diff --git a/internal/mcp/apps/logs.html b/internal/mcp/apps/logs.html index 29eebf79d..73290891d 100644 --- a/internal/mcp/apps/logs.html +++ b/internal/mcp/apps/logs.html @@ -5,13 +5,13 @@ `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Dn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)On(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=dn(l),S=0;S<_.length;S++)w=Math.max(_n(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var jn=function(){function e(){}return e}(),Mn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Nn=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Pn(e,t,n,r,i){var a=new Nn,o=Un(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Tn.lastIndex=0,h;(h=Tn.exec(o))!=null;){var g=h.index;g>m&&Fn(a,o.substring(m,g),t,p),Fn(a,h[2],t,p,h[1]),m=Tn.lastIndex}md){var te=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=zn(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=dn(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ln=se(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Rn(e){return!In(e)||!!Ln[e]}function zn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=dn(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return $r(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),$r(qr(i),`rgba`)}function Qr(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),$r(n,`rgba`)}function $r(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ei(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ti=new dt(100);function ni(e){if(V(e)){var t=ti.get(e);return t||(t=Yr(e,-.1),ti.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ri=Math.round;function ii(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var ai=1e-4;function oi(e){return e-ai}function si(e){return ri(e*1e3)/1e3}function ci(e){return ri(e*1e4)/1e4}function li(e){return`matrix(`+si(e[0])+`,`+si(e[1])+`,`+si(e[2])+`,`+si(e[3])+`,`+ci(e[4])+`,`+ci(e[5])+`)`}var ui={left:`start`,right:`end`,center:`middle`,middle:`middle`};function di(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function fi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function pi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function mi(e){return e&&!!e.image}function hi(e){return e&&!!e.svgElement}function gi(e){return mi(e)||hi(e)}function _i(e){return e.type===`linear`}function vi(e){return e.type===`radial`}function yi(e){return e&&(e.type===`linear`||e.type===`radial`)}function bi(e){return`url(#`+e+`)`}function xi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Si(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ri(o*He)+`deg, `+ri(s*He)+`deg)`),c.join(` `)}var Ci=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),wi=Array.prototype.slice;function Ti(e,t,n){return(t-e)*n+e}function Ei(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Vi,s=t;if(oe(t)){var c=Pi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Fi;else if(V(t)){if(!isNaN(+t))o=Fi;else{var l=Kr(t);l&&(s=l,o=Ri)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),_i(t)?o=zi:vi(t)&&(o=Bi),s=u}i===0?this.valType=o:(o!==this.valType||o===Vi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ui(r),c=Hi(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Wi:e[s];if((Ui(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ui(i))i===Ii?Ei(g,f[r],p[r],h):Di(g,f[r],p[r],h);else if(Hi(i)){var _=f[r],v=p[r],y=i===zi;e[s]={type:y?`linear`:`radial`,x:Ti(_.x,v.x,h),y:Ti(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ti(e.offset,n.offset,h),color:Ni(Ei([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ti(_.x2,v.x2,h),e[s].y2=Ti(_.y2,v.y2,h)):e[s].r=Ti(_.r,v.r,h)}else if(c)Ei(g,f[r],p[r],h),n||(e[s]=Ni(g));else{var b=Ti(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Fi?e[n]=e[n]+r:t===Ri?(Kr(e[n],Wi),Oi(Wi,Wi,r,1),e[n]=Ni(Wi)):t===Ii?Oi(e[n],e[n],r,1):t===Li&&ki(e[n],e[n],r,1)},e}(),Ki=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Mi(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Mi(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),qi=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Qi:Zi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,$r(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ea,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ea;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ma(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ga(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var _a=`__zr_style_`+Math.round(Math.random()*10),va={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ya={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};va[_a]=!0;var ba=[`z`,`z2`,`invisible`],xa=[`invisible`],Sa=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(ja[0]=ka(i)*n+e,ja[1]=Oa(i)*r+t,Ma[0]=ka(a)*n+e,Ma[1]=Oa(a)*r+t,l(s,ja,Ma),u(c,ja,Ma),i%=Aa,i<0&&(i+=Aa),a%=Aa,a<0&&(a+=Aa),i>a&&!o?a+=Aa:ii&&(Na[0]=ka(p)*n+e,Na[1]=Oa(p)*r+t,l(s,Na,s),u(c,Na,c))}var Ba={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Va=[],Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=Math.min,Ja=Math.max,Ya=Math.cos,Xa=Math.sin,Za=Math.abs,Qa=Math.PI,$a=Qa*2,eo=typeof Float32Array<`u`,to=[];function no(e){return Math.round(e/Qa*1e8)/1e8%2*Qa}function ro(e,t){var n=no(e[0]);n<0&&(n+=$a);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=$a?i=n+$a:t&&n-i>=$a?i=n-$a:!t&&n>i?i=n+($a-no(n-i)):t&&n0&&(this._ux=Za(n/Yi/e)||0,this._uy=Za(n/Yi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ba.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Za(e-this._xi),r=Za(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Ba.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Ba.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ba.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),to[0]=r,to[1]=i,ro(to,a),r=to[0],i=to[1];var o=i-r;return this.addData(Ba.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ya(i)*n+e,this._yi=Xa(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ba.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ba.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&eo&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Ua[0]=Ua[1]=Ga[0]=Ga[1]=Number.MAX_VALUE,Wa[0]=Wa[1]=Ka[0]=Ka[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Za(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Ba.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Ba.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Ba.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ya(D)*T+C,s=Xa(D)*E+w),m=Ja(T,E)*qa($a,Math.abs(O)),i=Ya(k)*T+C,a=Xa(k)*E+w;break;case Ba.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Ba.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Ba.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Ba.L:u=n[x++],d=n[x++];var w=Za(u-c),T=Za(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Ba.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Va),br(l,A,ee,N,D,Ha),e.bezierCurveTo(Va[1],Ha[1],Va[2],Ha[2],Va[3],Ha[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Ba.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Va),Dr(l,A,ee,D,Ha),e.quadraticCurveTo(Va[1],Ha[1],Va[2],Ha[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Ba.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Za(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Ya(ne)*F+te,s=Xa(ne)*I+P),c=Ya(R)*F+te,l=Xa(R)*I+P;break;case Ba.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+qa(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+qa(le,ce)),le-=ce,le>0&&e.lineTo(u+Ja(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ja(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Ba.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Ba,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ao(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=uo);var f=Math.atan2(c,s);return f<0&&(f+=uo),f>=r&&f<=i||f+uo>=r&&f+uo<=i}function po(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var mo=io.CMD,ho=Math.PI*2,go=1e-4;function _o(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&bo(),p=gr(t,r,a,s,yo[0]),f>1&&(m=gr(t,r,a,s,yo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);vo[0]=-c,vo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=ho-1e-4){r=0,i=ho;var u=a?1:-1;return o>=vo[0]+e&&o<=vo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=ho,i+=ho);for(var f=0,p=0;p<2;p++){var m=vo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=ho+h),(h>=r&&h<=i||h+ho>=r&&h+ho<=i)&&(h>Math.PI/2&&h1&&(n||(s+=po(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case mo.M:u=a[m++],d=a[m++],c=u,l=d;break;case mo.L:if(n){if(ao(c,l,a[m],a[m+1],t,r,i))return!0}else s+=po(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.C:if(n){if(oo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.Q:if(n){if(so(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=po(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(fo(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Co(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case mo.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ao(u,d,f,d,t,r,i)||ao(f,d,f,p,t,r,i)||ao(f,p,u,p,t,r,i)||ao(u,p,u,d,t,r,i))return!0}else s+=po(f,d,f,p,r,i),s+=po(u,p,u,d,r,i);break;case mo.Z:if(n){if(ao(c,l,u,d,t,r,i))return!0}else s+=po(c,l,u,d,r,i);c=u,l=d}}return!n&&!_o(l,d)&&(s+=po(c,l,u,d,r,i)||0),s!==0}function To(e,t,n){return wo(e,0,!1,t,n)}function Eo(e,t,n,r){return wo(e,t,!0,n,r)}var Do=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},va),Oo={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ya.style)},ko=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Ao=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Zi:t>.2?$i:Qi}if(e)return Qi}return Zi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ei(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new io(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Eo(a,o/s,e,t)))return!0}if(this.hasFill())return To(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Do,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Ro=Math.round;function zo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Ro(r*2)===Ro(i*2)&&(e.x1=e.x2=Vo(r,s,!0)),Ro(a*2)===Ro(o*2)&&(e.y1=e.y2=Vo(a,s,!0)),e):e}}function Bo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Vo(r,s,!0),e.y=Vo(i,s,!0),e.width=Math.max(Vo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Vo(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Vo(e,t,n){if(!t)return e;var r=Ro(e*2);return(r+Ro(t))%2==0?r/2:(r+(n?1:-1))/2}var Ho=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Uo={},Wo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ho},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Bo(Uo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Lo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ao);Wo.prototype.type=`rect`;var Go={fill:`#000`},Ko=2,qo={},Jo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ya.style)},Yo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Go,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&cs(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=os(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Mo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=as(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=is(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Ko,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),es(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Wo),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Io),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ts(e)&&(t=[e.fontStyle,e.fontWeight,$o(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Sa),Xo={left:!0,right:1,center:1},Zo={top:1,bottom:1,middle:1},Qo=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function $o(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function es(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var ws=Ts;function Ts(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Es(e,t,n)}function Es(e,t,n){return V(e)?Ds(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Ds(e){return!!ds(e).match(/%$/)}function Os(e,t,n){return isNaN(t)?n?``+e:+e:(t=fs(ps(0,t),us),e=(+e).toFixed(t),n?e:+e)}function ks(e){return e.sort(function(e,t){return e-t}),e}function As(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(hs(e*t)/t===e)return n}return js(e)}function js(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ps(0,(a<0?0:i-1-a)-r)}function Ms(e,t,n){var r=ms(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ys(2*ms(n||1)*ms(r))/bs,a=ys(ms(t))/bs,o=ps(0,_s(-i+a));return isFinite(o)||(o=NaN),o}function Ns(e,t){var n=ps(As(e),As(t)),r=e+t;return n>us?r:Os(r,n)}var Ps=vs(2,53)-1;function Fs(e){var t=xs*2;return(e%t+t)%t}function Is(e){return e>-ls&&e=10&&t++,t}function Vs(e,t){var n=Bs(e),r=vs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Os(e,-n)}function Hs(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Pc(){return[1/0,-1/0]}function Fc(e,t){zc(t)&&(te[1]&&(e[1]=t))}function Ic(e,t){zc(t)&&te[1]&&(e[1]=t)}function Rc(e,t){Bc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function zc(e){return e!=null&&isFinite(e)}function Bc(e,t){return zc(e)&&zc(t)&&e<=t}function Vc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Hc(e){Bc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Uc(){var e=`__ec_once_`+Wc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var Wc=Gs();function Gc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Kc(e){return e.value+``}function qc(e){return e+``}function Jc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Yc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Xc(e){return{overallReset:e}}var Zc=wc(),Qc=function(e,t,n,r){if(r){var i=Zc(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Zc(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},$c=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),el=`original`,tl=`arrayRows`,nl=`objectRows`,rl=`keyedColumns`,il=`typedArray`,al=`unknown`,ol=`column`,sl=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],cl=function(){function e(e){R(sl,function(t){this[t]=fe(e[t],e)},this)}return e}();function ll(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var ul=1,dl={},fl=wc(),pl=wc(),ml=[`emphasis`,`blur`,`select`],hl=[`normal`,`emphasis`,`blur`,`select`],gl=`highlight`,_l=`downplay`,vl=`select`,yl=`unselect`,bl=`toggleSelect`,xl=`selectchanged`;function Sl(e){return e!=null&&e!==`none`}function Cl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function wl(e){Cl(e,`emphasis`,2)}function Tl(e){e.hoverState===2&&Cl(e,`normal`,0)}function El(e){Cl(e,`blur`,1)}function Dl(e){e.hoverState===1&&Cl(e,`normal`,0)}function Ol(e){e.selected=!0}function kl(e){e.selected=!1}function Al(e,t,n){t(e,n)}function jl(e,t,n){Al(e,t,n),e.isGroup&&e.traverse(function(e){Al(e,t,n)})}function Ml(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Ao){var o=fl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Sl(s)||Sl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Sl(l.fill)&&Sl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ni(s)):!Sl(l.stroke)&&Sl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ni(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Pl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Fl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ml(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Il(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Nl(this,e,t,n);if(e===`blur`)return Fl(this,e,n);if(e===`select`)return Pl(this,e,n)}return n}function Ll(e){e.stateProxy=Il;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Il),n&&(n.stateProxy=Il)}function Rl(e,t){!Kl(e,t)&&!e.__highByOuter&&jl(e,wl)}function zl(e,t){!Kl(e,t)&&!e.__highByOuter&&jl(e,Tl)}function Bl(e,t){e.__highByOuter|=1<<(t||0),jl(e,wl)}function Vl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&jl(e,Tl)}function Hl(e){jl(e,El)}function Ul(e){jl(e,Dl)}function Wl(e){jl(e,Ol)}function Gl(e){jl(e,kl)}function Kl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function ql(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=pl(i),o=ll(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Dl(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Jl(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ru(e,t,n){uu(e,!0),jl(e,Ll),ou(e,t,n)}function iu(e){uu(e,!1)}function au(e,t,n,r){r?iu(e):ru(e,t,n)}function ou(e,t,n){var r=Zc(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var su=[`emphasis`,`blur`,`select`],cu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function lu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=xu(m),s*=xu(m));var h=(i===a?-1:1)*xu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Cu(d)*g-Su(d)*_,y=(t+r)/2+Su(d)*g+Cu(d)*_,b=Du([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Du(x,S);if(Eu(x,S)<=-1&&(C=wu),Eu(x,S)>=1&&(C=0),C<0){var w=Math.round(C/wu*1e6)/1e6;C=wu*2+w%2*wu}u.addData(l,v,y,o,s,b,C,d,a)}var ku=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Au=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ju(e){var t=new io;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=io.CMD,c=e.match(ku);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function nd(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function rd(e,t){var n,r=Zu(t.r,0),i=Zu(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Yu(c-s),p=f>Wu&&f%Wu;if(p>$u&&(f=p),!(r>$u))e.moveTo(l,u);else if(f>Wu-$u)e.moveTo(l+r*Ku(s),u+r*Gu(s)),e.arc(l,u,r,s,c,!d),i>$u&&(e.moveTo(l+i*Ku(c),u+i*Gu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ku(s),j=r*Gu(s),ee=i*Ku(c),M=i*Gu(c),N=f>$u;if(N){var te=t.cornerRadius;te&&(n=nd(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=Yu(r-i)/2;if(v=Qu(P,g),y=Qu(P,_),b=Qu(P,m),x=Qu(P,h),w=S=Zu(v,y),T=C=Zu(b,x),(S>$u||C>$u)&&(E=r*Ku(c),D=r*Gu(c),O=i*Ku(s),k=i*Gu(s),f$u){var oe=Qu(g,w),R=Qu(_,w),z=td(O,k,A,j,r,oe,d),se=td(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Ju(z.y0,z.x0),Ju(z.y1,z.x1),!d),e.arc(l,u,r,Ju(z.cy+z.y1,z.cx+z.x1),Ju(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Ju(se.y1,se.x1),Ju(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>$u)||!N)e.lineTo(l+ee,u+M);else if(T>$u){var oe=Qu(m,T),R=Qu(h,T),z=td(ee,M,E,D,i,-R,d),se=td(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Ju(z.y0,z.x0),Ju(z.y1,z.x1),!d),e.arc(l,u,i,Ju(z.cy+z.y1,z.cx+z.x1),Ju(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Ju(se.y1,se.x1),Ju(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var id=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ad=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new id},t.prototype.buildPath=function(e,t){rd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ao);ad.prototype.type=`sector`;var od=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),sd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new od},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Ao);sd.prototype.type=`ring`;function cd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=cd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sjd[1]){if(i=!1,Md.negativeSize||n)return i;var s=kd(jd[0]-Ad[1]),c=kd(Ad[0]-jd[1]);Dd(s,c)>Pd.len()&&(s=c||!Md.bidirectional)&&(Vt.scale(Nd,o,-c*r),Md.useDir&&Md.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Vd(e,t,n,r,i,a){Bd(`update`,e,t,n,r,i,a)}function Hd(e,t,n,r,i,a){Bd(`enter`,e,t,n,r,i,a)}function Ud(e){if(!e.__zr)return!0;for(var t=0;tSd,BezierCurve:()=>bd,BoundingRect:()=>tn,Circle:()=>Bu,CompoundPath:()=>Cd,Ellipse:()=>Hu,Group:()=>Ru,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Io,IncrementalDisplayable:()=>Ld,Line:()=>gd,LinearGradient:()=>Td,OrientedBoundingRect:()=>Fd,Path:()=>Ao,Point:()=>Vt,Polygon:()=>dd,Polyline:()=>pd,RadialGradient:()=>Ed,Rect:()=>Wo,Ring:()=>sd,Sector:()=>ad,Text:()=>Yo,WH:()=>Zd,XY:()=>Xd,applyTransform:()=>pf,calcZ2Range:()=>If,clipPointsByRect:()=>vf,clipRectByRect:()=>yf,createIcon:()=>bf,decomposeTransform:()=>Bf,ensureCopyRect:()=>Nf,ensureCopyTransform:()=>Pf,expandOrShrinkRect:()=>Tf,extendPath:()=>ef,extendShape:()=>Qd,getCurrentCanvasPainter:()=>Hf,getShapeClass:()=>nf,getTransform:()=>ff,groupTransition:()=>_f,initProps:()=>Hd,isBoundingRectAxisAligned:()=>jf,isElementRemoved:()=>Ud,lineLineIntersect:()=>Sf,linePolygonIntersect:()=>xf,makeImage:()=>af,makePath:()=>rf,mergePath:()=>sf,payloadDisableAnimation:()=>zf,registerShape:()=>tf,removeElement:()=>Wd,removeElementWithFadeOut:()=>Kd,resizePath:()=>cf,retrieveZInfo:()=>Ff,setTooltipConfig:()=>Of,subPixelOptimize:()=>df,subPixelOptimizeLine:()=>lf,subPixelOptimizeRect:()=>uf,transformDirection:()=>mf,traverseElements:()=>Af,traverseUpdateZ:()=>Lf,updateProps:()=>Vd}),Yd={},Xd=[`x`,`y`],Zd=[`width`,`height`];function Qd(e){return Ao.extend(e)}var $d=Iu;function ef(e,t){return $d(e,t)}function tf(e,t){Yd[e]=t}function nf(e){if(Yd.hasOwnProperty(e))return Yd[e]}function rf(e,t,n,r){var i=Fu(e,t);return n&&(r===`center`&&(n=of(n,i.getBoundingRect())),cf(i,n)),i}function af(e,t,n){var r=new Io({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(of(t,i))}}});return r}function of(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var sf=Lu;function cf(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function lf(e,t){return zo(e,e,{lineWidth:t}),e}function uf(e,t){return Bo(e,e,t),e}var df=Vo;function ff(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function pf(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function mf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:ms(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:ms(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=pf(a,t,n),ms(a[0])>ms(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function hf(e){return!e.isGroup}function gf(e){return e.shape!=null}function _f(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){hf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return gf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(hf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Vd(e,r,n,Zc(e).dataIndex)}}})}function vf(e,t){return z(e,function(e){var n=e[0];n=ps(n,t.x),n=fs(n,t.x+t.width);var r=e[1];return r=ps(r,t.y),r=fs(r,t.y+t.height),[n,r]})}function yf(e,t){var n=ps(e.x,t.x),r=fs(e.x+e.width,t.x+t.width),i=ps(e.y,t.y),a=fs(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function bf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Io(r)):rf(e.replace(`path://`,``),r,n,`center`)}function xf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Cf(p,m,u,d)/f;return!(g<0||g>1)}function Cf(e,t,n,r){return e*r-n*t}function wf(e){return e<=1e-6&&e>=-1e-6}function Tf(e,t,n,r,i){return t==null?e:(ge(t)?Ef[0]=Ef[1]=Ef[2]=Ef[3]=t:(Ef[0]=t[0],Ef[1]=t[1],Ef[2]=t[2],Ef[3]=t[3]),r&&(Ef[0]=ps(0,Ef[0]),Ef[1]=ps(0,Ef[1]),Ef[2]=ps(0,Ef[2]),Ef[3]=ps(0,Ef[3])),n&&(Ef[0]=-Ef[0],Ef[1]=-Ef[1],Ef[2]=-Ef[2],Ef[3]=-Ef[3]),Df(e,Ef,`x`,`width`,3,1,i&&i[0]||0),Df(e,Ef,`y`,`height`,0,2,i&&i[1]||0),e)}var Ef=[0,0,0,0];function Df(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ps(0,fs(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:ms(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Of(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Zc(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function kf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Af(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Lf(e,t,n){Rf(e,t,n,-1/0)}function Rf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Up=(e={},e[tl+`_`+ol]={pure:!0,appendData:i},e[tl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nl]={pure:!0,appendData:i},e[rl]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[el]={appendData:i},e[il]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||ec(``),this._opFn=um[e],this._rvalFloat=Us(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Us(e),this._rvalFloat)},e})();var dm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Us(e),r=ge(t)?t:Us(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Us(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Us(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function fm(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function pm(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,hm=typeof Uint16Array>`u`?Array:Uint16Array,gm=typeof Int32Array>`u`?Array:Int32Array,_m=typeof Float64Array>`u`?Array:Float64Array,vm={float:_m,int:gm,ordinal:Array,number:Array,time:_m},ym;function bm(e){return e>65535?mm:hm}function xm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Sm(e,t,n,r,i){var a=vm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(bm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return lm(e[r],this._dimensions[r])}ym={arrayRows:e,objectRows:function(e,t,n,r){return lm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return lm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),wm=wc(),Tm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Em=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=km(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Rp(this.source),n=!Am(e),r=``,i=[],a=0,o=0;a30}var jm=_e,Mm=z,Nm=typeof Int32Array>`u`?Array:Int32Array,Pm=`e\0\0`,Fm=-1,Im=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Lm=[`_approximateExtent`],Rm,zm,Bm,Vm,Hm,Um,Wm,tee=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Dm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():jm(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,jm(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){jm(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Qc(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Mm(this.dimensions,this._getDimInfo,this),this.hostModel),Hm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Rm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Nm(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function nee(e,t){kp(e)||(e=jp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=ree(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Am(o),c=r===e.dimensionsDefine,l=c?km(e):Om(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new gm(o),p=0;p0&&(e.name+=t-1)}),new Em({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function ree(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function iee(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Gm={},Km={},qm=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Gm,!0),this._normalMasterList=n(Km,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Gm[e]=t;return}Km[e]=t},e.get=function(e){return Km[e]||Gm[e]},e}();function aee(e){return!!Gm[e]}var oee=Le();function Jm(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=oee.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function see(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!aee(n)&&(i=0))}return{coordSysType:n,kind:i}}function cee(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=see(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var lee=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function uee(e){var t=e.get(`coordinateSystem`),n=new lee(t),r=dee[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dee={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Oc).models[0],a=e.getReferringComponents(`yAxis`,Oc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),Ym(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),Ym(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Oc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),Ym(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Oc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),Ym(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),Ym(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),Ym(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Oc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function Ym(e){return e.get(`type`)===`category`}function Xm(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;fee(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function fee(e){return!Dm(e.schema)}function Zm(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function Qm(e,t){return Zm(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function pee(e,t){var n=e.get(`coordinateSystem`),r=qm.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=om(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mee(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function $m(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=jp(e)):(i=r.getSource(),a=i.sourceFormat===el);var o=uee(t),s=pee(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Cp,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=nee(i,u),f=mee(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=Xm(t,{schema:d,store:p}),h=new tee(d,t);h.setCalculationInfo(m);var g=f!=null&&eh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function eh(e){if(e.sourceFormat===`original`)return!B(oc(th(e.data||[])))}function th(e){for(var t=0;t=0&&n.push(e)}),n}}function ah(e,t){return F(F({},e,!0),t,!0)}var oh=Math.log(2);function sh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function vee(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?ch(s,o):ch(o,s))}function ph(e){return e.nodeName.toUpperCase()===`CANVAS`}var yee=/([&<>"'])/g,mh={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function hh(e){return e==null?``:(e+``).replace(yee,function(e,t){return mh[t]})}var gh={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},_h={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},vh=`ZH`,yh=`EN`,bh=yh,xh={},Sh={},Ch=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||bh).toUpperCase().indexOf(vh)>-1?vh:bh}():bh;function wh(e,t){e=e.toUpperCase(),Sh[e]=new gp(t),xh[e]=t}function Th(e){if(V(e)){var t=xh[e.toUpperCase()]||{};return e===vh||e===yh?P(t):F(P(t),P(xh[bh]),!1)}return F(P(e),P(xh[bh]),!1)}function Eh(e){return Sh[e]}function Dh(){return Sh[bh]}wh(yh,gh),wh(vh,_h);var Oh=null;function kh(){return Oh}function Ah(e,t){var n=kh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function jh(e){var t=e.brk;return t?t.breaks:[]}function Mh(e){var t=e.brk;return t?t.hasBreaks():!1}var Nh=1e3,Ph=Nh*60,Fh=Ph*60,Ih=Fh*24,Lh=Ih*365,bee={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Rh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},xee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,zh=`{yyyy}-{MM}-{dd}`,Bh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:zh,hour:zh+` `+Rh.hour,minute:zh+` `+Rh.minute,second:zh+` `+Rh.second,millisecond:xee},Vh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],See=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Cee(e){return!V(e)&&!me(e)?Hh(e):e}function Hh(e){e||={};var t={},n=!0;return R(Vh,function(t){n&&=e[t]==null}),R(Vh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Vh[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=Rh[r]:bee[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Uh(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Wh(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function Gh(e){return e===Wh(e)}function Kh(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function qh(e,t,n,r){var i=Rs(e),a=i[Zh(n)](),o=i[Qh(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[$h(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[eg(n)](),d=(u-1)%12+1,f=i[tg(n)](),p=i[ng(n)](),m=i[rg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof gp?r:Eh(r||Ch)||Dh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Uh(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Uh(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Uh(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Uh(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Uh(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Uh(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Uh(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Uh(m,3)).replace(/{S}/g,m+``)}function Jh(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=kh();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Yh(e.value,i);a=n[u][u][0]}}return qh(new Date(e.value),a,i,r)}function Yh(e,t){var n=Rs(e),r=n[Qh(t)]()+1,i=n[$h(t)](),a=n[eg(t)](),o=n[tg(t)](),s=n[ng(t)](),c=n[rg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Xh(e,t,n){switch(t){case`year`:e[ag(n)](0);case`month`:e[og(n)](1);case`day`:e[sg(n)](0);case`hour`:e[cg(n)](0);case`minute`:e[lg(n)](0);case`second`:e[ug(n)](0)}return e}function Zh(e){return e?`getUTCFullYear`:`getFullYear`}function Qh(e){return e?`getUTCMonth`:`getMonth`}function $h(e){return e?`getUTCDate`:`getDate`}function eg(e){return e?`getUTCHours`:`getHours`}function tg(e){return e?`getUTCMinutes`:`getMinutes`}function ng(e){return e?`getUTCSeconds`:`getSeconds`}function rg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function ig(e){return e?`setUTCFullYear`:`setFullYear`}function ag(e){return e?`setUTCMonth`:`setMonth`}function og(e){return e?`setUTCDate`:`setDate`}function sg(e){return e?`setUTCHours`:`setHours`}function cg(e){return e?`setUTCMinutes`:`setMinutes`}function lg(e){return e?`setUTCSeconds`:`setSeconds`}function ug(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function dg(e){if(!Ws(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function fg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var pg=De;function mg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Js(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Rs(e):e;if(!isNaN(+c))return qh(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Us(e);return a(l)?dg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var hg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],gg=function(e,t){return`{`+e+(t??``)+`}`};function _g(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function yg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var bg=R,xg=[`left`,`right`,`top`,`bottom`,`width`,`height`],Sg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Cg(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var wg=Cg;pe(Cg,`vertical`),pe(Cg,`horizontal`);function Tg(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Eg(e,t,n){n=pg(n||0);var r=t.width,i=t.height,a=ws(e.left,r),o=ws(e.top,i),s=ws(e.right,r),c=ws(e.bottom,i),l=ws(e.width,r),u=ws(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Dg={rect:1,point:2};function Og(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=Jm(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Dg.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Dg.point,s=u,i=o.dataToPoint(l))}return a??=Dg.rect,a===Dg.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function kg(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Eg(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Ag(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function jg(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(Sg[0],0),a=o(Sg[1],1);c(Sg[0],e,i),c(Sg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(bg(n,function(t){c[t]=e[t]}),bg(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return kc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Tg(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(gp);et(Fg,gp),at(Fg),hee(Fg),ih(Fg,Ig);function Ig(e){var t=[];return R(Fg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Lg=wc(),Rg=wc(),zg=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=rc(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return Hg(this,Lg,r,i,e,t,n)},e.prototype.clearColorPalette=function(){Ug(this,Lg)},e}();function Bg(e,t,n,r){return Hg(e,Rg,rc(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function Vg(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function Hg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Vg(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Ug(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Wg=/\{@(.+?)\}/g,Gg=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return _g(i,s).replace(Wg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=nm(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return nm(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Kg(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function qg(e){return new Jg(e)}var Jg=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(c_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?il:el,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Ap(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Ap(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&l_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&l_(``),a.push(t),o.push(e._getVersionSign())}),n?i=i_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Mp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;tn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return $r(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),$r(qr(i),`rgba`)}function Qr(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),$r(n,`rgba`)}function $r(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ei(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ti=new dt(100);function ni(e){if(V(e)){var t=ti.get(e);return t||(t=Yr(e,-.1),ti.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ri=Math.round;function ii(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var ai=1e-4;function oi(e){return e-ai}function si(e){return ri(e*1e3)/1e3}function ci(e){return ri(e*1e4)/1e4}function li(e){return`matrix(`+si(e[0])+`,`+si(e[1])+`,`+si(e[2])+`,`+si(e[3])+`,`+ci(e[4])+`,`+ci(e[5])+`)`}var ui={left:`start`,right:`end`,center:`middle`,middle:`middle`};function di(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function fi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function pi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function mi(e){return e&&!!e.image}function hi(e){return e&&!!e.svgElement}function gi(e){return mi(e)||hi(e)}function _i(e){return e.type===`linear`}function vi(e){return e.type===`radial`}function yi(e){return e&&(e.type===`linear`||e.type===`radial`)}function bi(e){return`url(#`+e+`)`}function xi(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Si(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ri(o*He)+`deg, `+ri(s*He)+`deg)`),c.join(` `)}var Ci=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),wi=Array.prototype.slice;function Ti(e,t,n){return(t-e)*n+e}function Ei(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Vi,s=t;if(oe(t)){var c=Pi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Fi;else if(V(t)){if(!isNaN(+t))o=Fi;else{var l=Kr(t);l&&(s=l,o=Ri)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),_i(t)?o=zi:vi(t)&&(o=Bi),s=u}i===0?this.valType=o:(o!==this.valType||o===Vi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Ui(r),c=Hi(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Wi:e[s];if((Ui(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Ui(i))i===Ii?Ei(g,f[r],p[r],h):Di(g,f[r],p[r],h);else if(Hi(i)){var _=f[r],v=p[r],y=i===zi;e[s]={type:y?`linear`:`radial`,x:Ti(_.x,v.x,h),y:Ti(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ti(e.offset,n.offset,h),color:Ni(Ei([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ti(_.x2,v.x2,h),e[s].y2=Ti(_.y2,v.y2,h)):e[s].r=Ti(_.r,v.r,h)}else if(c)Ei(g,f[r],p[r],h),n||(e[s]=Ni(g));else{var b=Ti(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Fi?e[n]=e[n]+r:t===Ri?(Kr(e[n],Wi),Oi(Wi,Wi,r,1),e[n]=Ni(Wi)):t===Ii?Oi(e[n],e[n],r,1):t===Li&&ki(e[n],e[n],r,1)},e}(),Ki=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Mi(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Mi(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),qi=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Qi:Zi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,$r(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ea,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ea;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ma(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ga(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var _a=`__zr_style_`+Math.round(Math.random()*10),va={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ya={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};va[_a]=!0;var ba=[`z`,`z2`,`invisible`],xa=[`invisible`],Sa=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(ja[0]=ka(i)*n+e,ja[1]=Oa(i)*r+t,Ma[0]=ka(a)*n+e,Ma[1]=Oa(a)*r+t,l(s,ja,Ma),u(c,ja,Ma),i%=Aa,i<0&&(i+=Aa),a%=Aa,a<0&&(a+=Aa),i>a&&!o?a+=Aa:ii&&(Na[0]=ka(p)*n+e,Na[1]=Oa(p)*r+t,l(s,Na,s),u(c,Na,c))}var Ba={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Va=[],Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=Math.min,Ja=Math.max,Ya=Math.cos,Xa=Math.sin,Za=Math.abs,Qa=Math.PI,$a=Qa*2,eo=typeof Float32Array<`u`,to=[];function no(e){return Math.round(e/Qa*1e8)/1e8%2*Qa}function ro(e,t){var n=no(e[0]);n<0&&(n+=$a);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=$a?i=n+$a:t&&n-i>=$a?i=n-$a:!t&&n>i?i=n+($a-no(n-i)):t&&n0&&(this._ux=Za(n/Yi/e)||0,this._uy=Za(n/Yi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Ba.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Za(e-this._xi),r=Za(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Ba.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Ba.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Ba.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),to[0]=r,to[1]=i,ro(to,a),r=to[0],i=to[1];var o=i-r;return this.addData(Ba.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Ya(i)*n+e,this._yi=Xa(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Ba.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Ba.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&eo&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Ua[0]=Ua[1]=Ga[0]=Ga[1]=Number.MAX_VALUE,Wa[0]=Wa[1]=Ka[0]=Ka[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Za(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Ba.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Ba.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Ba.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Ya(D)*T+C,s=Xa(D)*E+w),m=Ja(T,E)*qa($a,Math.abs(O)),i=Ya(k)*T+C,a=Xa(k)*E+w;break;case Ba.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Ba.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Ba.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Ba.L:u=n[x++],d=n[x++];var w=Za(u-c),T=Za(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Ba.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Va),br(l,A,ee,N,D,Ha),e.bezierCurveTo(Va[1],Ha[1],Va[2],Ha[2],Va[3],Ha[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Ba.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Va),Dr(l,A,ee,D,Ha),e.quadraticCurveTo(Va[1],Ha[1],Va[2],Ha[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Ba.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Za(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Ya(ne)*F+te,s=Xa(ne)*I+P),c=Ya(R)*F+te,l=Xa(R)*I+P;break;case Ba.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+qa(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+qa(le,ce)),le-=ce,le>0&&e.lineTo(u+Ja(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ja(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Ba.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Ba,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ao(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=uo);var f=Math.atan2(c,s);return f<0&&(f+=uo),f>=r&&f<=i||f+uo>=r&&f+uo<=i}function po(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var mo=io.CMD,ho=Math.PI*2,go=1e-4;function _o(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&bo(),p=gr(t,r,a,s,yo[0]),f>1&&(m=gr(t,r,a,s,yo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);vo[0]=-c,vo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=ho-1e-4){r=0,i=ho;var u=a?1:-1;return o>=vo[0]+e&&o<=vo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=ho,i+=ho);for(var f=0,p=0;p<2;p++){var m=vo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=ho+h),(h>=r&&h<=i||h+ho>=r&&h+ho<=i)&&(h>Math.PI/2&&h1&&(n||(s+=po(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case mo.M:u=a[m++],d=a[m++],c=u,l=d;break;case mo.L:if(n){if(ao(c,l,a[m],a[m+1],t,r,i))return!0}else s+=po(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.C:if(n){if(oo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=xo(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.Q:if(n){if(so(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case mo.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=po(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(fo(_,v,b,x,x+S,C,t,w,i))return!0}else s+=Co(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case mo.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ao(u,d,f,d,t,r,i)||ao(f,d,f,p,t,r,i)||ao(f,p,u,p,t,r,i)||ao(u,p,u,d,t,r,i))return!0}else s+=po(f,d,f,p,r,i),s+=po(u,p,u,d,r,i);break;case mo.Z:if(n){if(ao(c,l,u,d,t,r,i))return!0}else s+=po(c,l,u,d,r,i);c=u,l=d}}return!n&&!_o(l,d)&&(s+=po(c,l,u,d,r,i)||0),s!==0}function To(e,t,n){return wo(e,0,!1,t,n)}function Eo(e,t,n,r){return wo(e,t,!0,n,r)}var Do=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},va),Oo={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ya.style)},ko=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Ao=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Zi:t>.2?$i:Qi}if(e)return Qi}return Zi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ei(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new io(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Eo(a,o/s,e,t)))return!0}if(this.hasFill())return To(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Do,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Ro=Math.round;function zo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Ro(r*2)===Ro(i*2)&&(e.x1=e.x2=Vo(r,s,!0)),Ro(a*2)===Ro(o*2)&&(e.y1=e.y2=Vo(a,s,!0)),e):e}}function Bo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Vo(r,s,!0),e.y=Vo(i,s,!0),e.width=Math.max(Vo(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Vo(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Vo(e,t,n){if(!t)return e;var r=Ro(e*2);return(r+Ro(t))%2==0?r/2:(r+(n?1:-1))/2}var Ho=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Uo={},Wo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Ho},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Bo(Uo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Lo(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Ao);Wo.prototype.type=`rect`;var Go={fill:`#000`},Ko=2,qo={},Jo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ya.style)},Yo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Go,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&cs(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=os(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Mo),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=as(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=is(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Ko,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),es(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Wo),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Io),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ts(e)&&(t=[e.fontStyle,e.fontWeight,$o(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Sa),Xo={left:!0,right:1,center:1},Zo={top:1,bottom:1,middle:1},Qo=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function $o(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function es(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var ws=Ts;function Ts(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Es(e,t,n)}function Es(e,t,n){return V(e)?Ds(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Ds(e){return!!ds(e).match(/%$/)}function Os(e,t,n){return isNaN(t)?n?``+e:+e:(t=fs(ps(0,t),us),e=(+e).toFixed(t),n?e:+e)}function ks(e){return e.sort(function(e,t){return e-t}),e}function As(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(hs(e*t)/t===e)return n}return js(e)}function js(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ps(0,(a<0?0:i-1-a)-r)}function Ms(e,t,n){var r=ms(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=ys(2*ms(n||1)*ms(r))/bs,a=ys(ms(t))/bs,o=ps(0,_s(-i+a));return isFinite(o)||(o=NaN),o}function Ns(e,t){var n=ps(As(e),As(t)),r=e+t;return n>us?r:Os(r,n)}var Ps=vs(2,53)-1;function Fs(e){var t=xs*2;return(e%t+t)%t}function Is(e){return e>-ls&&e=10&&t++,t}function Vs(e,t){var n=Bs(e),r=vs(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,Os(e,-n)}function Hs(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Pc(){return[1/0,-1/0]}function Fc(e,t){zc(t)&&(te[1]&&(e[1]=t))}function Ic(e,t){zc(t)&&te[1]&&(e[1]=t)}function Rc(e,t){Bc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function zc(e){return e!=null&&isFinite(e)}function Bc(e,t){return zc(e)&&zc(t)&&e<=t}function Vc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Hc(e){Bc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Uc(){var e=`__ec_once_`+Wc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var Wc=Gs();function Gc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Kc(e){return e.value+``}function qc(e){return e+``}function Jc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Yc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Xc(e){return{overallReset:e}}var Zc=wc(),Qc=function(e,t,n,r){if(r){var i=Zc(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Zc(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},$c=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),el=`original`,tl=`arrayRows`,nl=`objectRows`,rl=`keyedColumns`,il=`typedArray`,al=`unknown`,ol=`column`,sl=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],cl=function(){function e(e){R(sl,function(t){this[t]=fe(e[t],e)},this)}return e}();function ll(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var ul=1,dl={},fl=wc(),pl=wc(),ml=[`emphasis`,`blur`,`select`],hl=[`normal`,`emphasis`,`blur`,`select`],gl=`highlight`,_l=`downplay`,vl=`select`,yl=`unselect`,bl=`toggleSelect`,xl=`selectchanged`;function Sl(e){return e!=null&&e!==`none`}function Cl(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function wl(e){Cl(e,`emphasis`,2)}function Tl(e){e.hoverState===2&&Cl(e,`normal`,0)}function El(e){Cl(e,`blur`,1)}function Dl(e){e.hoverState===1&&Cl(e,`normal`,0)}function Ol(e){e.selected=!0}function kl(e){e.selected=!1}function Al(e,t,n){t(e,n)}function jl(e,t,n){Al(e,t,n),e.isGroup&&e.traverse(function(e){Al(e,t,n)})}function Ml(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Ao){var o=fl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Sl(s)||Sl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Sl(l.fill)&&Sl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ni(s)):!Sl(l.stroke)&&Sl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ni(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Pl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Fl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ml(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Il(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Nl(this,e,t,n);if(e===`blur`)return Fl(this,e,n);if(e===`select`)return Pl(this,e,n)}return n}function Ll(e){e.stateProxy=Il;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Il),n&&(n.stateProxy=Il)}function Rl(e,t){!Kl(e,t)&&!e.__highByOuter&&jl(e,wl)}function zl(e,t){!Kl(e,t)&&!e.__highByOuter&&jl(e,Tl)}function Bl(e,t){e.__highByOuter|=1<<(t||0),jl(e,wl)}function Vl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&jl(e,Tl)}function Hl(e){jl(e,El)}function Ul(e){jl(e,Dl)}function Wl(e){jl(e,Ol)}function Gl(e){jl(e,kl)}function Kl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function ql(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=pl(i),o=ll(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Dl(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Jl(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ru(e,t,n){uu(e,!0),jl(e,Ll),ou(e,t,n)}function iu(e){uu(e,!1)}function au(e,t,n,r){r?iu(e):ru(e,t,n)}function ou(e,t,n){var r=Zc(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var su=[`emphasis`,`blur`,`select`],cu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function lu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=xu(m),s*=xu(m));var h=(i===a?-1:1)*xu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Cu(d)*g-Su(d)*_,y=(t+r)/2+Su(d)*g+Cu(d)*_,b=Du([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Du(x,S);if(Eu(x,S)<=-1&&(C=wu),Eu(x,S)>=1&&(C=0),C<0){var w=Math.round(C/wu*1e6)/1e6;C=wu*2+w%2*wu}u.addData(l,v,y,o,s,b,C,d,a)}var ku=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Au=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function ju(e){var t=new io;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=io.CMD,c=e.match(ku);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function nd(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function rd(e,t){var n,r=Zu(t.r,0),i=Zu(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Yu(c-s),p=f>Wu&&f%Wu;if(p>$u&&(f=p),!(r>$u))e.moveTo(l,u);else if(f>Wu-$u)e.moveTo(l+r*Ku(s),u+r*Gu(s)),e.arc(l,u,r,s,c,!d),i>$u&&(e.moveTo(l+i*Ku(c),u+i*Gu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Ku(s),j=r*Gu(s),ee=i*Ku(c),M=i*Gu(c),N=f>$u;if(N){var te=t.cornerRadius;te&&(n=nd(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=Yu(r-i)/2;if(v=Qu(P,g),y=Qu(P,_),b=Qu(P,m),x=Qu(P,h),w=S=Zu(v,y),T=C=Zu(b,x),(S>$u||C>$u)&&(E=r*Ku(c),D=r*Gu(c),O=i*Ku(s),k=i*Gu(s),f$u){var oe=Qu(g,w),R=Qu(_,w),z=td(O,k,A,j,r,oe,d),se=td(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Ju(z.y0,z.x0),Ju(z.y1,z.x1),!d),e.arc(l,u,r,Ju(z.cy+z.y1,z.cx+z.x1),Ju(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Ju(se.y1,se.x1),Ju(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>$u)||!N)e.lineTo(l+ee,u+M);else if(T>$u){var oe=Qu(m,T),R=Qu(h,T),z=td(ee,M,E,D,i,-R,d),se=td(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Ju(z.y0,z.x0),Ju(z.y1,z.x1),!d),e.arc(l,u,i,Ju(z.cy+z.y1,z.cx+z.x1),Ju(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Ju(se.y1,se.x1),Ju(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var id=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ad=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new id},t.prototype.buildPath=function(e,t){rd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Ao);ad.prototype.type=`sector`;var od=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),sd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new od},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Ao);sd.prototype.type=`ring`;function cd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=cd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sjd[1]){if(i=!1,Md.negativeSize||n)return i;var s=kd(jd[0]-Ad[1]),c=kd(Ad[0]-jd[1]);Dd(s,c)>Pd.len()&&(s=c||!Md.bidirectional)&&(Vt.scale(Nd,o,-c*r),Md.useDir&&Md.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Vd(e,t,n,r,i,a){Bd(`update`,e,t,n,r,i,a)}function Hd(e,t,n,r,i,a){Bd(`enter`,e,t,n,r,i,a)}function Ud(e){if(!e.__zr)return!0;for(var t=0;tSd,BezierCurve:()=>bd,BoundingRect:()=>tn,Circle:()=>Bu,CompoundPath:()=>Cd,Ellipse:()=>Hu,Group:()=>Ru,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Io,IncrementalDisplayable:()=>Ld,Line:()=>gd,LinearGradient:()=>Td,OrientedBoundingRect:()=>Fd,Path:()=>Ao,Point:()=>Vt,Polygon:()=>dd,Polyline:()=>pd,RadialGradient:()=>Ed,Rect:()=>Wo,Ring:()=>sd,Sector:()=>ad,Text:()=>Yo,WH:()=>Zd,XY:()=>Xd,applyTransform:()=>pf,calcZ2Range:()=>If,clipPointsByRect:()=>vf,clipRectByRect:()=>yf,createIcon:()=>bf,decomposeTransform:()=>Bf,ensureCopyRect:()=>Nf,ensureCopyTransform:()=>Pf,expandOrShrinkRect:()=>Tf,extendPath:()=>ef,extendShape:()=>Qd,getCurrentCanvasPainter:()=>Hf,getShapeClass:()=>nf,getTransform:()=>ff,groupTransition:()=>_f,initProps:()=>Hd,isBoundingRectAxisAligned:()=>jf,isElementRemoved:()=>Ud,lineLineIntersect:()=>Sf,linePolygonIntersect:()=>xf,makeImage:()=>af,makePath:()=>rf,mergePath:()=>sf,payloadDisableAnimation:()=>zf,registerShape:()=>tf,removeElement:()=>Wd,removeElementWithFadeOut:()=>Kd,resizePath:()=>cf,retrieveZInfo:()=>Ff,setTooltipConfig:()=>Of,subPixelOptimize:()=>df,subPixelOptimizeLine:()=>lf,subPixelOptimizeRect:()=>uf,transformDirection:()=>mf,traverseElements:()=>Af,traverseUpdateZ:()=>Lf,updateProps:()=>Vd}),Yd={},Xd=[`x`,`y`],Zd=[`width`,`height`];function Qd(e){return Ao.extend(e)}var $d=Iu;function ef(e,t){return $d(e,t)}function tf(e,t){Yd[e]=t}function nf(e){if(Yd.hasOwnProperty(e))return Yd[e]}function rf(e,t,n,r){var i=Fu(e,t);return n&&(r===`center`&&(n=of(n,i.getBoundingRect())),cf(i,n)),i}function af(e,t,n){var r=new Io({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(of(t,i))}}});return r}function of(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var sf=Lu;function cf(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function lf(e,t){return zo(e,e,{lineWidth:t}),e}function uf(e,t){return Bo(e,e,t),e}var df=Vo;function ff(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function pf(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function mf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:ms(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:ms(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=pf(a,t,n),ms(a[0])>ms(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function hf(e){return!e.isGroup}function gf(e){return e.shape!=null}function _f(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){hf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return gf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(hf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Vd(e,r,n,Zc(e).dataIndex)}}})}function vf(e,t){return z(e,function(e){var n=e[0];n=ps(n,t.x),n=fs(n,t.x+t.width);var r=e[1];return r=ps(r,t.y),r=fs(r,t.y+t.height),[n,r]})}function yf(e,t){var n=ps(e.x,t.x),r=fs(e.x+e.width,t.x+t.width),i=ps(e.y,t.y),a=fs(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function bf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Io(r)):rf(e.replace(`path://`,``),r,n,`center`)}function xf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Cf(p,m,u,d)/f;return!(g<0||g>1)}function Cf(e,t,n,r){return e*r-n*t}function wf(e){return e<=1e-6&&e>=-1e-6}function Tf(e,t,n,r,i){return t==null?e:(ge(t)?Ef[0]=Ef[1]=Ef[2]=Ef[3]=t:(Ef[0]=t[0],Ef[1]=t[1],Ef[2]=t[2],Ef[3]=t[3]),r&&(Ef[0]=ps(0,Ef[0]),Ef[1]=ps(0,Ef[1]),Ef[2]=ps(0,Ef[2]),Ef[3]=ps(0,Ef[3])),n&&(Ef[0]=-Ef[0],Ef[1]=-Ef[1],Ef[2]=-Ef[2],Ef[3]=-Ef[3]),Df(e,Ef,`x`,`width`,3,1,i&&i[0]||0),Df(e,Ef,`y`,`height`,0,2,i&&i[1]||0),e)}var Ef=[0,0,0,0];function Df(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ps(0,fs(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:ms(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Of(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Zc(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function kf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Af(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Lf(e,t,n){Rf(e,t,n,-1/0)}function Rf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Up=(e={},e[tl+`_`+ol]={pure:!0,appendData:i},e[tl+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nl]={pure:!0,appendData:i},e[rl]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[el]={appendData:i},e[il]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||ec(``),this._opFn=um[e],this._rvalFloat=Us(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Us(e),this._rvalFloat)},e})();var dm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Us(e),r=ge(t)?t:Us(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Us(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Us(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function fm(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function pm(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,hm=typeof Uint16Array>`u`?Array:Uint16Array,gm=typeof Int32Array>`u`?Array:Int32Array,_m=typeof Float64Array>`u`?Array:Float64Array,vm={float:_m,int:gm,ordinal:Array,number:Array,time:_m},ym;function bm(e){return e>65535?mm:hm}function xm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Sm(e,t,n,r,i){var a=vm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(bm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return lm(e[r],this._dimensions[r])}ym={arrayRows:e,objectRows:function(e,t,n,r){return lm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return lm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),wm=wc(),Tm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Em=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=km(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Rp(this.source),n=!Am(e),r=``,i=[],a=0,o=0;a30}var jm=_e,Mm=z,Nm=typeof Int32Array>`u`?Array:Int32Array,Pm=`e\0\0`,Fm=-1,Im=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Lm=[`_approximateExtent`],Rm,zm,Bm,Vm,Hm,Um,Wm,tee=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Dm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():jm(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,jm(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){jm(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Qc(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Mm(this.dimensions,this._getDimInfo,this),this.hostModel),Hm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Rm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Nm(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function nee(e,t){kp(e)||(e=jp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=ree(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Am(o),c=r===e.dimensionsDefine,l=c?km(e):Om(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new gm(o),p=0;p0&&(e.name+=t-1)}),new Em({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function ree(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function iee(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Gm={},Km={},qm=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Gm,!0),this._normalMasterList=n(Km,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Gm[e]=t;return}Km[e]=t},e.get=function(e){return Km[e]||Gm[e]},e}();function aee(e){return!!Gm[e]}var oee=Le();function Jm(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=oee.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function see(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!aee(n)&&(i=0))}return{coordSysType:n,kind:i}}function cee(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=see(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var lee=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function uee(e){var t=e.get(`coordinateSystem`),n=new lee(t),r=dee[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var dee={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Oc).models[0],a=e.getReferringComponents(`yAxis`,Oc).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),Ym(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),Ym(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Oc).models[0];t.coordSysDims=[`single`],n.set(`single`,i),Ym(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Oc).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),Ym(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),Ym(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),Ym(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Oc).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function Ym(e){return e.get(`type`)===`category`}function Xm(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;fee(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function fee(e){return!Dm(e.schema)}function Zm(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function Qm(e,t){return Zm(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function pee(e,t){var n=e.get(`coordinateSystem`),r=qm.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=om(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mee(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function $m(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=jp(e)):(i=r.getSource(),a=i.sourceFormat===el);var o=uee(t),s=pee(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Cp,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=nee(i,u),f=mee(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=Xm(t,{schema:d,store:p}),h=new tee(d,t);h.setCalculationInfo(m);var g=f!=null&&eh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function eh(e){if(e.sourceFormat===`original`)return!B(oc(th(e.data||[])))}function th(e){for(var t=0;t=0&&n.push(e)}),n}}function ah(e,t){return F(F({},e,!0),t,!0)}var oh=Math.log(2);function sh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function vee(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?ch(s,o):ch(o,s))}function ph(e){return e.nodeName.toUpperCase()===`CANVAS`}var mh=/([&<>"'])/g,hh={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function gh(e){return e==null?``:(e+``).replace(mh,function(e,t){return hh[t]})}var _h={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},vh={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},yh=`ZH`,bh=`EN`,xh=bh,Sh={},Ch={},wh=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||xh).toUpperCase().indexOf(yh)>-1?yh:xh}():xh;function Th(e,t){e=e.toUpperCase(),Ch[e]=new gp(t),Sh[e]=t}function Eh(e){if(V(e)){var t=Sh[e.toUpperCase()]||{};return e===yh||e===bh?P(t):F(P(t),P(Sh[xh]),!1)}return F(P(e),P(Sh[xh]),!1)}function Dh(e){return Ch[e]}function Oh(){return Ch[xh]}Th(bh,_h),Th(yh,vh);var kh=null;function Ah(){return kh}function jh(e,t){var n=Ah(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Mh(e){var t=e.brk;return t?t.breaks:[]}function Nh(e){var t=e.brk;return t?t.hasBreaks():!1}var Ph=1e3,Fh=Ph*60,Ih=Fh*60,Lh=Ih*24,Rh=Lh*365,yee={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},zh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},bee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Bh=`{yyyy}-{MM}-{dd}`,Vh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Bh,hour:Bh+` `+zh.hour,minute:Bh+` `+zh.minute,second:Bh+` `+zh.second,millisecond:bee},Hh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],xee=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function Uh(e){return!V(e)&&!me(e)?Wh(e):e}function Wh(e){e||={};var t={},n=!0;return R(Hh,function(t){n&&=e[t]==null}),R(Hh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Hh[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=zh[r]:yee[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function Gh(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function Kh(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function qh(e){return e===Kh(e)}function Jh(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function Yh(e,t,n,r){var i=Rs(e),a=i[$h(n)](),o=i[eg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[tg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ng(n)](),d=(u-1)%12+1,f=i[rg(n)](),p=i[ig(n)](),m=i[ag(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof gp?r:Dh(r||wh)||Oh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,Gh(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,Gh(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,Gh(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,Gh(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,Gh(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,Gh(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,Gh(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,Gh(m,3)).replace(/{S}/g,m+``)}function Xh(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Ah();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=Zh(e.value,i);a=n[u][u][0]}}return Yh(new Date(e.value),a,i,r)}function Zh(e,t){var n=Rs(e),r=n[eg(t)]()+1,i=n[tg(t)](),a=n[ng(t)](),o=n[rg(t)](),s=n[ig(t)](),c=n[ag(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function Qh(e,t,n){switch(t){case`year`:e[sg(n)](0);case`month`:e[cg(n)](1);case`day`:e[lg(n)](0);case`hour`:e[ug(n)](0);case`minute`:e[dg(n)](0);case`second`:e[fg(n)](0)}return e}function $h(e){return e?`getUTCFullYear`:`getFullYear`}function eg(e){return e?`getUTCMonth`:`getMonth`}function tg(e){return e?`getUTCDate`:`getDate`}function ng(e){return e?`getUTCHours`:`getHours`}function rg(e){return e?`getUTCMinutes`:`getMinutes`}function ig(e){return e?`getUTCSeconds`:`getSeconds`}function ag(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function og(e){return e?`setUTCFullYear`:`setFullYear`}function sg(e){return e?`setUTCMonth`:`setMonth`}function cg(e){return e?`setUTCDate`:`setDate`}function lg(e){return e?`setUTCHours`:`setHours`}function ug(e){return e?`setUTCMinutes`:`setMinutes`}function dg(e){return e?`setUTCSeconds`:`setSeconds`}function fg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function pg(e){if(!Ws(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function mg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var hg=De;function gg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Js(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Rs(e):e;if(!isNaN(+c))return Yh(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Us(e);return a(l)?pg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var _g=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],vg=function(e,t){return`{`+e+(t??``)+`}`};function yg(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function xg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Sg=R,Cg=[`left`,`right`,`top`,`bottom`,`width`,`height`],wg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Tg(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Eg=Tg;pe(Tg,`vertical`),pe(Tg,`horizontal`);function Dg(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Og(e,t,n){n=hg(n||0);var r=t.width,i=t.height,a=ws(e.left,r),o=ws(e.top,i),s=ws(e.right,r),c=ws(e.bottom,i),l=ws(e.width,r),u=ws(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var kg={rect:1,point:2};function Ag(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=Jm(e),l=c.coord,u=c.from;if(o.dataToLayout){a=kg.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=kg.point,s=u,i=o.dataToPoint(l))}return a??=kg.rect,a===kg.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function jg(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Og(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Mg(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function Ng(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(wg[0],0),a=o(wg[1],1);c(wg[0],e,i),c(wg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Sg(n,function(t){c[t]=e[t]}),Sg(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return kc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Dg(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(gp);et(Lg,gp),at(Lg),hee(Lg),ih(Lg,Rg);function Rg(e){var t=[];return R(Lg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var zg=wc(),Bg=wc(),Vg=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=rc(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return Wg(this,zg,r,i,e,t,n)},e.prototype.clearColorPalette=function(){Gg(this,zg)},e}();function Hg(e,t,n,r){return Wg(e,Bg,rc(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function Ug(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function Wg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:Ug(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Gg(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Kg=/\{@(.+?)\}/g,qg=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return yg(i,s).replace(Kg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=nm(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return nm(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Jg(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function Yg(e){return new Xg(e)}var Xg=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(u_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?il:el,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Ap(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Ap(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&d_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&d_(``),a.push(t),o.push(e._getVersionSign())}),n?i=o_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Mp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=S_(e);n>=t&&(t=n+ +(r&&(!n||b_(e)&&!e.noHeader)))}),t}return 0}function C_(e,t,n,r){var i=t.noHeader,a=E_(S_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new dm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=x_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):D_(r,o.join(``),i?n:a.html);if(i)return d;var f=mg(t.header,`ordinal`,e.useUTC),p=g_(r,e.renderMode).nameStyle,m=h_(r);return e.renderMode===`richText`?A_(e,f,p)+a.richText+d:D_(r,`
`+hh(f)+`
`+d,n)}function w_(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return mg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||u_.color.secondary,i),f=a?``:mg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=g_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:A_(e,f,v))+(o?``:j_(e,m,h,g,y)):D_(r,(s?``:d)+(a?``:O_(f,!s,v))+(o?``:k_(m,h,g,y)),n)}}function T_(e,t,n,r,i,a){if(e)return x_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function E_(e){return{html:__[e],richText:v_[e]}}function D_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=h_(e);return`
`+t+r+`
`}function O_(e,t,n){var r=t?`margin-left:2px`:``;return``+hh(e)+``}function k_(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return hh(e)}).join(`  `)+``}function A_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function j_(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function M_(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return yg(n)}function N_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var P_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Gs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=vg({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function F_(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=M_(t,n),u,d,f,p;if(o>1||c&&!o){var m=I_(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=nm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=vc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return y_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[y_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function I_(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(nm(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(y_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var L_=wc();function R_(e,t){return e.getName(t)||e.getId(t)}var z_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=qg({count:H_,reset:U_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(L_(this).sourceManager=new s_(this)).prepareSource();var r=this.getInitialData(e,n);G_(r,this),this.dataTask.context.data=r,L_(this).dataBeforeProcessed=r,B_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Ag(this),r=n?Mg(e):{},i=this.subType;Fg.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),ic(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&jg(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Ag(this);n&&jg(this.option,e,n);var r=L_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);G_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,L_(this).dataBeforeProcessed=i,B_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return F_({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=zg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[R_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Fg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Fg);ae(z_,Gg),ae(z_,zg),et(z_,Fg);function B_(e){var t=e.name;vc(e)||(e.name=V_(e)||t)}function V_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function H_(e){return e.model.getRawData().count()}function U_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),W_}function W_(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function G_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(K_,t))})}function K_(e,t){var n=q_(e);return n&&n.setOutputEnd((t||this).count()),t}function q_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var J_=Ao.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Y_={line:gd,rect:Wo,roundRect:Wo,square:Wo,circle:Bu,diamond:Ao.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Ao.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Ao.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:J_},X_={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Z_={};R(Y_,function(e,t){Z_[t]=new e});var Q_=Ao.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Z_[r];i||=(r=`rect`,Z_[r]),X_[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function wee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||u_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function $_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?af(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?rf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new Q_({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=wee,a&&c.setColor(a),c}function Tee(e,t){if(e!=null)return B(e)||(e=[e,e]),[ws(e[0],t[0])||0,ws(we(e[1],e[0]),t[1])||0]}function Eee(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=nm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Oee=typeof Float32Array<`u`?Float32Array:void 0,kee=typeof Float64Array<`u`?Float64Array:void 0;function ev(e){return tv({ctor:Oee},e).arr}function tv(e,t){var n=e.arr,r=e.ctor;if(t>Ps&&(t=Ps),!n||e.typed&&n.length=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){gv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),gv(r,e,t,n)},freeze:function(){}};function gv(e,t,n,r){Bc(n,r)&&(e[t][0]=n,e[t][1]=r)}function _v(e){return vv(e)||bv(e)}function vv(e){return e.type===`interval`}function yv(e){return e.type===`time`}function bv(e){return e.type===`log`}function xv(e){return e.type===`ordinal`}function Uee(e){var t=Bs(e),n=vs(10,t),r=hs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Os(r*n,-t)}function Sv(e){return As(e)+2}function Cv(e,t){return ys(e)/ys(t)}function wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Ov=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new cv({}),B(i)&&(i=new cv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=uv(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,fv(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=hs(e),e},t.prototype.getTicks=function(){var e=[];return Dv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=fs(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=fs(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Os(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Os(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Os(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return kv(this,e,jh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=As(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),dg(Os(e.value,n,!0))},t.type=`interval`,t}(sv);sv.registerClass(Av);var Gee=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function qee(e){var t=30*Ih;return e/=t,e>6?6:e>3?3:e>2?2:1}function Jee(e){return e/=Fh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Pv(e,t){return e/=t?Ph:Nh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Yee(e){return ps(Vs(e,!0),1)}function Fv(e,t,n){var r=Math.max(0,re(Vh,t)-1);return Xh(new Date(e),Vh[r],n).getTime()}function Iv(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Lv(e,t,n,r,i,a){var o=See,s=0;function c(e,t,n,i,o,c,l){for(var u=Iv(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!Nv(Wh(e),r[0],r[1],n)){s&&(i=[{value:Fv(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=Mv.length,l=Math.min(Gee(Mv,a,0,c),c-1),u=Mv[l][1],d=Mv[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};sv.registerClass(jv);var zv=0,Bv=1,Vv=2,Hv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Av.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[zv]=i[Bv]=a[zv]=a[Bv]=NaN,dv(r,t.mapperMethods);var s=kh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Vv,l),r.powStub=new Av({breakParsed:l.original}),r.intervalStub=new Av({breakParsed:l.transformed}),fv(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=kh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,jh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return kv(this,e,jh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Cv(e,this.base))},scale:function(e){return wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Cv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Uv.depth=n,Wv.lookup=this._lookup,wv(n===2?e:this.intervalStub.transformOut(e,Uv),this.base,Wv)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Bc(t,n)||t<=0||n<=0)){var r=Gv,i=Gv;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[zv]=t,r[Bv]=n);var o=this.base;this.intervalStub.setExtent2(e,i[zv]=Cv(t,o),i[Bv]=Cv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Bc(t[0],t[1])&&Js(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(sv);sv.registerClass(Hv);var Uv={},Wv={},Gv=[],Kv={value:1,category:1,time:1,log:1},qv=wc();function Jv(e){var t=e.get(`type`);return(t==null||!Be(Kv,t)&&!sv.getClass(t))&&(t=`value`),t}function Yv(e,t,n){var r=kh(),i;switch(r&&(i=iy(e,t,n)),t){case`category`:return new Ov({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Pc()});case`time`:return new jv({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Hv({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Av({breakOption:i});default:return new((sv.getClass(t))||Av)({})}}function Xv(e,t,n){var r=n?mv(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Bc(i,a)?i===t||a===t?2:it?1:3:3}function Zv(e){qv(e).noOnMyZero=!0}function Qv(e){return qv(e).noOnMyZero}function $v(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Cee(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(ey(e,n),n.value-e.scale.getExtent()[0],null)};var r=kh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(ey(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function ey(e,t){var n=e.scale;return xv(n)?n.getLabel(t):t.value}function ty(e){return e.get(`interval`)??`auto`}function Xee(e){return e.type===`category`&&ty(e.getLabelModel())===0}function Zee(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[Qm(e,t)]=!0}),ue(n)}function ny(e){return e===`middle`||e===`center`}function ry(e){return e.getShallow(`show`)}function iy(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!kh()||!n||!ay(t)?void 0:r}function ay(e){return e!==`category`}function oy(e,t,n,r,i,a){var o=bv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Wee(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function sy(e,t){return xv(e)?e.getRawOrdinalNumber(t.value):t.value}function cy(e,t){return xv(e)&&!!t.get(`boundaryGap`)}var ly={average:function(e){for(var t=0,n=0,r=0;rt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=ly[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,uy))}}}}}var fy=wc(),py=wc(),my={estimate:1,determine:2};function hy(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function gy(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(vy(n,r),function(t,n){return{formattedLabel:$v(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?yy(e,t):Sy(e)}function _y(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:vy(i,r)}:e.type===`category`?xy(e,t):{ticks:r.getTicks(n)}}function vy(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Gc(r,qc,null),ks(r),z(r,function(e){return{value:e}})}function yy(e,t){var n=e.getLabelModel(),r=by(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function by(e,t,n){var r=wy(e),i=ty(t),a=n.kind===my.estimate;if(!a){var o=Ey(r,i);if(o)return o}var s,c;me(i)?s=Ny(e,i,!1):(c=i===`auto`?Oy(e,n):i,s=Ny(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Dy(r,i,l),!0}):Dy(r,i,l),l}function xy(e,t){var n=Cy(e),r=ty(t),i=Ey(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Ny(e,r,!0);else if(r===`auto`){var s=by(e,e.getLabelModel(),hy(my.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Ny(e,o,!0);return Dy(n,r,{ticks:a,tickCategoryInterval:o})}function Sy(e){var t=e.scale.getTicks(),n=$v(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Cy=Ty(`axisTick`),wy=Ty(`axisLabel`);function Ty(e){return function(t){return py(t)[e]||(py(t)[e]={list:[]})}}function Ey(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===my.estimate?(t.out.noPxChangeTryDetermine.push(fe(Ay,null,e,S,c)),S):jy(e,S,c)??S}function Ay(e,t,n){return jy(e,t,n)==null}function jy(e,t,n){var r=fy(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function My(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Ny(e,t,n){var r=$v(e),i=e.scale,a=[],o=me(t);return Dv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Py=wc();function Fy(e){Py(e).prepare={}}function Iy(e){Py(e).fullUpdate={}}function Ly(e){return Py(e).prepare}function Ry(e){return Py(e).fullUpdate}var zy=Uc(),By=wc(),Vy=wc();function Hy(e,t){var n=e.model,r=By(Ry(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Uy(e,t){return Ky(Hy(e,t))}function Wy(e,t){var n=[];return Gy(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Js(n)&&n>0&&Js(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*ab,e.w2=e.w*n/r)}var lb=[0,1],ub=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Cs(e,lb,db(this),t)},e.prototype.coordToData=function(e,t){var n=Cs(e,db(this),lb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(_y(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(sy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Qee(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(xv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=hy(my.determine),gy(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return ob(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=hy(my.determine),ky(this,e)},e}();function db(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Qee(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=ob(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var $ee=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ub),fb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],ete=1,pb=2,mb=ete|pb;function hb(e,t,n){n||=mb,t?e.dirty|=n:e.dirty&=~n}function gb(e,t){return t||=mb,e.dirty==null||!!(e.dirty&t)}function _b(e){if(e)return gb(e)&&tte(e,e.label,e),e}function tte(e,t,n){var r=t.getComputedTransform();e.transform=Pf(e.transform,r);var i=e.localRect=Nf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=ap.textMargin);for(var d=0;d<4;d++)vb[d]=u===ap.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ap.textMargin&&Tf(i,vb,!1,!1);var f=e.rect=Nf(e.rect,i);return r&&f.applyTransform(r),u===ap.minMargin&&Tf(f,vb,!1,!1),e.axisAligned=jf(r),(e.label=e.label||{}).ignore=t.ignore,hb(e,!1),hb(e,!0,pb),e}var vb=[0,0,0,0];function nte(e,t,n){return e.transform=Pf(e.transform,n),e.localRect=Nf(e.localRect,t),e.rect=Nf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=jf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function rte(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function yb(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var jb=_t(),Mb=new tn(0,0,0,0),Nb=function(e,t,n,r,i,a){if(ny(e.nameLocation)){var o=a.stOccupiedRect;o&&Pb(nte({},o,a.transGroup.transform),r,i)}else Fb(a.labelInfoList,a.dirVec,r,i)};function Pb(e,t,n){var r=new Vt;xb(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&rte(t,r)}function Fb(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Is(r-wb)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),Lb=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],Rb={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Mh(r.axis.scale))Sb().buildAxisBreakLine(r,i,a,m);else{var h=new gd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));lf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=Tee(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=$_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){qb(t,i,s)&&zb(e,t,n,r,i,a,o,my.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){qb(t,i,s)&&zb(e,t,n,r,i,a,o,my.determine);var c=Gb(e,i,a,r);Hb(e,t.labelLayoutList,c),Kb(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(ex(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*wb/180);var b,x;ny(u)?b=Ib.innerTextLayout(e.rotation,y??e.rotation,d):(b=Bb(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Yo({x:g.x,y:g.y,rotation:b.rotation,silent:Ib.isLabelSilent(r),style:Jf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Of({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=Ib.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Zc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=_b({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ny(u)?Tb[E]:Eb[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function zb(e,t,n,r,i,a,o,s){Yb(t)||Jb(e,t,i,s,r,o);var c=t.labelLayoutList;Zb(e,r,c,a),nx(r,e.rotation,c);var l=e.optionHideOverlap;Vb(r,c,l),l&&ite(ce(c,function(e){return e&&!e.label.ignore})),Ab(e,n,r,c)}function Bb(e,t,n,r){var i=Fs(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Is(i-wb/2)?(o=c?`bottom`:`top`,a=`center`):Is(i-wb*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iwb/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Vb(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Xee(r))return;function a(e,a,o){var s=_b(t[a]),c=_b(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=Db(s.label).labelInfo.tick;if(yv(l)&&u.notNice||xv(l)&&u.offInterval){Ub(s.label);return}}if(e===!1||s.suggestIgnore){Ub(s.label);return}if(c.suggestIgnore){Ub(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=yb({marginForce:f},s),c=yb({marginForce:f},c)}xb(s,c,null,{touchThreshold:d})&&Ub(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function Hb(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=fx(e,t.get(`startValue`,!0)),x=b!=null;!Js(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Js(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),dx(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),dx(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function dx(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Hc(t))}function fx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function px(e,t){var n;if(xv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[mx(n[0]),mx(n[1])]}function mx(e){return Cn(typeof e==`boolean`?0:e,1)||0}function hx(e){var t=cx(e.scale);return t.extent||=Pc(),t}function gx(e,t){hx(e).dimIdxInCoord=t.get(e.dim)}function _x(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||vx(n,e,i,r,t)}function vx(e,t,n,r,i){var a=hx(t),o=a.extent,s=!1;qy(t,function(r){if(r.boxCoordinateSystem){var i=Jm(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Fc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(Zee(u,n),function(e){Rc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Tx(e,t,r);bx(e,new ux(e,r,o,s,c),i),a.extent=null}function yx(e,t){var n=e.scale;bx(n,new ux(n,e.model,t,!1,!1),lx)}function bx(e,t,n){e.rawExtentInfo=t,t.from=n}function xx(e,t){Sx.set(e,t)}var Sx=Le();function Cx(e,t,n,r,i){e.rawExtentInfo||yx({scale:e,model:t},i||Pc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Tx(e,t,n){var r=cy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Zy(t,function(e){a=!!Sx.get(e)||a}),a}function Ex(e,t,n,r){if(n.ctnShp){var i;if(Zy(e,function(t){var n=Sx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Ic(i,a[0]),Lc(i,a[1]),Zv(e))}}),i){var a=t.getExtent();if(xv(t))e.onBand||t.setExtent2(1,fs(a[0],a[0]+i[0]),ps(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=fs(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ps(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Dx(){$y(`liPosMinGap`,Ox)}function Ox(e,t,n){var r=Le(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=fm(u);function f(n){Yy(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}tv(kx,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var kx=tv({ctor:kee},50);function Ax(e){return function(t,n){var r=ob(t,{fromStat:{key:e}});if(Js(r.w2))return[-r.w2/2,r.w2/2]}}function jx(e,t){return e+`|&`+t}function Mx(e){return Dx(),{liPosMinGap:!xv(e.scale)}}function Nx(e,t,n,r){rb(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Mx})}function Px(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Fx={left:0,right:0,top:0,bottom:0},Ix=[`25%`,`25%`],Lx=`cartesian2d`,Rx=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Mg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&jg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&jg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Fx,outerBoundsContain:`all`,outerBoundsClampWidth:Ix[0],outerBoundsClampHeight:Ix[1],backgroundColor:u_.color.transparent,borderWidth:1,borderColor:u_.color.neutral30},t}(Fg),zx=Uc(),Bx=`__ec_stack_`;function Vx(e){return e.get(`stack`)||Bx+e.seriesIndex}function Hx(e,t){var n=Ux(e,t);return n.columnMap=Wx(n),n}function Ux(e,t){var n=jx(t,Lx),r=[],i=ob(e,{fromStat:{key:n},min:1});return Jy(e,n,function(e){r.push({barWidth:ws(e.get(`barWidth`),i.w),barMaxWidth:ws(e.get(`barMaxWidth`),i.w),barMinWidth:ws(e.get(`barMinWidth`)||(qx(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Vx(e)})}),{bandWidthResult:i,seriesInfo:r}}function Wx(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};R(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Be(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=fs(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=ps(35-o.length*4,15)+`%`;var c=ws(i,t),l=ws(a,1),u=(n-c)/(r+(r-1)*l);u=ps(u,0),R(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=fs(o,i)),a&&(o=ps(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ps(u,0);var d=0,f;R(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return R(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Gx(e){return{seriesType:e,overallReset:function(t){var n=jx(e,Lx);Xy(t,n,function(t){var r=Hx(t,e);Jy(t,n,function(e){var t=r.columnMap[Vx(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Kx(e){return{seriesType:e,plan:nv(),reset:function(e){if(ix(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=Zm(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Px(i))),p=qx(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&ev(r*3),c=p&&s&&ev(r*3),l=p&&ev(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,ms(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(z_);z_.registerClass(Jx);var cte=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return $m(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Yc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=ah(Jx.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:u_.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Jx),Yx=`\0__throttleOriginMethod`,Xx=`\0__throttleRate`,Zx=`\0__throttleType`;function Qx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function $x(e,t,n,r){var i=e[t];if(i){var a=i[Yx]||i,o=i[Zx];if(i[Xx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Qx(a,n,r===`debounce`),i[Yx]=a,i[Zx]=r,i[Xx]=n}return i}}function eS(e,t){var n=e[t];n&&n[Yx]&&(n.clear&&n.clear(),e[t]=n[Yx])}var lte=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),tS=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new lte},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Kd(t,e,Zc(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(iv),oS={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=iS(t.x,e.x),s=aS(t.x+t.width,i),c=iS(t.y,e.y),l=aS(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=aS(t.r,e.r),a=iS(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},sS={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Wo({shape:I({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?tS:ad,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=ute(fS(i),{isRoundCap:l===tS}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Vd:Hd)(u,{shape:p},a)}return u}};function mte(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function cS(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Vd:Hd)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Vd:Hd)(n,{shape:l},u,i)}function lS(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function _te(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function fS(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function pS(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;I(u,fte(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?Ste(i,a.coordinateSystem):Cte(i,a.coordinateSystem),p=qf(r);Kf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Eee(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,dte(e,h===`outside`?f:h,fS(o),r.get([`label`,`rotate`]))}ip(m,p,a.getRawValue(n),function(e){return Dee(t,e)});var g=r.getModel([`emphasis`]);au(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),lu(e,r),_te(i)&&(e.style.fill=`none`,e.style.stroke=`none`,R(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function vte(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var yte=function(){function e(){}return e}(),mS=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new yte},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function bte(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function _S(e,t,n){if(Lee(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function xte(e,t,n){return new(e.type===`polar`?ad:Wo)({shape:_S(t,n,e),silent:!0,z2:0})}function Ste(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function Cte(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function wte(e){e.registerChartView(pte),e.registerSeriesModel(cte),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Gx(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Kx(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dy(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),ste(e)}function vS(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&xS(e,i,t,n)}else{xS(e,t,t,n);var a=kte(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Dte.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function kte(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Ate(e,t,n,r){e.addEventListener(t,n,r)}function jte(e,t,n,r){e.removeEventListener(t,n,r)}var TS=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},ES=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=DS(r)/DS(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=OS(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},AS=`silent`;function jS(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:MS}}function MS(){TS(this.event)}var NS=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(qi),PS=function(){function e(e,t){this.x=e,this.y=t}return e}(),FS=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],IS=new tn(0,0,0,0),LS=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new PS(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new NS,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ete(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(FS,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=BS(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new PS(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new PS(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=jS(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new PS(e,t);if(zS(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(IS.copy(u.getBoundingRect()),u.transform&&IS.applyTransform(u.transform),IS.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function RS(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||AS}return!1}function zS(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=RS(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==AS)){t.target=o;break}}}function BS(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var VS=32,HS=7;function US(e){for(var t=0;e>=VS;)t|=e&1,e>>=1;return e+t}function WS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function GS(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function qS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function JS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function YS(e,t){var n=HS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=HS||m>=HS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-qS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=HS||g>=HS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),KS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var ZS=!1;function QS(){ZS||(ZS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function $S(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var eC=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=$S}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),tC=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function nC(){return new Date().getTime()}var rC=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=nC()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(tC(t),!e._paused&&e.update())}tC(t)},t.prototype.start=function(){this._running||(this._time=nC(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=nC(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=nC()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ki(e,t.loop);return this.addAnimator(n),n},t}(qi),iC=300,aC=We.domSupported,oC=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),sC={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},cC=!1;function lC(e){var t=e.pointerType;return t===`pen`||t===`touch`}function uC(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function dC(e){e&&(e.zrByTouch=!0)}function fC(e,t){return wS(e.dom,new mC(e,t),!0)}function pC(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var mC=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),hC={mousedown:function(e){e=wS(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=wS(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=wS(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=wS(this.dom,e);var t=e.toElement||e.relatedTarget;pC(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){cC=!0,e=wS(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){cC||(e=wS(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=wS(this.dom,e),dC(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),hC.mousemove.call(this,e),hC.mousedown.call(this,e)},touchmove:function(e){e=wS(this.dom,e),dC(e),this.handler.processGesture(e,`change`),hC.mousemove.call(this,e)},touchend:function(e){e=wS(this.dom,e),dC(e),this.handler.processGesture(e,`end`),hC.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!yc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[UC],e},t.prototype.setTheme=function(e){this._theme=new gp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function nw(e,t){return e.join(`,`)===t.join(`,`)}var rw=R,iw=_e,aw=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function ow(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=aw.length;n0?e[n-1].seriesModel:null)}),kw(e))})}function kw(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ns(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var Aw=function(){function e(){this.group=new Ru,this.uid=rh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(Aw),at(Aw);var jw=wc(),Mw={itemStyle:ot(pp,!0),lineStyle:ot(up,!0)},Nw={lineStyle:`stroke`,itemStyle:`fill`};function Pw(e,t){return e.visualStyleMapper||Mw[t]||(console.warn(`Unknown style type '`+t+`'.`),Mw.itemStyle)}function Fw(e,t){return e.visualDrawType||Nw[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Iw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Pw(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=Fw(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Lw=new gp,Rw={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Pw(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Lw.option=n[r];var o=i(Lw);I(e.ensureUniqueItemVisual(t,`style`),o),Lw.option.decal&&(e.setItemVisual(t,`decal`,Lw.option.decal),Lw.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},zw={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();jw(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=jw(e).scope,a=Fw(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},Bw=Math.PI;function Vw(e,t){t||={},L(t,{text:`loading`,textColor:u_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:u_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ru,r=new Wo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Yo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Wo({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Sd({shape:{startAngle:-Bw/2,endAngle:-Bw/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Bw*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Bw*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Hw=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Yc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||qg({plan:qw,reset:Jw,count:Zw}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||qg({reset:Uw});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,qg({reset:Ww,onDirty:Kw})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:Qw(e)}),e.uid=rh(`stageHandler`),t&&(e.visualType=t),e},e}();function Uw(e){e.overallReset(e.ecModel,e.api,e.payload)}function Ww(e){return e.dirtyOnOverallProgress&&Gw}function Gw(){this.agent.dirty(),this.getDownstream().dirty()}function Kw(){this.agent&&this.agent.dirty()}function qw(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Jw(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=rc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return Xw(t)}):Yw}var Yw=Xw(0);function Xw(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),cT=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],lT=cT.concat([`symbolKeepAspect`]),uT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&TT(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function OT(e,t,n){for(var r=t.type===`radial`?DT(e,t,n):ET(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function NT(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&MT(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var PT=new io(!0);function FT(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function IT(e){return typeof e==`string`&&e!==`none`}function LT(e){var t=e.fill;return t!=null&&t!==`none`}function RT(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function zT(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function BT(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function VT(e,t,n,r,i){var a,o=FT(n),s=LT(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||PT,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?OT(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?OT(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?BT(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?BT(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=NT(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&zT(e,n),s&&RT(e,n)):(s&&RT(e,n),o&&zT(e,n)),T&&e.setLineDash([])}function HT(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function UT(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=NT(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(FT(n)&&e.strokeText(i,n.x,n.y),LT(n)&&e.fillText(i,n.x,n.y)):(LT(n)&&e.fillText(i,n.x,n.y),FT(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var WT=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],GT=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function KT(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){rE(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?va.opacity:o}(r||t.blend!==n.blend)&&(a||=(rE(e,i),!0),e.globalCompositeOperation=t.blend||va.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[LE]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[LE]=!0,hD(this),!this._model||t){var o=new QC(this._api),s=this._theme,c=this._model=new GC;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},CD);var l={seriesTransition:a,optionChanged:!0};if(n)this[zE]={silent:r,updateParams:l},this[LE]=!1,this.getZr().wakeUp();else{try{ZE(this),eD.update.call(this,null,l)}catch(e){throw this[zE]=null,this[LE]=!1,e}this._ssr||this._zr.flush(),this[zE]=null,this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[LE]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[zE]&&(r??=this[zE].silent,i=this[zE].updateParams,this[zE]=null),this[LE]=!0,hD(this);try{this._updateTheme(e),n.setTheme(this._theme),ZE(this),eD.update.call(this,{type:`setTheme`},i)}catch(e){throw this[LE]=!1,e}this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=TD[e]),e&&(e=P(e),e&&Ew(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(OD[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(DD,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=OC(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Wo({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Io({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return tD(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return tD(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return tD(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Ec(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Ec(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?pT(i,t):fT(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(vD,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&hT(i,function(e){var t=Zc(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(xD,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Tte(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&jc(this.getDom(),AD,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete DD[e.id]},t.prototype.resize=function(e){if(!this[LE]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[zE]&&(r??=this[zE].silent,n=!0,this[zE]=null),this[LE]=!0,hD(this);try{n&&ZE(this),eD.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[LE]=!1,e}this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),ED[e]){var n=ED[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=bD[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),yD[e.type]&&this._model){if(this[LE]){this._pendingActions.push(e);return}var n=t.silent;rD.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),iD.call(this,n),aD.call(this,n)}},t.prototype.updateLabelLayout=function(){gT.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){ZE=function(e){Fy(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),QE(e,!0),QE(e,!1),t.plan()},QE=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),LC.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Ff(e);t.eachRendered(function(e){return Lf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Ud(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Ud(e))return;if(e instanceof Ao&&hu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}dD=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Bl(t,n),pD(e)},n.prototype.leaveEmphasis=function(t,n){Vl(t,n),pD(e)},n.prototype.enterBlur=function(t){Hl(t),pD(e)},n.prototype.leaveBlur=function(t){Ul(t),pD(e)},n.prototype.enterSelect=function(t){Wl(t),pD(e)},n.prototype.leaveSelect=function(t){Gl(t),pD(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[RE]},n.prototype.usingTHL=function(){return e._usingTHL},n}(cl))(e)},fD=function(e){function t(e,t){for(var n=0;n=0)){HD.push(n);var o=Hw.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function WD(e,t){ED[e]=t}function GD(e,t,n){var r=yT(`registerMap`);r&&r(e,t,n)}var KD=r_;VD(OE,Iw),VD(jE,Rw),VD(jE,zw),VD(OE,uT),VD(jE,dT),VD(FE,_E),PD(Ew),FD(xE,Dw),WD(`default`,Vw),zD({type:gl,event:gl,update:gl},Ve),zD({type:_l,event:_l,update:_l},Ve),zD({type:vl,event:xl,update:vl,action:Ve,refineEvent:qD,publishNonRefinedEvent:!0}),zD({type:yl,event:xl,update:yl,action:Ve,refineEvent:qD,publishNonRefinedEvent:!0}),zD({type:bl,event:xl,update:bl,action:Ve,refineEvent:qD,publishNonRefinedEvent:!0});function qD(e,t,n,r){return{eventContent:{selected:nu(n),isFromClick:t.isFromClick||!1}}}ND(`default`,{}),ND(`dark`,oT);var JD=[],YD={registerPreprocessor:PD,registerProcessor:FD,registerPostInit:ID,registerPostUpdate:LD,registerUpdateLifecycle:RD,registerAction:zD,registerCoordinateSystem:Mte,registerLayout:BD,registerVisual:VD,registerTransform:KD,registerLoading:WD,registerMap:GD,registerImpl:vT,PRIORITY:IE,ComponentModel:Fg,ComponentView:Aw,SeriesModel:z_,ChartView:iv,registerComponentModel:function(e){Fg.registerClass(e)},registerComponentView:function(e){Aw.registerClass(e)},registerSeriesModel:function(e){z_.registerClass(e)},registerChartView:function(e){iv.registerClass(e)},registerCustomSeries:function(e,t){xT(e,t)},registerSubTypeDefaulter:function(e,t){Fg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){kC(e,t)}};function XD(e){if(B(e)){R(e,function(e){XD(e)});return}re(JD,e)>=0||(JD.push(e),me(e)&&(e={install:e}),e.install(YD))}var ZD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),QD=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Oc).models[0]},t.type=`cartesian2dAxis`,t}(Fg);ae(QD,ZD);var $D={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:u_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:u_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:u_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[u_.color.backgroundTint,u_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:u_.color.neutral00,borderColor:u_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},eO=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},$D),tO=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:u_.color.axisMinorSplitLine,width:1}}},$D),nO={category:eO,value:tO,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},tO),log:L({logBase:10},tO)};function rO(e,t,n,r){R(Kv,function(i,a){var o=F(F({},nO[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Ag(this),r=n?Mg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=iO(e),n&&jg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Sb();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,iO)}function iO(e){return e.type||(e.data?`category`:`value`)}var aO=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),oO=[`x`,`y`];function sO(e){return(e.type===`interval`||e.type===`time`)&&!Mh(e)}var cO=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Lx,t.dimensions=oO,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(sO(e)&&sO(t)){var n=mv(e,null),r=mv(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(aO);function lO(e,t){var n=e.scale,r=e.model,i=Cx(n,r,r.ecModel,e,null),a=bv(n),o=bv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=ms(l[0].value-l[1].value),g=ms(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=Os(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Os(_s(C[0]/E)*E,D),O=Os(gs(C[1]/E)*E,D);var e=hs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=gs(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}oy(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function uO(e,t){var n=bv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Tv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?fO(r,t):dO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Sv(d)),i[0]||(s[0]=Os(gs(s[0]/u)*u,l)),i[1]||(s[1]=Os(_s(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),oy(e,i,o,s,a,c)}function dO(e,t){var n=Ev(t.splitNumber,5),r=hv(e),i=t.minInterval,a=t.maxInterval,o=Vs(r/n,!0);i!=null&&oa&&(o=a);var s=Sv(o),c=e.getExtent(),l=[Os(_s(c[0]/o)*o,s),Os(gs(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function fO(e,t){var n=Ev(t.splitNumber,10),r=e.getExtent(),i=hv(e),a=ps(zs(i),1);n/i*a<=.5&&(a*=10);var o=Sv(a),s=[Os(_s(r[0]/a)*a,o),Os(gs(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function pO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;mO(t,n,r,i,null)}function mO(e,t,n,r,i){var a=Cx(e,t,r,n,i),o=vv(e)||yv(e);hO(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Ex(n,e,a,r)}function hO(e,t){gO[e.type](e,t)}var gO={interval:uO,log:uO,time:Rv,ordinal:Ve},_O=[[3,1],[0,2]],vO=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=oO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){_x(e,1);var t=e.scale;xv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):pO(i)}R(n,function(e){CO(e,e.__alignTo)?pO(e):lO(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){bO(n,`y`,e,i)}),R(n.y,function(e){bO(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Og(e,t),i=this._rect=Eg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(TO(a,i),!n){var c=kO(i,o,a,s,t),l=void 0;if(s)DO?(DO(this._axesList,i),TO(a,i)):l=OO(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=jO(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=OO(d,f,p,i,a,c,r))}AO(i,a,my.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];_v(a.scale)&&iy(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function CO(e,t){return Mh(e.scale)||Mh(t.scale)||t.scale.getTicks().length<2}function wO(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function TO(e,t){R(e.x,function(e){return EO(e,t.x,t.width)}),R(e.y,function(e){return EO(e,t.y,t.height)})}function EO(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),wO(e,t)}var DO;function OO(e,t,n,r,i,a,o){AO(r,i,my.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return Tf(r,s,!0,!0,n),TO(i,r),c;function l(e){R(i[Xd[e]],function(t){if(ry(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function kO(e,t,n,r,i){var a=new kb(MO);return R(n,function(n){return R(n,function(n){if(ry(n.model)){var o=!r;n.axisBuilder=ox(e,t,n.model,i,a,o)}})}),a}function AO(e,t,n,r,i,a){var o=n===my.determine;R(t,function(t){return R(t,function(t){ry(t.model)&&(sx(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Xd[1-t]]=e[Zd[t]]<=a.refContainer[Zd[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){ry(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function jO(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Eg(e.get(`outerBounds`,!0)||Fx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Es(we(e.get(`outerBoundsClampWidth`,!0),Ix[0]),t.width),Es(we(e.get(`outerBoundsClampHeight`,!0),Ix[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var MO=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;Nb(e,t,n,r,i,a),ny(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&Fb(e.labelInfoList,e.dirVec,r,i)})};function NO(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return PO(n,e,t),n.seriesInvolved&&IO(n,e),n}function PO(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=UO(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||HO(d))){s??=d.get(`triggerTooltip`),d=r?FO(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=UO(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:HO(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=LO(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function FO(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new gp(c,n,r))}function IO(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[UO(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function LO(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function zO(e){var t=BO(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=HO(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function lk(e,t){var n=e.visual,r=[];_e(n)?rk(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),_k(e,r)}function uk(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:hk([0,1])}}function dk(e){var t=this.option.visual;return t[Math.round(Cs(e,[0,1],[0,t.length-1],!0))]||{}}function fk(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function pk(e){var t=this.option.visual;return t[this.option.loop&&e!==ak?e%t.length:e]}function mk(){return this.option.visual[0]}function hk(e){return{linear:function(t){return Cs(t,e,this.option.visual,!0)},category:pk,piecewise:function(t,n){var r=gk.call(this,n);return r??=Cs(t,e,this.option.visual,!0),r},fixed:mk}}function gk(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[ok.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function _k(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var vk={linear:function(e){return Cs(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=ok.findPieceIndex(e,t,!0);if(n!=null)return Cs(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ak},fixed:Ve};function yk(e,t,n){return e?t<=n:ta&&(t[1-r]=Ns(t[r],d.sign*a)),t}function xk(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Sk(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}function Ck(e){return Object.keys(e)}function wk(e){return e&&typeof e==`object`&&!Array.isArray(e)}function Tk(e,t){let n={...e},r=t;return wk(e)&&wk(t)&&Object.keys(t).forEach(t=>{wk(r[t])&&t in e?n[t]=Tk(n[t],r[t]):n[t]=r[t]}),n}function Ek(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Dk(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Ok(e){let t=Dk(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function kk(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function Ak(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?kk(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?kk(n):n}}return r}return n}var U=Ak(`rem`,{shouldScale:!0}),jk=Ak(`em`);function Mk(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function Nk(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var Pk=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=Pk()})),W=u(Fk(),1);function Ik(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function Lk(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}var Rk={app:100,modal:200,popover:300,overlay:400,max:9999};function zk(e){return Rk[e]}function Bk(e,t=`size`,n=!0){if(e!==void 0)return Nk(e)?n?U(e):e:`var(--${t}-${e})`}function Vk(e){return Bk(e,`mantine-spacing`)}function Hk(e){return e===void 0?`var(--mantine-radius-default)`:Bk(e,`mantine-radius`)}function Uk(e){return Bk(e,`mantine-font-size`)}function Nte(e){return Bk(e,`mantine-line-height`,!1)}function Pte(e){if(e)return Bk(e,`mantine-shadow`,!1)}function Wk(e,t){return n=>{e?.(n),t?.(n)}}function Gk(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function Fte(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function qk(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=Kk(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function Ite(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function Lte(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:Ite(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var Jk=typeof document<`u`?W.useLayoutEffect:W.useEffect;function Rte(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function Yk(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return Jk(()=>{r.current||(r.current=!0,n(Gk()))},[]),typeof e==`string`?e:t}function Xk(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function zte(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=Xk(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():Xk(e,null)}),t.clear()}}}function Zk(...e){return(0,W.useCallback)(zte(...e),e)}function Qk({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function $k(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var eA=`dots`;function Bte({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=Qk({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return $k(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,W.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,W.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function Gte(e,t,n){let r=(0,W.useRef)(null);(0,W.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function Kte(){let[e,t]=(0,W.useState)(!1);return(0,W.useEffect)(()=>t(!0),[]),e}var qte=s((e=>{var t=Fk();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=qte()}));function Jte(){return`development`}function rA(e){return e?.props?.ref}function Yte(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function iA(e){let t=W.Children.toArray(e);return t.length!==1||!Ik(t[0])?null:t[0]}function aA(e){return e}function oA(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=sA(t[e],n):t[e]=n})}),t}function cA({theme:e,classNames:t,props:n,stylesCtx:r}){return Zte((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Xte))}function lA({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function uA(e){return e===`auto`||e===`dark`||e===`light`}function Qte({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return uA(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&uA(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function dA(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function $te(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function ene(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function tne(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function nne(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function fA(e){return $te(e)?ene(e):e.startsWith(`rgb`)?tne(e):e.startsWith(`hsl`)?nne(e):{r:0,g:0,b:0,a:1}}function pA(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function rne(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function ine(e){if(e.startsWith(`oklch(`))return(rne(e)||0)/100;let{r:t,g:n,b:r}=fA(e),i=t/255,a=n/255,o=r/255,s=pA(i),c=pA(a),l=pA(o);return .2126*s+.7152*c+.0722*l}function mA(e,t=.179){return!e.startsWith(`var(`)&&ine(e)>t}function hA({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:mA(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:mA(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:mA(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][dA(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:mA(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:mA(e,t.luminanceThreshold),shade:a,variable:void 0}}function gA(e,t){let n=hA({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function _A(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function vA(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=fA(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function yA(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=gA(n.from,t),i=gA(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function bA(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=fA(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var xA=bA,SA=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=hA({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&_A(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:vA(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:vA(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:bA(e,.1),hover:bA(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:bA(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:bA(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:bA(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:bA(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:vA(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:vA(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:vA(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:yA(r,t),hover:yA(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function CA({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&hA({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function wA(e,t,n){return CA({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function TA(e,t){let n=e.colors[e.primaryColor];return _A(n)?e.autoContrast?wA(n,e,t):`var(--mantine-color-white)`:CA({color:n[dA(e,t)],theme:e,autoContrast:null})}function ane(e,t){return typeof e==`boolean`?e:t.autoContrast}var EA=(0,W.createContext)(null);function DA(){let e=(0,W.use)(EA);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function one(){return DA().cssVariablesResolver}function sne(){return DA().classNamesPrefix}function OA(){return DA().getStyleNonce}function cne(){return DA().withStaticClasses}function lne(){return DA().headless}function une(){return DA().stylesTransform?.sx}function dne(){return DA().stylesTransform?.styles}function kA(){return DA().env||`default`}function fne(){return DA().deduplicateInlineStyles}function AA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function pne({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(AA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),AA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),Jk(()=>{AA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return AA(r,n),()=>{};r===void 0&&AA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&AA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var mne=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),hne=s(((e,t)=>{t.exports=mne()})),gne={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},jA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,MA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:gne,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:SA,autoContrast:!1,luminanceThreshold:.3,fontFamily:jA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:jA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},_ne=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,vne=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function NA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function PA(e){if(!(e.primaryColor in e.colors))throw Error(_ne);if(typeof e.primaryShade==`object`&&(!NA(e.primaryShade.dark)||!NA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!NA(e.primaryShade))throw Error(vne)}function yne(e,t){if(!t)return PA(e),e;let n=Tk(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),PA(n),n}var G=hne(),FA=(0,W.createContext)(null),bne=()=>(0,W.use)(FA)||MA;function IA(){let e=(0,W.use)(FA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function LA({theme:e,children:t,inherit:n=!0}){let r=bne(),i=(0,W.useMemo)(()=>yne(n?r:MA,e),[e,r,n]);return(0,G.jsx)(FA,{value:i,children:t})}LA.displayName=`@mantine/core/MantineThemeProvider`;function RA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function zA(e,t){let n=t?[t]:[`:root`,`:host`],r=RA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=RA(e.dark),o=RA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function BA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=dA(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:xA(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=dA(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:vA(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:vA(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:xA(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function VA(e,t,n){Ck(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var HA=e=>{let t=dA(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":TA(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":TA(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};VA(r.variables,e.breakpoints,`breakpoint`),VA(r.variables,e.spacing,`spacing`),VA(r.variables,e.fontSizes,`font-size`),VA(r.variables,e.lineHeights,`line-height`),VA(r.variables,e.shadows,`shadow`),VA(r.variables,e.radius,`radius`),VA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),Ck(e.colors).forEach(t=>{let n=e.colors[t];if(_A(n)){Object.assign(r.light,BA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,BA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=wA(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=wA(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,BA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,BA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return Ck(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function xne(){let e=IA(),t=OA(),n=Ck(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Ok(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:jk(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:jk(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Sne({theme:e,generator:t}){let n=HA(e),r=t?.(e);return r?Tk(n,r):n}var UA=HA(MA);function Cne(e){let t={variables:{},light:{},dark:{}};return Ck(e.variables).forEach(n=>{UA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Ck(e.light).forEach(n=>{UA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Ck(e.dark).forEach(n=>{UA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function wne(e){return zA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function WA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=IA(),r=OA(),i=Sne({theme:n,generator:one()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=zA(a?Cne(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:wne(e)}`}}):null}WA.displayName=`@mantine/CssVariables`;function Tne({respectReducedMotion:e,getRootElement:t}){Jk(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function GA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Qte(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=pne({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Tne({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(EA,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(LA,{theme:e,children:[o&&(0,G.jsx)(WA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(xne,{}),t]})})}GA.displayName=`@mantine/core/MantineProvider`;function KA(e,t,n){let r=IA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...Mk(n)}}function Ene(e){return e}function Dne({classNames:e,styles:t,props:n,stylesCtx:r}){let i=IA();return{resolvedClassNames:e===void 0?void 0:cA({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:lA({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var One={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function kne({theme:e,options:t,unstyled:n}){return sA(t?.focusable&&!n&&(e.focusClassName||One[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Ane({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return cA({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function jne({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return cA({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Mne({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Nne({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Pne({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Fne({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function Ine({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return sA(kne({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),Fne({options:t,classes:s,selector:r,unstyled:c||m}),a[r],jne({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Ane({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Mne({rootSelector:u,selector:r,className:l}),Nne({selector:r,classes:s,unstyled:c||m}),p&&!m&&Pne({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function qA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...qA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function Lne({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&lA({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...qA({style:n?.style,theme:e})}}function Rne(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...Mk(t[n])}}),e),{})}function zne({props:e,stylesCtx:t,themeName:n,theme:r}){let i=dne()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function JA({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=IA(),m=sne(),h=cne(),g=lne(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=zne({props:n,stylesCtx:r,themeName:_,theme:p}),b=cA({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>cA({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:lA({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=lA({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=Rne([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=qA({style:a,theme:p});return(e,a)=>({...f?.[e],className:Ine({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:Lne({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function YA(e){return Ck(e).reduce((t,n)=>e[n]===void 0?t:`${t}${Ek(n)}:${e[n]};`,``).trim()}function Bne({selector:e,styles:t,media:n,container:r}){let i=t?YA(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${YA(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${YA(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function Vne(e){let t=5381;for(let n=0;n>>0).toString(36)}function Hne({deduplicate:e,...t}){let n=OA(),r=Bne(t);return e?(0,G.jsx)(`style`,{href:`mantine-${Vne(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Une(e){let t=5381;for(let n=0;n>>0).toString(36)}function Wne(e,t){return`__mdi__-${Une(`${e?YA(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${YA(e.styles)}`).join(`|`):``}`)}`}function XA(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:Mk({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var Gne={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function ZA(e,t){let n=hA({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function Kne(e,t){let n=hA({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:ZA(e,t)}function qne(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${ZA(i.join(` `),t)}`),a.trim()}return e}var QA={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function Jne(e){return typeof e==`string`&&e in QA?QA[e]:e}var Yne=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Xne(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&Yne.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function Zne(e){return e}var Qne=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function $ne(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Qne.includes(e)?`var(--mantine-${e}-line-height)`:e}function ere(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function tre(e){return typeof e==`number`?U(e):e}function nre(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var $A={color:ZA,textColor:Kne,fontSize:Xne,spacing:nre,radius:ere,identity:Zne,size:tre,lineHeight:$ne,fontFamily:Jne,border:qne};function ej(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function rre({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(ej(e))-Number(ej(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function ire(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function are(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ore(e){return typeof e==`object`&&e?Ck(e).filter(e=>e!==`base`):[]}function sre(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function cre({styleProps:e,data:t,theme:n}){return rre(Ck(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=are(e[i]);if(!ire(e[i]))return o.forEach(e=>{r.inlineStyles[e]=$A[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=ore(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=$A[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:$A[a.type](sre(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function lre(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function tj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...tj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function ure(e){return e}var nj=ure;function rj(e){return e}function ij(e){let t=e;return t.extend=rj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function dre(e){return ij(e)}function aj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=rj,t}function oj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function fre(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[oj(n)]=e[n]),t},{})}function sj(e){return e?typeof e==`string`?{[oj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...sj(t)}),{}):fre(e):null}function cj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...cj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function pre({theme:e,style:t,vars:n,styleProps:r}){let i=cj(t,e),a=cj(n,e);return{...i,...a,...r}}function lj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=IA(),g=e||`div`,{styleProps:_,rest:v}=XA(m),y=une()?.()?.(_.sx),b=lre(),x=cre({styleProps:_,theme:h,data:Gne}),S=fne(),C=S&&x.hasResponsiveStyles?Wne(x.styles,x.media):b,w={ref:p,style:pre({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:sA(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Nk(o)?void 0:o||void 0,size:f,...sj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(Hne,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}lj.displayName=`@mantine/core/Box`;var uj=nj(lj),mre=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function dj(){return(0,W.use)(mre)}var[hre,fj]=Lk(`ScrollArea.Root component was not found in tree`);function pj(e,t){let n=(0,W.useEffectEvent)(t);Jk(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function gre(e){let{style:t,...n}=e,r=fj(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return pj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),pj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function _re(e){let t=fj(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(gre,{...e}):null}var vre={scrollHideDelay:1e3,type:`hover`};function mj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=KA(`ScrollAreaRoot`,vre,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=Zk(a,c);return(0,G.jsx)(hre,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(uj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}mj.displayName=`@mantine/core/ScrollAreaRoot`;function hj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function gj(e){let t=hj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function _j(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function yre(e,[t,n]){return Math.min(n,Math.max(t,e))}function vj(e,t,n=`ltr`){let r=gj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=yre(e,n===`ltr`?[0,o]:[o*-1,0]);return _j([0,o],[0,s])(c)}function bre(e,t,n,r=`ltr`){let i=gj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return _j([c,l],d)(e)}function yj(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[xre,Sj]=Lk(`ScrollAreaScrollbar was not found in tree`);function Cj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=fj(),[p,m]=(0,W.useState)(null),h=Zk(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=Kk(o),S=qk(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),pj(p,S),pj(f.content,S),(0,G.jsx)(xre,{value:{scrollbar:p,hasThumb:n,onThumbChange:Kk(r),onThumbPointerUp:Kk(i),onThumbPositionChange:x,onThumbPointerDown:Kk(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:xj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:xj(e.onPointerMove,C),onPointerUp:xj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var wj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=fj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=Zk(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(Cj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${gj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),yj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:bj(s.paddingLeft),paddingEnd:bj(s.paddingRight)}})}})};wj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function Tj(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=fj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=Zk(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(Cj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${gj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),yj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:bj(s.paddingTop),paddingEnd:bj(s.paddingBottom)}})}})}Tj.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Ej(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=dj(),i=fj(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=hj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>bre(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(wj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=vj(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(Tj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=vj(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Ej.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Dj(e){let t=fj(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=qk(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Dj,{"data-state":i?`visible`:`hidden`,...n}):null}Oj.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Sre(e){let{forceMount:t,...n}=e,r=fj(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=qk(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Ej,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:xj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:xj(e.onPointerLeave,()=>o(`idle`))}):null}function kj(e){let{forceMount:t,...n}=e,r=fj(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Oj,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Sre,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Dj,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Ej,{...n}):null}kj.displayName=`@mantine/core/ScrollAreaScrollbar`;function Cre(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function Aj(e){let{style:t,ref:n,...r}=e,i=fj(),a=Sj(),{onThumbPositionChange:o}=a,s=Zk(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=qk(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Cre(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:xj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:xj(e.onPointerUp,a.onThumbPointerUp)})}Aj.displayName=`@mantine/core/ScrollAreaThumb`;function jj(e){let{forceMount:t,...n}=e,r=Sj();return t||r.hasThumb?(0,G.jsx)(Aj,{...n}):null}jj.displayName=`@mantine/core/ScrollAreaThumb`;function Mj({children:e,style:t,ref:n,onWheel:r,...i}){let a=fj(),o=Zk(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(uj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}Mj.displayName=`@mantine/core/ScrollAreaViewport`;var Nj={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function Pj(){return typeof window<`u`}function Fj(e){return Rj(e)?(e.nodeName||``).toLowerCase():`#document`}function Ij(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lj(e){return((Rj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rj(e){return Pj()?e instanceof Node||e instanceof Ij(e).Node:!1}function zj(e){return Pj()?e instanceof Element||e instanceof Ij(e).Element:!1}function Bj(e){return Pj()?e instanceof HTMLElement||e instanceof Ij(e).HTMLElement:!1}function Vj(e){return!Pj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Ij(e).ShadowRoot}function Hj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Zj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function wre(e){return/^(table|td|th)$/.test(Fj(e))}function Uj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Tre=/transform|translate|scale|rotate|perspective|filter/,Wj=/paint|layout|strict|content/,Gj=e=>!!e&&e!==`none`,Kj;function qj(e){let t=zj(e)?Zj(e):e;return Gj(t.transform)||Gj(t.translate)||Gj(t.scale)||Gj(t.rotate)||Gj(t.perspective)||!Yj()&&(Gj(t.backdropFilter)||Gj(t.filter))||Tre.test(t.willChange||``)||Wj.test(t.contain||``)}function Jj(e){let t=$j(e);for(;Bj(t)&&!Xj(t);){if(qj(t))return t;if(Uj(t))return null;t=$j(t)}return null}function Yj(){return Kj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Kj}function Xj(e){return/^(html|body|#document)$/.test(Fj(e))}function Zj(e){return Ij(e).getComputedStyle(e)}function Qj(e){return zj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function $j(e){if(Fj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Vj(e)&&e.host||Lj(e);return Vj(t)?t.host:t}function eM(e){let t=$j(e);return Xj(t)?(e.ownerDocument||e).body:Bj(t)&&Hj(t)?t:eM(t)}function tM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=eM(e),i=r===e.ownerDocument?.body,a=Ij(r);if(i){let e=nM(a);return t.concat(a,a.visualViewport||[],Hj(r)?r:[],e&&n?tM(e):[])}return t.concat(r,tM(r,[],n))}function nM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var rM=Math.min,iM=Math.max,aM=Math.round,oM=Math.floor,sM=e=>({x:e,y:e}),Ere={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function cM(e,t,n){return iM(e,rM(t,n))}function lM(e,t){return typeof e==`function`?e(t):e}function uM(e){return e.split(`-`)[0]}function dM(e){return e.split(`-`)[1]}function fM(e){return e===`x`?`y`:`x`}function pM(e){return e===`y`?`height`:`width`}function mM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function hM(e){return fM(mM(e))}function gM(e,t,n){n===void 0&&(n=!1);let r=dM(e),i=hM(e),a=pM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=TM(o)),[o,TM(o)]}function _M(e){let t=TM(e);return[vM(e),t,vM(t)]}function vM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var yM=[`left`,`right`],bM=[`right`,`left`],xM=[`top`,`bottom`],SM=[`bottom`,`top`];function CM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?bM:yM:t?yM:bM;case`left`:case`right`:return t?xM:SM;default:return[]}}function wM(e,t,n,r){let i=dM(e),a=CM(uM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(vM)))),a}function TM(e){let t=uM(e);return Ere[t]+e.slice(t.length)}function EM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function DM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:EM(e)}function OM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function kM(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function AM(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function jM(){return/apple/i.test(navigator.vendor)}function MM(){return kM().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function NM(){return AM().includes(`jsdom/`)}var PM=`data-floating-ui-focusable`,FM=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function IM(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function LM(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Vj(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function RM(e){return`composedPath`in e?e.composedPath()[0]:e.target}function zM(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function BM(e){return e.matches(`html,body`)}function VM(e){return e?.ownerDocument||document}function HM(e){return Bj(e)&&e.matches(FM)}function UM(e){if(!e||NM())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function WM(e){return e?e.hasAttribute(PM)?e:e.querySelector(`[`+PM+`]`)||e:null}function GM(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...GM(e,t.id,n)])}function KM(e){return`nativeEvent`in e}function qM(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var JM=typeof document<`u`?W.useLayoutEffect:function(){},YM={...W};function XM(e){let t=W.useRef(e);return JM(()=>{t.current=e}),t}var ZM=YM.useInsertionEffect||(e=>e());function QM(e){let t=W.useRef(()=>{});return ZM(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function $M(e,t,n){let{reference:r,floating:i}=e,a=mM(t),o=hM(t),s=pM(o),c=uM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=dM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function eN(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=lM(t,e),p=DM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=OM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=OM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var tN=50,nN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:eN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=$M(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=lM(e,t)||{};if(l==null)return{};let d=DM(u),f={x:n,y:r},p=hM(i),m=pM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=rM(d[_],T),D=rM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=cM(E,k,O),j=!c.arrow&&dM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===mM(t)||T.every(e=>mM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=mM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function aN(e){let t=rM(...e.map(e=>e.left)),n=rM(...e.map(e=>e.top)),r=iM(...e.map(e=>e.right)),i=iM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function oN(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>OM(aN(e)))}var sN=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=lM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=oN(u),f=OM(aN(u)),p=DM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(mM(n)===`y`){let e=d[0],t=d[d.length-1],r=uM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return OM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=uM(n)===`left`,t=iM(...d.map(e=>e.right)),r=rM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return OM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},cN=new Set([`left`,`top`]);async function lN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=uM(n),s=dM(n),c=mM(n)===`y`,l=cN.has(o)?-1:1,u=a&&c?-1:1,d=lM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var uN=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await lN(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},dN=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=lM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=mM(i),p=fM(f),m=u[p],h=u[f],g=(e,t)=>cM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function fN(e){let t=Zj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=Bj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=aM(n)!==a||aM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function pN(e){return zj(e)?e:e.contextElement}function mN(e){let t=pN(e);if(!Bj(t))return sM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=fN(t),o=(a?aM(n.width):n.width)/r,s=(a?aM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Dre=sM(0);function hN(e){let t=Ij(e);return!Yj()||!t.visualViewport?Dre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ore(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Ij(e)}function gN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=pN(e),o=sM(1);t&&(r?zj(r)&&(o=mN(r)):o=mN(e));let s=Ore(a,n,r)?hN(a):sM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Ij(a),t=zj(r)?Ij(r):r,n=e,i=nM(n);for(;i&&t!==n;){let e=mN(i),t=i.getBoundingClientRect(),r=Zj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Ij(i),i=nM(n)}}return OM({width:u,height:d,x:c,y:l})}function _N(e,t){let n=Qj(e).scrollLeft;return t?t.left+n:gN(Lj(e)).left+n}function vN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_N(e,n),y:n.top+t.scrollTop}}function kre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Lj(r),s=t?Uj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=sM(1),u=sM(0),d=Bj(r);if((d||!a)&&((Fj(r)!==`body`||Hj(o))&&(c=Qj(r)),d)){let e=gN(r);l=mN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vN(o,c):sM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Are(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function jre(e){let t=Qj(e),n=e.ownerDocument.body,r=iM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=iM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_N(e),o=-t.scrollTop;return Zj(n).direction===`rtl`&&(a+=iM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Mre=25;function Nre(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Ij(e),a=Lj(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Yj()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_N(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Mre&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Pre(e,t){let n=gN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=mN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Nre(e,n,t);else if(t===`document`)r=jre(Lj(e));else if(zj(t))r=Pre(t,n);else{let n=hN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return OM(r)}function Fre(e,t){let n=t.get(e);if(n)return n;let r=tM(e,[],!1).filter(e=>zj(e)&&Fj(e)!==`body`),i=null,a=Zj(e).position===`fixed`,o=a?$j(e):e;for(;zj(o)&&!Xj(o);){let e=Zj(o),t=qj(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=$j(o)}return t.set(e,r),r}function Ire(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Uj(t)?[]:Fre(t,this._c):[].concat(n),r],o=yN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Ij(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function TN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=pN(e),u=i||a?[...l?tM(l):[],...t?tM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?wN(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gN(e):null;c&&g();function g(){let t=gN(e);h&&!CN(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var EN=uN,DN=dN,ON=iN,kN=rN,AN=sN,jN=(e,t,n)=>{let r=new Map,i=n??{},a={...Vre,...i.platform,_c:r};return nN(e,t,{...i,platform:a})},MN=u(nA(),1),NN=typeof document<`u`?W.useLayoutEffect:function(){};function PN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!PN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!PN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function FN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function IN(e,t){let n=FN(e);return Math.round(t*n)/n}function LN(e){let t=W.useRef(e);return NN(()=>{t.current=e}),t}function RN(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);PN(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=LN(c),D=LN(i),O=LN(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),jN(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!PN(w.current,t)&&(w.current=t,MN.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);NN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);NN(()=>(A.current=!0,()=>{A.current=!1}),[]),NN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=IN(ee.floating,u.x),r=IN(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...FN(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var zN=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:kN({element:r.current,padding:i}).fn(n):r?kN({element:r,padding:i}).fn(n):{}}}},BN=(e,t)=>{let n=EN(e);return{name:n.name,fn:n.fn,options:[e,t]}},VN=(e,t)=>{let n=DN(e);return{name:n.name,fn:n.fn,options:[e,t]}},HN=(e,t)=>{let n=ON(e);return{name:n.name,fn:n.fn,options:[e,t]}},UN=(e,t)=>{let n=AN(e);return{name:n.name,fn:n.fn,options:[e,t]}},WN=(e,t)=>{let n=zN(e);return{name:n.name,fn:n.fn,options:[e,t]}};function GN(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var KN=`data-floating-ui-focusable`,qN=`active`,JN=`selected`,YN=`ArrowLeft`,XN=`ArrowRight`,ZN=`ArrowUp`,QN=`ArrowDown`,$N=[YN,XN],eP=[ZN,QN];[...$N,...eP];var tP={...W},nP=!1,rP=0,iP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+rP++;function aP(){let[e,t]=W.useState(()=>nP?iP():void 0);return JM(()=>{e??t(iP())},[]),W.useEffect(()=>{nP=!0},[]),e}var oP=tP.useId||aP;function sP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var cP=W.createContext(null),lP=W.createContext(null),uP=()=>W.useContext(cP)?.id||null,dP=()=>W.useContext(lP);function fP(e){return`data-floating-ui-`+e}function pP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var mP=fP(`safe-polygon`);function hP(e,t,n){if(n&&!qM(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function gP(e){return typeof e==`function`?e():e}function _P(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=dP(),m=uP(),h=XM(l),g=XM(c),_=XM(n),v=XM(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=QM(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(pP(b),pP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=VM(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=hP(g.current,`close`,y.current);i&&!x.current?(pP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(pP(b),r(!1,e,n))},[g,r]),k=QM(()=>{T.current(),x.current=void 0}),A=QM(()=>{if(w.current){let e=VM(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(mP),w.current=!1}}),j=QM(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(pP(b),C.current=!1,u&&!qM(y.current)||gP(v.current)>0&&!hP(g.current,`open`))return;let t=hP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=VM(o.floating);if(pP(S),E.current=!1,h.current&&i.current.floatingContext){n||pP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!LM(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){pP(b)}function l(e){j()||O(e,!1)}if(zj(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),JM(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(zj(o.domReference)&&e){var t;let n=VM(o.floating).body;n.setAttribute(mP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),JM(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),pP(b),pP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||qM(y.current))&&(n||gP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(pP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,gP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var vP=()=>{},yP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:vP,setState:vP,isInstantPhase:!1}),bP=()=>W.useContext(yP);function xP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return JM(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(yP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function SP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=bP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return JM(()=>{o&&l&&(f({delay:{open:1,close:hP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),JM(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),JM(()=>{o&&u!==vP&&n&&u(s)},[o,n,u,s]),c}function CP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Vj(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function wP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var TP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},EP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},DP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function OP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=dP(),g=QM(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=DP(p),{escapeKey:x,outsidePress:S}=DP(m),C=W.useRef(!1),w=QM(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?GM(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,KM(e)?e.nativeEvent:e,`escape-key`)}),T=QM(e=>{var t;let n=()=>{var t;w(e),(t=RM(e))==null||t.removeEventListener(`keydown`,n)};(t=RM(e))==null||t.addEventListener(`keydown`,n)}),E=QM(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=RM(e),s=`[`+fP(`inert`)+`]`,c=VM(i.floating).querySelectorAll(s),u=zj(o)?o:null;for(;u&&!Xj(u);){let e=$j(u);if(Xj(e)||!zj(e))break;u=e}if(c.length&&zj(o)&&!BM(o)&&!LM(o,i.floating)&&Array.from(c).every(e=>!LM(u,e)))return;if(Bj(o)&&k){let t=Xj(o),n=Zj(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&GM(h.nodesRef.current,d).some(t=>zM(e,t.context?.elements.floating));if(zM(e,i.floating)||zM(e,i.domReference)||f)return;let p=h?GM(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=QM(e=>{var t;let n=()=>{var t;E(e),(t=RM(e))==null||t.removeEventListener(l,n)};(t=RM(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},Yj()?5:0)}let d=VM(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(zj(i.domReference)&&(p=tM(i.domReference)),zj(i.floating)&&(p=p.concat(tM(i.floating))),!zj(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(tM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[TP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[EP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function kP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=oP(),a=W.useRef({}),[o]=W.useState(()=>sP()),s=uP()!=null,[c,l]=W.useState(r.reference),u=QM((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function AP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=kP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=dP();JM(()=>{d&&(f.current=d)},[d]);let m=RN({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=zj(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(zj(e)||e===null)&&(f.current=e,c(e)),(zj(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!zj(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return JM(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function jP(){return MM()&&jM()}function MP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=Ij(o.domReference);function t(){!n&&Bj(o.domReference)&&o.domReference===IM(VM(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),jP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),jP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{pP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=RM(e.nativeEvent);if(c&&zj(t)){if(jP()&&!e.relatedTarget){if(!d.current&&!HM(t))return}else if(!UM(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=zj(t)&&t.hasAttribute(fP(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=IM(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(LM(a.current.floatingContext?.refs.floating.current,e)||LM(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function NP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[qN]:t,[JN]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[KN]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[qN,JN].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function PP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>NP(t,e,`reference`),t),a=W.useCallback(t=>NP(t,e,`floating`),n),o=W.useCallback(t=>NP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var FP=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function IP(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=oP(),c=r.domReference?.id||s,l=W.useMemo(()=>WM(r.floating)?.id||i,[r.floating,i]),u=FP.get(o)??o,d=uP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function LP(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...LP(e,t.id,n)])}function RP(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function zP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function BP(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){pP(i),u()}if(pP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=wP(e),v=e.type===`mouseleave`,y=CP(c.floating,_),b=CP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=zP(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&zj(e.relatedTarget)&&CP(c.floating,e.relatedTarget)||f&&LP(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!RP([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}RP([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var VP={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},HP=aA((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),UP=ij(e=>{let t=KA(`ScrollArea`,VP,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=JA({name:`ScrollArea`,props:t,classes:Nj,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:HP}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=GN([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return pj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),Jk(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(mj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(Mj,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(kj,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(jj,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(kj,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(jj,{...P(`thumb`)})}),(0,G.jsx)(_re,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});UP.displayName=`@mantine/core/ScrollArea`;var WP=ij(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=KA(`ScrollAreaAutosize`,VP,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=GN([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return pj(S?T:null,A),(0,G.jsx)(uj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(uj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(UP,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});UP.classes=Nj,UP.varsResolver=HP,WP.displayName=`@mantine/core/ScrollAreaAutosize`,WP.classes=Nj,UP.Autosize=WP;var GP={root:`m_87cf2631`},KP={__staticSelector:`UnstyledButton`},qP=aj(e=>{let t=KA(`UnstyledButton`,KP,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(uj,{...JA({name:i,props:t,classes:GP,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});qP.classes=GP,qP.displayName=`@mantine/core/UnstyledButton`;var JP={root:`m_1b7284a3`},YP=aA((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:Hk(t),"--paper-shadow":Pte(n)}})),XP=aj(e=>{let t=KA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=JA({name:`Paper`,props:t,classes:JP,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:YP});return(0,G.jsx)(uj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});XP.classes=JP,XP.varsResolver=YP,XP.displayName=`@mantine/core/Paper`;function ZP(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function QP(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var $P={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function eF({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function tF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=eF({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[$P[c]]:r},d=-t/2;return c===`left`?{...u,...ZP(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...ZP(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...QP(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...QP(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function nF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function rF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=dj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...tF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}rF.displayName=`@mantine/core/FloatingArrow`;function iF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function aF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function oF({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||aF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=aF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return aF(n)}var sF={reuseTargetNode:!0},cF=ij(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=KA(`Portal`,sF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return Jk(()=>(s(!0),c.current=oF({target:n,reuseTargetNode:r,...a}),Xk(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,MN.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});cF.displayName=`@mantine/core/Portal`;var lF=ij(({withinPortal:e=!0,children:t,...n})=>kA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(cF,{...n,children:t}));lF.displayName=`@mantine/core/OptionalPortal`;var uF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),dF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...uF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...uF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...uF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...uF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...uF(`top`),common:{transformOrigin:`top right`}}},fF={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function pF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in dF?{transitionProperty:dF[e].transitionProperty,...i,...dF[e].common,...dF[e][fF[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[fF[t]]}}function mF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=IA(),d=tA(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{MN.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return Rte(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function hF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=kA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=mF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:pF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(pF({transition:n,duration:h,state:g,timingFunction:_}))})}hF.displayName=`@mantine/core/Transition`;var gF={duration:100,transition:`fade`};function _F(e,t){return{...gF,...t,...e}}var vF={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},yF=({className:e,...t})=>(0,G.jsxs)(uj,{component:`span`,className:sA(vF.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:vF.bar}),(0,G.jsx)(`span`,{className:vF.bar}),(0,G.jsx)(`span`,{className:vF.bar})]});yF.displayName=`@mantine/core/Bars`;var bF=({className:e,...t})=>(0,G.jsxs)(uj,{component:`span`,className:sA(vF.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:vF.dot}),(0,G.jsx)(`span`,{className:vF.dot}),(0,G.jsx)(`span`,{className:vF.dot})]});bF.displayName=`@mantine/core/Dots`;var xF=({className:e,...t})=>(0,G.jsx)(uj,{component:`span`,className:sA(vF.ovalLoader,e),...t});xF.displayName=`@mantine/core/Oval`;var SF={bars:yF,oval:xF,dots:bF},CF={loaders:SF,type:`oval`},wF=aA((e,{size:t,color:n})=>({root:{"--loader-size":Bk(t,`loader-size`),"--loader-color":n?gA(n,e):void 0}})),TF=ij(e=>{let t=KA(`Loader`,CF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=JA({name:`Loader`,props:t,classes:vF,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:wF});return p?(0,G.jsx)(uj,{...g(`root`),...h,children:p}):(0,G.jsx)(uj,{...g(`root`),component:d[i],variant:f,size:n,...h})});TF.defaultLoaders=SF,TF.classes=vF,TF.varsResolver=wF,TF.displayName=`@mantine/core/Loader`;var EF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},DF={orientation:`horizontal`},OF=aA((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),kF=ij(e=>{let t=KA(`ActionIconGroup`,DF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(uj,{...JA({name:`ActionIconGroup`,props:t,classes:EF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:OF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});kF.classes=EF,kF.varsResolver=OF,kF.displayName=`@mantine/core/ActionIconGroup`;var AF=aA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":Bk(o,`section-height`),"--section-padding-x":Bk(o,`section-padding-x`),"--section-fz":Uk(o),"--section-radius":t===void 0?void 0:Hk(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),jF=ij(e=>{let t=KA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(uj,{...JA({name:`ActionIconGroupSection`,props:t,classes:EF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:AF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});jF.classes=EF,jF.varsResolver=AF,jF.displayName=`@mantine/core/ActionIconGroupSection`;var MF=aA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":Bk(t,`ai-size`),"--ai-radius":n===void 0?void 0:Hk(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),NF=aj(e=>{let t=KA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=JA({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:EF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:MF});return(0,G.jsxs)(qP,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(hF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(uj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(TF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(uj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});NF.classes=EF,NF.varsResolver=MF,NF.displayName=`@mantine/core/ActionIcon`,NF.Group=kF,NF.GroupSection=jF;function PF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}PF.displayName=`@mantine/core/CloseIcon`;var FF={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},IF={variant:`subtle`},LF=aA((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":Bk(t,`cb-size`),"--cb-radius":n===void 0?void 0:Hk(n),"--cb-icon-size":U(r)}})),RF=aj(e=>{let t=KA(`CloseButton`,IF,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=JA({name:_||`CloseButton`,props:t,className:o,style:c,classes:FF,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:LF});return(0,G.jsxs)(qP,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(PF,{}),r]})});RF.classes=FF,RF.varsResolver=LF,RF.displayName=`@mantine/core/CloseButton`;function zF(e){return W.Children.toArray(e).filter(Boolean)}var BF={root:`m_4081bf90`},VF={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},HF=aA((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":Vk(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),UF=ij(e=>{let t=KA(`Group`,VF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=zF(s),x=b.length,S=Vk(c??`md`);return(0,G.jsx)(uj,{...JA({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:BF,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:HF})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});UF.classes=BF,UF.varsResolver=HF,UF.displayName=`@mantine/core/Group`;var WF=(0,W.createContext)({size:`sm`}),GF=ij(e=>{let t=KA(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,W.use)(WF),{resolvedClassNames:l,resolvedStyles:u}=Dne({classNames:a,styles:o,props:t});return(0,G.jsx)(RF,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});GF.displayName=`@mantine/core/InputClearButton`;var KF={xs:7,sm:8,md:10,lg:12,xl:15};function qF({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:KF[i]},children:[o,n||r]}):n===null?null:n||o||r}var JF=(0,W.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),YF={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},XF=aA((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`}})),ZF=ij(e=>{let t=KA(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=KA(`InputDescription`,null,t),f=(0,W.use)(JF),p=JA({name:[`InputWrapper`,c],props:t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:XF});return(0,G.jsx)(uj,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});ZF.classes=YF,ZF.varsResolver=XF,ZF.displayName=`@mantine/core/InputDescription`;var QF=aA((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`}})),$F=ij(e=>{let t=KA(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=JA({name:[`InputWrapper`,l],props:t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:QF}),p=(0,W.use)(JF);return(0,G.jsx)(uj,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});$F.classes=YF,$F.varsResolver=QF,$F.displayName=`@mantine/core/InputError`;var eI={labelElement:`label`},tI=aA((e,{size:t})=>({label:{"--input-label-size":Uk(t),"--input-asterisk-color":void 0}})),nI=ij(e=>{let t=KA(`InputLabel`,eI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=JA({name:[`InputWrapper`,p],props:t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:tI}),v=(0,W.use)(JF),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(uj,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});nI.classes=YF,nI.varsResolver=tI,nI.displayName=`@mantine/core/InputLabel`;var rI=ij(e=>{let t=KA(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,G.jsx)(uj,{...JA({name:[`InputPlaceholder`,c],props:t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});rI.classes=YF,rI.displayName=`@mantine/core/InputPlaceholder`;var iI=aA((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`}})),aI=ij(e=>{let t=KA(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=JA({name:[`InputWrapper`,l],props:t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:iI}),p=(0,W.use)(JF);return(0,G.jsx)(uj,{component:`p`,...(u&&p?.getStyles||f)(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});aI.classes=YF,aI.varsResolver=iI,aI.displayName=`@mantine/core/InputSuccess`;function Hre(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Ure={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},oI=aA((e,{size:t})=>({label:{"--input-label-size":Uk(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${Uk(t)} - ${U(2)})`}})),sI=ij(e=>{let t=KA(`InputWrapper`,Ure,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:C,id:w,required:T,__stylesApiProps:E,mod:D,attributes:O,...k}=t,A=JA({name:[`InputWrapper`,u],props:E||t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:oI}),j={size:c,variant:l,__staticSelector:u},ee=Yk(w),M=typeof C==`boolean`?C:T,N=y?.id||`${ee}-error`,te=b?.id||`${ee}-success`,P=v?.id||`${ee}-description`,F=ee,I=!!m&&typeof m!=`boolean`,ne=!!h&&typeof h!=`boolean`&&!m,L=!!g,re=I&&f.includes(`error`),ie=ne&&f.includes(`error`),ae=L&&f.includes(`description`),oe=`${re?N:``} ${ie?te:``} ${ae?P:``}`,R=oe.trim().length>0?oe.trim():void 0,z=_?.id||`${ee}-label`,se=p&&(0,G.jsx)(nI,{labelElement:x,id:z,htmlFor:F,required:M,...j,..._,children:p},`label`),ce=L&&(0,G.jsx)(ZF,{...v,...j,size:v?.size||j.size,id:v?.id||P,children:g},`description`),le=(0,G.jsx)(W.Fragment,{children:d(S)},`input`),ue=I&&(0,W.createElement)($F,{...y,...j,size:y?.size||j.size,key:`error`,id:y?.id||N},m),de=ne&&(0,W.createElement)(aI,{...b,...j,size:b?.size||j.size,key:`success`,id:b?.id||te},h),fe=f.map(e=>{switch(e){case`label`:return se;case`input`:return le;case`description`:return ce;case`error`:return ue||de;default:return null}});return(0,G.jsx)(JF,{value:{getStyles:A,describedBy:R,inputId:F,labelId:z,...Hre(f,{hasDescription:L,hasError:I||ne})},children:(0,G.jsx)(uj,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},D],id:x===`label`?void 0:w,...A(`root`),...k,children:fe})})});sI.classes=YF,sI.varsResolver=oI,sI.displayName=`@mantine/core/InputWrapper`;var Wre={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},cI=aA((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":Bk(t.size,`input-height`),"--input-fz":Uk(t.size),"--input-radius":t.radius===void 0?void 0:Hk(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:U(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:U(t.rightSectionWidth),"--input-padding-y":t.multiline?Bk(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),lI=aj(e=>{let t=KA(`Input`,Wre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,withSuccessStyles:j,mod:ee,inputSize:M,attributes:N,__clearSection:te,__clearable:P,__clearSectionMode:F,__defaultRightSection:I,loading:ne,loadingPosition:L,__bottomSection:re,__bottomSectionProps:ie,rootRef:ae,dir:oe,...R}=t,{styleProps:z,rest:se}=XA(R),ce=(0,W.use)(JF),le={offsetBottom:ce?.offsetBottom,offsetTop:ce?.offsetTop},ue=JA({name:[`Input`,c],props:l||t,classes:YF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,stylesCtx:le,rootSelector:`wrapper`,vars:w,varsResolver:cI}),de=k?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":ce?.describedBy,id:ce?.inputId||O}:{},fe=ne?(0,G.jsx)(TF,{size:L===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,pe=ne&&L===`left`?fe:h,B=qF({__clearable:P,__clearSection:te,rightSection:ne&&L===`right`?fe:v,__defaultRightSection:I,size:u,__clearSectionMode:F});return(0,G.jsx)(WF,{value:{size:u||`sm`},children:(0,G.jsxs)(uj,{ref:ae,dir:oe,...ue(`wrapper`),...z,...d,mod:[{error:!!f&&A,success:!!p&&!f&&j,pointer:T,disabled:m,multiline:E,"data-with-right-section":!!B,"data-with-left-section":!!pe,"data-with-bottom-section":!!re},ee],variant:C,size:u,children:[pe&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...ue(`section`,{className:g?.className,style:g?.style}),children:pe}),(0,G.jsx)(uj,{component:`input`,...se,...de,required:s,mod:{disabled:m,error:!!f&&A,success:!!p&&!f&&j},variant:C,__size:M,...ue(`input`)}),re&&(0,G.jsx)(`div`,{...ie,...ue(`bottomSection`,{className:ie?.className,style:ie?.style}),children:re}),B&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...ue(`section`,{className:y?.className,style:y?.style}),children:B})]})})});lI.classes=YF,lI.varsResolver=cI,lI.Wrapper=sI,lI.Label=nI,lI.Error=$F,lI.Success=aI,lI.Description=ZF,lI.Placeholder=rI,lI.ClearButton=GF,lI.displayName=`@mantine/core/Input`;function Gre(e,t,n){let r=KA([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:ee}=XA(A),M={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...ee,classNames:l,styles:u,unstyled:f,wrapperProps:{...M,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var Kre={__staticSelector:`InputBase`,withAria:!0,size:`sm`},uI=aj(e=>{let{inputProps:t,wrapperProps:n,...r}=Gre(`InputBase`,Kre,e);return(0,G.jsx)(lI.Wrapper,{...n,children:(0,G.jsx)(lI,{...t,...r})})});uI.classes={...lI.classes,...lI.Wrapper.classes},uI.displayName=`@mantine/core/InputBase`;function qre(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Jre({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,W.useRef)(-1),s=(0,W.useRef)(e),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=bj(s.borderTopWidth)+bj(c.borderTopWidth),u=bj(s.borderLeftWidth)+bj(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,W.useRef)(null),h=(0,W.useRef)(null);return(0,W.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,W.useEffect)(()=>{if(t){let e=e=>{qre(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,W.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Wte(()=>{Jte()!==`test`&&l(!0)},20,{autoInvoke:!0}),Gte(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var dI={root:`m_96b553a6`},fI=aA((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),pI=ij(e=>{let t=KA(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=JA({name:`FloatingIndicator`,classes:dI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:fI,stylesCtx:{shouldReduceMotion:tA()}}),y=(0,W.useRef)(null),{initialized:b,hidden:x}=Jre({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=Zk(g,y);return!c||!l?null:(0,G.jsx)(uj,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});pI.displayName=`@mantine/core/FloatingIndicator`,pI.classes=dI,pI.varsResolver=fI;var mI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},hI=aA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:Hk(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),gI=ij(e=>{let t=KA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=JA({name:`Alert`,classes:mI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:hI}),C=Yk(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(uj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(RF,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});gI.classes=mI,gI.varsResolver=hI,gI.displayName=`@mantine/core/Alert`;var _I={root:`m_b6d8b162`};function Yre(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Xre={inherit:!1},vI=aA((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":Uk(i),"--text-lh":Nte(i),"--text-gradient":t===`gradient`?yA(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),yI=aj(e=>{let t=KA(`Text`,Xre,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(uj,{...JA({name:[`Text`,l],props:t,classes:_I,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:vI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":Yre(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});yI.classes=_I,yI.varsResolver=vI,yI.displayName=`@mantine/core/Text`;var bI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},xI=aA((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":Bk(a,`badge-height`),"--badge-padding-x":Bk(a,`badge-padding-x`),"--badge-fz":Bk(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:Hk(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?gA(n,e):void 0}}}),SI=aj(e=>{let t=KA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=JA({name:`Badge`,props:t,classes:bI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:xI});return(0,G.jsxs)(uj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});SI.classes=bI,SI.varsResolver=xI,SI.displayName=`@mantine/core/Badge`;var CI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},wI={orientation:`horizontal`},TI=aA((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),EI=ij(e=>{let t=KA(`ButtonGroup`,wI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=KA(`ButtonGroup`,wI,e);return(0,G.jsx)(uj,{...JA({name:`ButtonGroup`,props:t,classes:CI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:TI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});EI.classes=CI,EI.varsResolver=TI,EI.displayName=`@mantine/core/ButtonGroup`;var DI=aA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":Bk(o,`section-height`),"--section-padding-x":Bk(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?Uk(o.replace(`compact-`,``)):Uk(o),"--section-radius":t===void 0?void 0:Hk(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),OI=ij(e=>{let t=KA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(uj,{...JA({name:`ButtonGroupSection`,props:t,classes:CI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:DI,rootSelector:`groupSection`})(`groupSection`),...f})});OI.classes=CI,OI.varsResolver=DI,OI.displayName=`@mantine/core/ButtonGroupSection`;var Zre={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},kI=aA((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":Bk(a,`button-height`),"--button-padding-x":Bk(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?Uk(a.replace(`compact-`,``)):Uk(a),"--button-radius":t===void 0?void 0:Hk(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),AI=aj(e=>{let t=KA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=JA({name:`Button`,props:t,classes:CI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:kI}),T=!!c,E=!!l;return(0,G.jsxs)(qP,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(hF,{mounted:p,transition:Zre,duration:150,children:e=>(0,G.jsx)(uj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(TF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(uj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(uj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(uj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});AI.classes=CI,AI.varsResolver=kI,AI.displayName=`@mantine/core/Button`,AI.Group=EI,AI.GroupSection=OI;var jI={root:`m_4451eb3a`},MI=aj(e=>{let t=KA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=JA({name:`Center`,props:t,classes:jI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(uj,{mod:[{inline:c},l],...f(`root`),...d})});MI.classes=jI,MI.displayName=`@mantine/core/Center`;var[Qre,NI]=Lk(`Pagination.Root component was not found in tree`),PI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},$re={withPadding:!0},FI=ij(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=KA(`PaginationControl`,$re,e),d=NI(),f=s||d.disabled;return(0,G.jsx)(qP,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});FI.classes=PI,FI.displayName=`@mantine/core/PaginationControl`;function II({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var eie=e=>(0,G.jsx)(II,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),tie=e=>(0,G.jsx)(II,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),LI=e=>(0,G.jsx)(II,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),RI=e=>(0,G.jsx)(II,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),zI={icon:e=>(0,G.jsx)(II,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},BI=ij(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=KA(`PaginationDots`,zI,e);return(0,G.jsx)(uj,{...NI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});BI.classes=PI,BI.displayName=`@mantine/core/PaginationDots`;function VI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=KA(t,i,e),s=NI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(FI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,nj(a)}var HI=VI({icon:eie,name:`PaginationNext`,action:`onNext`,type:`next`}),UI=VI({icon:tie,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),WI=VI({icon:LI,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),GI=VI({icon:RI,name:`PaginationLast`,action:`onLast`,type:`next`});function KI({dotsIcon:e}){let t=NI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(BI,{icon:e},r):(0,G.jsx)(FI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}KI.displayName=`@mantine/core/PaginationItems`;var qI={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},JI=ij(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=KA(`PaginationLabel`,qI,e),c=NI();return(0,G.jsx)(uj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});JI.classes=PI,JI.displayName=`@mantine/core/PaginationLabel`;var YI={siblings:1,boundaries:1},XI=aA((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:Hk(n),"--pagination-control-size":Bk(t,`pagination-control-size`),"--pagination-control-fz":Uk(t),"--pagination-active-bg":r?gA(r,e):void 0,"--pagination-active-color":ane(i,e)?CA({color:r,theme:e,autoContrast:i}):void 0}})),ZI=ij(e=>{let t=KA(`PaginationRoot`,YI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=JA({name:`Pagination`,classes:PI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:XI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=Bte({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(Qre,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:Wk(_,j),onPrevious:Wk(v,ee),onFirst:Wk(y,N),onLast:Wk(b,te),getStyles:O},children:(0,G.jsx)(uj,{...O(`root`),mod:[{layout:w},T],...D})})});ZI.classes=PI,ZI.varsResolver=XI,ZI.displayName=`@mantine/core/PaginationRoot`;var QI={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function $I({children:e}){return(0,G.jsx)(uj,{...NI().getStyles(`items`),children:e})}var eL=ij(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=KA(`Pagination`,QI,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($I,{children:(0,G.jsx)(KI,{dotsIcon:c})}),(0,G.jsx)(JI,{formatLabel:m})]}):(0,G.jsx)(KI,{dotsIcon:c}):null;return(0,G.jsx)(ZI,{total:l,layout:p,...h,children:(0,G.jsxs)(UF,{gap:u,children:[t&&(0,G.jsx)(WI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(UI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(HI,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(GI,{icon:o,...r?.(`last`)})]})})});eL.classes=PI,eL.displayName=`@mantine/core/Pagination`,eL.Root=ZI,eL.Control=FI,eL.Dots=BI,eL.First=WI,eL.Last=GI,eL.Next=HI,eL.Previous=UI,eL.Items=KI,eL.Label=JI;function tL({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=AP({placement:t,middleware:[VN({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=tM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var nL={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},rL={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:zk(`popover`)},iL=aA((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Hk(t),"--tooltip-bg":n?gA(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),aL=ij(e=>{let t=KA(`TooltipFloating`,rL,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=IA(),E=JA({name:`TooltipFloating`,props:t,classes:nL,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:iL}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=tL({offset:p,position:m,defaultOpened:v}),N=iA(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=Zk(j,rA(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(lF,{...x,withinPortal:i,children:(0,G.jsx)(uj,{...w,...E(`tooltip`,{style:{...tj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});aL.classes=nL,aL.varsResolver=iL,aL.displayName=`@mantine/core/TooltipFloating`;var oL=(0,W.createContext)({withinGroup:!1}),sL={openDelay:0,closeDelay:0};function cL(e){let{openDelay:t,closeDelay:n,children:r}=KA(`TooltipGroup`,sL,e);return(0,G.jsx)(oL,{value:{withinGroup:!0},children:(0,G.jsx)(xP,{delay:{open:t,close:n},children:r})})}cL.displayName=`@mantine/core/TooltipGroup`,cL.extend=e=>e;function lL(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function uL(e){let t=lL(e.middlewares),n=[BN(e.offset)];return t.shift&&n.push(VN(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?HN():HN(t.flip)),n.push(WN({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?UN():UN(t.inline)):e.inline&&n.push(UN()),n}function dL(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(oL).withinGroup,a=Yk(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=AP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:uL(e),whileElementsMounted:TN}),{delay:m,currentId:h,setCurrentId:g}=SP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=PP([_P(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?BP():null}),MP(l,{enabled:e.events?.focus,visibleOnly:!0}),IP(l,{role:`tooltip`}),OP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);Jk(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var fL={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:zk(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},pL=aA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:Hk(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),mL=ij(e=>{let t=KA(`Tooltip`,fL,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=dj(),ce=(0,W.useRef)(null),le=dL({position:iF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=JA({name:`Tooltip`,props:t,classes:nL,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:pL}),de=iA(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?nF({position:le.placement,dir:se}):void 0;if(oe){let e=_F(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(lF,{...I,withinPortal:d,children:(0,G.jsx)(hF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(uj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(rF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=Zk(le.reference,rA(de),R),he=_F(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(lF,{...I,withinPortal:d,children:(0,G.jsx)(hF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(uj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(rF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:sA(v,me.className),[i]:V}))]})});mL.classes=nL,mL.varsResolver=pL,mL.displayName=`@mantine/core/Tooltip`,mL.Floating=aL,mL.Group=cL;var hL={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},gL={withItemsBorders:!0},_L=aA((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:Hk(t),"--sc-color":n?gA(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":Bk(i,`sc-padding`),"--sc-font-size":Uk(i)}})),vL=dre(e=>{let t=KA(`SegmentedControl`,gL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:w,mod:T,attributes:E,ref:D,...O}=t,k=JA({name:`SegmentedControl`,props:t,classes:hL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:_L}),A=IA(),j=c.map(e=>Yte(e)?{label:`${e}`,value:e}:e),ee=Kte(),[M,N]=(0,W.useState)(Gk()),[te,P]=(0,W.useState)(null),[F,I]=(0,W.useState)({}),ne=(e,t)=>{F[t]=e,I(F)},[L,re]=Qk({value:l,defaultValue:u,finalValue:Array.isArray(c)?j.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=Yk(p),ae=j.map(e=>(0,W.createElement)(uj,{...k(`control`),mod:{active:L===e.value,orientation:_},key:`${e.value}`},(0,W.createElement)(`input`,{...k(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:L===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":A.focusRing,key:`${e.value}-input`}),(0,W.createElement)(uj,{component:`label`,...k(`label`),mod:{active:L===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>ne(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:CA({color:y,theme:A,autoContrast:C})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...k(`innerLabel`),children:e.label})))),oe=Zk(D,P);return Ute(()=>{N(Gk())},[c.length]),c.length===0?null:(0,G.jsxs)(uj,{...k(`root`),variant:S,size:f,ref:oe,mod:[{"full-width":g,orientation:_,initialized:ee,"with-items-borders":w},T],...O,role:`radiogroup`,"data-disabled":m,children:[L!==void 0&&(0,G.jsx)(pI,{target:F[`${L}`],parent:te,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...k(`indicator`)},M),ae]})});vL.classes=hL,vL.varsResolver=_L,vL.displayName=`@mantine/core/SegmentedControl`;var[yL,bL]=Lk(`Table component was not found in the tree`),xL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function SL(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function CL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=ij(r=>{let i=KA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=bL();return(0,G.jsx)(uj,{component:e,...SL(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=xL,r}var wL=CL(`th`,{columnBorder:!0}),TL=CL(`td`,{columnBorder:!0}),EL=CL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),DL=CL(`thead`,{stickyHeader:!0}),OL=CL(`tbody`),kL=CL(`tfoot`),AL=CL(`caption`,{captionSide:!0}),jL={type:`scrollarea`},ML=aA((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),NL=ij(e=>{let t=KA(`TableScrollContainer`,jL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=JA({name:`TableScrollContainer`,classes:xL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:ML,rootSelector:`scrollContainer`});return(0,G.jsx)(uj,{component:d===`scrollarea`?UP:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});NL.classes=xL,NL.varsResolver=ML,NL.displayName=`@mantine/core/TableScrollContainer`;function PL({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(AL,{children:e.caption}),e.head&&(0,G.jsx)(DL,{children:(0,G.jsx)(EL,{children:e.head.map((e,t)=>(0,G.jsx)(wL,{children:e},t))})}),e.body&&(0,G.jsx)(OL,{children:e.body.map((e,t)=>(0,G.jsx)(EL,{children:e.map((e,t)=>(0,G.jsx)(TL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(kL,{children:(0,G.jsx)(EL,{children:e.foot.map((e,t)=>(0,G.jsx)(wL,{children:e},t))})})]})}PL.displayName=`@mantine/core/TableDataRenderer`;var FL={withRowBorders:!0,verticalSpacing:7},IL=aA((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":Vk(r),"--table-vertical-spacing":Vk(i),"--table-border-color":a?gA(a,e):void 0,"--table-striped-color":c&&o?gA(o,e):void 0,"--table-highlight-on-hover-color":l&&s?gA(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),LL=ij(e=>{let t=KA(`Table`,FL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=JA({name:`Table`,props:t,className:r,style:i,classes:xL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:IL});return(0,G.jsx)(yL,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(uj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(PL,{data:b})})})});LL.classes=xL,LL.varsResolver=IL,LL.displayName=`@mantine/core/Table`,LL.Td=TL,LL.Th=wL,LL.Tr=EL,LL.Thead=DL,LL.Tbody=OL,LL.Tfoot=kL,LL.Caption=AL,LL.ScrollContainer=NL,LL.DataRenderer=PL;var RL=ij(e=>(0,G.jsx)(uI,{component:`input`,...KA([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));RL.classes=uI.classes,RL.displayName=`@mantine/core/TextInput`;var zL={root:`m_7341320d`},BL=aA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":Bk(t,`ti-size`),"--ti-radius":n===void 0?void 0:Hk(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),VL=ij(e=>{let t=KA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(uj,{...JA({name:`ThemeIcon`,classes:zL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:BL})(`root`),...u})});VL.classes=zL,VL.varsResolver=BL,VL.displayName=`@mantine/core/ThemeIcon`;var HL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],UL=[`xs`,`sm`,`md`,`lg`,`xl`];function WL(e,t){let n=t===void 0?`h${e}`:t;return HL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:UL.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var GL={root:`m_8a5d1357`},KL={order:1},qL=aA((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=WL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),JL=ij(e=>{let t=KA(`Title`,KL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=JA({name:`Title`,props:t,classes:GL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:qL});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(uj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});JL.classes=GL,JL.varsResolver=qL,JL.displayName=`@mantine/core/Title`;var YL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),XL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z`}))]]),ZL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),QL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),$L=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),eR=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext($L);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});eR.displayName=`IconBase`;var tR=W.forwardRef((e,t)=>W.createElement(eR,{ref:t,...e,weights:YL}));tR.displayName=`ArrowClockwiseIcon`;var nR=tR,rR=W.forwardRef((e,t)=>W.createElement(eR,{ref:t,...e,weights:XL}));rR.displayName=`ArrowSquareOutIcon`;var iR=rR,aR=W.forwardRef((e,t)=>W.createElement(eR,{ref:t,...e,weights:ZL}));aR.displayName=`ListMagnifyingGlassIcon`;var oR=aR,sR=W.forwardRef((e,t)=>W.createElement(eR,{ref:t,...e,weights:QL}));sR.displayName=`MagnifyingGlassIcon`;var cR=sR,lR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),uR=s(((e,t)=>{t.exports=lR()})),dR=s((e=>{var t=uR(),n=Fk(),r=nA();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-11||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=C_(e);n>=t&&(t=n+ +(r&&(!n||x_(e)&&!e.noHeader)))}),t}return 0}function w_(e,t,n,r){var i=t.noHeader,a=D_(C_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new dm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=S_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):O_(r,o.join(``),i?n:a.html);if(i)return d;var f=gg(t.header,`ordinal`,e.useUTC),p=v_(r,e.renderMode).nameStyle,m=__(r);return e.renderMode===`richText`?j_(e,f,p)+a.richText+d:O_(r,`
`+gh(f)+`
`+d,n)}function T_(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return gg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||f_.color.secondary,i),f=a?``:gg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=v_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:j_(e,f,v))+(o?``:M_(e,m,h,g,y)):O_(r,(s?``:d)+(a?``:k_(f,!s,v))+(o?``:A_(m,h,g,y)),n)}}function E_(e,t,n,r,i,a){if(e)return S_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function D_(e){return{html:See[e],richText:y_[e]}}function O_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=__(e);return`
`+t+r+`
`}function k_(e,t,n){var r=t?`margin-left:2px`:``;return``+gh(e)+``}function A_(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return gh(e)}).join(`  `)+``}function j_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function M_(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function N_(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return xg(n)}function P_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var F_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Gs()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=bg({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function I_(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=N_(t,n),u,d,f,p;if(o>1||c&&!o){var m=L_(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=nm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=vc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return b_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[b_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function L_(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(nm(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(b_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var R_=wc();function z_(e,t){return e.getName(t)||e.getId(t)}var B_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Yg({count:U_,reset:W_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(R_(this).sourceManager=new l_(this)).prepareSource();var r=this.getInitialData(e,n);K_(r,this),this.dataTask.context.data=r,R_(this).dataBeforeProcessed=r,V_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{},i=this.subType;Lg.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),ic(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Ng(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Mg(this);n&&Ng(this.option,e,n);var r=R_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);K_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,R_(this).dataBeforeProcessed=i,V_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return I_({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Vg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[z_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Lg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Lg);ae(B_,qg),ae(B_,Vg),et(B_,Lg);function V_(e){var t=e.name;vc(e)||(e.name=H_(e)||t)}function H_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function U_(e){return e.model.getRawData().count()}function W_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),G_}function G_(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function K_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(q_,t))})}function q_(e,t){var n=J_(e);return n&&n.setOutputEnd((t||this).count()),t}function J_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Y_=Ao.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),X_={line:gd,rect:Wo,roundRect:Wo,square:Wo,circle:Bu,diamond:Ao.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Ao.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Ao.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Y_},Z_={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Q_={};R(X_,function(e,t){Q_[t]=new e});var Cee=Ao.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Q_[r];i||=(r=`rect`,Q_[r]),Z_[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function wee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||f_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function $_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?af(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?rf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new Cee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=wee,a&&c.setColor(a),c}function Tee(e,t){if(e!=null)return B(e)||(e=[e,e]),[ws(e[0],t[0])||0,ws(we(e[1],e[0]),t[1])||0]}function Eee(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=nm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Oee=typeof Float32Array<`u`?Float32Array:void 0,kee=typeof Float64Array<`u`?Float64Array:void 0;function ev(e){return tv({ctor:Oee},e).arr}function tv(e,t){var n=e.arr,r=e.ctor;if(t>Ps&&(t=Ps),!n||e.typed&&n.length=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){gv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),gv(r,e,t,n)},freeze:function(){}};function gv(e,t,n,r){Bc(n,r)&&(e[t][0]=n,e[t][1]=r)}function _v(e){return vv(e)||bv(e)}function vv(e){return e.type===`interval`}function yv(e){return e.type===`time`}function bv(e){return e.type===`log`}function xv(e){return e.type===`ordinal`}function Uee(e){var t=Bs(e),n=vs(10,t),r=hs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Os(r*n,-t)}function Sv(e){return As(e)+2}function Cv(e,t){return ys(e)/ys(t)}function wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Ov=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new cv({}),B(i)&&(i=new cv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=uv(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,fv(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=hs(e),e},t.prototype.getTicks=function(){var e=[];return Dv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=fs(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=fs(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Os(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Os(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Os(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return kv(this,e,Mh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=As(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),pg(Os(e.value,n,!0))},t.type=`interval`,t}(sv);sv.registerClass(Av);var Gee=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function qee(e){var t=30*Lh;return e/=t,e>6?6:e>3?3:e>2?2:1}function Jee(e){return e/=Ih,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Pv(e,t){return e/=t?Fh:Ph,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function Yee(e){return ps(Vs(e,!0),1)}function Fv(e,t,n){var r=Math.max(0,re(Hh,t)-1);return Qh(new Date(e),Hh[r],n).getTime()}function Iv(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function Lv(e,t,n,r,i,a){var o=xee,s=0;function c(e,t,n,i,o,c,l){for(var u=Iv(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!Nv(Kh(e),r[0],r[1],n)){s&&(i=[{value:Fv(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=Mv.length,l=Math.min(Gee(Mv,a,0,c),c-1),u=Mv[l][1],d=Mv[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};sv.registerClass(jv);var zv=0,Bv=1,Vv=2,Hv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Av.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[zv]=i[Bv]=a[zv]=a[Bv]=NaN,dv(r,t.mapperMethods);var s=Ah(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},Vv,l),r.powStub=new Av({breakParsed:l.original}),r.intervalStub=new Av({breakParsed:l.transformed}),fv(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Ah(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Mh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return kv(this,e,Mh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Cv(e,this.base))},scale:function(e){return wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Cv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Uv.depth=n,Wv.lookup=this._lookup,wv(n===2?e:this.intervalStub.transformOut(e,Uv),this.base,Wv)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Bc(t,n)||t<=0||n<=0)){var r=Gv,i=Gv;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[zv]=t,r[Bv]=n);var o=this.base;this.intervalStub.setExtent2(e,i[zv]=Cv(t,o),i[Bv]=Cv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Bc(t[0],t[1])&&Js(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(sv);sv.registerClass(Hv);var Uv={},Wv={},Gv=[],Kv={value:1,category:1,time:1,log:1},qv=wc();function Jv(e){var t=e.get(`type`);return(t==null||!Be(Kv,t)&&!sv.getClass(t))&&(t=`value`),t}function Yv(e,t,n){var r=Ah(),i;switch(r&&(i=iy(e,t,n)),t){case`category`:return new Ov({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Pc()});case`time`:return new jv({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Hv({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Av({breakOption:i});default:return new((sv.getClass(t))||Av)({})}}function Xv(e,t,n){var r=n?mv(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Bc(i,a)?i===t||a===t?2:it?1:3:3}function Zv(e){qv(e).noOnMyZero=!0}function Qv(e){return qv(e).noOnMyZero}function $v(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Uh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(ey(e,n),n.value-e.scale.getExtent()[0],null)};var r=Ah();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(ey(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function ey(e,t){var n=e.scale;return xv(n)?n.getLabel(t):t.value}function ty(e){return e.get(`interval`)??`auto`}function Xee(e){return e.type===`category`&&ty(e.getLabelModel())===0}function Zee(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[Qm(e,t)]=!0}),ue(n)}function ny(e){return e===`middle`||e===`center`}function ry(e){return e.getShallow(`show`)}function iy(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Ah()||!n||!ay(t)?void 0:r}function ay(e){return e!==`category`}function oy(e,t,n,r,i,a){var o=bv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Wee(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function sy(e,t){return xv(e)?e.getRawOrdinalNumber(t.value):t.value}function cy(e,t){return xv(e)&&!!t.get(`boundaryGap`)}var ly={average:function(e){for(var t=0,n=0,r=0;rt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=ly[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,uy))}}}}}var fy=wc(),py=wc(),my={estimate:1,determine:2};function hy(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function gy(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(vy(n,r),function(t,n){return{formattedLabel:$v(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?yy(e,t):Sy(e)}function _y(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:vy(i,r)}:e.type===`category`?xy(e,t):{ticks:r.getTicks(n)}}function vy(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Gc(r,qc,null),ks(r),z(r,function(e){return{value:e}})}function yy(e,t){var n=e.getLabelModel(),r=by(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function by(e,t,n){var r=wy(e),i=ty(t),a=n.kind===my.estimate;if(!a){var o=Ey(r,i);if(o)return o}var s,c;me(i)?s=Ny(e,i,!1):(c=i===`auto`?Oy(e,n):i,s=Ny(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Dy(r,i,l),!0}):Dy(r,i,l),l}function xy(e,t){var n=Cy(e),r=ty(t),i=Ey(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Ny(e,r,!0);else if(r===`auto`){var s=by(e,e.getLabelModel(),hy(my.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Ny(e,o,!0);return Dy(n,r,{ticks:a,tickCategoryInterval:o})}function Sy(e){var t=e.scale.getTicks(),n=$v(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var Cy=Ty(`axisTick`),wy=Ty(`axisLabel`);function Ty(e){return function(t){return py(t)[e]||(py(t)[e]={list:[]})}}function Ey(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===my.estimate?(t.out.noPxChangeTryDetermine.push(fe(Ay,null,e,S,c)),S):jy(e,S,c)??S}function Ay(e,t,n){return jy(e,t,n)==null}function jy(e,t,n){var r=fy(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function My(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Ny(e,t,n){var r=$v(e),i=e.scale,a=[],o=me(t);return Dv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Py=wc();function Fy(e){Py(e).prepare={}}function Iy(e){Py(e).fullUpdate={}}function Ly(e){return Py(e).prepare}function Ry(e){return Py(e).fullUpdate}var zy=Uc(),By=wc(),Vy=wc();function Hy(e,t){var n=e.model,r=By(Ry(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Uy(e,t){return Ky(Hy(e,t))}function Wy(e,t){var n=[];return Gy(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Js(n)&&n>0&&Js(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*ab,e.w2=e.w*n/r)}var lb=[0,1],ub=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),Cs(e,lb,db(this),t)},e.prototype.coordToData=function(e,t){var n=Cs(e,db(this),lb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(_y(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(sy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Qee(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(xv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=hy(my.determine),gy(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return ob(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=hy(my.determine),ky(this,e)},e}();function db(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Qee(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=ob(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var $ee=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ub),fb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],ete=1,pb=2,mb=ete|pb;function hb(e,t,n){n||=mb,t?e.dirty|=n:e.dirty&=~n}function gb(e,t){return t||=mb,e.dirty==null||!!(e.dirty&t)}function _b(e){if(e)return gb(e)&&tte(e,e.label,e),e}function tte(e,t,n){var r=t.getComputedTransform();e.transform=Pf(e.transform,r);var i=e.localRect=Nf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=ap.textMargin);for(var d=0;d<4;d++)vb[d]=u===ap.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ap.textMargin&&Tf(i,vb,!1,!1);var f=e.rect=Nf(e.rect,i);return r&&f.applyTransform(r),u===ap.minMargin&&Tf(f,vb,!1,!1),e.axisAligned=jf(r),(e.label=e.label||{}).ignore=t.ignore,hb(e,!1),hb(e,!0,pb),e}var vb=[0,0,0,0];function nte(e,t,n){return e.transform=Pf(e.transform,n),e.localRect=Nf(e.localRect,t),e.rect=Nf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=jf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function rte(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function yb(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var jb=_t(),Mb=new tn(0,0,0,0),Nb=function(e,t,n,r,i,a){if(ny(e.nameLocation)){var o=a.stOccupiedRect;o&&Pb(nte({},o,a.transGroup.transform),r,i)}else Fb(a.labelInfoList,a.dirVec,r,i)};function Pb(e,t,n){var r=new Vt;xb(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&rte(t,r)}function Fb(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Is(r-wb)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),Lb=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],Rb={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Nh(r.axis.scale))Sb().buildAxisBreakLine(r,i,a,m);else{var h=new gd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));lf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=Tee(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=$_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){qb(t,i,s)&&zb(e,t,n,r,i,a,o,my.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){qb(t,i,s)&&zb(e,t,n,r,i,a,o,my.determine);var c=Gb(e,i,a,r);Hb(e,t.labelLayoutList,c),Kb(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(ex(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*wb/180);var b,x;ny(u)?b=Ib.innerTextLayout(e.rotation,y??e.rotation,d):(b=Bb(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Yo({x:g.x,y:g.y,rotation:b.rotation,silent:Ib.isLabelSilent(r),style:Jf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Of({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=Ib.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Zc(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=_b({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:ny(u)?Tb[E]:Eb[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function zb(e,t,n,r,i,a,o,s){Yb(t)||Jb(e,t,i,s,r,o);var c=t.labelLayoutList;Zb(e,r,c,a),nx(r,e.rotation,c);var l=e.optionHideOverlap;Vb(r,c,l),l&&ite(ce(c,function(e){return e&&!e.label.ignore})),Ab(e,n,r,c)}function Bb(e,t,n,r){var i=Fs(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Is(i-wb/2)?(o=c?`bottom`:`top`,a=`center`):Is(i-wb*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iwb/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Vb(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Xee(r))return;function a(e,a,o){var s=_b(t[a]),c=_b(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=Db(s.label).labelInfo.tick;if(yv(l)&&u.notNice||xv(l)&&u.offInterval){Ub(s.label);return}}if(e===!1||s.suggestIgnore){Ub(s.label);return}if(c.suggestIgnore){Ub(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=yb({marginForce:f},s),c=yb({marginForce:f},c)}xb(s,c,null,{touchThreshold:d})&&Ub(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function Hb(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=fx(e,t.get(`startValue`,!0)),x=b!=null;!Js(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Js(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),dx(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),dx(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function dx(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Hc(t))}function fx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function px(e,t){var n;if(xv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[mx(n[0]),mx(n[1])]}function mx(e){return Cn(typeof e==`boolean`?0:e,1)||0}function hx(e){var t=cx(e.scale);return t.extent||=Pc(),t}function gx(e,t){hx(e).dimIdxInCoord=t.get(e.dim)}function _x(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||vx(n,e,i,r,t)}function vx(e,t,n,r,i){var a=hx(t),o=a.extent,s=!1;qy(t,function(r){if(r.boxCoordinateSystem){var i=Jm(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Fc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(Zee(u,n),function(e){Rc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Tx(e,t,r);bx(e,new ux(e,r,o,s,c),i),a.extent=null}function yx(e,t){var n=e.scale;bx(n,new ux(n,e.model,t,!1,!1),lx)}function bx(e,t,n){e.rawExtentInfo=t,t.from=n}function xx(e,t){Sx.set(e,t)}var Sx=Le();function Cx(e,t,n,r,i){e.rawExtentInfo||yx({scale:e,model:t},i||Pc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Tx(e,t,n){var r=cy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Zy(t,function(e){a=!!Sx.get(e)||a}),a}function Ex(e,t,n,r){if(n.ctnShp){var i;if(Zy(e,function(t){var n=Sx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Ic(i,a[0]),Lc(i,a[1]),Zv(e))}}),i){var a=t.getExtent();if(xv(t))e.onBand||t.setExtent2(1,fs(a[0],a[0]+i[0]),ps(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=fs(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ps(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function Dx(){$y(`liPosMinGap`,Ox)}function Ox(e,t,n){var r=Le(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=fm(u);function f(n){Yy(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}tv(kx,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var kx=tv({ctor:kee},50);function Ax(e){return function(t,n){var r=ob(t,{fromStat:{key:e}});if(Js(r.w2))return[-r.w2/2,r.w2/2]}}function jx(e,t){return e+`|&`+t}function Mx(e){return Dx(),{liPosMinGap:!xv(e.scale)}}function Nx(e,t,n,r){rb(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Mx})}function Px(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Fx={left:0,right:0,top:0,bottom:0},Ix=[`25%`,`25%`],Lx=`cartesian2d`,Rx=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Pg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Ng(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Ng(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Fx,outerBoundsContain:`all`,outerBoundsClampWidth:Ix[0],outerBoundsClampHeight:Ix[1],backgroundColor:f_.color.transparent,borderWidth:1,borderColor:f_.color.neutral30},t}(Lg),zx=Uc(),Bx=`__ec_stack_`;function Vx(e){return e.get(`stack`)||Bx+e.seriesIndex}function Hx(e,t){var n=Ux(e,t);return n.columnMap=Wx(n),n}function Ux(e,t){var n=jx(t,Lx),r=[],i=ob(e,{fromStat:{key:n},min:1});return Jy(e,n,function(e){r.push({barWidth:ws(e.get(`barWidth`),i.w),barMaxWidth:ws(e.get(`barMaxWidth`),i.w),barMinWidth:ws(e.get(`barMinWidth`)||(Kx(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Vx(e)})}),{bandWidthResult:i,seriesInfo:r}}function Wx(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};R(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Be(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=fs(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=ps(35-o.length*4,15)+`%`;var c=ws(i,t),l=ws(a,1),u=(n-c)/(r+(r-1)*l);u=ps(u,0),R(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=fs(o,i)),a&&(o=ps(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ps(u,0);var d=0,f;R(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return R(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Gx(e){return{seriesType:e,overallReset:function(t){var n=jx(e,Lx);Xy(t,n,function(t){var r=Hx(t,e);Jy(t,n,function(e){var t=r.columnMap[Vx(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function ote(e){return{seriesType:e,plan:nv(),reset:function(e){if(ix(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=Zm(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Px(i))),p=Kx(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&ev(r*3),c=p&&s&&ev(r*3),l=p&&ev(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,ms(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(B_);B_.registerClass(qx);var lte=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return $m(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Yc(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=ah(qx.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:f_.color.primary,borderWidth:2}},realtimeSort:!1}),t}(qx),Jx=`\0__throttleOriginMethod`,Yx=`\0__throttleRate`,Xx=`\0__throttleType`;function Zx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Qx(e,t,n,r){var i=e[t];if(i){var a=i[Jx]||i,o=i[Xx];if(i[Yx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Zx(a,n,r===`debounce`),i[Jx]=a,i[Xx]=r,i[Yx]=n}return i}}function $x(e,t){var n=e[t];n&&n[Jx]&&(n.clear&&n.clear(),e[t]=n[Jx])}var ute=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),eS=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new ute},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){Kd(t,e,Zc(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(iv),aS={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=rS(t.x,e.x),s=iS(t.x+t.width,i),c=rS(t.y,e.y),l=iS(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=iS(t.r,e.r),a=rS(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},oS={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new Wo({shape:I({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?eS:ad,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=dte(dS(i),{isRoundCap:l===eS}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?Vd:Hd)(u,{shape:p},a)}return u}};function hte(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function sS(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?Vd:Hd)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?Vd:Hd)(n,{shape:l},u,i)}function cS(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function vte(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function dS(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function fS(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;I(u,pte(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?Cte(i,a.coordinateSystem):wte(i,a.coordinateSystem),p=qf(r);Kf(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Eee(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,fte(e,h===`outside`?f:h,dS(o),r.get([`label`,`rotate`]))}ip(m,p,a.getRawValue(n),function(e){return Dee(t,e)});var g=r.getModel([`emphasis`]);au(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),lu(e,r),vte(i)&&(e.style.fill=`none`,e.style.stroke=`none`,R(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function yte(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var bte=function(){function e(){}return e}(),pS=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new bte},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function xte(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function gS(e,t,n){if(Lee(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function Ste(e,t,n){return new(e.type===`polar`?ad:Wo)({shape:gS(t,n,e),silent:!0,z2:0})}function Cte(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function wte(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function Tte(e){e.registerChartView(mte),e.registerSeriesModel(lte),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Gx(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,ote(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,dy(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),cte(e)}function _S(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&bS(e,i,t,n)}else{bS(e,t,t,n);var a=Ate(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&Ote.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Ate(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function jte(e,t,n,r){e.addEventListener(t,n,r)}function wS(e,t,n,r){e.removeEventListener(t,n,r)}var TS=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},ES=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=DS(r)/DS(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=OS(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},AS=`silent`;function jS(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:MS}}function MS(){TS(this.event)}var NS=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(qi),PS=function(){function e(e,t){this.x=e,this.y=t}return e}(),FS=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],IS=new tn(0,0,0,0),LS=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new PS(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new NS,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Dte(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(FS,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=BS(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new PS(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new PS(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=jS(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new PS(e,t);if(zS(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(IS.copy(u.getBoundingRect()),u.transform&&IS.applyTransform(u.transform),IS.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function RS(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||AS}return!1}function zS(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=RS(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==AS)){t.target=o;break}}}function BS(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var VS=32,HS=7;function US(e){for(var t=0;e>=VS;)t|=e&1,e>>=1;return e+t}function WS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function GS(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function qS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function JS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function YS(e,t){var n=HS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=HS||m>=HS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-qS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=HS||g>=HS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),KS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var ZS=!1;function QS(){ZS||(ZS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function $S(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var eC=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=$S}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),tC=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function nC(){return new Date().getTime()}var rC=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=nC()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(tC(t),!e._paused&&e.update())}tC(t)},t.prototype.start=function(){this._running||(this._time=nC(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=nC(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=nC()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Ki(e,t.loop);return this.addAnimator(n),n},t}(qi),iC=300,aC=We.domSupported,oC=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),sC={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},cC=!1;function lC(e){var t=e.pointerType;return t===`pen`||t===`touch`}function uC(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function dC(e){e&&(e.zrByTouch=!0)}function fC(e,t){return CS(e.dom,new mC(e,t),!0)}function pC(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var mC=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),hC={mousedown:function(e){e=CS(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=CS(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=CS(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=CS(this.dom,e);var t=e.toElement||e.relatedTarget;pC(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){cC=!0,e=CS(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){cC||(e=CS(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=CS(this.dom,e),dC(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),hC.mousemove.call(this,e),hC.mousedown.call(this,e)},touchmove:function(e){e=CS(this.dom,e),dC(e),this.handler.processGesture(e,`change`),hC.mousemove.call(this,e)},touchend:function(e){e=CS(this.dom,e),dC(e),this.handler.processGesture(e,`end`),hC.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!yc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[UC],e},t.prototype.setTheme=function(e){this._theme=new gp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function nw(e,t){return e.join(`,`)===t.join(`,`)}var rw=R,iw=_e,aw=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function ow(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=aw.length;n0?e[n-1].seriesModel:null)}),kw(e))})}function kw(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ns(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var Aw=function(){function e(){this.group=new Ru,this.uid=rh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(Aw),at(Aw);var jw=wc(),Mw={itemStyle:ot(pp,!0),lineStyle:ot(up,!0)},Nw={lineStyle:`stroke`,itemStyle:`fill`};function Pw(e,t){return e.visualStyleMapper||Mw[t]||(console.warn(`Unknown style type '`+t+`'.`),Mw.itemStyle)}function Fw(e,t){return e.visualDrawType||Nw[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var Iw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=Pw(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=Fw(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},Lw=new gp,Rw={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=Pw(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){Lw.option=n[r];var o=i(Lw);I(e.ensureUniqueItemVisual(t,`style`),o),Lw.option.decal&&(e.setItemVisual(t,`decal`,Lw.option.decal),Lw.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},zw={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();jw(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=jw(e).scope,a=Fw(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},Bw=Math.PI;function Vw(e,t){t||={},L(t,{text:`loading`,textColor:f_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:f_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Ru,r=new Wo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Yo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Wo({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Sd({shape:{startAngle:-Bw/2,endAngle:-Bw/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Bw*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:Bw*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var Hw=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Yc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Yg({plan:qw,reset:Jw,count:Zw}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Yg({reset:Uw});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Yg({reset:Ww,onDirty:Kw})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:Qw(e)}),e.uid=rh(`stageHandler`),t&&(e.visualType=t),e},e}();function Uw(e){e.overallReset(e.ecModel,e.api,e.payload)}function Ww(e){return e.dirtyOnOverallProgress&&Gw}function Gw(){this.agent.dirty(),this.getDownstream().dirty()}function Kw(){this.agent&&this.agent.dirty()}function qw(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function Jw(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=rc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return Xw(t)}):Yw}var Yw=Xw(0);function Xw(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),cT=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],lT=cT.concat([`symbolKeepAspect`]),uT={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&TT(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function OT(e,t,n){for(var r=t.type===`radial`?DT(e,t,n):ET(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function NT(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&MT(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var PT=new io(!0);function FT(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function IT(e){return typeof e==`string`&&e!==`none`}function LT(e){var t=e.fill;return t!=null&&t!==`none`}function RT(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function zT(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function BT(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function VT(e,t,n,r,i){var a,o=FT(n),s=LT(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||PT,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?OT(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?OT(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?BT(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?BT(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=NT(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&zT(e,n),s&&RT(e,n)):(s&&RT(e,n),o&&zT(e,n)),T&&e.setLineDash([])}function HT(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function UT(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=NT(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(FT(n)&&e.strokeText(i,n.x,n.y),LT(n)&&e.fillText(i,n.x,n.y)):(LT(n)&&e.fillText(i,n.x,n.y),FT(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var WT=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],GT=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function KT(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){rE(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?va.opacity:o}(r||t.blend!==n.blend)&&(a||=(rE(e,i),!0),e.globalCompositeOperation=t.blend||va.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[LE]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[LE]=!0,hD(this),!this._model||t){var o=new QC(this._api),s=this._theme,c=this._model=new GC;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},CD);var l={seriesTransition:a,optionChanged:!0};if(n)this[zE]={silent:r,updateParams:l},this[LE]=!1,this.getZr().wakeUp();else{try{ZE(this),eD.update.call(this,null,l)}catch(e){throw this[zE]=null,this[LE]=!1,e}this._ssr||this._zr.flush(),this[zE]=null,this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[LE]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[zE]&&(r??=this[zE].silent,i=this[zE].updateParams,this[zE]=null),this[LE]=!0,hD(this);try{this._updateTheme(e),n.setTheme(this._theme),ZE(this),eD.update.call(this,{type:`setTheme`},i)}catch(e){throw this[LE]=!1,e}this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=TD[e]),e&&(e=P(e),e&&Ew(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(OD[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(DD,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=OC(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Wo({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Io({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return tD(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return tD(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return tD(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Ec(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Ec(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?pT(i,t):fT(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(vD,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&hT(i,function(e){var t=Zc(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(xD,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Ete(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&jc(this.getDom(),AD,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete DD[e.id]},t.prototype.resize=function(e){if(!this[LE]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[zE]&&(r??=this[zE].silent,n=!0,this[zE]=null),this[LE]=!0,hD(this);try{n&&ZE(this),eD.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[LE]=!1,e}this[LE]=!1,iD.call(this,r),aD.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),ED[e]){var n=ED[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=bD[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),yD[e.type]&&this._model){if(this[LE]){this._pendingActions.push(e);return}var n=t.silent;rD.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),iD.call(this,n),aD.call(this,n)}},t.prototype.updateLabelLayout=function(){gT.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){ZE=function(e){Fy(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),QE(e,!0),QE(e,!1),t.plan()},QE=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),LC.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Ff(e);t.eachRendered(function(e){return Lf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!Ud(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(Ud(e))return;if(e instanceof Ao&&hu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}dD=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Bl(t,n),pD(e)},n.prototype.leaveEmphasis=function(t,n){Vl(t,n),pD(e)},n.prototype.enterBlur=function(t){Hl(t),pD(e)},n.prototype.leaveBlur=function(t){Ul(t),pD(e)},n.prototype.enterSelect=function(t){Wl(t),pD(e)},n.prototype.leaveSelect=function(t){Gl(t),pD(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[RE]},n.prototype.usingTHL=function(){return e._usingTHL},n}(cl))(e)},fD=function(e){function t(e,t){for(var n=0;n=0)){UD.push(n);var o=Hw.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function GD(e,t){ED[e]=t}function KD(e,t,n){var r=yT(`registerMap`);r&&r(e,t,n)}var qD=a_;HD(OE,Iw),HD(jE,Rw),HD(jE,zw),HD(OE,uT),HD(jE,dT),HD(FE,_E),PD(Ew),FD(xE,Dw),GD(`default`,Vw),zD({type:gl,event:gl,update:gl},Ve),zD({type:_l,event:_l,update:_l},Ve),zD({type:vl,event:xl,update:vl,action:Ve,refineEvent:JD,publishNonRefinedEvent:!0}),zD({type:yl,event:xl,update:yl,action:Ve,refineEvent:JD,publishNonRefinedEvent:!0}),zD({type:bl,event:xl,update:bl,action:Ve,refineEvent:JD,publishNonRefinedEvent:!0});function JD(e,t,n,r){return{eventContent:{selected:nu(n),isFromClick:t.isFromClick||!1}}}ND(`default`,{}),ND(`dark`,oT);var YD=[],XD={registerPreprocessor:PD,registerProcessor:FD,registerPostInit:ID,registerPostUpdate:LD,registerUpdateLifecycle:RD,registerAction:zD,registerCoordinateSystem:BD,registerLayout:VD,registerVisual:HD,registerTransform:qD,registerLoading:GD,registerMap:KD,registerImpl:vT,PRIORITY:IE,ComponentModel:Lg,ComponentView:Aw,SeriesModel:B_,ChartView:iv,registerComponentModel:function(e){Lg.registerClass(e)},registerComponentView:function(e){Aw.registerClass(e)},registerSeriesModel:function(e){B_.registerClass(e)},registerChartView:function(e){iv.registerClass(e)},registerCustomSeries:function(e,t){xT(e,t)},registerSubTypeDefaulter:function(e,t){Lg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){kC(e,t)}};function ZD(e){if(B(e)){R(e,function(e){ZD(e)});return}re(YD,e)>=0||(YD.push(e),me(e)&&(e={install:e}),e.install(XD))}var QD=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),$D=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Oc).models[0]},t.type=`cartesian2dAxis`,t}(Lg);ae($D,QD);var eO={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:f_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:f_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:f_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[f_.color.backgroundTint,f_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:f_.color.neutral00,borderColor:f_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},tO=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},eO),nO=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:f_.color.axisMinorSplitLine,width:1}}},eO),rO={category:tO,value:nO,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},nO),log:L({logBase:10},nO)};function iO(e,t,n,r){R(Kv,function(i,a){var o=F(F({},rO[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=aO(e),n&&Ng(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Sb();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,aO)}function aO(e){return e.type||(e.data?`category`:`value`)}var oO=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),sO=[`x`,`y`];function cO(e){return(e.type===`interval`||e.type===`time`)&&!Nh(e)}var lO=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Lx,t.dimensions=sO,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(cO(e)&&cO(t)){var n=mv(e,null),r=mv(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(oO);function uO(e,t){var n=e.scale,r=e.model,i=Cx(n,r,r.ecModel,e,null),a=bv(n),o=bv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=ms(l[0].value-l[1].value),g=ms(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=Os(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=Os(_s(C[0]/E)*E,D),O=Os(gs(C[1]/E)*E,D);var e=hs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=gs(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}oy(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function dO(e,t){var n=bv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Tv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?pO(r,t):fO(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Sv(d)),i[0]||(s[0]=Os(gs(s[0]/u)*u,l)),i[1]||(s[1]=Os(_s(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),oy(e,i,o,s,a,c)}function fO(e,t){var n=Ev(t.splitNumber,5),r=hv(e),i=t.minInterval,a=t.maxInterval,o=Vs(r/n,!0);i!=null&&oa&&(o=a);var s=Sv(o),c=e.getExtent(),l=[Os(_s(c[0]/o)*o,s),Os(gs(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function pO(e,t){var n=Ev(t.splitNumber,10),r=e.getExtent(),i=hv(e),a=ps(zs(i),1);n/i*a<=.5&&(a*=10);var o=Sv(a),s=[Os(_s(r[0]/a)*a,o),Os(gs(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function mO(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;hO(t,n,r,i,null)}function hO(e,t,n,r,i){var a=Cx(e,t,r,n,i),o=vv(e)||yv(e);gO(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Ex(n,e,a,r)}function gO(e,t){_O[e.type](e,t)}var _O={interval:dO,log:dO,time:Rv,ordinal:Ve},vO=[[3,1],[0,2]],yO=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=sO,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){_x(e,1);var t=e.scale;xv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):mO(i)}R(n,function(e){wO(e,e.__alignTo)?mO(e):uO(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){xO(n,`y`,e,i)}),R(n.y,function(e){xO(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Ag(e,t),i=this._rect=Og(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(EO(a,i),!n){var c=AO(i,o,a,s,t),l=void 0;if(s)OO?(OO(this._axesList,i),EO(a,i)):l=kO(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=MO(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=kO(d,f,p,i,a,c,r))}jO(i,a,my.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];_v(a.scale)&&iy(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function wO(e,t){return Nh(e.scale)||Nh(t.scale)||t.scale.getTicks().length<2}function TO(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function EO(e,t){R(e.x,function(e){return DO(e,t.x,t.width)}),R(e.y,function(e){return DO(e,t.y,t.height)})}function DO(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),TO(e,t)}var OO;function kO(e,t,n,r,i,a,o){jO(r,i,my.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return Tf(r,s,!0,!0,n),EO(i,r),c;function l(e){R(i[Xd[e]],function(t){if(ry(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function AO(e,t,n,r,i){var a=new kb(NO);return R(n,function(n){return R(n,function(n){if(ry(n.model)){var o=!r;n.axisBuilder=ox(e,t,n.model,i,a,o)}})}),a}function jO(e,t,n,r,i,a){var o=n===my.determine;R(t,function(t){return R(t,function(t){ry(t.model)&&(sx(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Xd[1-t]]=e[Zd[t]]<=a.refContainer[Zd[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){ry(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function MO(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Og(e.get(`outerBounds`,!0)||Fx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Es(we(e.get(`outerBoundsClampWidth`,!0),Ix[0]),t.width),Es(we(e.get(`outerBoundsClampHeight`,!0),Ix[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var NO=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;Nb(e,t,n,r,i,a),ny(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&Fb(e.labelInfoList,e.dirVec,r,i)})};function PO(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return FO(n,e,t),n.seriesInvolved&&LO(n,e),n}function FO(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=WO(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||UO(d))){s??=d.get(`triggerTooltip`),d=r?IO(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=WO(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:UO(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=RO(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function IO(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new gp(c,n,r))}function LO(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[WO(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function RO(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function BO(e){var t=VO(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=UO(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function uk(e,t){var n=e.visual,r=[];_e(n)?ik(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),vk(e,r)}function dk(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:gk([0,1])}}function fk(e){var t=this.option.visual;return t[Math.round(Cs(e,[0,1],[0,t.length-1],!0))]||{}}function pk(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function mk(e){var t=this.option.visual;return t[this.option.loop&&e!==ok?e%t.length:e]}function hk(){return this.option.visual[0]}function gk(e){return{linear:function(t){return Cs(t,e,this.option.visual,!0)},category:mk,piecewise:function(t,n){var r=_k.call(this,n);return r??=Cs(t,e,this.option.visual,!0),r},fixed:hk}}function _k(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[sk.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function vk(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var yk={linear:function(e){return Cs(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=sk.findPieceIndex(e,t,!0);if(n!=null)return Cs(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ok},fixed:Ve};function bk(e,t,n){return e?t<=n:ta&&(t[1-r]=Ns(t[r],d.sign*a)),t}function Sk(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Ck(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}function wk(e){return Object.keys(e)}function Tk(e){return e&&typeof e==`object`&&!Array.isArray(e)}function Ek(e,t){let n={...e},r=t;return Tk(e)&&Tk(t)&&Object.keys(t).forEach(t=>{Tk(r[t])&&t in e?n[t]=Ek(n[t],r[t]):n[t]=r[t]}),n}function Dk(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ok(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function kk(e){let t=Ok(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function Ak(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function jk(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?Ak(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?Ak(n):n}}return r}return n}var U=jk(`rem`,{shouldScale:!0}),Mk=jk(`em`);function Nk(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function Pk(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var Fk=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=Fk()})),W=u(Ik(),1);function Mte(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function Lk(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}var Nte={app:100,modal:200,popover:300,overlay:400,max:9999};function Rk(e){return Nte[e]}function zk(e,t=`size`,n=!0){if(e!==void 0)return Pk(e)?n?U(e):e:`var(--${t}-${e})`}function Bk(e){return zk(e,`mantine-spacing`)}function Vk(e){return e===void 0?`var(--mantine-radius-default)`:zk(e,`mantine-radius`)}function Hk(e){return zk(e,`mantine-font-size`)}function Pte(e){return zk(e,`mantine-line-height`,!1)}function Fte(e){if(e)return zk(e,`mantine-shadow`,!1)}function Uk(e,t){return n=>{e?.(n),t?.(n)}}function Wk(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function Ite(e,t){if(e===t||Number.isNaN(e)&&Number.isNaN(t))return!0;if(!(e instanceof Object)||!(t instanceof Object))return!1;let n=Object.keys(e),{length:r}=n;if(r!==Object.keys(t).length)return!1;for(let i=0;i{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function Kk(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=Gk(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function Lte(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function Rte(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:Lte(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var qk=typeof document<`u`?W.useLayoutEffect:W.useEffect;function zte(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}function Jk(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return qk(()=>{r.current||(r.current=!0,n(Wk()))},[]),typeof e==`string`?e:t}function Yk(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function Bte(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=Yk(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():Yk(e,null)}),t.clear()}}}function Xk(...e){return(0,W.useCallback)(Bte(...e),e)}function Zk({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function Qk(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var $k=`dots`;function Vte({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=Zk({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return Qk(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{r.current||=window.setTimeout(()=>{i(...e),r.current=null},t)},[t]),o=(0,W.useCallback)(()=>{r.current&&=(window.clearTimeout(r.current),null)},[]);return(0,W.useEffect)(()=>(n.autoInvoke&&a(),o),[o,a]),{start:a,clear:o}}function Kte(e,t,n){let r=(0,W.useRef)(null);(0,W.useEffect)(()=>{r.current&&=(r.current.disconnect(),null);let i=typeof n==`function`?n():n;return i&&(r.current=new MutationObserver(e),r.current.observe(i,t)),()=>{r.current&&=(r.current.disconnect(),null)}},[e,t,n])}function qte(){let[e,t]=(0,W.useState)(!1);return(0,W.useEffect)(()=>t(!0),[]),e}var Jte=s((e=>{var t=Ik();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Jte()}));function Yte(){return`development`}function nA(e){return e?.props?.ref}function Xte(e){return typeof e==`string`||typeof e==`number`||typeof e==`boolean`||typeof e==`bigint`}function rA(e){let t=W.Children.toArray(e);return t.length!==1||!Mte(t[0])?null:t[0]}function iA(e){return e}function aA(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=oA(t[e],n):t[e]=n})}),t}function sA({theme:e,classNames:t,props:n,stylesCtx:r}){return Qte((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||Zte))}function cA({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function lA(e){return e===`auto`||e===`dark`||e===`light`}function $te({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return lA(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&lA(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function uA(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function ene(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function tne(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function nne(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function rne(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function dA(e){return ene(e)?tne(e):e.startsWith(`rgb`)?nne(e):e.startsWith(`hsl`)?rne(e):{r:0,g:0,b:0,a:1}}function fA(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function ine(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function ane(e){if(e.startsWith(`oklch(`))return(ine(e)||0)/100;let{r:t,g:n,b:r}=dA(e),i=t/255,a=n/255,o=r/255,s=fA(i),c=fA(a),l=fA(o);return .2126*s+.7152*c+.0722*l}function pA(e,t=.179){return!e.startsWith(`var(`)&&ane(e)>t}function mA({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:pA(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:pA(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:pA(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][uA(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:pA(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:pA(e,t.luminanceThreshold),shade:a,variable:void 0}}function hA(e,t){let n=mA({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function gA(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function _A(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=dA(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function vA(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=hA(n.from,t),i=hA(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function yA(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=dA(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var bA=yA,xA=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=mA({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&gA(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:_A(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:_A(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:yA(e,.1),hover:yA(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:yA(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:yA(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:yA(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:yA(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:_A(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:_A(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:_A(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:vA(r,t),hover:vA(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function SA({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&mA({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function CA(e,t,n){return SA({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function wA(e,t){let n=e.colors[e.primaryColor];return gA(n)?e.autoContrast?CA(n,e,t):`var(--mantine-color-white)`:SA({color:n[uA(e,t)],theme:e,autoContrast:null})}function one(e,t){return typeof e==`boolean`?e:t.autoContrast}var TA=(0,W.createContext)(null);function EA(){let e=(0,W.use)(TA);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function sne(){return EA().cssVariablesResolver}function cne(){return EA().classNamesPrefix}function DA(){return EA().getStyleNonce}function lne(){return EA().withStaticClasses}function une(){return EA().headless}function dne(){return EA().stylesTransform?.sx}function fne(){return EA().stylesTransform?.styles}function OA(){return EA().env||`default`}function pne(){return EA().deduplicateInlineStyles}function kA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function mne({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(kA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),kA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),qk(()=>{kA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return kA(r,n),()=>{};r===void 0&&kA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&kA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var hne=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),gne=s(((e,t)=>{t.exports=hne()})),_ne={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},AA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,jA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:_ne,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:xA,autoContrast:!1,luminanceThreshold:.3,fontFamily:AA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:AA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},vne=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,yne=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function MA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function NA(e){if(!(e.primaryColor in e.colors))throw Error(vne);if(typeof e.primaryShade==`object`&&(!MA(e.primaryShade.dark)||!MA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!MA(e.primaryShade))throw Error(yne)}function bne(e,t){if(!t)return NA(e),e;let n=Ek(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),NA(n),n}var G=gne(),PA=(0,W.createContext)(null),xne=()=>(0,W.use)(PA)||jA;function FA(){let e=(0,W.use)(PA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function IA({theme:e,children:t,inherit:n=!0}){let r=xne(),i=(0,W.useMemo)(()=>bne(n?r:jA,e),[e,r,n]);return(0,G.jsx)(PA,{value:i,children:t})}IA.displayName=`@mantine/core/MantineThemeProvider`;function LA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function RA(e,t){let n=t?[t]:[`:root`,`:host`],r=LA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=LA(e.dark),o=LA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function zA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=uA(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:bA(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=uA(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:_A(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:_A(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:bA(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function BA(e,t,n){wk(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var VA=e=>{let t=uA(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":wA(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":wA(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};BA(r.variables,e.breakpoints,`breakpoint`),BA(r.variables,e.spacing,`spacing`),BA(r.variables,e.fontSizes,`font-size`),BA(r.variables,e.lineHeights,`line-height`),BA(r.variables,e.shadows,`shadow`),BA(r.variables,e.radius,`radius`),BA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),wk(e.colors).forEach(t=>{let n=e.colors[t];if(gA(n)){Object.assign(r.light,zA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,zA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=CA(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=CA(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,zA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,zA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return wk(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function Sne(){let e=FA(),t=DA(),n=wk(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=kk(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:Mk(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:Mk(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Cne({theme:e,generator:t}){let n=VA(e),r=t?.(e);return r?Ek(n,r):n}var HA=VA(jA);function wne(e){let t={variables:{},light:{},dark:{}};return wk(e.variables).forEach(n=>{HA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),wk(e.light).forEach(n=>{HA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),wk(e.dark).forEach(n=>{HA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Tne(e){return RA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function UA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=FA(),r=DA(),i=Cne({theme:n,generator:sne()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=RA(a?wne(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:Tne(e)}`}}):null}UA.displayName=`@mantine/CssVariables`;function Ene({respectReducedMotion:e,getRootElement:t}){qk(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function WA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=$te(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=mne({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Ene({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(TA,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(IA,{theme:e,children:[o&&(0,G.jsx)(UA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(Sne,{}),t]})})}WA.displayName=`@mantine/core/MantineProvider`;function GA(e,t,n){let r=FA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...Nk(n)}}function Dne(e){return e}function One({classNames:e,styles:t,props:n,stylesCtx:r}){let i=FA();return{resolvedClassNames:e===void 0?void 0:sA({theme:i,classNames:e,props:n,stylesCtx:r||void 0}),resolvedStyles:t===void 0?void 0:cA({theme:i,styles:t,props:n,stylesCtx:r||void 0})}}var kne={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function Ane({theme:e,options:t,unstyled:n}){return oA(t?.focusable&&!n&&(e.focusClassName||kne[e.focusRing]),t?.active&&!n&&e.activeClassName)}function jne({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return sA({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function Mne({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return sA({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Nne({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Pne({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Fne({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Ine({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function Lne({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return oA(Ane({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),Ine({options:t,classes:s,selector:r,unstyled:c||m}),a[r],Mne({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),jne({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Nne({rootSelector:u,selector:r,className:l}),Pne({selector:r,classes:s,unstyled:c||m}),p&&!m&&Fne({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function KA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...KA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function Rne({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&cA({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...KA({style:n?.style,theme:e})}}function zne(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...Nk(t[n])}}),e),{})}function Bne({props:e,stylesCtx:t,themeName:n,theme:r}){let i=fne()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function qA({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=FA(),m=cne(),h=lne(),g=une(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=Bne({props:n,stylesCtx:r,themeName:_,theme:p}),b=sA({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>sA({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:cA({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=cA({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=zne([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=KA({style:a,theme:p});return(e,a)=>({...f?.[e],className:Lne({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:Rne({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function JA(e){return wk(e).reduce((t,n)=>e[n]===void 0?t:`${t}${Dk(n)}:${e[n]};`,``).trim()}function Vne({selector:e,styles:t,media:n,container:r}){let i=t?JA(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${JA(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${JA(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function Hne(e){let t=5381;for(let n=0;n>>0).toString(36)}function Une({deduplicate:e,...t}){let n=DA(),r=Vne(t);return e?(0,G.jsx)(`style`,{href:`mantine-${Hne(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Wne(e){let t=5381;for(let n=0;n>>0).toString(36)}function Gne(e,t){return`__mdi__-${Wne(`${e?JA(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${JA(e.styles)}`).join(`|`):``}`)}`}function YA(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:Nk({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var Kne={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function XA(e,t){let n=mA({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function qne(e,t){let n=mA({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:XA(e,t)}function Jne(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${XA(i.join(` `),t)}`),a.trim()}return e}var ZA={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function Yne(e){return typeof e==`string`&&e in ZA?ZA[e]:e}var Xne=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Zne(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&Xne.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function Qne(e){return e}var $ne=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function ere(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&$ne.includes(e)?`var(--mantine-${e}-line-height)`:e}function tre(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function nre(e){return typeof e==`number`?U(e):e}function rre(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var QA={color:XA,textColor:qne,fontSize:Zne,spacing:rre,radius:tre,identity:Qne,size:nre,lineHeight:ere,fontFamily:Yne,border:Jne};function $A(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function ire({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number($A(e))-Number($A(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function are(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function ore(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function sre(e){return typeof e==`object`&&e?wk(e).filter(e=>e!==`base`):[]}function cre(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function lre({styleProps:e,data:t,theme:n}){return ire(wk(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=ore(e[i]);if(!are(e[i]))return o.forEach(e=>{r.inlineStyles[e]=QA[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=sre(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=QA[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:QA[a.type](cre(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function ure(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function ej(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...ej(n,t)}),{}):typeof e==`function`?e(t):e??{}}function dre(e){return e}var tj=dre;function nj(e){return e}function rj(e){let t=e;return t.extend=nj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function fre(e){return rj(e)}function ij(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=nj,t}function aj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function pre(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[aj(n)]=e[n]),t},{})}function oj(e){return e?typeof e==`string`?{[aj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...oj(t)}),{}):pre(e):null}function sj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...sj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function mre({theme:e,style:t,vars:n,styleProps:r}){let i=sj(t,e),a=sj(n,e);return{...i,...a,...r}}function cj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=FA(),g=e||`div`,{styleProps:_,rest:v}=YA(m),y=dne()?.()?.(_.sx),b=ure(),x=lre({styleProps:_,theme:h,data:Kne}),S=pne(),C=S&&x.hasResponsiveStyles?Gne(x.styles,x.media):b,w={ref:p,style:mre({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:oA(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Pk(o)?void 0:o||void 0,size:f,...oj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(Une,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}cj.displayName=`@mantine/core/Box`;var lj=tj(cj),hre=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function uj(){return(0,W.use)(hre)}var[gre,dj]=Lk(`ScrollArea.Root component was not found in tree`);function fj(e,t){let n=(0,W.useEffectEvent)(t);qk(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function _re(e){let{style:t,...n}=e,r=dj(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return fj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),fj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function vre(e){let t=dj(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(_re,{...e}):null}var yre={scrollHideDelay:1e3,type:`hover`};function pj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=GA(`ScrollAreaRoot`,yre,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=Xk(a,c);return(0,G.jsx)(gre,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(lj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}pj.displayName=`@mantine/core/ScrollAreaRoot`;function mj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function hj(e){let t=mj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function gj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function bre(e,[t,n]){return Math.min(n,Math.max(t,e))}function _j(e,t,n=`ltr`){let r=hj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=bre(e,n===`ltr`?[0,o]:[o*-1,0]);return gj([0,o],[0,s])(c)}function xre(e,t,n,r=`ltr`){let i=hj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return gj([c,l],d)(e)}function vj(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Sre,xj]=Lk(`ScrollAreaScrollbar was not found in tree`);function Sj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=dj(),[p,m]=(0,W.useState)(null),h=Xk(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=Gk(o),S=Kk(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),fj(p,S),fj(f.content,S),(0,G.jsx)(Sre,{value:{scrollbar:p,hasThumb:n,onThumbChange:Gk(r),onThumbPointerUp:Gk(i),onThumbPositionChange:x,onThumbPointerDown:Gk(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:bj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:bj(e.onPointerMove,C),onPointerUp:bj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Cj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=dj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=Xk(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(Sj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${hj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),vj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:yj(s.paddingLeft),paddingEnd:yj(s.paddingRight)}})}})};Cj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function wj(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=dj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=Xk(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(Sj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${hj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),vj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:yj(s.paddingTop),paddingEnd:yj(s.paddingBottom)}})}})}wj.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Tj(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=uj(),i=dj(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=mj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>xre(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Cj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=_j(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(wj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=_j(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Tj.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Ej(e){let t=dj(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=Kk(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Ej,{"data-state":i?`visible`:`hidden`,...n}):null}Dj.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Cre(e){let{forceMount:t,...n}=e,r=dj(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=Kk(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Tj,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:bj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:bj(e.onPointerLeave,()=>o(`idle`))}):null}function Oj(e){let{forceMount:t,...n}=e,r=dj(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Dj,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Cre,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Ej,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Tj,{...n}):null}Oj.displayName=`@mantine/core/ScrollAreaScrollbar`;function wre(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function kj(e){let{style:t,ref:n,...r}=e,i=dj(),a=xj(),{onThumbPositionChange:o}=a,s=Xk(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=Kk(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=wre(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:bj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:bj(e.onPointerUp,a.onThumbPointerUp)})}kj.displayName=`@mantine/core/ScrollAreaThumb`;function Aj(e){let{forceMount:t,...n}=e,r=xj();return t||r.hasThumb?(0,G.jsx)(kj,{...n}):null}Aj.displayName=`@mantine/core/ScrollAreaThumb`;function jj({children:e,style:t,ref:n,onWheel:r,...i}){let a=dj(),o=Xk(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(lj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}jj.displayName=`@mantine/core/ScrollAreaViewport`;var Mj={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function Nj(){return typeof window<`u`}function Pj(e){return Lj(e)?(e.nodeName||``).toLowerCase():`#document`}function Fj(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ij(e){return((Lj(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Lj(e){return Nj()?e instanceof Node||e instanceof Fj(e).Node:!1}function Rj(e){return Nj()?e instanceof Element||e instanceof Fj(e).Element:!1}function zj(e){return Nj()?e instanceof HTMLElement||e instanceof Fj(e).HTMLElement:!1}function Bj(e){return!Nj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof Fj(e).ShadowRoot}function Vj(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Xj(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Tre(e){return/^(table|td|th)$/.test(Pj(e))}function Hj(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Ere=/transform|translate|scale|rotate|perspective|filter/,Uj=/paint|layout|strict|content/,Wj=e=>!!e&&e!==`none`,Gj;function Kj(e){let t=Rj(e)?Xj(e):e;return Wj(t.transform)||Wj(t.translate)||Wj(t.scale)||Wj(t.rotate)||Wj(t.perspective)||!Jj()&&(Wj(t.backdropFilter)||Wj(t.filter))||Ere.test(t.willChange||``)||Uj.test(t.contain||``)}function qj(e){let t=Qj(e);for(;zj(t)&&!Yj(t);){if(Kj(t))return t;if(Hj(t))return null;t=Qj(t)}return null}function Jj(){return Gj??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Gj}function Yj(e){return/^(html|body|#document)$/.test(Pj(e))}function Xj(e){return Fj(e).getComputedStyle(e)}function Zj(e){return Rj(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Qj(e){if(Pj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||Bj(e)&&e.host||Ij(e);return Bj(t)?t.host:t}function $j(e){let t=Qj(e);return Yj(t)?(e.ownerDocument||e).body:zj(t)&&Vj(t)?t:$j(t)}function eM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=$j(e),i=r===e.ownerDocument?.body,a=Fj(r);if(i){let e=tM(a);return t.concat(a,a.visualViewport||[],Vj(r)?r:[],e&&n?eM(e):[])}return t.concat(r,eM(r,[],n))}function tM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var nM=Math.min,rM=Math.max,iM=Math.round,aM=Math.floor,oM=e=>({x:e,y:e}),Dre={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function sM(e,t,n){return rM(e,nM(t,n))}function cM(e,t){return typeof e==`function`?e(t):e}function lM(e){return e.split(`-`)[0]}function uM(e){return e.split(`-`)[1]}function dM(e){return e===`x`?`y`:`x`}function fM(e){return e===`y`?`height`:`width`}function pM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function mM(e){return dM(pM(e))}function hM(e,t,n){n===void 0&&(n=!1);let r=uM(e),i=mM(e),a=fM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=wM(o)),[o,wM(o)]}function gM(e){let t=wM(e);return[_M(e),t,_M(t)]}function _M(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var vM=[`left`,`right`],yM=[`right`,`left`],bM=[`top`,`bottom`],xM=[`bottom`,`top`];function SM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?yM:vM:t?vM:yM;case`left`:case`right`:return t?bM:xM;default:return[]}}function CM(e,t,n,r){let i=uM(e),a=SM(lM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(_M)))),a}function wM(e){let t=lM(e);return Dre[t]+e.slice(t.length)}function TM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function EM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:TM(e)}function DM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function OM(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function kM(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function AM(){return/apple/i.test(navigator.vendor)}function jM(){return OM().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function MM(){return kM().includes(`jsdom/`)}var NM=`data-floating-ui-focusable`,PM=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function FM(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function IM(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bj(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function LM(e){return`composedPath`in e?e.composedPath()[0]:e.target}function RM(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function zM(e){return e.matches(`html,body`)}function BM(e){return e?.ownerDocument||document}function VM(e){return zj(e)&&e.matches(PM)}function HM(e){if(!e||MM())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function UM(e){return e?e.hasAttribute(NM)?e:e.querySelector(`[`+NM+`]`)||e:null}function WM(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...WM(e,t.id,n)])}function GM(e){return`nativeEvent`in e}function KM(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var qM=typeof document<`u`?W.useLayoutEffect:function(){},JM={...W};function YM(e){let t=W.useRef(e);return qM(()=>{t.current=e}),t}var XM=JM.useInsertionEffect||(e=>e());function ZM(e){let t=W.useRef(()=>{});return XM(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function QM(e,t,n){let{reference:r,floating:i}=e,a=pM(t),o=mM(t),s=fM(o),c=lM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=uM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function $M(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=cM(t,e),p=EM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=DM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=DM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var eN=50,tN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:$M},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=QM(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=cM(e,t)||{};if(l==null)return{};let d=EM(u),f={x:n,y:r},p=mM(i),m=fM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=nM(d[_],T),D=nM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=sM(E,k,O),j=!c.arrow&&uM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===pM(t)||T.every(e=>pM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=pM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function iN(e){let t=nM(...e.map(e=>e.left)),n=nM(...e.map(e=>e.top)),r=rM(...e.map(e=>e.right)),i=rM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function aN(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>DM(iN(e)))}var oN=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=cM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=aN(u),f=DM(iN(u)),p=EM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(pM(n)===`y`){let e=d[0],t=d[d.length-1],r=lM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return DM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=lM(n)===`left`,t=rM(...d.map(e=>e.right)),r=nM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return DM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},sN=new Set([`left`,`top`]);async function cN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=lM(n),s=uM(n),c=pM(n)===`y`,l=sN.has(o)?-1:1,u=a&&c?-1:1,d=cM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var lN=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await cN(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},uN=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=cM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=pM(i),p=dM(f),m=u[p],h=u[f],g=(e,t)=>sM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function dN(e){let t=Xj(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zj(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=iM(n)!==a||iM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function fN(e){return Rj(e)?e:e.contextElement}function pN(e){let t=fN(e);if(!zj(t))return oM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=dN(t),o=(a?iM(n.width):n.width)/r,s=(a?iM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var mN=oM(0);function hN(e){let t=Fj(e);return!Jj()||!t.visualViewport?mN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ore(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===Fj(e)}function gN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=fN(e),o=oM(1);t&&(r?Rj(r)&&(o=pN(r)):o=pN(e));let s=Ore(a,n,r)?hN(a):oM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=Fj(a),t=Rj(r)?Fj(r):r,n=e,i=tM(n);for(;i&&t!==n;){let e=pN(i),t=i.getBoundingClientRect(),r=Xj(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=Fj(i),i=tM(n)}}return DM({width:u,height:d,x:c,y:l})}function _N(e,t){let n=Zj(e).scrollLeft;return t?t.left+n:gN(Ij(e)).left+n}function vN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_N(e,n),y:n.top+t.scrollTop}}function kre(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Ij(r),s=t?Hj(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=oM(1),u=oM(0),d=zj(r);if((d||!a)&&((Pj(r)!==`body`||Vj(o))&&(c=Zj(r)),d)){let e=gN(r);l=pN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vN(o,c):oM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Are(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function jre(e){let t=Zj(e),n=e.ownerDocument.body,r=rM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=rM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_N(e),o=-t.scrollTop;return Xj(n).direction===`rtl`&&(a+=rM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Mre=25;function Nre(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=Fj(e),a=Ij(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!Jj()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_N(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Mre&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Pre(e,t){let n=gN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=pN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function yN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Nre(e,n,t);else if(t===`document`)r=jre(Ij(e));else if(Rj(t))r=Pre(t,n);else{let n=hN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return DM(r)}function Fre(e,t){let n=t.get(e);if(n)return n;let r=eM(e,[],!1).filter(e=>Rj(e)&&Pj(e)!==`body`),i=null,a=Xj(e).position===`fixed`,o=a?Qj(e):e;for(;Rj(o)&&!Yj(o);){let e=Xj(o),t=Kj(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Qj(o)}return t.set(e,r),r}function Ire(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Hj(t)?[]:Fre(t,this._c):[].concat(n),r],o=yN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=Fj(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function wN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=fN(e),u=i||a?[...l?eM(l):[],...t?eM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Hre(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gN(e):null;c&&g();function g(){let t=gN(e);h&&!CN(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var TN=lN,EN=uN,DN=rN,ON=nN,kN=oN,AN=(e,t,n)=>{let r=new Map,i=n??{},a={...Vre,...i.platform,_c:r};return tN(e,t,{...i,platform:a})},jN=u(tA(),1),MN=typeof document<`u`?W.useLayoutEffect:function(){};function NN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!NN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!NN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function PN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function FN(e,t){let n=PN(e);return Math.round(t*n)/n}function IN(e){let t=W.useRef(e);return MN(()=>{t.current=e}),t}function LN(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);NN(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=IN(c),D=IN(i),O=IN(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),AN(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!NN(w.current,t)&&(w.current=t,jN.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);MN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);MN(()=>(A.current=!0,()=>{A.current=!1}),[]),MN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=FN(ee.floating,u.x),r=FN(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...PN(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var RN=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:ON({element:r.current,padding:i}).fn(n):r?ON({element:r,padding:i}).fn(n):{}}}},zN=(e,t)=>{let n=TN(e);return{name:n.name,fn:n.fn,options:[e,t]}},BN=(e,t)=>{let n=EN(e);return{name:n.name,fn:n.fn,options:[e,t]}},VN=(e,t)=>{let n=DN(e);return{name:n.name,fn:n.fn,options:[e,t]}},HN=(e,t)=>{let n=kN(e);return{name:n.name,fn:n.fn,options:[e,t]}},UN=(e,t)=>{let n=RN(e);return{name:n.name,fn:n.fn,options:[e,t]}};function WN(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var GN=`data-floating-ui-focusable`,KN=`active`,qN=`selected`,JN=`ArrowLeft`,YN=`ArrowRight`,XN=`ArrowUp`,ZN=`ArrowDown`,QN=[JN,YN],$N=[XN,ZN];[...QN,...$N];var eP={...W},tP=!1,nP=0,rP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+nP++;function iP(){let[e,t]=W.useState(()=>tP?rP():void 0);return qM(()=>{e??t(rP())},[]),W.useEffect(()=>{tP=!0},[]),e}var aP=eP.useId||iP;function oP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var sP=W.createContext(null),cP=W.createContext(null),lP=()=>W.useContext(sP)?.id||null,uP=()=>W.useContext(cP);function dP(e){return`data-floating-ui-`+e}function fP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var pP=dP(`safe-polygon`);function mP(e,t,n){if(n&&!KM(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function hP(e){return typeof e==`function`?e():e}function gP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=uP(),m=lP(),h=YM(l),g=YM(c),_=YM(n),v=YM(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=ZM(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(fP(b),fP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=BM(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=mP(g.current,`close`,y.current);i&&!x.current?(fP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(fP(b),r(!1,e,n))},[g,r]),k=ZM(()=>{T.current(),x.current=void 0}),A=ZM(()=>{if(w.current){let e=BM(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(pP),w.current=!1}}),j=ZM(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(fP(b),C.current=!1,u&&!KM(y.current)||hP(v.current)>0&&!mP(g.current,`open`))return;let t=mP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=BM(o.floating);if(fP(S),E.current=!1,h.current&&i.current.floatingContext){n||fP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!IM(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){fP(b)}function l(e){j()||O(e,!1)}if(Rj(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),qM(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(Rj(o.domReference)&&e){var t;let n=BM(o.floating).body;n.setAttribute(pP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),qM(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),fP(b),fP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||KM(y.current))&&(n||hP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(fP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,hP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var _P=()=>{},vP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:_P,setState:_P,isInstantPhase:!1}),yP=()=>W.useContext(vP);function bP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return qM(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(vP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function xP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=yP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return qM(()=>{o&&l&&(f({delay:{open:1,close:mP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),qM(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),qM(()=>{o&&u!==_P&&n&&u(s)},[o,n,u,s]),c}function SP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&Bj(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function CP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var wP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},TP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},EP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function DP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=uP(),g=ZM(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=EP(p),{escapeKey:x,outsidePress:S}=EP(m),C=W.useRef(!1),w=ZM(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?WM(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,GM(e)?e.nativeEvent:e,`escape-key`)}),T=ZM(e=>{var t;let n=()=>{var t;w(e),(t=LM(e))==null||t.removeEventListener(`keydown`,n)};(t=LM(e))==null||t.addEventListener(`keydown`,n)}),E=ZM(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=LM(e),s=`[`+dP(`inert`)+`]`,c=BM(i.floating).querySelectorAll(s),u=Rj(o)?o:null;for(;u&&!Yj(u);){let e=Qj(u);if(Yj(e)||!Rj(e))break;u=e}if(c.length&&Rj(o)&&!zM(o)&&!IM(o,i.floating)&&Array.from(c).every(e=>!IM(u,e)))return;if(zj(o)&&k){let t=Yj(o),n=Xj(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&WM(h.nodesRef.current,d).some(t=>RM(e,t.context?.elements.floating));if(RM(e,i.floating)||RM(e,i.domReference)||f)return;let p=h?WM(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=ZM(e=>{var t;let n=()=>{var t;E(e),(t=LM(e))==null||t.removeEventListener(l,n)};(t=LM(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},Jj()?5:0)}let d=BM(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(Rj(i.domReference)&&(p=eM(i.domReference)),Rj(i.floating)&&(p=p.concat(eM(i.floating))),!Rj(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(eM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[wP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[TP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function OP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=aP(),a=W.useRef({}),[o]=W.useState(()=>oP()),s=lP()!=null,[c,l]=W.useState(r.reference),u=ZM((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function kP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=OP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=uP();qM(()=>{d&&(f.current=d)},[d]);let m=LN({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=Rj(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(Rj(e)||e===null)&&(f.current=e,c(e)),(Rj(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!Rj(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return qM(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function AP(){return jM()&&AM()}function jP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=Fj(o.domReference);function t(){!n&&zj(o.domReference)&&o.domReference===FM(BM(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),AP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),AP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{fP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=LM(e.nativeEvent);if(c&&Rj(t)){if(AP()&&!e.relatedTarget){if(!d.current&&!VM(t))return}else if(!HM(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=Rj(t)&&t.hasAttribute(dP(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=FM(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(IM(a.current.floatingContext?.refs.floating.current,e)||IM(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function MP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[KN]:t,[qN]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[GN]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[KN,qN].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function NP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>MP(t,e,`reference`),t),a=W.useCallback(t=>MP(t,e,`floating`),n),o=W.useCallback(t=>MP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var PP=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function FP(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=aP(),c=r.domReference?.id||s,l=W.useMemo(()=>UM(r.floating)?.id||i,[r.floating,i]),u=PP.get(o)??o,d=lP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function IP(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...IP(e,t.id,n)])}function LP(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function RP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function zP(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){fP(i),u()}if(fP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=CP(e),v=e.type===`mouseleave`,y=SP(c.floating,_),b=SP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=RP(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&Rj(e.relatedTarget)&&SP(c.floating,e.relatedTarget)||f&&IP(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!LP([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}LP([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var BP={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},VP=iA((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),HP=rj(e=>{let t=GA(`ScrollArea`,BP,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=qA({name:`ScrollArea`,props:t,classes:Mj,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:VP}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=WN([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return fj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),qk(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(pj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(jj,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(Oj,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(Aj,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(Oj,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(Aj,{...P(`thumb`)})}),(0,G.jsx)(vre,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});HP.displayName=`@mantine/core/ScrollArea`;var UP=rj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=GA(`ScrollAreaAutosize`,BP,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=WN([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return fj(S?T:null,A),(0,G.jsx)(lj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(lj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(HP,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});HP.classes=Mj,HP.varsResolver=VP,UP.displayName=`@mantine/core/ScrollAreaAutosize`,UP.classes=Mj,HP.Autosize=UP;var WP={root:`m_87cf2631`},GP={__staticSelector:`UnstyledButton`},KP=ij(e=>{let t=GA(`UnstyledButton`,GP,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(lj,{...qA({name:i,props:t,classes:WP,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});KP.classes=WP,KP.displayName=`@mantine/core/UnstyledButton`;var qP={root:`m_1b7284a3`},JP=iA((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:Vk(t),"--paper-shadow":Fte(n)}})),YP=ij(e=>{let t=GA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=qA({name:`Paper`,props:t,classes:qP,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:JP});return(0,G.jsx)(lj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});YP.classes=qP,YP.varsResolver=JP,YP.displayName=`@mantine/core/Paper`;function XP(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function ZP(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var QP={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function $P({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function eF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=$P({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[QP[c]]:r},d=-t/2;return c===`left`?{...u,...XP(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...XP(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...ZP(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...ZP(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function tF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function nF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=uj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...eF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}nF.displayName=`@mantine/core/FloatingArrow`;function rF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function iF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function aF({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||iF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=iF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return iF(n)}var oF={reuseTargetNode:!0},sF=rj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=GA(`Portal`,oF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return qk(()=>(s(!0),c.current=aF({target:n,reuseTargetNode:r,...a}),Yk(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,jN.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});sF.displayName=`@mantine/core/Portal`;var cF=rj(({withinPortal:e=!0,children:t,...n})=>OA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(sF,{...n,children:t}));cF.displayName=`@mantine/core/OptionalPortal`;var lF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),uF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...lF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...lF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...lF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...lF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...lF(`top`),common:{transformOrigin:`top right`}}},dF={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function fF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in uF?{transitionProperty:uF[e].transitionProperty,...i,...uF[e].common,...uF[e][dF[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[dF[t]]}}function pF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=FA(),d=eA(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{jN.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return zte(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function mF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=OA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=pF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:fF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(fF({transition:n,duration:h,state:g,timingFunction:_}))})}mF.displayName=`@mantine/core/Transition`;var hF={duration:100,transition:`fade`};function gF(e,t){return{...hF,...t,...e}}var _F={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},vF=({className:e,...t})=>(0,G.jsxs)(lj,{component:`span`,className:oA(_F.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:_F.bar}),(0,G.jsx)(`span`,{className:_F.bar}),(0,G.jsx)(`span`,{className:_F.bar})]});vF.displayName=`@mantine/core/Bars`;var yF=({className:e,...t})=>(0,G.jsxs)(lj,{component:`span`,className:oA(_F.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:_F.dot}),(0,G.jsx)(`span`,{className:_F.dot}),(0,G.jsx)(`span`,{className:_F.dot})]});yF.displayName=`@mantine/core/Dots`;var bF=({className:e,...t})=>(0,G.jsx)(lj,{component:`span`,className:oA(_F.ovalLoader,e),...t});bF.displayName=`@mantine/core/Oval`;var xF={bars:vF,oval:bF,dots:yF},SF={loaders:xF,type:`oval`},CF=iA((e,{size:t,color:n})=>({root:{"--loader-size":zk(t,`loader-size`),"--loader-color":n?hA(n,e):void 0}})),wF=rj(e=>{let t=GA(`Loader`,SF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=qA({name:`Loader`,props:t,classes:_F,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:CF});return p?(0,G.jsx)(lj,{...g(`root`),...h,children:p}):(0,G.jsx)(lj,{...g(`root`),component:d[i],variant:f,size:n,...h})});wF.defaultLoaders=xF,wF.classes=_F,wF.varsResolver=CF,wF.displayName=`@mantine/core/Loader`;var TF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},EF={orientation:`horizontal`},DF=iA((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),OF=rj(e=>{let t=GA(`ActionIconGroup`,EF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(lj,{...qA({name:`ActionIconGroup`,props:t,classes:TF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:DF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});OF.classes=TF,OF.varsResolver=DF,OF.displayName=`@mantine/core/ActionIconGroup`;var kF=iA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":zk(o,`section-height`),"--section-padding-x":zk(o,`section-padding-x`),"--section-fz":Hk(o),"--section-radius":t===void 0?void 0:Vk(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),AF=rj(e=>{let t=GA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(lj,{...qA({name:`ActionIconGroupSection`,props:t,classes:TF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:kF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});AF.classes=TF,AF.varsResolver=kF,AF.displayName=`@mantine/core/ActionIconGroupSection`;var jF=iA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":zk(t,`ai-size`),"--ai-radius":n===void 0?void 0:Vk(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),MF=ij(e=>{let t=GA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=qA({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:TF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:jF});return(0,G.jsxs)(KP,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(mF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(lj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(wF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(lj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});MF.classes=TF,MF.varsResolver=jF,MF.displayName=`@mantine/core/ActionIcon`,MF.Group=OF,MF.GroupSection=AF;function NF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}NF.displayName=`@mantine/core/CloseIcon`;var PF={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},FF={variant:`subtle`},IF=iA((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":zk(t,`cb-size`),"--cb-radius":n===void 0?void 0:Vk(n),"--cb-icon-size":U(r)}})),LF=ij(e=>{let t=GA(`CloseButton`,FF,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=qA({name:_||`CloseButton`,props:t,className:o,style:c,classes:PF,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:IF});return(0,G.jsxs)(KP,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(NF,{}),r]})});LF.classes=PF,LF.varsResolver=IF,LF.displayName=`@mantine/core/CloseButton`;function RF(e){return W.Children.toArray(e).filter(Boolean)}var zF={root:`m_4081bf90`},BF={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},VF=iA((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":Bk(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),HF=rj(e=>{let t=GA(`Group`,BF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=RF(s),x=b.length,S=Bk(c??`md`);return(0,G.jsx)(lj,{...qA({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:zF,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:VF})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});HF.classes=zF,HF.varsResolver=VF,HF.displayName=`@mantine/core/Group`;var UF=(0,W.createContext)({size:`sm`}),WF=rj(e=>{let t=GA(`InputClearButton`,null,e),{size:n,variant:r,vars:i,classNames:a,styles:o,...s}=t,c=(0,W.use)(UF),{resolvedClassNames:l,resolvedStyles:u}=One({classNames:a,styles:o,props:t});return(0,G.jsx)(LF,{variant:r||`transparent`,size:n||c?.size||`sm`,classNames:l,styles:u,__staticSelector:`InputClearButton`,style:{pointerEvents:`all`,background:`var(--input-bg)`,...s.style},...s})});WF.displayName=`@mantine/core/InputClearButton`;var GF={xs:7,sm:8,md:10,lg:12,xl:15};function KF({__clearable:e,__clearSection:t,rightSection:n,__defaultRightSection:r,size:i=`sm`,__clearSectionMode:a=`both`}){let o=e&&t;return a===`rightSection`?n===null?null:n||r:a===`clear`?n===null?null:o||r:o&&(n||r)?(0,G.jsxs)(`div`,{"data-combined-clear-section":!0,style:{display:`flex`,gap:2,alignItems:`center`,paddingInlineEnd:GF[i]},children:[o,n||r]}):n===null?null:n||o||r}var qF=(0,W.createContext)({offsetBottom:!1,offsetTop:!1,describedBy:void 0,getStyles:null,inputId:void 0,labelId:void 0}),JF={wrapper:`m_6c018570`,input:`m_8fb7ebe7`,bottomSection:`m_93f4ed57`,section:`m_82577fc2`,placeholder:`m_88bacfd0`,root:`m_46b77525`,label:`m_8fdc1311`,required:`m_78a94662`,error:`m_8f816625`,success:`m_9d9d40e0`,description:`m_fe47ce59`},YF=iA((e,{size:t})=>({description:{"--input-description-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`}})),XF=rj(e=>{let t=GA(`InputDescription`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,__inheritStyles:l=!0,attributes:u,...d}=GA(`InputDescription`,null,t),f=(0,W.use)(qF),p=qA({name:[`InputWrapper`,c],props:t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,rootSelector:`description`,vars:s,varsResolver:YF});return(0,G.jsx)(lj,{component:`p`,...(l&&f?.getStyles||p)(`description`,f?.getStyles?{className:r,style:i}:void 0),...d})});XF.classes=JF,XF.varsResolver=YF,XF.displayName=`@mantine/core/InputDescription`;var ZF=iA((e,{size:t})=>({error:{"--input-error-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`}})),QF=rj(e=>{let t=GA(`InputError`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=qA({name:[`InputWrapper`,l],props:t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`error`,vars:s,varsResolver:ZF}),p=(0,W.use)(qF);return(0,G.jsx)(lj,{component:`p`,...(u&&p?.getStyles||f)(`error`,p?.getStyles?{className:r,style:i}:void 0),...d})});QF.classes=JF,QF.varsResolver=ZF,QF.displayName=`@mantine/core/InputError`;var $F={labelElement:`label`},eI=iA((e,{size:t})=>({label:{"--input-label-size":Hk(t),"--input-asterisk-color":void 0}})),tI=rj(e=>{let t=GA(`InputLabel`,$F,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,labelElement:c,required:l,htmlFor:u,onMouseDown:d,children:f,__staticSelector:p,mod:m,attributes:h,...g}=t,_=qA({name:[`InputWrapper`,p],props:t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,rootSelector:`label`,vars:s,varsResolver:eI}),v=(0,W.use)(qF),y=v?.getStyles||_,b=g.component||c,x=typeof b!=`string`||b===`label`;return(0,G.jsxs)(lj,{...y(`label`,v?.getStyles?{className:r,style:i}:void 0),component:c,htmlFor:x?u:void 0,mod:[{required:l},m],onMouseDown:e=>{d?.(e),!e.defaultPrevented&&e.detail>1&&e.preventDefault()},...g,children:[f,l&&(0,G.jsx)(`span`,{...y(`required`),"aria-hidden":!0,children:` *`})]})});tI.classes=JF,tI.varsResolver=eI,tI.displayName=`@mantine/core/InputLabel`;var nI=rj(e=>{let t=GA(`InputPlaceholder`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,__staticSelector:c,error:l,mod:u,attributes:d,...f}=t;return(0,G.jsx)(lj,{...qA({name:[`InputPlaceholder`,c],props:t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,rootSelector:`placeholder`})(`placeholder`),mod:[{error:!!l},u],component:`span`,...f})});nI.classes=JF,nI.displayName=`@mantine/core/InputPlaceholder`;var rI=iA((e,{size:t})=>({success:{"--input-success-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`}})),iI=rj(e=>{let t=GA(`InputSuccess`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,__staticSelector:l,__inheritStyles:u=!0,...d}=t,f=qA({name:[`InputWrapper`,l],props:t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,rootSelector:`success`,vars:s,varsResolver:rI}),p=(0,W.use)(qF);return(0,G.jsx)(lj,{component:`p`,...(u&&p?.getStyles||f)(`success`,p?.getStyles?{className:r,style:i}:void 0),...d})});iI.classes=JF,iI.varsResolver=rI,iI.displayName=`@mantine/core/InputSuccess`;function Ure(e,{hasDescription:t,hasError:n}){let r=e.findIndex(e=>e===`input`),i=e.slice(0,r),a=e.slice(r+1),o=t&&i.includes(`description`)||n&&i.includes(`error`);return{offsetBottom:t&&a.includes(`description`)||n&&a.includes(`error`),offsetTop:o}}var Wre={labelElement:`label`,inputContainer:e=>e,inputWrapperOrder:[`label`,`description`,`input`,`error`]},aI=iA((e,{size:t})=>({label:{"--input-label-size":Hk(t),"--input-asterisk-color":void 0},error:{"--input-error-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`},success:{"--input-success-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`},description:{"--input-description-size":t===void 0?void 0:`calc(${Hk(t)} - ${U(2)})`}})),oI=rj(e=>{let t=GA(`InputWrapper`,Wre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,size:c,variant:l,__staticSelector:u,inputContainer:d,inputWrapperOrder:f,label:p,error:m,success:h,description:g,labelProps:_,descriptionProps:v,errorProps:y,successProps:b,labelElement:x,children:S,withAsterisk:C,id:w,required:T,__stylesApiProps:E,mod:D,attributes:O,...k}=t,A=qA({name:[`InputWrapper`,u],props:E||t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:O,vars:s,varsResolver:aI}),j={size:c,variant:l,__staticSelector:u},ee=Jk(w),M=typeof C==`boolean`?C:T,N=y?.id||`${ee}-error`,te=b?.id||`${ee}-success`,P=v?.id||`${ee}-description`,F=ee,I=!!m&&typeof m!=`boolean`,ne=!!h&&typeof h!=`boolean`&&!m,L=!!g,re=I&&f.includes(`error`),ie=ne&&f.includes(`error`),ae=L&&f.includes(`description`),oe=`${re?N:``} ${ie?te:``} ${ae?P:``}`,R=oe.trim().length>0?oe.trim():void 0,z=_?.id||`${ee}-label`,se=p&&(0,G.jsx)(tI,{labelElement:x,id:z,htmlFor:F,required:M,...j,..._,children:p},`label`),ce=L&&(0,G.jsx)(XF,{...v,...j,size:v?.size||j.size,id:v?.id||P,children:g},`description`),le=(0,G.jsx)(W.Fragment,{children:d(S)},`input`),ue=I&&(0,W.createElement)(QF,{...y,...j,size:y?.size||j.size,key:`error`,id:y?.id||N},m),de=ne&&(0,W.createElement)(iI,{...b,...j,size:b?.size||j.size,key:`success`,id:b?.id||te},h),fe=f.map(e=>{switch(e){case`label`:return se;case`input`:return le;case`description`:return ce;case`error`:return ue||de;default:return null}});return(0,G.jsx)(qF,{value:{getStyles:A,describedBy:R,inputId:F,labelId:z,...Ure(f,{hasDescription:L,hasError:I||ne})},children:(0,G.jsx)(lj,{variant:l,size:c,mod:[{error:!!m,success:!!h&&!m},D],id:x===`label`?void 0:w,...A(`root`),...k,children:fe})})});oI.classes=JF,oI.varsResolver=aI,oI.displayName=`@mantine/core/InputWrapper`;var Gre={variant:`default`,leftSectionPointerEvents:`none`,rightSectionPointerEvents:`none`,withAria:!0,withErrorStyles:!0,withSuccessStyles:!0,size:`sm`,loading:!1,loadingPosition:`right`},sI=iA((e,t,n)=>({wrapper:{"--input-margin-top":n.offsetTop?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-margin-bottom":n.offsetBottom?`calc(var(--mantine-spacing-xs) / 2)`:void 0,"--input-height":zk(t.size,`input-height`),"--input-fz":Hk(t.size),"--input-radius":t.radius===void 0?void 0:Vk(t.radius),"--input-left-section-width":t.leftSectionWidth===void 0?void 0:U(t.leftSectionWidth),"--input-right-section-width":t.rightSectionWidth===void 0?void 0:U(t.rightSectionWidth),"--input-padding-y":t.multiline?zk(t.size,`input-padding-y`):void 0,"--input-left-section-pointer-events":t.leftSectionPointerEvents,"--input-right-section-pointer-events":t.rightSectionPointerEvents}})),cI=ij(e=>{let t=GA(`Input`,Gre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,required:s,__staticSelector:c,__stylesApiProps:l,size:u,wrapperProps:d,error:f,success:p,disabled:m,leftSection:h,leftSectionProps:g,leftSectionWidth:_,rightSection:v,rightSectionProps:y,rightSectionWidth:b,rightSectionPointerEvents:x,leftSectionPointerEvents:S,variant:C,vars:w,pointer:T,multiline:E,radius:D,id:O,withAria:k,withErrorStyles:A,withSuccessStyles:j,mod:ee,inputSize:M,attributes:N,__clearSection:te,__clearable:P,__clearSectionMode:F,__defaultRightSection:I,loading:ne,loadingPosition:L,__bottomSection:re,__bottomSectionProps:ie,rootRef:ae,dir:oe,...R}=t,{styleProps:z,rest:se}=YA(R),ce=(0,W.use)(qF),le={offsetBottom:ce?.offsetBottom,offsetTop:ce?.offsetTop},ue=qA({name:[`Input`,c],props:l||t,classes:JF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:N,stylesCtx:le,rootSelector:`wrapper`,vars:w,varsResolver:sI}),de=k?{required:s,disabled:m,"aria-invalid":f?!0:void 0,"aria-describedby":ce?.describedBy,id:ce?.inputId||O}:{},fe=ne?(0,G.jsx)(wF,{size:L===`left`?`calc(var(--input-left-section-size) / 2)`:`calc(var(--input-right-section-size) / 2)`}):null,pe=ne&&L===`left`?fe:h,B=KF({__clearable:P,__clearSection:te,rightSection:ne&&L===`right`?fe:v,__defaultRightSection:I,size:u,__clearSectionMode:F});return(0,G.jsx)(UF,{value:{size:u||`sm`},children:(0,G.jsxs)(lj,{ref:ae,dir:oe,...ue(`wrapper`),...z,...d,mod:[{error:!!f&&A,success:!!p&&!f&&j,pointer:T,disabled:m,multiline:E,"data-with-right-section":!!B,"data-with-left-section":!!pe,"data-with-bottom-section":!!re},ee],variant:C,size:u,children:[pe&&(0,G.jsx)(`div`,{...g,"data-position":`left`,...ue(`section`,{className:g?.className,style:g?.style}),children:pe}),(0,G.jsx)(lj,{component:`input`,...se,...de,required:s,mod:{disabled:m,error:!!f&&A,success:!!p&&!f&&j},variant:C,__size:M,...ue(`input`)}),re&&(0,G.jsx)(`div`,{...ie,...ue(`bottomSection`,{className:ie?.className,style:ie?.style}),children:re}),B&&(0,G.jsx)(`div`,{...y,"data-position":`right`,...ue(`section`,{className:y?.className,style:y?.style}),children:B})]})})});cI.classes=JF,cI.varsResolver=sI,cI.Wrapper=oI,cI.Label=tI,cI.Error=QF,cI.Success=iI,cI.Description=XF,cI.Placeholder=nI,cI.ClearButton=WF,cI.displayName=`@mantine/core/Input`;function Kre(e,t,n){let r=GA([`Input`,`InputWrapper`,e],t,n),{label:i,description:a,error:o,success:s,required:c,classNames:l,styles:u,className:d,unstyled:f,__staticSelector:p,__stylesApiProps:m,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,wrapperProps:y,id:b,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,vars:D,mod:O,attributes:k,...A}=r,{styleProps:j,rest:ee}=YA(A),M={label:i,description:a,error:o,success:s,required:c,classNames:l,className:d,__staticSelector:p,__stylesApiProps:m||r,errorProps:h,successProps:g,labelProps:_,descriptionProps:v,unstyled:f,styles:u,size:x,style:S,inputContainer:C,inputWrapperOrder:w,withAsterisk:T,variant:E,id:b,mod:O,attributes:k,...y};return{...ee,classNames:l,styles:u,unstyled:f,wrapperProps:{...M,...j},inputProps:{required:c,classNames:l,styles:u,unstyled:f,size:x,__staticSelector:p,__stylesApiProps:m||r,error:o,success:s,variant:E,id:b,attributes:k}}}var qre={__staticSelector:`InputBase`,withAria:!0,size:`sm`},lI=ij(e=>{let{inputProps:t,wrapperProps:n,...r}=Kre(`InputBase`,qre,e);return(0,G.jsx)(cI.Wrapper,{...n,children:(0,G.jsx)(cI,{...t,...r})})});lI.classes={...cI.classes,...cI.Wrapper.classes},lI.displayName=`@mantine/core/InputBase`;function Jre(e,t){if(!t||!e)return!1;let n=t.parentNode;for(;n!=null;){if(n===e)return!0;n=n.parentNode}return!1}function Yre({target:e,parent:t,ref:n,displayAfterTransitionEnd:r,onTransitionStart:i,onTransitionEnd:a}){let o=(0,W.useRef)(-1),s=(0,W.useRef)(e),[c,l]=(0,W.useState)(!1),[u,d]=(0,W.useState)(typeof r==`boolean`&&r),f=()=>{if(!e||!t||!n.current)return;let r=e.getBoundingClientRect(),i=t.getBoundingClientRect(),a=t.offsetWidth===0?1:i.width/t.offsetWidth,o=t.offsetHeight===0?1:i.height/t.offsetHeight,s=window.getComputedStyle(e),c=window.getComputedStyle(t),l=yj(s.borderTopWidth)+yj(c.borderTopWidth),u=yj(s.borderLeftWidth)+yj(c.borderLeftWidth),d={top:(r.top-i.top)/o-l,left:(r.left-i.left)/a-u,width:r.width/a,height:r.height/o};n.current.style.transform=`translateY(${d.top}px) translateX(${d.left}px)`,n.current.style.width=`${d.width}px`,n.current.style.height=`${d.height}px`},p=()=>{window.clearTimeout(o.current),n.current&&(n.current.style.transitionDuration=`0ms`),f(),o.current=window.setTimeout(()=>{n.current&&(n.current.style.transitionDuration=``)},30)},m=(0,W.useRef)(null),h=(0,W.useRef)(null);return(0,W.useEffect)(()=>{if(c&&s.current!==e&&i&&i(),s.current=e,f(),e)return m.current=new ResizeObserver(p),m.current.observe(e),t&&(h.current=new ResizeObserver(p),h.current.observe(t)),()=>{m.current?.disconnect(),h.current?.disconnect()}},[t,e]),(0,W.useEffect)(()=>{if(t){let e=e=>{Jre(e.target,t)&&(p(),d(!1))};return t.addEventListener(`transitionend`,e),()=>{t.removeEventListener(`transitionend`,e)}}},[t]),(0,W.useEffect)(()=>{if(n.current&&a){let e=e=>{e.propertyName===`transform`&&a()};return n.current.addEventListener(`transitionend`,e),()=>{n.current?.removeEventListener(`transitionend`,e)}}},[a]),Gte(()=>{Yte()!==`test`&&l(!0)},20,{autoInvoke:!0}),Kte(e=>{e.forEach(e=>{e.type===`attributes`&&e.attributeName===`dir`&&p()})},{attributes:!0,attributeFilter:[`dir`]},()=>document.documentElement),{initialized:c,hidden:u}}var uI={root:`m_96b553a6`},dI=iA((e,{transitionDuration:t},{shouldReduceMotion:n})=>({root:{"--transition-duration":e.respectReducedMotion&&n?`0ms`:typeof t==`number`?`${t}ms`:t||`150ms`}})),fI=rj(e=>{let t=GA(`FloatingIndicator`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,target:c,parent:l,transitionDuration:u,mod:d,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m,attributes:h,ref:g,..._}=t,v=qA({name:`FloatingIndicator`,classes:uI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s,varsResolver:dI,stylesCtx:{shouldReduceMotion:eA()}}),y=(0,W.useRef)(null),{initialized:b,hidden:x}=Yre({target:c,parent:l,ref:y,displayAfterTransitionEnd:f,onTransitionStart:p,onTransitionEnd:m}),S=Xk(g,y);return!c||!l?null:(0,G.jsx)(lj,{ref:S,mod:[{initialized:b,hidden:x},d],...v(`root`),..._})});fI.displayName=`@mantine/core/FloatingIndicator`,fI.classes=uI,fI.varsResolver=dI;var pI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},mI=iA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:Vk(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),hI=rj(e=>{let t=GA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=qA({name:`Alert`,classes:pI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:mI}),C=Jk(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(lj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(LF,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});hI.classes=pI,hI.varsResolver=mI,hI.displayName=`@mantine/core/Alert`;var gI={root:`m_b6d8b162`};function Xre(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var Zre={inherit:!1},_I=iA((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":Hk(i),"--text-lh":Pte(i),"--text-gradient":t===`gradient`?vA(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),vI=ij(e=>{let t=GA(`Text`,Zre,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(lj,{...qA({name:[`Text`,l],props:t,classes:gI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:_I})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":Xre(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});vI.classes=gI,vI.varsResolver=_I,vI.displayName=`@mantine/core/Text`;var yI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},bI=iA((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":zk(a,`badge-height`),"--badge-padding-x":zk(a,`badge-padding-x`),"--badge-fz":zk(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:Vk(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?hA(n,e):void 0}}}),xI=ij(e=>{let t=GA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=qA({name:`Badge`,props:t,classes:yI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:bI});return(0,G.jsxs)(lj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});xI.classes=yI,xI.varsResolver=bI,xI.displayName=`@mantine/core/Badge`;var SI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},CI={orientation:`horizontal`},wI=iA((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),TI=rj(e=>{let t=GA(`ButtonGroup`,CI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=GA(`ButtonGroup`,CI,e);return(0,G.jsx)(lj,{...qA({name:`ButtonGroup`,props:t,classes:SI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:wI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});TI.classes=SI,TI.varsResolver=wI,TI.displayName=`@mantine/core/ButtonGroup`;var EI=iA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":zk(o,`section-height`),"--section-padding-x":zk(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?Hk(o.replace(`compact-`,``)):Hk(o),"--section-radius":t===void 0?void 0:Vk(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),DI=rj(e=>{let t=GA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(lj,{...qA({name:`ButtonGroupSection`,props:t,classes:SI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:EI,rootSelector:`groupSection`})(`groupSection`),...f})});DI.classes=SI,DI.varsResolver=EI,DI.displayName=`@mantine/core/ButtonGroupSection`;var Qre={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},OI=iA((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":zk(a,`button-height`),"--button-padding-x":zk(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?Hk(a.replace(`compact-`,``)):Hk(a),"--button-radius":t===void 0?void 0:Vk(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),kI=ij(e=>{let t=GA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=qA({name:`Button`,props:t,classes:SI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:OI}),T=!!c,E=!!l;return(0,G.jsxs)(KP,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(mF,{mounted:p,transition:Qre,duration:150,children:e=>(0,G.jsx)(lj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(wF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(lj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(lj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(lj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});kI.classes=SI,kI.varsResolver=OI,kI.displayName=`@mantine/core/Button`,kI.Group=TI,kI.GroupSection=DI;var AI={root:`m_4451eb3a`},jI=ij(e=>{let t=GA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=qA({name:`Center`,props:t,classes:AI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(lj,{mod:[{inline:c},l],...f(`root`),...d})});jI.classes=AI,jI.displayName=`@mantine/core/Center`;var[$re,MI]=Lk(`Pagination.Root component was not found in tree`),NI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},eie={withPadding:!0},PI=rj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=GA(`PaginationControl`,eie,e),d=MI(),f=s||d.disabled;return(0,G.jsx)(KP,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});PI.classes=NI,PI.displayName=`@mantine/core/PaginationControl`;function FI({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var tie=e=>(0,G.jsx)(FI,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),nie=e=>(0,G.jsx)(FI,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),rie=e=>(0,G.jsx)(FI,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),II=e=>(0,G.jsx)(FI,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),LI={icon:e=>(0,G.jsx)(FI,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},RI=rj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=GA(`PaginationDots`,LI,e);return(0,G.jsx)(lj,{...MI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});RI.classes=NI,RI.displayName=`@mantine/core/PaginationDots`;function zI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=GA(t,i,e),s=MI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(PI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,tj(a)}var BI=zI({icon:tie,name:`PaginationNext`,action:`onNext`,type:`next`}),VI=zI({icon:nie,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),HI=zI({icon:rie,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),UI=zI({icon:II,name:`PaginationLast`,action:`onLast`,type:`next`});function WI({dotsIcon:e}){let t=MI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(RI,{icon:e},r):(0,G.jsx)(PI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}WI.displayName=`@mantine/core/PaginationItems`;var GI={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},KI=rj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=GA(`PaginationLabel`,GI,e),c=MI();return(0,G.jsx)(lj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});KI.classes=NI,KI.displayName=`@mantine/core/PaginationLabel`;var qI={siblings:1,boundaries:1},JI=iA((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:Vk(n),"--pagination-control-size":zk(t,`pagination-control-size`),"--pagination-control-fz":Hk(t),"--pagination-active-bg":r?hA(r,e):void 0,"--pagination-active-color":one(i,e)?SA({color:r,theme:e,autoContrast:i}):void 0}})),YI=rj(e=>{let t=GA(`PaginationRoot`,qI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=qA({name:`Pagination`,classes:NI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:JI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=Vte({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)($re,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:Uk(_,j),onPrevious:Uk(v,ee),onFirst:Uk(y,N),onLast:Uk(b,te),getStyles:O},children:(0,G.jsx)(lj,{...O(`root`),mod:[{layout:w},T],...D})})});YI.classes=NI,YI.varsResolver=JI,YI.displayName=`@mantine/core/PaginationRoot`;var XI={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function ZI({children:e}){return(0,G.jsx)(lj,{...MI().getStyles(`items`),children:e})}var QI=rj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=GA(`Pagination`,XI,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(ZI,{children:(0,G.jsx)(WI,{dotsIcon:c})}),(0,G.jsx)(KI,{formatLabel:m})]}):(0,G.jsx)(WI,{dotsIcon:c}):null;return(0,G.jsx)(YI,{total:l,layout:p,...h,children:(0,G.jsxs)(HF,{gap:u,children:[t&&(0,G.jsx)(HI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(VI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(BI,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(UI,{icon:o,...r?.(`last`)})]})})});QI.classes=NI,QI.displayName=`@mantine/core/Pagination`,QI.Root=YI,QI.Control=PI,QI.Dots=RI,QI.First=HI,QI.Last=UI,QI.Next=BI,QI.Previous=VI,QI.Items=WI,QI.Label=KI;function $I({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=kP({placement:t,middleware:[BN({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=eM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var eL={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},tL={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:Rk(`popover`)},nL=iA((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:Vk(t),"--tooltip-bg":n?hA(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),rL=rj(e=>{let t=GA(`TooltipFloating`,tL,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=FA(),E=qA({name:`TooltipFloating`,props:t,classes:eL,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:nL}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=$I({offset:p,position:m,defaultOpened:v}),N=rA(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=Xk(j,nA(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(cF,{...x,withinPortal:i,children:(0,G.jsx)(lj,{...w,...E(`tooltip`,{style:{...ej(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});rL.classes=eL,rL.varsResolver=nL,rL.displayName=`@mantine/core/TooltipFloating`;var iL=(0,W.createContext)({withinGroup:!1}),aL={openDelay:0,closeDelay:0};function oL(e){let{openDelay:t,closeDelay:n,children:r}=GA(`TooltipGroup`,aL,e);return(0,G.jsx)(iL,{value:{withinGroup:!0},children:(0,G.jsx)(bP,{delay:{open:t,close:n},children:r})})}oL.displayName=`@mantine/core/TooltipGroup`,oL.extend=e=>e;function sL(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function cL(e){let t=sL(e.middlewares),n=[zN(e.offset)];return t.shift&&n.push(BN(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?VN():VN(t.flip)),n.push(UN({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?HN():HN(t.inline)):e.inline&&n.push(HN()),n}function lL(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(iL).withinGroup,a=Jk(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=kP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:cL(e),whileElementsMounted:wN}),{delay:m,currentId:h,setCurrentId:g}=xP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=NP([gP(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?zP():null}),jP(l,{enabled:e.events?.focus,visibleOnly:!0}),FP(l,{role:`tooltip`}),DP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);qk(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var uL={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:Rk(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},dL=iA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:Vk(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),fL=rj(e=>{let t=GA(`Tooltip`,uL,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=uj(),ce=(0,W.useRef)(null),le=lL({position:rF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=qA({name:`Tooltip`,props:t,classes:eL,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:dL}),de=rA(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?tF({position:le.placement,dir:se}):void 0;if(oe){let e=gF(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(cF,{...I,withinPortal:d,children:(0,G.jsx)(mF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(lj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(nF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=Xk(le.reference,nA(de),R),he=gF(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(cF,{...I,withinPortal:d,children:(0,G.jsx)(mF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(lj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(nF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:oA(v,me.className),[i]:V}))]})});fL.classes=eL,fL.varsResolver=dL,fL.displayName=`@mantine/core/Tooltip`,fL.Floating=rL,fL.Group=oL;var pL={root:`m_cf365364`,indicator:`m_9e182ccd`,label:`m_1738fcb2`,input:`m_1714d588`,control:`m_69686b9b`,innerLabel:`m_78882f40`},mL={withItemsBorders:!0},hL=iA((e,{radius:t,color:n,transitionDuration:r,size:i,transitionTimingFunction:a})=>({root:{"--sc-radius":t===void 0?void 0:Vk(t),"--sc-color":n?hA(n,e):void 0,"--sc-shadow":n?void 0:`var(--mantine-shadow-xs)`,"--sc-transition-duration":r===void 0?void 0:`${r}ms`,"--sc-transition-timing-function":a,"--sc-padding":zk(i,`sc-padding`),"--sc-font-size":Hk(i)}})),gL=fre(e=>{let t=GA(`SegmentedControl`,mL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,data:c,value:l,defaultValue:u,onChange:d,size:f,name:p,disabled:m,readOnly:h,fullWidth:g,orientation:_,radius:v,color:y,transitionDuration:b,transitionTimingFunction:x,variant:S,autoContrast:C,withItemsBorders:w,mod:T,attributes:E,ref:D,...O}=t,k=qA({name:`SegmentedControl`,props:t,classes:pL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:hL}),A=FA(),j=c.map(e=>Xte(e)?{label:`${e}`,value:e}:e),ee=qte(),[M,N]=(0,W.useState)(Wk()),[te,P]=(0,W.useState)(null),[F,I]=(0,W.useState)({}),ne=(e,t)=>{F[t]=e,I(F)},[L,re]=Zk({value:l,defaultValue:u,finalValue:Array.isArray(c)?j.find(e=>!e.disabled)?.value??c[0]?.value??null:null,onChange:d}),ie=Jk(p),ae=j.map(e=>(0,W.createElement)(lj,{...k(`control`),mod:{active:L===e.value,orientation:_},key:`${e.value}`},(0,W.createElement)(`input`,{...k(`input`),disabled:m||e.disabled,type:`radio`,name:ie,value:`${e.value}`,id:`${ie}-${e.value}`,checked:L===e.value,onChange:()=>!h&&re(e.value),"data-focus-ring":A.focusRing,key:`${e.value}-input`}),(0,W.createElement)(lj,{component:`label`,...k(`label`),mod:{active:L===e.value&&!(m||e.disabled),disabled:m||e.disabled,"read-only":h},htmlFor:`${ie}-${e.value}`,ref:t=>ne(t,`${e.value}`),__vars:{"--sc-label-color":y===void 0?void 0:SA({color:y,theme:A,autoContrast:C})},key:`${e.value}-label`},(0,G.jsx)(`span`,{...k(`innerLabel`),children:e.label})))),oe=Xk(D,P);return Wte(()=>{N(Wk())},[c.length]),c.length===0?null:(0,G.jsxs)(lj,{...k(`root`),variant:S,size:f,ref:oe,mod:[{"full-width":g,orientation:_,initialized:ee,"with-items-borders":w},T],...O,role:`radiogroup`,"data-disabled":m,children:[L!==void 0&&(0,G.jsx)(fI,{target:F[`${L}`],parent:te,component:`span`,transitionDuration:`var(--sc-transition-duration)`,...k(`indicator`)},M),ae]})});gL.classes=pL,gL.varsResolver=hL,gL.displayName=`@mantine/core/SegmentedControl`;var[_L,vL]=Lk(`Table component was not found in the tree`),yL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function bL(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function xL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=rj(r=>{let i=GA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=vL();return(0,G.jsx)(lj,{component:e,...bL(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=yL,r}var SL=xL(`th`,{columnBorder:!0}),CL=xL(`td`,{columnBorder:!0}),wL=xL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),TL=xL(`thead`,{stickyHeader:!0}),EL=xL(`tbody`),DL=xL(`tfoot`),OL=xL(`caption`,{captionSide:!0}),kL={type:`scrollarea`},AL=iA((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),jL=rj(e=>{let t=GA(`TableScrollContainer`,kL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=qA({name:`TableScrollContainer`,classes:yL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:AL,rootSelector:`scrollContainer`});return(0,G.jsx)(lj,{component:d===`scrollarea`?HP:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});jL.classes=yL,jL.varsResolver=AL,jL.displayName=`@mantine/core/TableScrollContainer`;function ML({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(OL,{children:e.caption}),e.head&&(0,G.jsx)(TL,{children:(0,G.jsx)(wL,{children:e.head.map((e,t)=>(0,G.jsx)(SL,{children:e},t))})}),e.body&&(0,G.jsx)(EL,{children:e.body.map((e,t)=>(0,G.jsx)(wL,{children:e.map((e,t)=>(0,G.jsx)(CL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(DL,{children:(0,G.jsx)(wL,{children:e.foot.map((e,t)=>(0,G.jsx)(SL,{children:e},t))})})]})}ML.displayName=`@mantine/core/TableDataRenderer`;var NL={withRowBorders:!0,verticalSpacing:7},PL=iA((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":Bk(r),"--table-vertical-spacing":Bk(i),"--table-border-color":a?hA(a,e):void 0,"--table-striped-color":c&&o?hA(o,e):void 0,"--table-highlight-on-hover-color":l&&s?hA(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),FL=rj(e=>{let t=GA(`Table`,NL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=qA({name:`Table`,props:t,className:r,style:i,classes:yL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:PL});return(0,G.jsx)(_L,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(lj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(ML,{data:b})})})});FL.classes=yL,FL.varsResolver=PL,FL.displayName=`@mantine/core/Table`,FL.Td=CL,FL.Th=SL,FL.Tr=wL,FL.Thead=TL,FL.Tbody=EL,FL.Tfoot=DL,FL.Caption=OL,FL.ScrollContainer=jL,FL.DataRenderer=ML;var IL=rj(e=>(0,G.jsx)(lI,{component:`input`,...GA([`Input`,`InputWrapper`,`TextInput`],null,e),__staticSelector:`TextInput`}));IL.classes=lI.classes,IL.displayName=`@mantine/core/TextInput`;var LL={root:`m_7341320d`},RL=iA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":zk(t,`ti-size`),"--ti-radius":n===void 0?void 0:Vk(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),zL=rj(e=>{let t=GA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(lj,{...qA({name:`ThemeIcon`,classes:LL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:RL})(`root`),...u})});zL.classes=LL,zL.varsResolver=RL,zL.displayName=`@mantine/core/ThemeIcon`;var BL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],VL=[`xs`,`sm`,`md`,`lg`,`xl`];function HL(e,t){let n=t===void 0?`h${e}`:t;return BL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:VL.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var UL={root:`m_8a5d1357`},WL={order:1},GL=iA((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=HL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),KL=rj(e=>{let t=GA(`Title`,WL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=qA({name:`Title`,props:t,classes:UL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:GL});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(lj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});KL.classes=UL,KL.varsResolver=GL,KL.displayName=`@mantine/core/Title`;var qL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),JL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z`}))]]),YL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),XL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),ZL=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),QL=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(ZL);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});QL.displayName=`IconBase`;var $L=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:qL}));$L.displayName=`ArrowClockwiseIcon`;var eR=$L,tR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:JL}));tR.displayName=`ArrowSquareOutIcon`;var nR=tR,rR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:YL}));rR.displayName=`ListMagnifyingGlassIcon`;var iR=rR,aR=W.forwardRef((e,t)=>W.createElement(QL,{ref:t,...e,weights:XL}));aR.displayName=`MagnifyingGlassIcon`;var oR=aR,sR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),cR=s(((e,t)=>{t.exports=sR()})),lR=s((e=>{var t=cR(),n=Ik(),r=tA();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?de(n):``}function B(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return e.child!==t&&t!==null?de(`Suspense Fallback`):de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return de(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=B(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var V=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,"passive",{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=nn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==At(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Pd(Tr,`onSelect`),0>=o,i-=o,bi=1<<32-je(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ki&&Si(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ki&&Si(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ki&&Si(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Ul&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=M.T,s={};M.T=s,Ns(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,da(c,r),yu(e)):Ms(e,t,r,yu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,te,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},yu())}function Es(){return Xi(sp)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ra(n);var r=za(t,e,n);r!==null&&(xu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=Xr(e,t,n,r),n!==null&&(xu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,yu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Vl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return xu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&xu(t,e,2)}function Ps(e){var t=e.alternate;return e===co||t!==null&&t===co}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ls={readContext:Xi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Xi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,co,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,co,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,co,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=co,a=Oo();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=Vl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ni(t,!0)}else e=Yd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return z(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return Wi(t.type),Lc(t),null;case 19:if(ne(ao),r=t.memoizedState,r===null)return Lc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return L(ao,ao.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}}else{if(!a){if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Lc(t),null}else 2*ye()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=ao.current,L(ao,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),z(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ao),null;case 4:return z(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ne(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Bc(e,t){switch(Ti(t),t.tag){case 3:Wi(na),z();break;case 26:case 27:case 5:ce(t);break;case 4:z();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ne(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ne(pa);break;case 24:Wi(na)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[tt]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[et]=e,t[tt]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=gp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ud(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,M.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{N.p=a,M.T=r,qu(e,t)}}function Xu(e,t,n){t=fi(n,t),t=Zs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(We(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=fi(n,e),n=Qs(2),r=za(t,n,2),r!==null&&($s(n,r,t,e),We(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>ye()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=He()),e=Zr(e,t),e!==null&&(We(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return he(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=ze(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,gd(r,a))}r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=ye(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=dR()}))(),pR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],mR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],hR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],gR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],_R=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],vR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],yR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},bR={micro:11,small:12,body:14,title:16,section:22,page:32},xR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},SR={brand:mR,ok:hR,warn:gR,bad:_R,info:vR},CR={light:7,dark:5};function wR(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function TR(e){let t=wR(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function ER(e){return Object.fromEntries(Object.entries(SR).map(([t,n])=>[`--fanout-color-${t}-contrast`,TR(n[CR[e]])]))}function DR(e){return t=>{let n=t.color??AR.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(SR,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var OR=.25,kR={xs:9,sm:10,md:11,lg:13,xl:16},AR={primaryColor:`brand`,primaryShade:CR,autoContrast:!0,luminanceThreshold:OR,colors:{dark:pR,brand:mR,ok:hR,warn:gR,bad:_R,info:vR},defaultRadius:`md`,fontFamily:xR.body,fontFamilyMonospace:xR.display,headings:{fontFamily:xR.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:NR(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:NR(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:MR(t.size)})}}},jR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":yR.light.muted,...ER(`light`)},dark:ER(`dark`)});function MR(e){let t=kR[e??`md`];return t===void 0||t>=bR.micro?{}:{"--badge-fz":`${bR.micro/16}rem`}}function NR(e,t){return!e||e===AR.primaryColor?{[t]:`var(--fanout-color-${AR.primaryColor}-contrast)`}:{}}var PR=Ene({...AR,variantColorResolver:DR(SA)});function FR({dark:e,children:t}){return(0,G.jsx)(GA,{theme:PR,cssVariablesResolver:jR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(XP,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function IR({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(UF,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(uj,{miw:0,children:[(0,G.jsx)(JL,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(yI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(mL,{label:`Refresh this view`,children:(0,G.jsx)(NF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(nR,{size:15,weight:`bold`})})})]})}function LR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(gI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(UF,{justify:`space-between`,children:[(0,G.jsx)(yI,{size:`sm`,children:e}),n&&(0,G.jsx)(AI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(MI,{mih:160,p:`xl`,children:[(0,G.jsx)(TF,{size:`sm`}),(0,G.jsx)(yI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function RR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(MI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(UF,{wrap:`nowrap`,children:[(0,G.jsx)(VL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(uj,{children:[(0,G.jsx)(yI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(yI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function zR({left:e,right:t}){return(0,G.jsxs)(UF,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(yI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(yI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function BR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function VR({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(UF,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(yI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(eL,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function HR(e){return yR[e?`dark`:`light`]}function UR(e){let t=e?5:7;return{ok:hR[t],warn:gR[t],bad:_R[t],info:vR[t]}}function WR(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function GR(e,t){let n=UR(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:HR(t).muted}var KR=wc(),qR=P,JR=fe,YR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Ru,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(XR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}ez(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&ob(r).w>o)return!0;if(a){var s=BO(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=KR(e).pointerEl=new Jd[i.type](qR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=KR(e).labelEl=new Yo(qR(t.label));e.add(i),QR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=KR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=KR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),QR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=bf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){TS(e.event)},onmousedown:JR(this._onHandleDragMove,this,0,0),drift:JR(this._onHandleDragMove,this),ondragend:JR(this._onHandleDragEnd,this)}),n.add(r)),ez(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,$x(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){XR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,$R(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform($R(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr($R(r)),KR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),eS(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function XR(e,t,n,r){ZR(KR(n).lastProp,r)||(KR(n).lastProp=r,t?Vd(n,r,e):(n.stopAnimation(),n.attr(r)))}function ZR(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=ZR(e[r],t)}),!!n}return e===t}function QR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function $R(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function ez(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function tz(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function nz(e,t,n,r,i){var a=iz(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=pg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),rz(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Jf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function rz(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function iz(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:ey(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function az(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),pf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function oz(e,t,n,r,i,a){var o=Ib.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),nz(t,r,i,a,{position:az(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function sz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function cz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function lz(e,t,n){return ob(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function uz(e,t,n){return[ps(fs(t[0],t[1]),e-n/2),fs(e+n/2,ps(t[0],t[1]))]}var dz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=fz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=tz(r),f=pz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}oz(t,e,rx(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=rx(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=az(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=fz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=fs(o[1],l[c]),l[c]=ps(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(YR);function fz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var pz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:sz([t,r[0]],[t,r[1]],mz(e))}},shadow:function(e,t,n,r,i,a){var o=lz(e,i,a),s=r[1]-r[0],c=uz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:cz([l,r[0]],[u-l,s],mz(e))}}};function mz(e){return e.dim===`x`?0:1}var hz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:u_.color.border,width:1,type:`dashed`},shadowStyle:{color:u_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:u_.color.neutral00,padding:[5,7,5,7],backgroundColor:u_.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:u_.color.accent40,throttle:40}},t}(Fg),gz=wc(),_z=R;function vz(e,t,n){if(!We.node){var r=t.getZr();gz(r).records||(gz(r).records={}),yz(r,t);var i=gz(r).records[e]||(gz(r).records[e]={});i.handler=n}}function yz(e,t){if(gz(e).initialized)return;gz(e).initialized=!0,n(`click`,pe(Sz,`click`)),n(`mousemove`,pe(Sz,`mousemove`)),n(`mousewheel`,pe(Sz,`mousewheel`)),n(`globalout`,xz);function n(n,r){e.on(n,function(n){var i=Cz(t);_z(gz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),bz(i.pendings,t)})}}function bz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function xz(e,t,n){e.handler(`leave`,null,n)}function Sz(e,t,n,r){t.handler(e,n,r)}function Cz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function wz(e,t){if(!We.node){var n=t.getZr();(gz(n).records||{})[e]&&(gz(n).records[e]=null)}}var Tz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;vz(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){wz(`axisPointer`,t)},t.prototype.dispose=function(e,t){wz(`axisPointer`,t)},t.type=`axisPointer`,t}(Aw);function Ez(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Cc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var Dz=wc();function Oz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Rz(i)&&(i=Ez({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Rz(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Rz(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(jz,p),showTooltip:pe(Mz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Iz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&kz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Lz(t),Lz(e)))),g[e.key]=a}})}),R(g,function(e,t){kz(u[t],e,h,!0,f)}),Nz(p,u,f),Pz(m,i,e,o),Fz(u,o,n),f}}function kz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=Az(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Az(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Js(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function jz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Mz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=UO(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Nz(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function Pz(e,t,n,r){if(Rz(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Fz(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Dz(r)[i]||{},o=Dz(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function Iz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Lz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function Rz(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function zz(e){GO.registerAxisPointerClass(`CartesianAxisPointer`,dz),e.registerComponentModel(hz),e.registerComponentView(Tz),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=NO(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},Oz)}function Bz(e){XD(nk),XD(zz)}function Vz(e,t){var n=pg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Wo({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Hz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:u_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:u_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:u_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:u_.color.tertiary,fontSize:14}},t}(Fg);function Uz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Wz(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function eB(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+Xz+i:`,left`+i+`,top`+i)),Yz+`:`+a}function tB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Xz+`:`+o+`;`:[[`top`,0],[`left`,0],[Gz,o]]}function nB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function rB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=N_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(eB(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=fg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(nB(d)),f!=null&&i.push(`padding:`+pg(f).join(`px `)+`px`),i.join(`;`)+`;`}function iB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&dh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var aB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));iB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;wS(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Jz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Zz+rB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+tB(i[0],i[1],!0)+(`border-color:`+yg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!Uz(n)&&(o=$z(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=pB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=vB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=uB;c.x=r.x,c.y=r.y,c.update(),Zc(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=Ez(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(pB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&fB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Zc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;hT(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Zc(e).dataIndex==null?Zc(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=fB([t.tooltipOption],r),o=this._renderMode,s=[],c=y_(`section`,{blocks:[],noHeader:!0}),l=[],u=new P_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=iz(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=y_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=ey(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,yg(m.color),o);var h=Kg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=fB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=T_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` - -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Zc(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=fB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new P_;h.marker=g.makeTooltipMarker(`item`,yg(h.color),d);var _=Kg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?T_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Zc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=hh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=fB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new P_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=qh(m.axisValue,d,p)),d=_g(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=ws(t[0],s),r=ws(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Eg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=gB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=mB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=_B(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=_B(d)?l[1]/2:d===`bottom`?l[1]:0),Uz(e)){var h=hB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&(eS(this,`_updatePosition`),this._tooltipContent.dispose(),wz(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(Aw);function fB(e,t,n){var r=t.ecModel,i;n?(i=new gp(n,r,r),i=new gp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof gp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new gp(o,i,r)))}return i}function pB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function mB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function hB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function gB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function _B(e){return e===`center`||e===`middle`}function vB(e,t,n){var r=Dc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=kc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Zc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function yB(e){XD(zz),e.registerComponentModel(Hz),e.registerComponentView(dB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var bB=R;function xB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function SB(e,t,n){var r={};return bB(t,function(t){var a=r[t]=i();bB(e[t],function(e,r){if(ok.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new ok(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new ok(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function CB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&xB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&xB(t[n])?e[n]=P(t[n]):delete e[n]})}function wB(e,t,n,r){var i={};return R(e,function(e){i[e]=ok.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return fT(a,l,e)}function c(e,t){mT(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var TB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},EB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,TB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:u_.size.m,align:`auto`,backgroundColor:u_.color.transparent,borderColor:u_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:u_.color.disabled,inactiveBorderColor:u_.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:u_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:u_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:u_.color.tertiary,borderWidth:1,borderColor:u_.color.border},emphasis:{selectorLabel:{show:!0,color:u_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Fg),DB=pe,OB=R,kB=Ru,AB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new kB),this.group.add(this._selectorGroup=new kB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Og(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Eg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Eg(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Vz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),OB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new kB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,DB(NB,f,null,r,d)).on(`mouseover`,DB(PB,m.name,null,r,d)).on(`mouseout`,DB(FB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Zc(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:$r(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,DB(NB,null,f,r,d)).on(`mouseover`,DB(PB,null,f,r,d)).on(`mouseout`,DB(FB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Zc(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Zc(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();OB(e,function(e){var r=e.type,i=new Yo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Kf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ru(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=jB(c,r,o,s,d,m,u),y=new kB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(MB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Yo({style:Jf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Wo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Of({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ru(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();wg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){wg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Aw);function jB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),OB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:dE(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function MB(e){var t=e.icon||`roundRect`,n=$_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=u_.color.neutral00,n.style.lineWidth=2),n}function NB(e,t,n,r){FB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),PB(e,t,n,r)}function PB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function FB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function IB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),LB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),LB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function LB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function RB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(IB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(IB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(IB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(IB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(IB,`unSelect`))}var zB=Xc(BB);function BB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Wo({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Vd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=GB[i],o=KB[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(AB);function JB(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function YB(e){XD(VB),e.registerComponentModel(HB),e.registerComponentView(qB),JB(e)}function XB(e){XD(VB),XD(YB)}var ZB={get:function(e,t,n){var r=P((QB[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},QB={color:{active:[`#006edd`,`#e0ffff`],inactive:[u_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},$B=ok.mapVisual,eV=ok.eachVisual,tV=B,nV=R,rV=ks,iV=Cs,aV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&CB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=SB(this.option.controller,t,e),this.targetVisuals=SB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return nV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=kc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=rV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){tV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},nV(r,function(e,t){if(ok.isValidType(t)){var n=ZB.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;nV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=$B(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;eV(l,function(e){e>u&&(u=e)}),c.symbolSize=$B(l,function(e){return iV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:u_.color.transparent,borderColor:u_.color.borderTint,contentColor:u_.color.theme[0],inactiveColor:u_.color.disabled,borderWidth:0,padding:u_.size.m,textGap:10,precision:0,textStyle:{color:u_.color.secondary}},t}(Fg),oV=[20,140],sV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=oV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=oV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ks((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=cV(this,`outOfRange`,this.getExtent()),n=cV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Ru(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);mV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=pV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=pf(n.handleLabelPoints[l],ff(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=pV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=pf(c.indicatorLabelPoint,ff(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||SV(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Sc(u,d);this._dispatchHighDown(`downplay`,fV(f[0],n)),this._dispatchHighDown(`highlight`,fV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(hT(e.target,function(e){var n=Zc(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function DV(e,t,n,r){for(var i=t.targetVisuals[r],a=ok.prepareVisualTypes(i),o={color:pT(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(wV,TV),R(EV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(kV))}function NV(e){e.registerComponentModel(sV),e.registerComponentView(yV),MV(e)}var PV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],FV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=ok.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=ZB.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=ok.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){ok.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=ah(aV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(aV),FV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function IV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var LV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Ru;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Yo({style:Jf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),wg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:fV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return dV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Ru,o=this.visualMapModel.textStyleModel;a.add(new Yo({style:Jf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=$_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(lV);function RV(e){e.registerComponentModel(PV),e.registerComponentView(LV),MV(e)}function zV(e){XD(NV),XD(RV)}var BV={label:{enabled:!0},decal:{show:!1}},VV=wc(),HV=wc(),UV=Xc(WV);function WV(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=HV(e).scope||(HV(e).scope={}),i=P(BV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||(VV(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Bg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=VV(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Bg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=XV:-c>=XV),f=c>0?c%XV:c%XV+XV,p=!1;p=d?!0:!oi(u)&&f>=YV==!!l;var m=e+n*JV(a),h=t+r*qV(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*ZV);if(d){var _=1/this._p,v=(l?1:-1)*(XV-_);this._add(`A`,n,r,g,1,+l,e+n*JV(a+v),t+r*qV(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*JV(o),b=t+r*qV(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function mH(e){return``}function hH(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return pH(i,a)+(i===`style`?o||``:hh(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+mH(i)}return r(e)}function gH(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function _H(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function vH(e,t,n,r){return fH(`svg`,`root`,{width:e,height:t,xmlns:oH,"xmlns:xlink":sH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var yH=0;function bH(){return yH++}var xH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},SH=`transform-origin`;function CH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new QV;return i.reset(xi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function wH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[SH]=n+`px `+r+`px`)}var TH={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function EH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function DH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=_H(n.zrId);t.animation=!0,kH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=EH(i,n);return a.replace(o,s)}}function OH(e){return V(e)?xH[e]?`cubic-bezier(`+xH[e]+`)`:jr(e)?e:``:``}function kH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Cd){var s=DH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return EH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+bH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function AH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};jH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ni(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),jH(r,t,n,!0)}}}function jH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+bH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var MH=Math.round;function NH(e){return e&&V(e.src)}function PH(e){return e&&me(e.toDataURL)}function FH(e,t,n,r){aH(function(i,a){var o=i===`fill`||i===`stroke`;o&&yi(a)?XH(t,e,i,r):o&&gi(a)?ZH(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),YH(n,e,r)}function IH(e,t){var n=jC(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[uH+`silent`]=`true`))}function LH(e){return oi(e[0]-1)&&oi(e[1])&&oi(e[2])&&oi(e[3]-1)}function RH(e){return oi(e[4])&&oi(e[5])}function zH(e,t,n){if(t&&!(RH(t)&&LH(t))){var r=n?10:1e4;e.transform=LH(t)?`translate(`+MH(t[4]*r)/r+` `+MH(t[5]*r)/r+`)`:li(t)}}function BH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=fH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Si(i);x&&(o.patternTransform=x);var S=fH(`pattern`,``,o,[d]),C=hH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=fH(`pattern`,T,o,[d])),t[n]=bi(T)}}function QH(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=fH(`clipPath`,a,o,[GH(e,n)])}t[`clip-path`]=bi(a)}function $H(e){return document.createTextNode(e)}function eU(e,t,n){e.insertBefore(t,n)}function tU(e,t){e.removeChild(t)}function nU(e,t){e.appendChild(t)}function rU(e){return e.parentNode}function iU(e){return e.nextSibling}function aU(e,t){e.textContent=t}var oU=58,sU=120,cU=fH(``,``);function lU(e){return e===void 0}function uU(e){return e!==void 0}function dU(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function fU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function pU(e){var t,n=e.children,r=e.tag;if(uU(r)){var i=e.elm=dH(r);if(gU(cU,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,mU(e,m,n,i,c)):hU(e,t,r,a))}function vU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(gU(e,t),lU(t.text)?uU(r)&&uU(i)?r!==i&&_U(n,r,i):uU(i)?(uU(e.text)&&aU(n,``),mU(n,null,i,0,i.length-1)):uU(r)?hU(n,r,0,r.length-1):uU(e.text)&&aU(n,``):e.text!==t.text&&(uU(r)&&hU(n,r,0,r.length-1),aU(n,t.text)))}function yU(e,t){if(fU(e,t))vU(e,t);else{var n=e.elm,r=rU(n);pU(t),r!==null&&(eU(r,t.elm,iU(n)),hU(r,[e],0,0))}return t}var bU=0,xU=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=SU(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+bU++,this._oldVNode=vH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=dH(`svg`);gU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,yU(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return JH(e,_H(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=_H(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=CU(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=fH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(fH(`defs`,`defs`,{},c)),e.animation){var l=gH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=fH(`style`,`stl`,{},[],l);a.push(u)}}return vH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},hH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=jD(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function wU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function TU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}var EU=c({BIGINT_FORMAT_RANGES:()=>TW,CONSTANT_CATCH:()=>jW,Class:()=>DW,NUMBER_FORMAT_RANGES:()=>wW,aborted:()=>$U,allowsEval:()=>bW,assert:()=>cie,assertEqual:()=>iie,assertIs:()=>oie,assertNever:()=>sie,assertNotEqual:()=>aie,assignProp:()=>FU,attachSchema:()=>rW,base64ToUint8Array:()=>uW,base64urlToUint8Array:()=>_ie,cached:()=>AU,captureStackTrace:()=>yW,cleanEnum:()=>gie,cleanRegex:()=>MU,clone:()=>UU,cloneDef:()=>uie,codePointLength:()=>oW,constantCatch:()=>_W,createTransparentProxy:()=>hie,defineLazy:()=>PU,defineLazyInternal:()=>hW,esc:()=>LU,escapeRegex:()=>HU,explicitlyAborted:()=>eW,extend:()=>JU,finalizeIssue:()=>iW,floatSafeRemainder:()=>NU,getElementAtPath:()=>die,getEnumValues:()=>OU,getLengthableOrigin:()=>sW,getParsedType:()=>xW,getSizableOrigin:()=>aW,hexToUint8Array:()=>yie,hide:()=>mW,installLazyProp:()=>gW,isObject:()=>zU,isPlainObject:()=>BU,issue:()=>lW,joinValues:()=>K,jsonStringifyReplacer:()=>kU,members:()=>fW,merge:()=>XU,mergeDefs:()=>IU,normalizeParams:()=>q,nullish:()=>jU,numKeys:()=>mie,objectClone:()=>lie,omit:()=>qU,optionalKeys:()=>GU,own:()=>pW,parsedType:()=>cW,partial:()=>ZU,pick:()=>KU,prefixIssues:()=>tW,primitiveTypes:()=>CW,promiseAllObject:()=>fie,propertyKeyTypes:()=>SW,randomString:()=>pie,required:()=>QU,safeExtend:()=>YU,shallowClone:()=>VU,slugify:()=>RU,stringifyPrimitive:()=>WU,toZod:()=>DU,uint8ArrayToBase64:()=>dW,uint8ArrayToBase64url:()=>vie,uint8ArrayToHex:()=>bie,unwrapMessage:()=>nW});function iie(e){return e}function aie(e){return e}function DU(){return e=>e}function oie(e){}function sie(e){throw Error(`Unexpected value in exhaustive check`)}function cie(e){}function OU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>WU(e)).join(t)}function kU(e,t){return typeof t==`bigint`?t.toString():t}function AU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jU(e){return e==null}function MU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function NU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function fie(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function hie(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function WU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function GU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&FU(e,r,n.shape[r])}return FU(this,`shape`,e),e},checks:[]}))}function qU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return FU(this,`shape`,r),r},checks:[]}))}function JU(e,t){if(!BU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function YU(e,t){if(!BU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function XU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return FU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ZU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return FU(this,`shape`,i),i},checks:[]}))}function QU(e,t,n){return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return FU(this,`shape`,i),i}}))}function $U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function nW(e){return typeof e==`string`?e:e?.message}function rW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function uW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function fW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):xie(e,n,r.value)}}function pW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function mW(e,t,n){return pW(e,t,n,!1)}function xie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:pW(this,t,n.bind(this))},set(e){pW(this,t,e)}})}function Sie(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function hW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&OW!==e._zod){OW=void 0;return}OW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,AW);let e=kW;kW=!1;try{let r=n(this);return kW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),kW||=e,r}catch(n){throw delete this[t],kW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function gW(e,t,n,r){let i=Sie(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function _W(e){let t=()=>e;return t[jW]=!0,t}var vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,J=o((()=>{VW(),vW=Symbol(`evaluating`),yW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},bW=AU(()=>{if(BW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),xW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},SW=new Set([`string`,`number`,`symbol`]),CW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),wW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},TW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},EW=/[\uD800-\uDBFF]/,DW=class{constructor(...e){}},kW=!1,AW={configurable:!0,get(){kW=!0}},jW=`~constantCatch`}));function Cie(e){let t=IW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return IW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){FW.value=new a(r);try{Object.defineProperty(n,"_zod",FW)}finally{FW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),fW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Cie(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function MW(e){return e&&Object.assign(BW,e),BW}var NW,PW,FW,IW,LW,RW,zW,BW,VW=o((()=>{J(),PW=Object.freeze({status:`aborted`}),FW={value:void 0,enumerable:!1},IW=`captureStackTrace`in Error?Error:null,LW=Symbol(`zod_brand`),RW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(NW=globalThis).__zod_globalConfig??(NW.__zod_globalConfig={}),BW=globalThis.__zod_globalConfig}));function wie(){let e=this._zod;return e.message??=JSON.stringify(e.def,kU,2),e.message}function Tie(e){this._zod.message=e}function Eie(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function HW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Eie(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function UW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function KW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${GW(e.path)}`);return t.join(` -`)}var qW,JW,YW,XW,ZW,QW,$W,eG=o((()=>{VW(),J(),qW={get:wie,set:Tie,enumerable:!0,configurable:!0},JW={value:void 0,enumerable:!1},YW={value:void 0,enumerable:!1},XW=new WeakSet([Object.prototype,Error.prototype]),ZW=(e,t)=>{e.name=`$ZodError`,JW.value=e._zod,Object.defineProperty(e,"_zod",JW),YW.value=t,Object.defineProperty(e,"issues",YW),JW.value=void 0,YW.value=void 0,Object.defineProperty(e,"message",qW);let n=Object.getPrototypeOf(e);XW.has(n)||(XW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},QW=Y(`$ZodError`,ZW),$W=Y(`$ZodError`,ZW,void 0,{Parent:Error})}));function tG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function nG(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[fG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new RW;return a.issues.length===0}var rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG=o((()=>{VW(),eG(),J(),rG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new RW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},iG=rG($W),aG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},oG=aG($W),sG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new RW;return a.issues.length?{success:!1,error:new(e??QW)(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},cG=sG($W),lG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},uG=lG($W),dG=Symbol.for(`zod.compile.invalid`),fG=Symbol.for(`zod.compile.fallback`),pG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==dG||nG(e,t,n)}),mG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},hG=e=>{let t=rG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,tG(n,a))};return n},gG=hG($W),_G=e=>{let t=rG(e),n=(e,r,i,a)=>t(e,r,i,tG(n,a));return n},vG=_G($W),yG=e=>{let t=aG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,tG(n,a))};return n},bG=yG($W),xG=e=>{let t=aG(e),n=async(e,r,i,a)=>await t(e,r,i,tG(n,a));return n},SG=xG($W),CG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sG(e)(t,n,i)},wG=CG($W),TG=e=>(t,n,r)=>sG(e)(t,n,r),EG=TG($W),DG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lG(e)(t,n,i)},OG=DG($W),kG=e=>async(t,n,r)=>lG(e)(t,n,r),AG=kG($W)})),MG=c({base64:()=>fK,base64url:()=>pK,bigint:()=>SK,boolean:()=>TK,browserEmail:()=>aK,cidrv4:()=>uK,cidrv6:()=>dK,creditCard:()=>vK,cuid:()=>VG,cuid2:()=>HG,date:()=>bK,datetime:()=>RG,domain:()=>hK,duration:()=>qG,e164:()=>_K,email:()=>eK,emoji:()=>PG,extendedDuration:()=>JG,guid:()=>YG,hex:()=>AK,hostname:()=>mK,html5Email:()=>tK,httpProtocol:()=>gK,idnEmail:()=>iK,integer:()=>CK,ipv4:()=>sK,ipv6:()=>cK,ksuid:()=>GG,lowercase:()=>OK,mac:()=>lK,md5_base64:()=>MK,md5_base64url:()=>NK,md5_hex:()=>jK,nanoid:()=>KG,nanoidOfLength:()=>NG,null:()=>EK,number:()=>wK,rfc5322Email:()=>nK,sha1_base64:()=>FK,sha1_base64url:()=>IK,sha1_hex:()=>PK,sha256_base64:()=>RK,sha256_base64url:()=>zK,sha256_hex:()=>LK,sha384_base64:()=>VK,sha384_base64url:()=>HK,sha384_hex:()=>BK,sha512_base64:()=>WK,sha512_base64url:()=>GK,sha512_hex:()=>UK,string:()=>xK,time:()=>LG,ulid:()=>UG,undefined:()=>DK,unicodeEmail:()=>rK,uppercase:()=>kK,uuid:()=>XG,uuid4:()=>ZG,uuid6:()=>QG,uuid7:()=>$G,xid:()=>WG});function NG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function PG(){return new RegExp(oK,`u`)}function FG(e){return RegExp(`^${e}$`)}function IG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function LG(e){return RegExp(`^${IG(e)}$`)}function RG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${IG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${IG({precision:e.precision})}`:n;return RegExp(`^${yK}T(?:${r})$`)}function zG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function BG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK=o((()=>{J(),VG=/^[cC][0-9a-z]{6,}$/,HG=/^[0-9a-z]+$/,UG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,WG=/^[0-9a-vA-V]{20}$/,GG=/^[A-Za-z0-9]{27}$/,KG=/^[a-zA-Z0-9_-]{21}$/,qG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JG=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,YG=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,XG=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ZG=XG(4),QG=XG(6),$G=XG(7),eK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,nK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,rK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,iK=rK,aK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,sK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lK=e=>{let t=HU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},uK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,dK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pK=/^[A-Za-z0-9_-]*$/,mK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,hK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,gK=/^https?$/,_K=/^\+[1-9]\d{6,14}$/,vK=/^\d(?:[ -]?\d){11,18}$/,yK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,bK=FG(yK),xK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},SK=/^-?\d+n?$/,CK=/^-?\d+$/,wK=/^-?\d+(?:\.\d+)?$/,TK=/^(?:true|false)$/i,EK=/^null$/i,DK=/^undefined$/i,OK=/^[^A-Z]*$/,kK=/^[^a-z]*$/,AK=/^[0-9a-fA-F]*$/,jK=/^[0-9a-fA-F]{32}$/,MK=zG(22,`==`),NK=BG(22),PK=/^[0-9a-fA-F]{40}$/,FK=zG(27,`=`),IK=BG(27),LK=/^[0-9a-fA-F]{64}$/,RK=zG(43,`=`),zK=BG(43),BK=/^[0-9a-fA-F]{96}$/,VK=zG(64,``),HK=BG(64),UK=/^[0-9a-fA-F]{128}$/,WK=zG(86,`==`),GK=BG(86)}));function qK(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues))}var JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq=o((()=>{VW(),KK(),J(),JK=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),YK=e=>{let t=e.value;return!jU(t)&&t.size!==void 0},XK=e=>{let t=e.value;return!jU(t)&&t.length!==void 0},ZK={number:`number`,bigint:`bigint`,object:`date`},QK=Y(`$ZodCheckLessThan`,(e,t)=>{JK.init(e,t);let n=ZK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{JK.init(e,t);let n=ZK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:ZK[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eq=Y(`$ZodCheckMultipleOf`,(e,t)=>{JK.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):NU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),tq=Y(`$ZodCheckNumberFormat`,(e,t)=>{JK.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=wW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=CK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),nq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{JK.init(e,t);let[n,r]=TW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),rq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:aW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),iq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:aW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:aW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),oq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?oW(r):i)<=t.maximum)return;let a=sW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=sW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?oW(r):i;if(a===t.length)return;let o=sW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;JK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uq=Y(`$ZodCheckRegex`,(e,t)=>{lq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),dq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=OK,lq.init(e,t)}),fq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=kK,lq.init(e,t)}),pq=Y(`$ZodCheckIncludes`,(e,t)=>{JK.init(e,t);let n=HU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckStartsWith`,(e,t)=>{JK.init(e,t);let n=RegExp(`^${HU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckEndsWith`,(e,t)=>{JK.init(e,t);let n=RegExp(`.*${HU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckProperty`,(e,t)=>{JK.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>qK(n,e,t.property));qK(n,e,t.property)}}),_q=Y(`$ZodCheckMimeType`,(e,t)=>{JK.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),vq=Y(`$ZodCheckOverwrite`,(e,t)=>{JK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),bq,xq=o((()=>{bq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=lR()}))(),dR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],fR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],pR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],mR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],hR=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],gR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],_R={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},vR={micro:11,small:12,body:14,title:16,section:22,page:32},yR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},bR={brand:fR,ok:pR,warn:mR,bad:hR,info:gR},xR={light:7,dark:5};function SR(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function CR(e){let t=SR(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function wR(e){return Object.fromEntries(Object.entries(bR).map(([t,n])=>[`--fanout-color-${t}-contrast`,CR(n[xR[e]])]))}function TR(e){return t=>{let n=t.color??OR.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(bR,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var ER=.25,DR={xs:9,sm:10,md:11,lg:13,xl:16},OR={primaryColor:`brand`,primaryShade:xR,autoContrast:!0,luminanceThreshold:ER,colors:{dark:dR,brand:fR,ok:pR,warn:mR,bad:hR,info:gR},defaultRadius:`md`,fontFamily:yR.body,fontFamilyMonospace:yR.display,headings:{fontFamily:yR.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:jR(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:jR(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:AR(t.size)})}}},kR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":_R.light.muted,...wR(`light`)},dark:wR(`dark`)});function AR(e){let t=DR[e??`md`];return t===void 0||t>=vR.micro?{}:{"--badge-fz":`${vR.micro/16}rem`}}function jR(e,t){return!e||e===OR.primaryColor?{[t]:`var(--fanout-color-${OR.primaryColor}-contrast)`}:{}}var MR=Dne({...OR,variantColorResolver:TR(xA)});function NR({dark:e,children:t}){return(0,G.jsx)(WA,{theme:MR,cssVariablesResolver:kR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(YP,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function PR({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(HF,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(lj,{miw:0,children:[(0,G.jsx)(KL,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(vI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(fL,{label:`Refresh this view`,children:(0,G.jsx)(MF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(eR,{size:15,weight:`bold`})})})]})}function FR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(hI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(HF,{justify:`space-between`,children:[(0,G.jsx)(vI,{size:`sm`,children:e}),n&&(0,G.jsx)(kI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(jI,{mih:160,p:`xl`,children:[(0,G.jsx)(wF,{size:`sm`}),(0,G.jsx)(vI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function IR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(jI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(HF,{wrap:`nowrap`,children:[(0,G.jsx)(zL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(lj,{children:[(0,G.jsx)(vI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(vI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function LR({left:e,right:t}){return(0,G.jsxs)(HF,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(vI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(vI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function RR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}var zR={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`};function BR({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(HF,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(vI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(QI,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`,getItemProps:e=>({"aria-label":`Page ${e}`}),getControlProps:e=>({"aria-label":zR[e]})})]})}function VR(e){return _R[e?`dark`:`light`]}function HR(e){let t=e?5:7;return{ok:pR[t],warn:mR[t],bad:hR[t],info:gR[t]}}function UR(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function WR(e,t){let n=HR(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:VR(t).muted}var GR=wc(),KR=P,qR=fe,JR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Ru,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(YR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}$R(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&ob(r).w>o)return!0;if(a){var s=VO(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=GR(e).pointerEl=new Jd[i.type](KR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=GR(e).labelEl=new Yo(KR(t.label));e.add(i),ZR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=GR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=GR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),ZR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=bf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){TS(e.event)},onmousedown:qR(this._onHandleDragMove,this,0,0),drift:qR(this._onHandleDragMove,this),ondragend:qR(this._onHandleDragEnd,this)}),n.add(r)),$R(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Qx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){YR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,QR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(QR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(QR(r)),GR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),$x(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function YR(e,t,n,r){XR(GR(n).lastProp,r)||(GR(n).lastProp=r,t?Vd(n,r,e):(n.stopAnimation(),n.attr(r)))}function XR(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=XR(e[r],t)}),!!n}return e===t}function ZR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function QR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function $R(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function ez(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function tz(e,t,n,r,i){var a=rz(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=hg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),nz(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Jf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function nz(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function rz(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:ey(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function iz(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),pf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function az(e,t,n,r,i,a){var o=Ib.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),tz(t,r,i,a,{position:iz(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function oz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function sz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function cz(e,t,n){return ob(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function lz(e,t,n){return[ps(fs(t[0],t[1]),e-n/2),fs(e+n/2,ps(t[0],t[1]))]}var uz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=dz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=ez(r),f=fz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}az(t,e,rx(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=rx(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=iz(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=dz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=fs(o[1],l[c]),l[c]=ps(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(JR);function dz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var fz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:oz([t,r[0]],[t,r[1]],pz(e))}},shadow:function(e,t,n,r,i,a){var o=cz(e,i,a),s=r[1]-r[0],c=lz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:sz([l,r[0]],[u-l,s],pz(e))}}};function pz(e){return e.dim===`x`?0:1}var mz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:f_.color.border,width:1,type:`dashed`},shadowStyle:{color:f_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:f_.color.neutral00,padding:[5,7,5,7],backgroundColor:f_.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:f_.color.accent40,throttle:40}},t}(Lg),hz=wc(),gz=R;function _z(e,t,n){if(!We.node){var r=t.getZr();hz(r).records||(hz(r).records={}),vz(r,t);var i=hz(r).records[e]||(hz(r).records[e]={});i.handler=n}}function vz(e,t){if(hz(e).initialized)return;hz(e).initialized=!0,n(`click`,pe(xz,`click`)),n(`mousemove`,pe(xz,`mousemove`)),n(`mousewheel`,pe(xz,`mousewheel`)),n(`globalout`,bz);function n(n,r){e.on(n,function(n){var i=Sz(t);gz(hz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),yz(i.pendings,t)})}}function yz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function bz(e,t,n){e.handler(`leave`,null,n)}function xz(e,t,n,r){t.handler(e,n,r)}function Sz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function Cz(e,t){if(!We.node){var n=t.getZr();(hz(n).records||{})[e]&&(hz(n).records[e]=null)}}var wz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;_z(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){Cz(`axisPointer`,t)},t.prototype.dispose=function(e,t){Cz(`axisPointer`,t)},t.type=`axisPointer`,t}(Aw);function Tz(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Cc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var Ez=wc();function Dz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Lz(i)&&(i=Tz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Lz(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Lz(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(Az,p),showTooltip:pe(jz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Fz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&Oz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Iz(t),Iz(e)))),g[e.key]=a}})}),R(g,function(e,t){Oz(u[t],e,h,!0,f)}),Mz(p,u,f),Nz(m,i,e,o),Pz(u,o,n),f}}function Oz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=kz(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function kz(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Js(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function Az(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function jz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=WO(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Mz(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function Nz(e,t,n,r){if(Lz(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Pz(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Ez(r)[i]||{},o=Ez(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function Fz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Iz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function Lz(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Rz(e){KO.registerAxisPointerClass(`CartesianAxisPointer`,uz),e.registerComponentModel(mz),e.registerComponentView(wz),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=PO(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},Dz)}function zz(e){ZD(rk),ZD(Rz)}function Bz(e,t){var n=hg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Wo({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Vz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:f_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:f_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:f_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:f_.color.tertiary,fontSize:14}},t}(Lg);function Hz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function Uz(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function $z(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+Yz+i:`,left`+i+`,top`+i)),Jz+`:`+a}function eB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Yz+`:`+o+`;`:[[`top`,0],[`left`,0],[Wz,o]]}function tB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function nB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=P_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push($z(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=mg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(tB(d)),f!=null&&i.push(`padding:`+hg(f).join(`px `)+`px`),i.join(`;`)+`;`}function rB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&dh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var iB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));rB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;CS(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=qz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Xz+nB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+eB(i[0],i[1],!0)+(`border-color:`+xg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!Hz(n)&&(o=Qz(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=fB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=_B(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=lB;c.x=r.x,c.y=r.y,c.update(),Zc(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=Tz(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(fB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&dB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Zc(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;hT(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Zc(e).dataIndex==null?Zc(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=dB([t.tooltipOption],r),o=this._renderMode,s=[],c=b_(`section`,{blocks:[],noHeader:!0}),l=[],u=new F_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=rz(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=b_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=ey(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,xg(m.color),o);var h=Jg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=dB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=E_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Zc(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=dB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new F_;h.marker=g.makeTooltipMarker(`item`,xg(h.color),d);var _=Jg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?E_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Zc(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=gh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=dB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new F_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Yh(m.axisValue,d,p)),d=yg(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=ws(t[0],s),r=ws(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Og(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=hB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=pB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=gB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=gB(d)?l[1]/2:d===`bottom`?l[1]:0),Hz(e)){var h=mB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&($x(this,`_updatePosition`),this._tooltipContent.dispose(),Cz(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(Aw);function dB(e,t,n){var r=t.ecModel,i;n?(i=new gp(n,r,r),i=new gp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof gp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new gp(o,i,r)))}return i}function fB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function pB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function mB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function hB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function gB(e){return e===`center`||e===`middle`}function _B(e,t,n){var r=Dc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=kc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Zc(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function vB(e){ZD(Rz),e.registerComponentModel(Vz),e.registerComponentView(uB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var yB=R;function bB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function xB(e,t,n){var r={};return yB(t,function(t){var a=r[t]=i();yB(e[t],function(e,r){if(sk.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new sk(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new sk(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function SB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&bB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&bB(t[n])?e[n]=P(t[n]):delete e[n]})}function CB(e,t,n,r){var i={};return R(e,function(e){i[e]=sk.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return fT(a,l,e)}function c(e,t){mT(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var wB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},TB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,wB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:f_.size.m,align:`auto`,backgroundColor:f_.color.transparent,borderColor:f_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:f_.color.disabled,inactiveBorderColor:f_.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:f_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:f_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:f_.color.tertiary,borderWidth:1,borderColor:f_.color.border},emphasis:{selectorLabel:{show:!0,color:f_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Lg),EB=pe,DB=R,OB=Ru,kB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new OB),this.group.add(this._selectorGroup=new OB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Ag(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Og(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Og(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Bz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),DB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new OB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,EB(MB,f,null,r,d)).on(`mouseover`,EB(NB,m.name,null,r,d)).on(`mouseout`,EB(PB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Zc(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:$r(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,EB(MB,null,f,r,d)).on(`mouseover`,EB(NB,null,f,r,d)).on(`mouseout`,EB(PB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Zc(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Zc(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();DB(e,function(e){var r=e.type,i=new Yo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Kf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ru(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=AB(c,r,o,s,d,m,u),y=new OB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(jB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Yo({style:Jf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Wo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Of({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ru(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Eg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Eg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(Aw);function AB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),DB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:dE(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function jB(e){var t=e.icon||`roundRect`,n=$_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=f_.color.neutral00,n.style.lineWidth=2),n}function MB(e,t,n,r){PB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),NB(e,t,n,r)}function NB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function PB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function FB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),IB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),IB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function IB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function LB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(FB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(FB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(FB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(FB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(FB,`unSelect`))}var RB=Xc(zB);function zB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Wo({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Vd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=WB[i],o=GB[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(kB);function qB(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function JB(e){ZD(BB),e.registerComponentModel(VB),e.registerComponentView(KB),qB(e)}function YB(e){ZD(BB),ZD(JB)}var XB={get:function(e,t,n){var r=P((ZB[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},ZB={color:{active:[`#006edd`,`#e0ffff`],inactive:[f_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},QB=sk.mapVisual,$B=sk.eachVisual,eV=B,tV=R,nV=ks,rV=Cs,iV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&SB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=xB(this.option.controller,t,e),this.targetVisuals=xB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return tV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=kc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=nV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){eV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},tV(r,function(e,t){if(sk.isValidType(t)){var n=XB.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;tV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=QB(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;$B(l,function(e){e>u&&(u=e)}),c.symbolSize=QB(l,function(e){return rV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:f_.color.transparent,borderColor:f_.color.borderTint,contentColor:f_.color.theme[0],inactiveColor:f_.color.disabled,borderWidth:0,padding:f_.size.m,textGap:10,precision:0,textStyle:{color:f_.color.secondary}},t}(Lg),aV=[20,140],oV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=aV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=aV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=ks((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=sV(this,`outOfRange`,this.getExtent()),n=sV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Ru(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);pV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=fV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=pf(n.handleLabelPoints[l],ff(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=fV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=pf(c.indicatorLabelPoint,ff(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||xV(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Sc(u,d);this._dispatchHighDown(`downplay`,dV(f[0],n)),this._dispatchHighDown(`highlight`,dV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(hT(e.target,function(e){var n=Zc(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function EV(e,t,n,r){for(var i=t.targetVisuals[r],a=sk.prepareVisualTypes(i),o={color:pT(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(CV,wV),R(TV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(OV))}function MV(e){e.registerComponentModel(oV),e.registerComponentView(vV),jV(e)}var NV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],PV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=sk.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=XB.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=sk.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){sk.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=ah(iV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(iV),PV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function FV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var IV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Ru;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Yo({style:Jf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Eg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:dV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return uV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Ru,o=this.visualMapModel.textStyleModel;a.add(new Yo({style:Jf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=$_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(cV);function LV(e){e.registerComponentModel(NV),e.registerComponentView(IV),jV(e)}function RV(e){ZD(MV),ZD(LV)}var zV={label:{enabled:!0},decal:{show:!1}},BV=wc(),VV=wc(),HV=Xc(UV);function UV(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=VV(e).scope||(VV(e).scope={}),i=P(zV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||(BV(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Hg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=BV(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Hg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=YV:-c>=YV),f=c>0?c%YV:c%YV+YV,p=!1;p=d?!0:!oi(u)&&f>=JV==!!l;var m=e+n*qV(a),h=t+r*KV(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*XV);if(d){var _=1/this._p,v=(l?1:-1)*(YV-_);this._add(`A`,n,r,g,1,+l,e+n*qV(a+v),t+r*KV(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*qV(o),b=t+r*KV(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function pH(e){return``}function mH(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return fH(i,a)+(i===`style`?o||``:gh(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+pH(i)}return r(e)}function hH(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function gH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function _H(e,t,n,r){return dH(`svg`,`root`,{width:e,height:t,xmlns:aH,"xmlns:xlink":oH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var vH=0;function yH(){return vH++}var bH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},xH=`transform-origin`;function SH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new ZV;return i.reset(xi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function CH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[xH]=n+`px `+r+`px`)}var wH={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function TH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function EH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=gH(n.zrId);t.animation=!0,OH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=TH(i,n);return a.replace(o,s)}}function DH(e){return V(e)?bH[e]?`cubic-bezier(`+bH[e]+`)`:jr(e)?e:``:``}function OH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Cd){var s=EH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return TH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+yH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function kH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};AH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ni(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),AH(r,t,n,!0)}}}function AH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+yH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var jH=Math.round;function MH(e){return e&&V(e.src)}function NH(e){return e&&me(e.toDataURL)}function PH(e,t,n,r){iH(function(i,a){var o=i===`fill`||i===`stroke`;o&&yi(a)?YH(t,e,i,r):o&&gi(a)?XH(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),JH(n,e,r)}function FH(e,t){var n=jC(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[lH+`silent`]=`true`))}function IH(e){return oi(e[0]-1)&&oi(e[1])&&oi(e[2])&&oi(e[3]-1)}function LH(e){return oi(e[4])&&oi(e[5])}function RH(e,t,n){if(t&&!(LH(t)&&IH(t))){var r=n?10:1e4;e.transform=IH(t)?`translate(`+jH(t[4]*r)/r+` `+jH(t[5]*r)/r+`)`:li(t)}}function zH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=dH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Si(i);x&&(o.patternTransform=x);var S=dH(`pattern`,``,o,[d]),C=mH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=dH(`pattern`,T,o,[d])),t[n]=bi(T)}}function ZH(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=dH(`clipPath`,a,o,[WH(e,n)])}t[`clip-path`]=bi(a)}function QH(e){return document.createTextNode(e)}function $H(e,t,n){e.insertBefore(t,n)}function eU(e,t){e.removeChild(t)}function tU(e,t){e.appendChild(t)}function nU(e){return e.parentNode}function rU(e){return e.nextSibling}function iU(e,t){e.textContent=t}var aU=58,oU=120,sU=dH(``,``);function cU(e){return e===void 0}function lU(e){return e!==void 0}function uU(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function dU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function fU(e){var t,n=e.children,r=e.tag;if(lU(r)){var i=e.elm=uH(r);if(hU(sU,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,pU(e,m,n,i,c)):mU(e,t,r,a))}function _U(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(hU(e,t),cU(t.text)?lU(r)&&lU(i)?r!==i&&gU(n,r,i):lU(i)?(lU(e.text)&&iU(n,``),pU(n,null,i,0,i.length-1)):lU(r)?mU(n,r,0,r.length-1):lU(e.text)&&iU(n,``):e.text!==t.text&&(lU(r)&&mU(n,r,0,r.length-1),iU(n,t.text)))}function vU(e,t){if(dU(e,t))_U(e,t);else{var n=e.elm,r=nU(n);fU(t),r!==null&&($H(r,t.elm,rU(n)),mU(r,[e],0,0))}return t}var yU=0,bU=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=xU(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+yU++,this._oldVNode=_H(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=uH(`svg`);hU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,vU(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return qH(e,gH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=gH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=SU(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=dH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(dH(`defs`,`defs`,{},c)),e.animation){var l=hH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=dH(`style`,`stl`,{},[],l);a.push(u)}}return _H(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},mH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=jD(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function CU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function wU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function TU(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?TU(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}function oie(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?String(e):t.toLocaleString([],{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`})}var EU=c({BIGINT_FORMAT_RANGES:()=>TW,CONSTANT_CATCH:()=>jW,Class:()=>DW,NUMBER_FORMAT_RANGES:()=>wW,aborted:()=>$U,allowsEval:()=>bW,assert:()=>die,assertEqual:()=>sie,assertIs:()=>lie,assertNever:()=>uie,assertNotEqual:()=>cie,assignProp:()=>FU,attachSchema:()=>rW,base64ToUint8Array:()=>uW,base64urlToUint8Array:()=>bie,cached:()=>AU,captureStackTrace:()=>yW,cleanEnum:()=>yie,cleanRegex:()=>MU,clone:()=>UU,cloneDef:()=>pie,codePointLength:()=>oW,constantCatch:()=>_W,createTransparentProxy:()=>vie,defineLazy:()=>PU,defineLazyInternal:()=>hW,esc:()=>LU,escapeRegex:()=>HU,explicitlyAborted:()=>eW,extend:()=>JU,finalizeIssue:()=>iW,floatSafeRemainder:()=>NU,getElementAtPath:()=>mie,getEnumValues:()=>OU,getLengthableOrigin:()=>sW,getParsedType:()=>xW,getSizableOrigin:()=>aW,hexToUint8Array:()=>Sie,hide:()=>mW,installLazyProp:()=>gW,isObject:()=>zU,isPlainObject:()=>BU,issue:()=>lW,joinValues:()=>K,jsonStringifyReplacer:()=>kU,members:()=>fW,merge:()=>XU,mergeDefs:()=>IU,normalizeParams:()=>q,nullish:()=>jU,numKeys:()=>_ie,objectClone:()=>fie,omit:()=>qU,optionalKeys:()=>GU,own:()=>pW,parsedType:()=>cW,partial:()=>ZU,pick:()=>KU,prefixIssues:()=>tW,primitiveTypes:()=>CW,promiseAllObject:()=>hie,propertyKeyTypes:()=>SW,randomString:()=>gie,required:()=>QU,safeExtend:()=>YU,shallowClone:()=>VU,slugify:()=>RU,stringifyPrimitive:()=>WU,toZod:()=>DU,uint8ArrayToBase64:()=>dW,uint8ArrayToBase64url:()=>xie,uint8ArrayToHex:()=>Cie,unwrapMessage:()=>nW});function sie(e){return e}function cie(e){return e}function DU(){return e=>e}function lie(e){}function uie(e){throw Error(`Unexpected value in exhaustive check`)}function die(e){}function OU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>WU(e)).join(t)}function kU(e,t){return typeof t==`bigint`?t.toString():t}function AU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function jU(e){return e==null}function MU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function NU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function hie(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function vie(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function WU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function GU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&FU(e,r,n.shape[r])}return FU(this,`shape`,e),e},checks:[]}))}function qU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return UU(e,IU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return FU(this,`shape`,r),r},checks:[]}))}function JU(e,t){if(!BU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function YU(e,t){if(!BU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return FU(this,`shape`,n),n}}))}function XU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return UU(e,IU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return FU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function ZU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return FU(this,`shape`,i),i},checks:[]}))}function QU(e,t,n){return UU(t,IU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return FU(this,`shape`,i),i}}))}function $U(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function nW(e){return typeof e==`string`?e:e?.message}function rW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function uW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function fW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):wie(e,n,r.value)}}function pW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function mW(e,t,n){return pW(e,t,n,!1)}function wie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:pW(this,t,n.bind(this))},set(e){pW(this,t,e)}})}function Tie(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function hW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&OW!==e._zod){OW=void 0;return}OW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,AW);let e=kW;kW=!1;try{let r=n(this);return kW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),kW||=e,r}catch(n){throw delete this[t],kW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function gW(e,t,n,r){let i=Tie(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function _W(e){let t=()=>e;return t[jW]=!0,t}var vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,jW,J=o((()=>{VW(),vW=Symbol(`evaluating`),yW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},bW=AU(()=>{if(BW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),xW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},SW=new Set([`string`,`number`,`symbol`]),CW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),wW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},TW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},EW=/[\uD800-\uDBFF]/,DW=class{constructor(...e){}},kW=!1,AW={configurable:!0,get(){kW=!0}},jW=`~constantCatch`}));function Eie(e){let t=IW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return IW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){FW.value=new a(r);try{Object.defineProperty(n,"_zod",FW)}finally{FW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),fW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Eie(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function MW(e){return e&&Object.assign(BW,e),BW}var NW,PW,FW,IW,LW,RW,zW,BW,VW=o((()=>{J(),PW=Object.freeze({status:`aborted`}),FW={value:void 0,enumerable:!1},IW=`captureStackTrace`in Error?Error:null,LW=Symbol(`zod_brand`),RW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},zW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(NW=globalThis).__zod_globalConfig??(NW.__zod_globalConfig={}),BW=globalThis.__zod_globalConfig}));function Die(){let e=this._zod;return e.message??=JSON.stringify(e.def,kU,2),e.message}function Oie(e){this._zod.message=e}function kie(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function HW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?kie(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function UW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function KW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${GW(e.path)}`);return t.join(` +`)}var qW,JW,YW,XW,ZW,QW,$W,eG=o((()=>{VW(),J(),qW={get:Die,set:Oie,enumerable:!0,configurable:!0},JW={value:void 0,enumerable:!1},YW={value:void 0,enumerable:!1},XW=new WeakSet([Object.prototype,Error.prototype]),ZW=(e,t)=>{e.name=`$ZodError`,JW.value=e._zod,Object.defineProperty(e,"_zod",JW),YW.value=t,Object.defineProperty(e,"issues",YW),JW.value=void 0,YW.value=void 0,Object.defineProperty(e,"message",qW);let n=Object.getPrototypeOf(e);XW.has(n)||(XW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},QW=Y(`$ZodError`,ZW),$W=Y(`$ZodError`,ZW,void 0,{Parent:Error})}));function tG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function nG(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[fG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new RW;return a.issues.length===0}var rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG=o((()=>{VW(),eG(),J(),rG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new RW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},iG=rG($W),aG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>iW(e,o,MW())));throw yW(n,a?.callee??t),n}return s.value};return t},oG=aG($W),sG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new RW;return a.issues.length?{success:!1,error:new(e??QW)(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},cG=sG($W),lG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>iW(e,i,MW())))}:{success:!0,data:a.value}},uG=lG($W),dG=Symbol.for(`zod.compile.invalid`),fG=Symbol.for(`zod.compile.fallback`),pG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==dG||nG(e,t,n)}),mG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},hG=e=>{let t=rG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,tG(n,a))};return n},gG=hG($W),_G=e=>{let t=rG(e),n=(e,r,i,a)=>t(e,r,i,tG(n,a));return n},vG=_G($W),yG=e=>{let t=aG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,tG(n,a))};return n},bG=yG($W),xG=e=>{let t=aG(e),n=async(e,r,i,a)=>await t(e,r,i,tG(n,a));return n},SG=xG($W),CG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sG(e)(t,n,i)},wG=CG($W),TG=e=>(t,n,r)=>sG(e)(t,n,r),EG=TG($W),DG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lG(e)(t,n,i)},OG=DG($W),kG=e=>async(t,n,r)=>lG(e)(t,n,r),AG=kG($W)})),MG=c({base64:()=>fK,base64url:()=>pK,bigint:()=>SK,boolean:()=>TK,browserEmail:()=>aK,cidrv4:()=>uK,cidrv6:()=>dK,creditCard:()=>vK,cuid:()=>VG,cuid2:()=>HG,date:()=>bK,datetime:()=>RG,domain:()=>hK,duration:()=>qG,e164:()=>_K,email:()=>eK,emoji:()=>PG,extendedDuration:()=>JG,guid:()=>YG,hex:()=>AK,hostname:()=>mK,html5Email:()=>tK,httpProtocol:()=>gK,idnEmail:()=>iK,integer:()=>CK,ipv4:()=>sK,ipv6:()=>cK,ksuid:()=>GG,lowercase:()=>OK,mac:()=>lK,md5_base64:()=>MK,md5_base64url:()=>NK,md5_hex:()=>jK,nanoid:()=>KG,nanoidOfLength:()=>NG,null:()=>EK,number:()=>wK,rfc5322Email:()=>nK,sha1_base64:()=>FK,sha1_base64url:()=>IK,sha1_hex:()=>PK,sha256_base64:()=>RK,sha256_base64url:()=>zK,sha256_hex:()=>LK,sha384_base64:()=>VK,sha384_base64url:()=>HK,sha384_hex:()=>BK,sha512_base64:()=>WK,sha512_base64url:()=>GK,sha512_hex:()=>UK,string:()=>xK,time:()=>LG,ulid:()=>UG,undefined:()=>DK,unicodeEmail:()=>rK,uppercase:()=>kK,uuid:()=>XG,uuid4:()=>ZG,uuid6:()=>QG,uuid7:()=>$G,xid:()=>WG});function NG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function PG(){return new RegExp(oK,`u`)}function FG(e){return RegExp(`^${e}$`)}function IG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function LG(e){return RegExp(`^${IG(e)}$`)}function RG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${IG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${IG({precision:e.precision})}`:n;return RegExp(`^${yK}T(?:${r})$`)}function zG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function BG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK=o((()=>{J(),VG=/^[cC][0-9a-z]{6,}$/,HG=/^[0-9a-z]+$/,UG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,WG=/^[0-9a-vA-V]{20}$/,GG=/^[A-Za-z0-9]{27}$/,KG=/^[a-zA-Z0-9_-]{21}$/,qG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,JG=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,YG=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,XG=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ZG=XG(4),QG=XG(6),$G=XG(7),eK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,nK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,rK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,iK=rK,aK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,sK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,cK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,lK=e=>{let t=HU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},uK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,dK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,fK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,pK=/^[A-Za-z0-9_-]*$/,mK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,hK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,gK=/^https?$/,_K=/^\+[1-9]\d{6,14}$/,vK=/^\d(?:[ -]?\d){11,18}$/,yK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,bK=FG(yK),xK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},SK=/^-?\d+n?$/,CK=/^-?\d+$/,wK=/^-?\d+(?:\.\d+)?$/,TK=/^(?:true|false)$/i,EK=/^null$/i,DK=/^undefined$/i,OK=/^[^A-Z]*$/,kK=/^[^a-z]*$/,AK=/^[0-9a-fA-F]*$/,jK=/^[0-9a-fA-F]{32}$/,MK=zG(22,`==`),NK=BG(22),PK=/^[0-9a-fA-F]{40}$/,FK=zG(27,`=`),IK=BG(27),LK=/^[0-9a-fA-F]{64}$/,RK=zG(43,`=`),zK=BG(43),BK=/^[0-9a-fA-F]{96}$/,VK=zG(64,``),HK=BG(64),UK=/^[0-9a-fA-F]{128}$/,WK=zG(86,`==`),GK=BG(86)}));function qK(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues))}var JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq=o((()=>{VW(),KK(),J(),JK=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),YK=e=>{let t=e.value;return!jU(t)&&t.size!==void 0},XK=e=>{let t=e.value;return!jU(t)&&t.length!==void 0},ZK={number:`number`,bigint:`bigint`,object:`date`},QK=Y(`$ZodCheckLessThan`,(e,t)=>{JK.init(e,t);let n=ZK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{JK.init(e,t);let n=ZK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:ZK[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),eq=Y(`$ZodCheckMultipleOf`,(e,t)=>{JK.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):NU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),tq=Y(`$ZodCheckNumberFormat`,(e,t)=>{JK.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=wW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=CK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),nq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{JK.init(e,t);let[n,r]=TW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),rq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:aW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),iq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:aW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=YK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:aW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),oq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?oW(r):i)<=t.maximum)return;let a=sW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),sq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=sW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),cq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;JK.init(e,t),(n=e._zod.def).when??(n.when=XK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?oW(r):i;if(a===t.length)return;let o=sW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;JK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),uq=Y(`$ZodCheckRegex`,(e,t)=>{lq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),dq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=OK,lq.init(e,t)}),fq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=kK,lq.init(e,t)}),pq=Y(`$ZodCheckIncludes`,(e,t)=>{JK.init(e,t);let n=HU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckStartsWith`,(e,t)=>{JK.init(e,t);let n=RegExp(`^${HU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckEndsWith`,(e,t)=>{JK.init(e,t);let n=RegExp(`.*${HU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckProperty`,(e,t)=>{JK.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>qK(n,e,t.property));qK(n,e,t.property)}}),_q=Y(`$ZodCheckMimeType`,(e,t)=>{JK.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),vq=Y(`$ZodCheckOverwrite`,(e,t)=>{JK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),bq,xq=o((()=>{bq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),Sq,Cq=o((()=>{Sq={major:4,minor:5,patch:4}}));function wq(e){return{validate:t=>{try{return oJ(cG(e,t))}catch{return uG(e,t).then(oJ)}},vendor:`zod`,version:1}}function Tq(e,t){if(!t.normalize&&t.protocol?.source===gK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Eq(e){return e.replace(fJ,``)}function Dq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Oq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function kq(e){if(!EJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Aq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:kq(n)}function jq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Mq(e){if(!pK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return jq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Nq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Pq(e){return vK.test(e)?Nq(e.replace(PJ,``)):!1}function Fq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Iq(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues)),t.value[n]=e.value}function Lq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...tW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Rq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:QJ,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=GU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function zq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Lq(e,n,i,t,u,d))):Lq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Bq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!$U(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>iW(e,r,MW())))}),t)}function Vq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>iW(e,r,MW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Hq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Uq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(BU(e)&&BU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Uq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Uq(t.value,n.value);if(!c.valid){if($U(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Gq(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Kq(e,t,n){e.issues.length&&t.issues.push(...tW(n,e.issues)),t.value[n]=e.value}function qq(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...tW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Jq(e,t,n,r,i,a,o){e.issues.length&&(SW.has(typeof r)?n.issues.push(...tW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>iW(e,o,MW()))})),t.issues.length&&(SW.has(typeof r)?n.issues.push(...tW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>iW(e,o,MW()))})),n.value.set(e.value,t.value)}function Yq(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Xq(e,t){return e.value=t.issues.length?void 0:t.value,e}function Zq(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Qq(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function $q(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>iW(e,r,MW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function eJ(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function tJ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>nJ(e,r,t.out,n)):nJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>nJ(e,r,t.in,n)):nJ(e,r,t.in,n)}}function nJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function rJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function iJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(lW(e))}}var aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY=o((()=>{yq(),VW(),xq(),jG(),KK(),J(),Cq(),aJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Sq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=$U(t),a;for(let o of n){if(o._zod.def.when){if(eW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new RW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(rW(t.issues,n,e),i||=$U(t,n))});else{if(t.issues.length===n)continue;rW(t.issues,n,e),i||=$U(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if($U(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new RW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new RW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return mW(this,`~standard`,wq(this))},set"~standard"(e){pW(this,`~standard`,e)}}),oJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},sJ=Y(`$ZodString`,(e,t)=>{aJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??xK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),cJ=Y(`$ZodStringFormat`,(e,t)=>{lq.init(e,t),sJ.init(e,t)}),lJ=Y(`$ZodGUID`,(e,t)=>{t.pattern??=YG,cJ.init(e,t)}),uJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=XG(e)}else t.pattern??=XG();cJ.init(e,t)}),dJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=eK,cJ.init(e,t)}),fJ=/[\t\n\r]/g,pJ=Y(`$ZodURL`,(e,t)=>{cJ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Tq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Dq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Oq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Eq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=PG(),cJ.init(e,t)}),hJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?KG:NG(t.length),cJ.init(e,t)}),gJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=VG,cJ.init(e,t)}),_J=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=HG,cJ.init(e,t)}),vJ=Y(`$ZodULID`,(e,t)=>{t.pattern??=UG,cJ.init(e,t)}),yJ=Y(`$ZodXID`,(e,t)=>{t.pattern??=WG,cJ.init(e,t)}),bJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=GG,cJ.init(e,t)}),xJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=RG(t),cJ.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),SJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=bK,cJ.init(e,t)}),CJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=LG(t),cJ.init(e,t)}),wJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=qG,cJ.init(e,t)}),TJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=sK,cJ.init(e,t),e._zod.bag.format=`ipv4`}),EJ=/^[0-9a-fA-F:.]+$/,DJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=cK,cJ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{kq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),OJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=lK(t.delimiter),cJ.init(e,t),e._zod.bag.format=`mac`}),kJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=uK,cJ.init(e,t)}),AJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=dK,cJ.init(e,t),e._zod.check=n=>{Aq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),jJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=fK,cJ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{jq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),MJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=pK,cJ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Mq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),NJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=_K,cJ.init(e,t)}),PJ=/[- ]/g,FJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=vK,cJ.init(e,t),e._zod.check=n=>{Pq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),IJ=Y(`$ZodJWT`,(e,t)=>{cJ.init(e,t),e._zod.check=n=>{Fq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),LJ=Y(`$ZodCustomStringFormat`,(e,t)=>{cJ.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),RJ=Y(`$ZodNumber`,(e,t)=>{aJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??wK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),zJ=Y(`$ZodNumberFormat`,(e,t)=>{tq.init(e,t),RJ.init(e,t)}),BJ=Y(`$ZodBoolean`,(e,t)=>{aJ.init(e,t),e._zod.pattern=TK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),VJ=Y(`$ZodBigInt`,(e,t)=>{aJ.init(e,t),e._zod.pattern=SK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),HJ=Y(`$ZodBigIntFormat`,(e,t)=>{nq.init(e,t),VJ.init(e,t)}),UJ=Y(`$ZodSymbol`,(e,t)=>{aJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),WJ=Y(`$ZodUndefined`,(e,t)=>{aJ.init(e,t),e._zod.pattern=DK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),GJ=Y(`$ZodNull`,(e,t)=>{aJ.init(e,t),e._zod.pattern=EK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),KJ=Y(`$ZodAny`,(e,t)=>{aJ.init(e,t),e._zod.parse=e=>e}),qJ=Y(`$ZodUnknown`,(e,t)=>{aJ.init(e,t),e._zod.parse=e=>e}),JJ=Y(`$ZodNever`,(e,t)=>{aJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),YJ=Y(`$ZodVoid`,(e,t)=>{aJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),XJ=Y(`$ZodDate`,(e,t)=>{aJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),ZJ=Y(`$ZodArray`,(e,t)=>{aJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eIq(t,r,e))):Iq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),QJ=[],$J=new WeakMap,eY=Y(`$ZodObject`,(e,t)=>{if(aJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;$J.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),$J.set(t,n),n}})}let n=AU(()=>Rq(t));hW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||FU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=zU,i=t.catchall,a,o=BW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Lq(n,t,e,c,r,i))):Lq(a,t,e,c,r,i)}return i?zq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),tY=Y(`$ZodObjectJIT`,(e,t)=>{eY.init(e,t);let n=e._zod.parse,r=AU(()=>Rq(t)),i=BW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new bq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { @@ -76,7 +76,7 @@ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=zU,c=!BW.jitless,l=c&&bW.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?zq([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),nY=Y(`$ZodUnion`,(e,t)=>{aJ.init(e,t),hW(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),hW(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),hW(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),hW(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>MU(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Bq(t,r,e,i)):Bq(o,r,e,i)}}),rY=Y(`$ZodXor`,(e,t)=>{nY.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Vq(t,r,e,i)):Vq(o,r,e,i)}}),iY=Y(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,nY.init(e,t);let n=e._zod.parse;hW(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||FU(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=$J.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=AU(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!zU(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),aY=Y(`$ZodIntersection`,(e,t)=>{aJ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Wq(e,t,n)):Wq(e,i,a)}}),oY=Y(`$ZodTuple`,(e,t)=>{aJ.init(e,t);let n=t.items,r=BW.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Gq(n,`optin`),l=Gq(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Kq(t,i,e))):Kq(r,i,e)}}return s.length?Promise.all(s).then(()=>qq(u,i,n,o,l)):qq(u,i,n,o,l)}}),sY=Y(`$ZodRecord`,(e,t)=>{aJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!BU(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>iW(e,i,MW())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...tW(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...tW(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&wK.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>iW(e,i,MW())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...tW(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...tW(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),cY=Y(`$ZodMap`,(e,t)=>{aJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{Jq(t,o,r,n,a,e,i)})):Jq(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),lY=Y(`$ZodSet`,(e,t)=>{aJ.init(e,t);let n=BW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>Yq(e,r))):Yq(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),uY=Y(`$ZodEnum`,(e,t)=>{aJ.init(e,t);let n=OU(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>SW.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>HU(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),dY=Y(`$ZodLiteral`,(e,t)=>{aJ.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?HU(e):e?HU(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),fY=Y(`$ZodFile`,(e,t)=>{aJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),pY=Y(`$ZodTransform`,(e,t)=>{aJ.init(e,t),e._zod.optin=`optional`,BW.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new RW;return n.value=i,n}}),mY=Y(`$ZodOptional`,(e,t)=>{aJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,hW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),hW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${MU(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Xq(e,t)):Xq(e,r)}return t.innerType._zod.run(e,n)}}),hY=Y(`$ZodExactOptional`,(e,t)=>{mY.init(e,t),hW(e,`values`,e=>e.def.innerType._zod.values),hW(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),gY=Y(`$ZodNullable`,(e,t)=>{aJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin),hW(e,`optout`,e=>e.def.innerType._zod.optout),hW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${MU(t.source)}|null)$`):void 0}),hW(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),_Y=Y(`$ZodDefault`,(e,t)=>{aJ.init(e,t),e._zod.optin=`defaulted`,hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Zq(e,t)):Zq(r,t)}}),vY=Y(`$ZodPrefault`,(e,t)=>{aJ.init(e,t),e._zod.optin=`defaulted`,hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),yY=Y(`$ZodNonOptional`,(e,t)=>{aJ.init(e,t),hW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Qq(t,e)):Qq(i,e)}}),bY=Y(`$ZodSuccess`,(e,t)=>{aJ.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new zW(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),xY=Y(`$ZodCatch`,(e,t)=>{aJ.init(e,t),hW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),hW(e,`optout`,e=>e.def.innerType._zod.optout),hW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>$q(e,r,t,n)):$q(e,r,t,n)}}),SY=Y(`$ZodNaN`,(e,t)=>{aJ.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),CY=Y(`$ZodPipe`,(e,t)=>{aJ.init(e,t),hW(e,`values`,e=>e.def.in._zod.values),hW(e,`optin`,e=>e.def.in._zod.optin),hW(e,`optout`,e=>e.def.out._zod.optout),hW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>eJ(e,t.in,n)):eJ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>eJ(e,t.out,n)):eJ(r,t.out,n)}}),wY=Y(`$ZodCodec`,(e,t)=>{aJ.init(e,t),hW(e,`values`,e=>e.def.in._zod.values),hW(e,`optin`,e=>e.def.in._zod.optin),hW(e,`optout`,e=>e.def.out._zod.optout),hW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>tJ(e,t,n)):tJ(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>tJ(e,t,n)):tJ(r,t,n)}}}),TY=Y(`$ZodPreprocess`,(e,t)=>{CY.init(e,t)}),EY=Y(`$ZodReadonly`,(e,t)=>{aJ.init(e,t),hW(e,`propValues`,e=>e.def.innerType._zod.propValues),hW(e,`values`,e=>e.def.innerType._zod.values),hW(e,`optin`,e=>e.def.innerType?._zod?.optin),hW(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(rJ):rJ(r)}}),DY=Y(`$ZodTemplateLiteral`,(e,t)=>{aJ.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||CW.has(typeof e))n.push(HU(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),OY=Y(`$ZodFunction`,(e,t)=>(aJ.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?iG(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?iG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await oG(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await oG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new oY({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),kY=Y(`$ZodPromise`,(e,t)=>{aJ.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),AY=Y(`$ZodLazy`,(e,t)=>{aJ.init(e,t),PU(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),hW(e,`pattern`,e=>e.innerType?._zod?.pattern),hW(e,`propValues`,e=>e.innerType?._zod?.propValues),hW(e,`optin`,e=>e.innerType?._zod?.optin??void 0),hW(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),jY=Y(`$ZodCustom`,(e,t)=>{JK.init(e,t),aJ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>iJ(t,n,r,e));iJ(i,n,r,e)}})}));function NY(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function PY(e,t){let n=HY.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&PY(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),HY.set(e,r),r}function FY(e){return PY(e,new Set)}function IY(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function LY(){return GY}function RY(e,t){let n=e[BY]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var zY,BY,VY,HY,UY,WY,GY,KY=o((()=>{zY=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},BY=`~memo`,VY=[],HY=new WeakMap,WY=[],GY={alloc(e,t,n){let r=UY;if(!r)return n;UY=void 0;let i={value:n,issues:null};return r.set(t.value,i),WY.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&RY(n,e.value))throw new zY;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=PY(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[BY];l||(l={buckets:new Map,backEdges:void 0},s[BY]=l);let u;r===s?u=i:(u=IY(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...NY(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;UY=u;let f=WY.length,p=t(o,s);UY=void 0;let m=WY.length>f?WY.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?NY(e.issues):VY),e)):(m&&(m.issues=p.issues.length?NY(p.issues):VY),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function qY(){return{localeError:JY()}}var JY,YY=o((()=>{J(),JY=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${WU(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function XY(){return{localeError:ZY()}}var ZY,QY=o((()=>{J(),ZY=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${WU(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function $Y(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function eX(){return{localeError:tX()}}var tX,nX=o((()=>{J(),tX=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${WU(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=$Y(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=$Y(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function rX(){return{localeError:iX()}}var iX,aX=o((()=>{J(),iX=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${WU(e.values[0])}`:`Невалидна опция: очаквано едно от ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function oX(){return{localeError:sX()}}var sX,cX=o((()=>{J(),sX=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${WU(e.values[0])}`:`অবৈধ অপশন: ${K(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function lX(){return{localeError:uX()}}var uX,dX=o((()=>{J(),uX=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${WU(e.values[0])}`:`Opció invàlida: s'esperava una de ${K(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function fX(){return{localeError:pX()}}var pX,mX=o((()=>{J(),pX=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${WU(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${K(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function hX(){return{localeError:gX()}}var gX,_X=o((()=>{J(),gX=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${WU(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function vX(){return{localeError:yX()}}var yX,bX=o((()=>{J(),yX=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${WU(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function xX(){return{localeError:SX()}}var SX,CX=o((()=>{J(),SX=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${WU(e.values[0])}`:`Ungültige Option: erwartet eine von ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function wX(){return{localeError:TX()}}var TX,EX=o((()=>{J(),TX=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${WU(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function DX(){return{localeError:OX()}}var OX,kX=o((()=>{J(),OX=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(cW(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${WU(e.values[0])}`:`Invalid option: expected one of ${K(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function AX(){return{localeError:jX()}}var jX,MX=o((()=>{J(),jX=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${WU(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function NX(){return{localeError:PX()}}var PX,FX=o((()=>{J(),PX=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${WU(e.values[0])}`:`Opción inválida: se esperaba una de ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function IX(){return{localeError:LX()}}var LX,RX=o((()=>{J(),LX=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${WU(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${K(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function zX(){return{localeError:BX()}}var BX,VX=o((()=>{J(),BX=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${WU(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function HX(){return{localeError:UX()}}var UX,WX=o((()=>{J(),UX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${WU(e.values[0])} attendu`:`Option invalide : une valeur parmi ${K(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function GX(){return{localeError:KX()}}var KX,qX=o((()=>{J(),KX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${WU(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function JX(){return{localeError:YX()}}var YX,XX=o((()=>{J(),YX=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${WU(e.values[0])}`:`અમાન્ય વિકલ્પ: ${K(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function ZX(){return{localeError:QX()}}var QX,$X=o((()=>{J(),QX=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=cW(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${WU(t.values[0])}`;let e=t.values.map(e=>WU(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${K(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function eZ(){return{localeError:tZ()}}var tZ,nZ=o((()=>{J(),tZ=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${WU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function rZ(){return{localeError:iZ()}}var iZ,aZ=o((()=>{J(),iZ=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${WU(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function oZ(){return{localeError:sZ()}}var sZ,cZ=o((()=>{J(),sZ=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${WU(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function lZ(e,t,n){return Math.abs(e)===1?t:n}function uZ(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function dZ(){return{localeError:fZ()}}var fZ,pZ=o((()=>{J(),fZ=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${WU(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=lZ(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${uZ(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${uZ(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=lZ(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${uZ(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${uZ(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${K(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${uZ(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${uZ(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function mZ(){return{localeError:hZ()}}var hZ,gZ=o((()=>{J(),hZ=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${WU(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function _Z(){return{localeError:vZ()}}var vZ,yZ=o((()=>{J(),vZ=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${WU(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function bZ(){return{localeError:xZ()}}var xZ,SZ=o((()=>{J(),xZ=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${WU(e.values[0])}`:`Opzione non valida: atteso uno tra ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function CZ(){return{localeError:wZ()}}var wZ,TZ=o((()=>{J(),wZ=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${WU(e.values[0])}が期待されました`:`無効な選択: ${K(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function EZ(){return{localeError:DZ()}}var DZ,OZ=o((()=>{J(),DZ=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${WU(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${K(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function kZ(){return{localeError:AZ()}}var AZ,jZ=o((()=>{J(),AZ=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${WU(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${K(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function MZ(){return kZ()}var NZ=o((()=>{jZ()}));function PZ(){return{localeError:FZ()}}var FZ,IZ=o((()=>{J(),FZ=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${WU(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function LZ(){return{localeError:RZ()}}var RZ,zZ=o((()=>{J(),RZ=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${WU(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${K(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${K(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function BZ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function VZ(){return{localeError:UZ()}}var HZ,UZ,WZ=o((()=>{J(),HZ=e=>e.charAt(0).toUpperCase()+e.slice(1),UZ=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${WU(e.values[0])}`:`Privalo būti vienas iš ${K(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,BZ(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${HZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${HZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,BZ(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${HZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${HZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${HZ(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function GZ(){return{localeError:KZ()}}var KZ,qZ=o((()=>{J(),KZ=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${WU(e.values[0])}`:`Грешана опција: се очекува една ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function JZ(){return{localeError:YZ()}}var YZ,XZ=o((()=>{J(),YZ=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${WU(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function ZZ(){return{localeError:QZ()}}var QZ,$Z=o((()=>{J(),QZ=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${WU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function eQ(){return{localeError:tQ()}}var tQ,nQ=o((()=>{J(),tQ=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${WU(e.values[0])}`:`Ongeldige optie: verwacht één van ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function rQ(){return{localeError:iQ()}}var iQ,aQ=o((()=>{J(),iQ=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${WU(e.values[0])}`:`Ugyldig val: forventa eitt av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function oQ(){return{localeError:sQ()}}var sQ,cQ=o((()=>{J(),sQ=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${WU(e.values[0])}`:`Ugyldig valg: forventet en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function lQ(){return{localeError:uQ()}}var uQ,dQ=o((()=>{J(),uQ=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${WU(e.values[0])}`:`Fâsit tercih: mûteberler ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function fQ(){return{localeError:pQ()}}var pQ,mQ=o((()=>{J(),pQ=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${WU(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${K(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function hQ(){return{localeError:gQ()}}var gQ,_Q=o((()=>{J(),gQ=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${WU(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function vQ(){return{localeError:yQ()}}var yQ,bQ=o((()=>{J(),yQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(cW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${WU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function xQ(){return{localeError:SQ()}}var SQ,CQ=o((()=>{J(),SQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(cW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${WU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function wQ(){return{localeError:TQ()}}var TQ,EQ=o((()=>{J(),TQ=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${WU(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${K(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function DQ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function OQ(){return{localeError:kQ()}}var kQ,AQ=o((()=>{J(),kQ=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${WU(e.values[0])}`:`Неверный вариант: ожидалось одно из ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=DQ(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=DQ(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function jQ(){return{localeError:MQ()}}var MQ,NQ=o((()=>{J(),MQ=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${WU(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function PQ(){return{localeError:FQ()}}var FQ,IQ=o((()=>{J(),FQ=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${WU(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function LQ(){return{localeError:RQ()}}var RQ,zQ=o((()=>{J(),RQ=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${WU(e.values[0])}`:`Ogiltigt val: förväntade en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function BQ(){return{localeError:VQ()}}var VQ,HQ=o((()=>{J(),VQ=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${WU(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${K(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function UQ(){return{localeError:WQ()}}var WQ,GQ=o((()=>{J(),WQ=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${WU(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${K(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function KQ(){return{localeError:qQ()}}var qQ,JQ=o((()=>{J(),qQ=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${WU(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function YQ(){return{localeError:XQ()}}var XQ,ZQ=o((()=>{J(),XQ=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${WU(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function QQ(){return{localeError:$Q()}}var $Q,e$=o((()=>{J(),$Q=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${WU(e.values[0])}`:`Неправильна опція: очікується одне з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function t$(){return QQ()}var n$=o((()=>{e$()}));function r$(){return{localeError:i$()}}var i$,a$=o((()=>{J(),i$=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${WU(e.values[0])} متوقع تھا`:`غلط آپشن: ${K(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function o$(){return{localeError:s$()}}var s$,c$=o((()=>{J(),s$=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${WU(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function l$(){return{localeError:u$()}}var u$,d$=o((()=>{J(),u$=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${WU(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${K(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function f$(){return{localeError:p$()}}var p$,m$=o((()=>{J(),p$=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${WU(e.values[0])}`:`无效选项:期望以下之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function h$(){return{localeError:g$()}}var g$,_$=o((()=>{J(),g$=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${WU(e.values[0])}`:`無效的選項:預期為以下其中之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function v$(){return{localeError:y$()}}var y$,b$=o((()=>{J(),y$=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=cW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${WU(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${K(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),x$=c({ar:()=>qY,az:()=>XY,be:()=>eX,bg:()=>rX,bn:()=>oX,ca:()=>lX,ckb:()=>fX,cs:()=>hX,da:()=>vX,de:()=>xX,el:()=>wX,en:()=>DX,eo:()=>AX,es:()=>NX,fa:()=>IX,fi:()=>zX,fr:()=>HX,frCA:()=>GX,gu:()=>JX,he:()=>ZX,hi:()=>eZ,hr:()=>rZ,hu:()=>oZ,hy:()=>dZ,id:()=>mZ,is:()=>_Z,it:()=>bZ,ja:()=>CZ,ka:()=>EZ,kh:()=>MZ,km:()=>kZ,kn:()=>PZ,ko:()=>LZ,lt:()=>VZ,mk:()=>GZ,ms:()=>JZ,ne:()=>ZZ,nl:()=>eQ,nn:()=>rQ,no:()=>oQ,ota:()=>lQ,pl:()=>hQ,ps:()=>fQ,pt:()=>vQ,ptBR:()=>xQ,ro:()=>wQ,ru:()=>OQ,sk:()=>jQ,sl:()=>PQ,sv:()=>LQ,ta:()=>BQ,th:()=>UQ,tk:()=>KQ,tr:()=>YQ,ua:()=>t$,uk:()=>QQ,ur:()=>r$,uz:()=>o$,vi:()=>l$,yo:()=>v$,zhCN:()=>f$,zhTW:()=>h$}),S$=o((()=>{YY(),QY(),nX(),aX(),cX(),dX(),mX(),_X(),bX(),CX(),EX(),kX(),MX(),FX(),RX(),VX(),WX(),qX(),XX(),$X(),nZ(),aZ(),cZ(),pZ(),gZ(),yZ(),SZ(),TZ(),OZ(),NZ(),jZ(),IZ(),zZ(),WZ(),qZ(),XZ(),$Z(),nQ(),aQ(),cQ(),dQ(),mQ(),_Q(),bQ(),CQ(),EQ(),AQ(),NQ(),IQ(),zQ(),HQ(),GQ(),JQ(),ZQ(),n$(),e$(),a$(),c$(),d$(),m$(),_$(),b$()}));function C$(){return new D$}var w$,T$,E$,D$,O$,k$=o((()=>{T$=Symbol(`ZodOutput`),E$=Symbol(`ZodInput`),D$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(w$=globalThis).__zod_globalRegistry??(w$.__zod_globalRegistry=C$()),O$=globalThis.__zod_globalRegistry}));function A$(e,t){try{return N$(e,{assertOnly:!0})}catch{return t}}function j$(e,t){try{let t=N$(e),n=UU(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[K1]||n&&RY(n,e.value))return i(e,n);let r=t(e.value);return r===G1?(n&&(n[K1]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=A$(e,t),n._zod.run=a,r.__originalRun||M$(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function M$(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===G1?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===G1?e(t,r):i}}}function N$(e,t){let n=!0;try{n=FY(e)}catch{}if(n)throw new J1(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new bq([`input`]),a=t1(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[G1,...r.constants.values()],c=i.content.join(` `),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new J1(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function P$(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function F$(e){return`v${e.varCounter++}`}function I$(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return G1;let r=n;return r.issues.length===0?r.value:G1}function L$(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return t1(e,t,n,r,i)}catch(i){if(!(i instanceof J1)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,R$(e,t,n,r)}}function R$(e,t,n,r){let i=P$(t,n),a=P$(t,I$),o=F$(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function z$(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!Y1.has(r.check))throw new J1(`check with a custom "when" condition`);switch(r.check){case`greater_than`:U$(e,t,r,a);break;case`less_than`:W$(e,t,r,a);break;case`multiple_of`:G$(e,t,r,a);break;case`number_format`:K$(e,r,a);break;case`min_length`:{let n=V$(r.minimum,`min_length`),i=B$(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=V$(r.maximum,`max_length`),i=B$(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=V$(r.length,`length_equals`),i=B$(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${V$(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${V$(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${V$(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=e1(e,t,r,a);break;case`custom`:a=$$(e,t,n,a);break;case`bigint_format`:q$(e,r,a);break;case`mime_type`:J$(e,t,r,a);break;case`property`:Y$(e,t,r,a);break;case`overwrite`:{let r=F$(t);X$(e,t,n,a,r),a=r;break}default:throw new J1(`check type ${r.check}`)}}return a}function B$(e,t,n,r){let i=P$(t,oW),a=F$(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function V$(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new J1(`${t} bound of type ${typeof e}`);return`${e}`}function H$(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new J1(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new J1(`comparison check with Invalid Date bound`);return P$(e,t)}throw new J1(`comparison check bound of type ${typeof t}`)}function U$(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${H$(t,n.value)}) return INVALID;`)}function W$(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${H$(t,n.value)}) return INVALID;`)}function G$(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new J1(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=P$(t,NU);e.write(`if (${i}(${r}, ${V$(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function K$(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new J1(`number format ${r}`)}}function q$(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new J1(`bigint format ${r}`)}}function J$(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=P$(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function Y$(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;t1(e,t,n.schema,i)}function X$(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new J1(`overwrite check without a transform function`);if(B1(a))throw new q1(`z.compile: async overwrite transforms are not supported`);let o=P$(t,a);e.write(`const ${i} = ${o}(${r});`)}function Z$(){throw new RW}function Q$(e){this.issues.push(e)}function $$(e,t,n,r){let i=n._zod.def;if(i.fn){if(B1(i.fn))throw new q1(`z.compile: async .refine() predicates are not supported`);let n=P$(t,i.fn),a=P$(t,Z$),o=F$(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(B1(n._zod.check))throw new q1(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=P$(t,e=>{let t={value:e,issues:[],addIssue:Q$};return i(t)instanceof Promise&&Z$(),t.issues.length===0?t.value:G1}),o=F$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new J1(`custom check without a predicate or check function`)}function e1(e,t,n,r){let i=n.format;if(i===`base64`){let n=P$(t,jq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=P$(t,Mq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=P$(t,Fq),a=P$(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=P$(t,kq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=P$(t,Aq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=P$(t,Pq);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=P$(t,Tq),o=P$(t,n),s=F$(t),c=F$(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=P$(t,Dq);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=P$(t,Oq);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=F$(t),u=a.normalize?`${c}.href`:`${P$(t,Eq)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(B1(o))throw new J1(`async string format ${i}`);let n=P$(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(X1.has(i)&&n.pattern){let i=P$(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new J1(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${LU(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${LU(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${LU(t)}) return INVALID;`);break}default:throw new J1(`string format ${s}`)}return r}function t1(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new J1(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=n1(e,t,n,r);break;case`number`:c=r1(e,n,r);break;case`boolean`:c=i1(e,r);break;case`bigint`:c=a1(e,n,r);break;case`symbol`:c=o1(e,r);break;case`undefined`:c=s1(e,r);break;case`null`:c=c1(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=l1(e,r);break;case`nan`:c=u1(e,r);break;case`date`:c=d1(e,r);break;case`object`:c=f1(e,t,n,r,s);break;case`optional`:c=p1(e,t,n,r,s);break;case`nullable`:c=y1(e,t,n,r,s);break;case`array`:c=b1(e,t,n,r,s);break;case`literal`:c=x1(e,t,n,r);break;case`enum`:c=S1(e,t,n,r);break;case`readonly`:{let i=C1(e,t,n,r),a=F$(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:C1(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=w1(e,t,n,r);break;case`nonoptional`:c=T1(e,t,n,r);break;case`tuple`:c=E1(e,t,n,r);break;case`union`:c=O1(e,t,n,r);break;case`intersection`:c=j1(e,t,n,r);break;case`record`:c=M1(e,t,n,r);break;case`map`:c=P1(e,t,n,r);break;case`set`:c=F1(e,t,n,r);break;case`file`:c=I1(e,r);break;case`template_literal`:c=L1(e,t,n,r);break;case`lazy`:c=R1(e,t,n,r);break;case`pipe`:c=z1(e,t,n,r);break;case`custom`:c=V1(e,t,n,r);break;case`transform`:c=W1(e,t,n,r);break;case`catch`:c=U1(e,t,n,r);break;default:throw new J1(`schema type ${o}`)}return c===null?null:z$(e,t,n,c)}function n1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:e1(e,t,i,r)}function r1(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&K$(e,{format:r.format},n),n}function i1(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function a1(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function o1(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function s1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function c1(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function l1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function u1(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function d1(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function f1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?P$(t,e):LU(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:LU(e),f=o;if(s.includes(`__proto__`))throw new J1(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=F$(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=F$(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=L$(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{h1(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=L$(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${LU(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=F$(t),_=l.some(e=>v1(f[e])||_1(f[e]));if(!i){if(h===`schema`){let n=s.length>0?P$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=F$(t);e.write(`const ${i} = ${r}[k];`),L$(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);_1(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):v1(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?P$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=F$(t);e.write(`const ${n} = ${r}[k];`);let i=L$(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function p1(e,t,n,r,i=!0){let a=n._zod.def;if(m1(n))return t1(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=F$(t),i=F$(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=t1(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=t1(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?F$(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=t1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function m1(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function h1(e){return e._zod.optin===void 0&&g1(e)}function g1(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?g1(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||g1(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(g1);case`intersection`:return!t.left||!t.right||g1(t.left)&&g1(t.right);case`pipe`:return!t.in||g1(t.in);default:return!0}}function _1(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function v1(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||v1(t.innerType);case`union`:return!t.options||t.options.some(v1);case`intersection`:return!t.left||!t.right||v1(t.left)||v1(t.right);case`pipe`:return!t.out||v1(t.out);default:return!0}}function y1(e,t,n,r,i=!0){let a=n._zod.def,o=i?F$(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=t1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function b1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?F$(t):null,s=F$(t),c=F$(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=L$(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function x1(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=P$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=P$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${LU(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new J1(`literal type ${typeof a}`);return r}function S1(e,t,n,r){let i=n._zod.values;if(!i)throw new J1(`enum schema without enumerated values`);let a=P$(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function C1(e,t,n,r){let i=n._zod.def;return t1(e,t,i.innerType,r)}function w1(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return t1(e,t,i.innerType,r);let n=P$(t,a),o=F$(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),t1(e,t,i.innerType,o)}let o=F$(t);if(a){let n=P$(t,a),s=P$(t,VU);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=t1(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=t1(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function T1(e,t,n,r){let i=n._zod.def,a=t1(e,t,i.innerType,r),o=F$(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function E1(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=D1(a,`optin`),c=D1(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=F$(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=F$(t);e.write(`const ${a} = ${r}[${n}];`);let o=L$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(_1(i)){e.write(`${l}.length = ${n};`);return}let r=F$(t),a=F$(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=L$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=F$(t);e.write(`const ${a} = ${r}[${n}];`);let o=L$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=F$(t),i=F$(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=L$(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function D1(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function O1(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return k1(e,t,i,r);if(i.inclusive===!1)throw new J1(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return t1(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=P$(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=F$(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=t1(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function k1(e,t,n,r){if(n.unionFallback)throw new J1(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=F$(t),a=F$(t);e.write(`const ${i} = ${r}?.[${LU(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new J1(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new J1(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>A1(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=t1(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function A1(e,t,n){if(typeof n==`string`)return`${t} === ${LU(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${P$(e,n)}`;throw new J1(`literal discriminator value ${String(n)}`)}function j1(e,t,n,r){let i=n._zod.def,a=L$(e,t,i.left,r),o=L$(e,t,i.right,r),s=P$(t,Uq),c=F$(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function M1(e,t,n,r){let i=n._zod.def,a=P$(t,BU);e.write(`if (!${a}(${r})) return INVALID;`);let o=F$(t),s=F$(t),c=F$(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new J1(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new J1(`record key "__proto__"`);n.push(s);let c=P$(t,a),l=t1(e,t,i.keyType,c),u=F$(t);e.write(`const ${u} = ${r}[${N1(t,s)}];`);let d=L$(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=P$(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=P$(t,N$(i.keyType)),c=P$(t,wK),l=P$(t,Object.prototype.propertyIsEnumerable),u=F$(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=F$(t);e.write(`const ${d} = ${r}[${s}];`);let f=L$(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=P$(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=L$(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function N1(e,t){return typeof t==`string`?LU(t):P$(e,t)}function P1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=F$(t),o=F$(t),s=F$(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=t1(e,t,i.keyType,o),r=t1(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function F1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=F$(t),o=F$(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=t1(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function I1(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function L1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=P$(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function R1(e,t,n,r){let i=n._zod.def,a=P$(t,i.getter),o=P$(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=F$(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function z1(e,t,n,r){let i=n._zod.def,a=t1(e,t,i.in,r);if(i.transform){if(B1(i.transform))throw new q1(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=P$(t,e=>{let t={value:e,issues:[],addIssue:Q$},r=n(e,t);return r instanceof Promise?G1:t.issues.length===0?r:G1}),o=F$(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),t1(e,t,i.out,o)}return t1(e,t,i.out,a)}function B1(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function V1(e,t,n,r){let i=n._zod.def;if(i.fn){if(B1(i.fn))throw new q1(`z.compile: async custom predicates are not supported`);let n=P$(t,i.fn),a=P$(t,Z$),o=F$(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new J1(`custom schema without a predicate function`);return r}function H1(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return G1;let i=r;return i.issues.length===0?i.value:t()}function U1(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new J1(`catch with a callback (only a constant catch value compiles)`,!1);let a=F$(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=L$(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=P$(t,i.innerType),s=P$(t,i.catchValue),c=P$(t,H1);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function W1(e,t,n,r){let i=n._zod.def;if(i.transform){if(B1(i.transform))throw new q1(`z.compile: async transforms are not supported`);let n=i.transform,a=P$(t,e=>{let t={value:e,issues:[],addIssue:Q$},r=n(e,t);return r instanceof Promise?G1:t.issues.length===0?r:G1}),o=F$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var G1,K1,q1,J1,Y1,X1,Z1=o((()=>{VW(),xq(),KY(),KK(),MY(),J(),G1=Symbol.for(`zod.compile.invalid`),K1=Symbol.for(`zod.compile.fallback`),q1=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},J1=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},Y1=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),X1=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function Q1(e,t){return new e({type:`string`,...q(t)})}function $1(e,t){return new e({type:`string`,coerce:!0,...q(t)})}function e0(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function t0(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function n0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function r0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function i0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function a0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function o0(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function s0(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function c0(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function l0(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function u0(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function d0(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function f0(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function p0(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function m0(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function h0(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function g0(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...q(t)})}function _0(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function v0(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function y0(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function b0(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function x0(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function S0(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...q(t)})}function C0(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function w0(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function T0(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function E0(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function D0(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function O0(e,t){return new e({type:`number`,checks:[],...q(t)})}function k0(e,t){return new e({type:`number`,coerce:!0,checks:[],...q(t)})}function A0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function j0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...q(t)})}function M0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...q(t)})}function N0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...q(t)})}function P0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...q(t)})}function F0(e,t){return new e({type:`boolean`,...q(t)})}function I0(e,t){return new e({type:`boolean`,coerce:!0,...q(t)})}function L0(e,t){return new e({type:`bigint`,...q(t)})}function R0(e,t){return new e({type:`bigint`,coerce:!0,...q(t)})}function z0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...q(t)})}function B0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...q(t)})}function V0(e,t){return new e({type:`symbol`,...q(t)})}function H0(e,t){return new e({type:`undefined`,...q(t)})}function U0(e,t){return new e({type:`null`,...q(t)})}function W0(e){return new e({type:`any`})}function G0(e){return new e({type:`unknown`})}function K0(e,t){return new e({type:`never`,...q(t)})}function q0(e,t){return new e({type:`void`,...q(t)})}function J0(e,t){return new e({type:`date`,...q(t)})}function Y0(e,t){return new e({type:`date`,coerce:!0,...q(t)})}function X0(e,t){return new e({type:`nan`,...q(t)})}function Z0(e,t){return new QK({check:`less_than`,...q(t),value:e,inclusive:!1})}function Q0(e,t){return new QK({check:`less_than`,...q(t),value:e,inclusive:!0})}function $0(e,t){return new $K({check:`greater_than`,...q(t),value:e,inclusive:!1})}function e2(e,t){return new $K({check:`greater_than`,...q(t),value:e,inclusive:!0})}function t2(e){return $0(0,e)}function n2(e){return Z0(0,e)}function r2(e){return Q0(0,e)}function i2(e){return e2(0,e)}function a2(e,t){return new eq({check:`multiple_of`,...q(t),value:e})}function o2(e,t){return new rq({check:`max_size`,...q(t),maximum:e})}function s2(e,t){return new iq({check:`min_size`,...q(t),minimum:e})}function c2(e,t){return new aq({check:`size_equals`,...q(t),size:e})}function l2(e,t){return new oq({check:`max_length`,...q(t),maximum:e})}function u2(e,t){return new sq({check:`min_length`,...q(t),minimum:e})}function d2(e,t){return new cq({check:`length_equals`,...q(t),length:e})}function f2(e,t){return new uq({check:`string_format`,format:`regex`,...q(t),pattern:e})}function p2(e){return new dq({check:`string_format`,format:`lowercase`,...q(e)})}function m2(e){return new fq({check:`string_format`,format:`uppercase`,...q(e)})}function h2(e,t){return new pq({check:`string_format`,format:`includes`,...q(t),includes:e})}function g2(e,t){return new mq({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function _2(e,t){return new hq({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function v2(e,t,n){return new gq({check:`property`,property:e,schema:t,...q(n)})}function y2(e){return Object.entries(e).map(([e,t])=>new gq({check:`property`,property:e,schema:t}))}function b2(e,t){return new _q({check:`mime_type`,mime:e,...q(t)})}function x2(e){return new vq({check:`overwrite`,tx:e})}function S2(e){return x2(t=>t.normalize(e))}function C2(){return x2(e=>e.trim())}function w2(){return x2(e=>e.toLowerCase())}function T2(){return x2(e=>e.toUpperCase())}function E2(){return x2(e=>RU(e))}function D2(e,t,n){return new e({type:`array`,element:t,...q(n)})}function O2(e,t,n){return new e({type:`union`,options:t,...q(n)})}function k2(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...q(n)})}function A2(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...q(r)})}function j2(e,t,n){return new e({type:`intersection`,left:t,right:n})}function M2(e,t,n,r){let i=n instanceof aJ;return new e({type:`tuple`,items:t,rest:i?n:null,...q(i?r:n)})}function N2(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...q(r)})}function P2(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...q(r)})}function F2(e,t,n){return new e({type:`set`,valueType:t,...q(n)})}function I2(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...q(n)})}function L2(e,t,n){return new e({type:`enum`,entries:t,...q(n)})}function R2(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...q(n)})}function z2(e,t){return new e({type:`file`,...q(t)})}function B2(e,t){return new e({type:`transform`,transform:t})}function V2(e,t){return new e({type:`optional`,innerType:t})}function H2(e,t){return new e({type:`nullable`,innerType:t})}function U2(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():VU(n)}})}function W2(e,t,n){return new e({type:`nonoptional`,innerType:t,...q(n)})}function G2(e,t){return new e({type:`success`,innerType:t})}function K2(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:_W(n)})}function q2(e,t,n){return new e({type:`pipe`,in:t,out:n})}function J2(e,t){return new e({type:`readonly`,innerType:t})}function Y2(e,t,n){return new e({type:`template_literal`,parts:t,...q(n)})}function X2(e,t){return new e({type:`lazy`,getter:t})}function Z2(e,t){return new e({type:`promise`,innerType:t})}function Q2(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function $2(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function e4(e,t){let n=t4(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(lW(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(lW(r))}},e(t.value,t)),t);return n}function t4(e,t){let n=new JK({check:`custom`,...q(t)});return n._zod.check=e,n}function n4(e){let t=new JK({check:`describe`});return t._zod.onattach=[t=>{let n=O$.get(t)??{};O$.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function r4(e){let t=new JK({check:`meta`});return t._zod.onattach=[t=>{let n=O$.get(t)??{};O$.add(t,{...n,...e})}],t._zod.check=()=>{},t}function i4(e,t){let n=q(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??wY,c=e.Boolean??BJ,l=new s({type:`pipe`,in:new(e.String??sJ)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function a4(e,t,n,r={}){let i=q(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var o4,s4=o((()=>{yq(),k$(),MY(),J(),o4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function c4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&FU(e,t,n[t]);return e}function l4(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??O$,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function u4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function d4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,d4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&c4(o.schema,c),t.io===`input`&&y4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function f4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function p4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${f4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+f4(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function m4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;m4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function h4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function g4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!b4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??h4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}FU(n,r,e.length===1?e[0]:g4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=h4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function _4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of b4)if(t in e)return;let n=t.filter(e=>x4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=g4(t);else{let e=n[0],i=x4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>g4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,c4(e,r))}function v4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):c4(i,s),c4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())m4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])_4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}c4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,FU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:C4(t,`input`,e.processors),output:C4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function y4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return y4(r.element,n);if(r.type===`set`)return y4(r.valueType,n);if(r.type===`lazy`)return y4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return y4(r.innerType,n);if(r.type===`intersection`)return y4(r.left,n)||y4(r.right,n);if(r.type===`record`||r.type===`map`)return y4(r.keyType,n)||y4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:y4(r.in,n)||y4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(y4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(y4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(y4(e,n))return!0;return!!(r.rest&&y4(r.rest,n))}return!1}var b4,x4,S4,C4,w4=o((()=>{k$(),J(),b4=new Set([`type`,`properties`,`required`,`additionalProperties`]),x4=[`oneOf`,`anyOf`],S4=(e,t={})=>n=>{let r=l4({...n,processors:t});return d4(e,r),p4(r,e),v4(r,e)},C4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=l4({...i??{},target:a,io:t,processors:n});return d4(e,o),p4(o,e),v4(o,e)}}));function T4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?T4(t.out):t.type===`catch`?T4(t.innerType):e._zod.optin}function E4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=E4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>E4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?wK:CK).source),p):p}function D4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of a3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=E4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function O4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(u4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),l3):JSON.parse(o)}function k4(e,t){if(`_idmap`in e){let n=e,r=l4({...t,processors:v3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;d4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;p4(r,n),FU(a,t,v4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=l4({...t,processors:v3});return d4(e,n),p4(n,e),v4(n,e)}var A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3,y3=o((()=>{KK(),w4(),J(),A4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},j4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=A4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},M4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):u4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},N4=(e,t,n,r)=>{n.type=`boolean`},P4=(e,t,n,r)=>{u4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},F4=(e,t,n,r)=>{u4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},I4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},L4=(e,t,n,r)=>{u4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},R4=(e,t,n,r)=>{u4(e,t,n,r,`Void cannot be represented in JSON Schema`)},z4=(e,t,n,r)=>{n.not={}},B4=(e,t,n,r)=>{},V4=(e,t,n,r)=>{},H4=(e,t,n,r)=>{u4(e,t,n,r,`Date cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{let i=e._zod.def,a=OU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},W4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(u4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(u4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},G4=(e,t,n,r)=>{u4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},K4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},q4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},J4=(e,t,n,r)=>{n.type=`boolean`},Y4=(e,t,n,r)=>{u4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{u4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{u4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{u4(e,t,n,r,`Map cannot be represented in JSON Schema`)},$4=(e,t,n,r)=>{u4(e,t,n,r,`Set cannot be represented in JSON Schema`)},e3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=d4(a.element,t,{...r,path:[...r.path,`items`]})},t3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&u4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)FU(i.properties,e,d4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?T4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=d4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},n3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>d4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},r3=(e,t,n,r)=>{let i=e._zod.def,a=d4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=d4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},i3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>d4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?d4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?T4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},a3=new WeakMap,o3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=d4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)FU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=d4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=a3.get(t);n||(n=[],a3.set(t,n),t.deferred.push(()=>D4(t))),n.push(e)}i.additionalProperties=d4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&T4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},s3=(e,t,n,r)=>{let i=e._zod.def,a=d4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},c3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},l3=Symbol(),u3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=O4(i.defaultValue,e,t,n,r);o!==l3&&(n.default=o)},d3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=O4(i.defaultValue,e,t,n,r);o!==l3&&(n._prefault=o)},f3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{u4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},p3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;d4(o,t,r);let s=t.seen.get(e);s.ref=o},m3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},h3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_3=(e,t,n,r)=>{let i=e._zod.innerType;d4(i,t,r);let a=t.seen.get(e);a.ref=i},v3={string:j4,number:M4,boolean:N4,bigint:P4,symbol:F4,null:I4,undefined:L4,void:R4,never:z4,any:B4,unknown:V4,date:H4,enum:U4,literal:W4,nan:G4,template_literal:K4,file:q4,success:J4,custom:Y4,function:X4,transform:Z4,map:Q4,set:$4,array:e3,object:t3,union:n3,intersection:r3,tuple:i3,record:o3,nullable:s3,nonoptional:c3,default:u3,prefault:d3,catch:f3,pipe:p3,readonly:m3,promise:h3,optional:g3,lazy:_3}})),b3,x3=o((()=>{y3(),w4(),b3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=l4({processors:v3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return d4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,p4(this.ctx,e);let{"~standard":n,...r}=v4(this.ctx,e);return r}}})),S3=c({}),C3=o((()=>{})),w3=c({$ZodAny:()=>KJ,$ZodArray:()=>ZJ,$ZodAsyncError:()=>RW,$ZodBase64:()=>jJ,$ZodBase64URL:()=>MJ,$ZodBigInt:()=>VJ,$ZodBigIntFormat:()=>HJ,$ZodBoolean:()=>BJ,$ZodCIDRv4:()=>kJ,$ZodCIDRv6:()=>AJ,$ZodCUID:()=>gJ,$ZodCUID2:()=>_J,$ZodCatch:()=>xY,$ZodCheck:()=>JK,$ZodCheckBigIntFormat:()=>nq,$ZodCheckEndsWith:()=>hq,$ZodCheckGreaterThan:()=>$K,$ZodCheckIncludes:()=>pq,$ZodCheckLengthEquals:()=>cq,$ZodCheckLessThan:()=>QK,$ZodCheckLowerCase:()=>dq,$ZodCheckMaxLength:()=>oq,$ZodCheckMaxSize:()=>rq,$ZodCheckMimeType:()=>_q,$ZodCheckMinLength:()=>sq,$ZodCheckMinSize:()=>iq,$ZodCheckMultipleOf:()=>eq,$ZodCheckNumberFormat:()=>tq,$ZodCheckOverwrite:()=>vq,$ZodCheckProperty:()=>gq,$ZodCheckRegex:()=>uq,$ZodCheckSizeEquals:()=>aq,$ZodCheckStartsWith:()=>mq,$ZodCheckStringFormat:()=>lq,$ZodCheckUpperCase:()=>fq,$ZodCodec:()=>wY,$ZodCreditCard:()=>FJ,$ZodCustom:()=>jY,$ZodCustomStringFormat:()=>LJ,$ZodCyclicError:()=>zY,$ZodDate:()=>XJ,$ZodDefault:()=>_Y,$ZodDiscriminatedUnion:()=>iY,$ZodE164:()=>NJ,$ZodEmail:()=>dJ,$ZodEmoji:()=>mJ,$ZodEncodeError:()=>zW,$ZodEnum:()=>uY,$ZodError:()=>QW,$ZodExactOptional:()=>hY,$ZodFile:()=>fY,$ZodFunction:()=>OY,$ZodGUID:()=>lJ,$ZodIPv4:()=>TJ,$ZodIPv6:()=>DJ,$ZodISODate:()=>SJ,$ZodISODateTime:()=>xJ,$ZodISODuration:()=>wJ,$ZodISOTime:()=>CJ,$ZodIntersection:()=>aY,$ZodJWT:()=>IJ,$ZodKSUID:()=>bJ,$ZodLazy:()=>AY,$ZodLiteral:()=>dY,$ZodMAC:()=>OJ,$ZodMap:()=>cY,$ZodNaN:()=>SY,$ZodNanoID:()=>hJ,$ZodNever:()=>JJ,$ZodNonOptional:()=>yY,$ZodNull:()=>GJ,$ZodNullable:()=>gY,$ZodNumber:()=>RJ,$ZodNumberFormat:()=>zJ,$ZodObject:()=>eY,$ZodObjectJIT:()=>tY,$ZodOptional:()=>mY,$ZodPipe:()=>CY,$ZodPrefault:()=>vY,$ZodPreprocess:()=>TY,$ZodPromise:()=>kY,$ZodReadonly:()=>EY,$ZodRealError:()=>$W,$ZodRecord:()=>sY,$ZodRegistry:()=>D$,$ZodSet:()=>lY,$ZodString:()=>sJ,$ZodStringFormat:()=>cJ,$ZodSuccess:()=>bY,$ZodSymbol:()=>UJ,$ZodTemplateLiteral:()=>DY,$ZodTransform:()=>pY,$ZodTuple:()=>oY,$ZodType:()=>aJ,$ZodULID:()=>vJ,$ZodURL:()=>pJ,$ZodUUID:()=>uJ,$ZodUndefined:()=>WJ,$ZodUnion:()=>nY,$ZodUnknown:()=>qJ,$ZodVoid:()=>YJ,$ZodXID:()=>yJ,$ZodXor:()=>rY,$brand:()=>LW,$constructor:()=>Y,$input:()=>E$,$output:()=>T$,Doc:()=>bq,INVALID:()=>G1,JSONSchema:()=>S3,JSONSchemaGenerator:()=>b3,NEVER:()=>PW,TimePrecision:()=>o4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,_any:()=>W0,_array:()=>D2,_base64:()=>y0,_base64url:()=>b0,_bigint:()=>L0,_boolean:()=>F0,_catch:()=>K2,_check:()=>t4,_cidrv4:()=>_0,_cidrv6:()=>v0,_coercedBigint:()=>R0,_coercedBoolean:()=>I0,_coercedDate:()=>Y0,_coercedNumber:()=>k0,_coercedString:()=>$1,_creditCard:()=>S0,_cuid:()=>l0,_cuid2:()=>u0,_custom:()=>Q2,_date:()=>J0,_decode:()=>_G,_decodeAsync:()=>xG,_default:()=>U2,_discriminatedUnion:()=>A2,_e164:()=>x0,_email:()=>e0,_emoji:()=>s0,_encode:()=>hG,_encodeAsync:()=>yG,_endsWith:()=>_2,_enum:()=>I2,_file:()=>z2,_float32:()=>j0,_float64:()=>M0,_gt:()=>$0,_gte:()=>e2,_guid:()=>t0,_includes:()=>h2,_int:()=>A0,_int32:()=>N0,_int64:()=>z0,_intersection:()=>j2,_ipv4:()=>m0,_ipv6:()=>h0,_isoDate:()=>T0,_isoDateTime:()=>w0,_isoDuration:()=>D0,_isoTime:()=>E0,_jwt:()=>C0,_ksuid:()=>p0,_lazy:()=>X2,_length:()=>d2,_literal:()=>R2,_lowercase:()=>p2,_lt:()=>Z0,_lte:()=>Q0,_mac:()=>g0,_map:()=>P2,_max:()=>Q0,_maxLength:()=>l2,_maxSize:()=>o2,_mime:()=>b2,_min:()=>e2,_minLength:()=>u2,_minSize:()=>s2,_multipleOf:()=>a2,_nan:()=>X0,_nanoid:()=>c0,_nativeEnum:()=>L2,_negative:()=>n2,_never:()=>K0,_nonnegative:()=>i2,_nonoptional:()=>W2,_nonpositive:()=>r2,_normalize:()=>S2,_null:()=>U0,_nullable:()=>H2,_number:()=>O0,_optional:()=>V2,_overwrite:()=>x2,_parse:()=>rG,_parseAsync:()=>aG,_pipe:()=>q2,_positive:()=>t2,_promise:()=>Z2,_properties:()=>y2,_property:()=>v2,_readonly:()=>J2,_record:()=>N2,_refine:()=>$2,_regex:()=>f2,_safeDecode:()=>TG,_safeDecodeAsync:()=>kG,_safeEncode:()=>CG,_safeEncodeAsync:()=>DG,_safeParse:()=>sG,_safeParseAsync:()=>lG,_set:()=>F2,_size:()=>c2,_slugify:()=>E2,_startsWith:()=>g2,_string:()=>Q1,_stringFormat:()=>a4,_stringbool:()=>i4,_success:()=>G2,_superRefine:()=>e4,_symbol:()=>V0,_templateLiteral:()=>Y2,_toLowerCase:()=>w2,_toUpperCase:()=>T2,_transform:()=>B2,_trim:()=>C2,_tuple:()=>M2,_uint32:()=>P0,_uint64:()=>B0,_ulid:()=>d0,_undefined:()=>H0,_union:()=>O2,_unknown:()=>G0,_uppercase:()=>m2,_url:()=>o0,_uuid:()=>n0,_uuidv4:()=>r0,_uuidv6:()=>i0,_uuidv7:()=>a0,_void:()=>q0,_xid:()=>f0,_xor:()=>k2,clone:()=>UU,compile:()=>j$,compileFn:()=>N$,config:()=>MW,createStandardJSONSchemaMethod:()=>C4,createToJSONSchemaMethod:()=>S4,decode:()=>vG,decodeAsync:()=>SG,describe:()=>n4,encode:()=>gG,encodeAsync:()=>bG,extractDefs:()=>p4,finalize:()=>v4,flattenError:()=>HW,formatError:()=>UW,getDiscriminatedOption:()=>Hq,globalConfig:()=>BW,globalRegistry:()=>O$,handleUnrepresentable:()=>u4,initializeContext:()=>l4,isBackEdge:()=>RY,isRecursiveSchema:()=>FY,isValidBase64:()=>jq,isValidBase64URL:()=>Mq,isValidCIDRv6:()=>Aq,isValidCreditCard:()=>Pq,isValidIPv6:()=>kq,isValidJWT:()=>Fq,locales:()=>x$,memoizer:()=>LY,mergeValues:()=>Uq,meta:()=>r4,parse:()=>iG,parseAsync:()=>oG,parseURLObject:()=>Tq,prettifyError:()=>KW,process:()=>d4,regexes:()=>MG,registry:()=>C$,safeDecode:()=>EG,safeDecodeAsync:()=>AG,safeEncode:()=>wG,safeEncodeAsync:()=>OG,safeParse:()=>cG,safeParseAsync:()=>uG,standardProps:()=>wq,stripTabAndNewline:()=>Eq,toDotPath:()=>GW,toJSONSchema:()=>k4,toZod:()=>DU,treeifyError:()=>WW,urlHostnameOk:()=>Dq,urlProtocolOk:()=>Oq,util:()=>EU,validate:()=>pG,validateAsync:()=>mG,version:()=>Sq}),T3=o((()=>{VW(),jG(),eG(),MY(),KY(),yq(),Cq(),J(),KK(),S$(),k$(),xq(),Z1(),s4(),w4(),y3(),x3(),C3()}));function E3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===D3)return new AY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,D3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?UU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:UU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?UU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:UU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:UU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?UU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:UU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:UU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:UU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:UU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return UU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var D3,O3=o((()=>{MY(),J(),D3=Symbol(`z.visit/resolving`)}));jG();function k3(e){return!!e._zod}function A3(e,t){return k3(e)?cG(e,t):e.safeParse(t)}function j3(e){if(!e)return;let t;if(t=k3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function M3(e){if(k3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var N3=c({endsWith:()=>_2,gt:()=>$0,gte:()=>e2,includes:()=>h2,length:()=>d2,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,maxLength:()=>l2,maxSize:()=>o2,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,negative:()=>n2,nonnegative:()=>i2,nonpositive:()=>r2,normalize:()=>S2,overwrite:()=>x2,positive:()=>t2,properties:()=>y2,property:()=>v2,regex:()=>f2,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,toLowerCase:()=>w2,toUpperCase:()=>T2,trim:()=>C2,uppercase:()=>m2}),P3=o((()=>{T3()}));function F3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var I3,L3,R3,z3,B3=o((()=>{T3(),J(),I3=new WeakSet([Object.prototype,Error.prototype]),L3=(e,t)=>{QW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);I3.has(n)||(I3.add(n),F3(n,`format`,e=>t=>UW(e,t)),F3(n,`flatten`,e=>t=>HW(e,t)),F3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,kU,2)}),F3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,kU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},R3=Y(`ZodError`,L3),z3=Y(`ZodError`,L3,void 0,{Parent:Error})})),V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3,$3=o((()=>{T3(),B3(),V3=rG(z3),H3=aG(z3),U3=sG(z3),W3=lG(z3),G3=hG(z3),K3=_G(z3),q3=yG(z3),J3=xG(z3),Y3=CG(z3),X3=TG(z3),Z3=DG(z3),Q3=kG(z3)})),e6=c({ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,codec:()=>T8,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,float32:()=>P6,float64:()=>F6,function:()=>j8,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,literal:()=>Q,looseObject:()=>$6,looseRecord:()=>s8,mac:()=>y6,map:()=>c8,meta:()=>s7,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,never:()=>q6,nonoptional:()=>b8,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,partialRecord:()=>o8,pipe:()=>w8,prefault:()=>y8,preprocess:()=>R8,promise:()=>A8,readonly:()=>D8,record:()=>a8,refine:()=>P8,set:()=>l8,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,transform:()=>p8,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,url:()=>l6,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,void:()=>J6,xid:()=>g6,xor:()=>t8});function t6(){BW.localeError||MW(DX())}function n6(){BW.memoizer||MW({memoizer:LY()})}function X(e){return Q1(V8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(J8,e)}function a6(e){return n0(Y8,e)}function o6(e){return r0(Y8,e)}function s6(e){return i0(Y8,e)}function c6(e){return a0(Y8,e)}function l6(e){return o0(X8,e)}function u6(e){return o0(X8,{protocol:gK,hostname:hK,...q(e)})}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return p0(r5,e)}function v6(e){return m0(i5,e)}function y6(e){return g0(a5,e)}function b6(e){return h0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e){return S0(f5,e)}function D6(e){return C0(p5,e)}function O6(e,t,n={}){return a4(m5,e,t,n)}function k6(e){return a4(m5,`hostname`,mK,e)}function A6(e){return a4(m5,`hex`,AK,e)}function j6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=MG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return a4(m5,n,r,t)}function M6(e){return O0(h5,e)}function N6(e){return A0(g5,e)}function P6(e){return j0(g5,e)}function F6(e){return M0(g5,e)}function I6(e){return N0(g5,e)}function L6(e){return P0(g5,e)}function R6(e){return F0(_5,e)}function z6(e){return L0(v5,e)}function B6(e){return z0(y5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(e){return H0(x5,e)}function W6(e){return U0(S5,e)}function G6(){return W0(C5)}function K6(){return G0(w5)}function q6(e){return K0(T5,e)}function J6(e){return q0(E5,e)}function Y6(e){return J0(D5,e)}function X6(e,t){return D2(O5,e,t)}function Z6(e){let t=e._zod.def.shape;return u8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new k5(n)}function Q6(e,t){return new k5({type:`object`,shape:e,catchall:q6(),...q(t)})}function $6(e,t){return new k5({type:`object`,shape:e,catchall:K6(),...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,...q(t)})}function t8(e,t){return new j5({type:`union`,options:e,inclusive:!1,...q(t)})}function n8(e,t,n){return new M5({type:`union`,options:t,discriminator:e,...q(n)})}function r8(e,t){return new N5({type:`intersection`,left:e,right:t})}function i8(e,t,n){let r=t instanceof aJ;return new P5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function a8(e,t,n){return!t||!t._zod?new F5({type:`record`,keyType:X(),valueType:e,...q(t)}):new F5({type:`record`,keyType:e,valueType:t,...q(n)})}function o8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function s8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function c8(e,t,n){return new I5({type:`map`,keyType:e,valueType:t,...q(n)})}function l8(e,t){return new L5({type:`set`,valueType:e,...q(t)})}function u8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new R5({type:`enum`,entries:n,...q(t)})}function d8(e,t){return new R5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new z5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function f8(e){return z2(B5,e)}function p8(e){return new V5({type:`transform`,transform:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`optional`,innerType:e})}function g8(e){return new W5({type:`nullable`,innerType:e})}function _8(e){return m8(g8(e))}function v8(e,t){return new G5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function y8(e,t){return new K5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function b8(e,t){return new q5({type:`nonoptional`,innerType:e,...q(t)})}function x8(e){return new J5({type:`success`,innerType:e})}function S8(e,t){return new Y5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:_W(t)})}function C8(e){return X0(X5,e)}function w8(e,t){return new Z5({type:`pipe`,in:e,out:t})}function T8(e,t,n){return new Q5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function E8(e){let t=e._zod.def;return new Q5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function D8(e){return new e7({type:`readonly`,innerType:e})}function O8(e,t){return new t7({type:`template_literal`,parts:e,...q(t)})}function k8(e){return new n7({type:`lazy`,getter:e})}function A8(e){return new r7({type:`promise`,innerType:e})}function j8(e){return new i7({type:`function`,input:Array.isArray(e?.input)?i8(e?.input):e?.input??X6(K6()),output:e?.output??K6()})}function M8(e){let t=new JK({check:`custom`});return t._zod.check=e,t}function N8(e,t){return Q2(a7,e??(()=>!0),t)}function P8(e,t={}){return $2(a7,e,t)}function F8(e,t){return e4(e,t)}function I8(e,t={}){let n=new a7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function L8(e){let t=k8(()=>e8([X(e),M6(),R6(),W6(),X6(t),a8(X(),t)]));return t}function R8(e,t){return new $5({type:`pipe`,in:p8(e),out:t})}var z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7,l7=o((()=>{T3(),y3(),w4(),kX(),P3(),$3(),z8=Y(`ZodType`,(e,t)=>(t6(),aJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(IU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return UU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(P8(e,t))},superRefine(e,t){return this.check(F8(e,t))},overwrite(e){return this.check(x2(e))},optional(){return m8(this)},exactOptional(){return h8(this)},nullable(){return g8(this)},nullish(){return m8(g8(this))},nonoptional(e){return b8(this,e)},array(){return X6(this)},or(e){return e8([this,e])},and(e){return r8(this,e)},transform(e){return w8(this,p8(e))},default(e){return v8(this,e)},prefault(e){return y8(this,e)},catch(e){return S8(this,e)},pipe(e){return w8(this,e)},readonly(){return D8(this)},describe(e){let t=this.clone();return O$.add(t,{description:e}),t},meta(...e){if(e.length===0)return O$.get(this);let t=this.clone();return O$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return mW(this,`~standard`,{...wq(this),jsonSchema:{input:C4(this,`input`),output:C4(this,`output`)}})},set"~standard"(e){pW(this,`~standard`,e)},parse:function e(t,n){return V3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await H3(this,t,n,{callee:e})},safeParse(e,t){return U3(this,e,t)},async safeParseAsync(e,t){return W3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){pW(this,`spa`,e)},encode:function e(t,n){return G3(this,t,n,{callee:e})},decode:function e(t,n){return K3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await q3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await J3(this,t,n,{callee:e})},safeEncode(e,t){return Y3(this,e,t)},safeDecode(e,t){return X3(this,e,t)},async safeEncodeAsync(e,t){return Z3(this,e,t)},async safeDecodeAsync(e,t){return Q3(this,e,t)},toJSONSchema(e){return S4(this,{})(e)},get description(){return O$.get(this)?.description},get _def(){return this._zod.def}}),B8=Y(`_ZodString`,(e,t)=>{sJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(f2(...e))},includes(...e){return this.check(h2(...e))},startsWith(...e){return this.check(g2(...e))},endsWith(...e){return this.check(_2(...e))},min(...e){return this.check(u2(...e))},max(...e){return this.check(l2(...e))},length(...e){return this.check(d2(...e))},nonempty(...e){return this.check(u2(1,...e))},lowercase(e){return this.check(p2(e))},uppercase(e){return this.check(m2(e))},trim(){return this.check(C2())},normalize(...e){return this.check(S2(...e))},toLowerCase(){return this.check(w2())},toUpperCase(){return this.check(T2())},slugify(){return this.check(E2())}}),V8=Y(`ZodString`,(e,t)=>{sJ.init(e,t),B8.init(e,t)},{email(e){return this.check(e0(q8,e))},url(e){return this.check(o0(X8,e))},jwt(e){return this.check(C0(p5,e))},emoji(e){return this.check(s0(Z8,e))},guid(e){return this.check(t0(J8,e))},uuid(e){return this.check(n0(Y8,e))},uuidv4(e){return this.check(r0(Y8,e))},uuidv6(e){return this.check(i0(Y8,e))},uuidv7(e){return this.check(a0(Y8,e))},nanoid(e){return this.check(c0(Q8,e))},cuid(e){return this.check(l0($8,e))},cuid2(e){return this.check(u0(e5,e))},ulid(e){return this.check(d0(t5,e))},base64(e){return this.check(y0(l5,e))},base64url(e){return this.check(b0(u5,e))},xid(e){return this.check(f0(n5,e))},ksuid(e){return this.check(p0(r5,e))},ipv4(e){return this.check(m0(i5,e))},ipv6(e){return this.check(h0(o5,e))},cidrv4(e){return this.check(_0(s5,e))},cidrv6(e){return this.check(v0(c5,e))},e164(e){return this.check(x0(d5,e))},datetime(e){return this.check(w0(U8,e))},date(e){return this.check(T0(W8,e))},time(e){return this.check(E0(G8,e))},duration(e){return this.check(D0(K8,e))}}),H8=Y(`ZodStringFormat`,(e,t)=>{cJ.init(e,t),B8.init(e,t)}),U8=Y(`ZodISODateTime`,(e,t)=>{xJ.init(e,t),H8.init(e,t)}),W8=Y(`ZodISODate`,(e,t)=>{SJ.init(e,t),H8.init(e,t)}),G8=Y(`ZodISOTime`,(e,t)=>{CJ.init(e,t),H8.init(e,t)}),K8=Y(`ZodISODuration`,(e,t)=>{wJ.init(e,t),H8.init(e,t)}),q8=Y(`ZodEmail`,(e,t)=>{dJ.init(e,t),H8.init(e,t)}),J8=Y(`ZodGUID`,(e,t)=>{lJ.init(e,t),H8.init(e,t)}),Y8=Y(`ZodUUID`,(e,t)=>{uJ.init(e,t),H8.init(e,t)}),X8=Y(`ZodURL`,(e,t)=>{pJ.init(e,t),H8.init(e,t)}),Z8=Y(`ZodEmoji`,(e,t)=>{mJ.init(e,t),H8.init(e,t)}),Q8=Y(`ZodNanoID`,(e,t)=>{hJ.init(e,t),H8.init(e,t)}),$8=Y(`ZodCUID`,(e,t)=>{gJ.init(e,t),H8.init(e,t)}),e5=Y(`ZodCUID2`,(e,t)=>{_J.init(e,t),H8.init(e,t)}),t5=Y(`ZodULID`,(e,t)=>{vJ.init(e,t),H8.init(e,t)}),n5=Y(`ZodXID`,(e,t)=>{yJ.init(e,t),H8.init(e,t)}),r5=Y(`ZodKSUID`,(e,t)=>{bJ.init(e,t),H8.init(e,t)}),i5=Y(`ZodIPv4`,(e,t)=>{TJ.init(e,t),H8.init(e,t)}),a5=Y(`ZodMAC`,(e,t)=>{OJ.init(e,t),H8.init(e,t)}),o5=Y(`ZodIPv6`,(e,t)=>{DJ.init(e,t),H8.init(e,t)}),s5=Y(`ZodCIDRv4`,(e,t)=>{kJ.init(e,t),H8.init(e,t)}),c5=Y(`ZodCIDRv6`,(e,t)=>{AJ.init(e,t),H8.init(e,t)}),l5=Y(`ZodBase64`,(e,t)=>{jJ.init(e,t),H8.init(e,t)}),u5=Y(`ZodBase64URL`,(e,t)=>{MJ.init(e,t),H8.init(e,t)}),d5=Y(`ZodE164`,(e,t)=>{NJ.init(e,t),H8.init(e,t)}),f5=Y(`ZodCreditCard`,(e,t)=>{FJ.init(e,t),H8.init(e,t)}),p5=Y(`ZodJWT`,(e,t)=>{IJ.init(e,t),H8.init(e,t)}),m5=Y(`ZodCustomStringFormat`,(e,t)=>{LJ.init(e,t),H8.init(e,t)}),h5=Y(`ZodNumber`,(e,t)=>{RJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check($0(e,t))},gte(e,t){return this.check(e2(e,t))},min(e,t){return this.check(e2(e,t))},lt(e,t){return this.check(Z0(e,t))},lte(e,t){return this.check(Q0(e,t))},max(e,t){return this.check(Q0(e,t))},int(e){return this.check(N6(e))},safe(e){return this.check(N6(e))},positive(e){return this.check($0(0,e))},nonnegative(e){return this.check(e2(0,e))},negative(e){return this.check(Z0(0,e))},nonpositive(e){return this.check(Q0(0,e))},multipleOf(e,t){return this.check(a2(e,t))},step(e,t){return this.check(a2(e,t))},finite(){return this}}),g5=Y(`ZodNumberFormat`,(e,t)=>{zJ.init(e,t),h5.init(e,t)}),_5=Y(`ZodBoolean`,(e,t)=>{BJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r)}),v5=Y(`ZodBigInt`,(e,t)=>{VJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(e2(e,t))},min(e,t){return this.check(e2(e,t))},gt(e,t){return this.check($0(e,t))},lt(e,t){return this.check(Z0(e,t))},lte(e,t){return this.check(Q0(e,t))},max(e,t){return this.check(Q0(e,t))},positive(e){return this.check($0(BigInt(0),e))},negative(e){return this.check(Z0(BigInt(0),e))},nonpositive(e){return this.check(Q0(BigInt(0),e))},nonnegative(e){return this.check(e2(BigInt(0),e))},multipleOf(e,t){return this.check(a2(e,t))}}),y5=Y(`ZodBigIntFormat`,(e,t)=>{HJ.init(e,t),v5.init(e,t)}),b5=Y(`ZodSymbol`,(e,t)=>{UJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),x5=Y(`ZodUndefined`,(e,t)=>{WJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),S5=Y(`ZodNull`,(e,t)=>{GJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),C5=Y(`ZodAny`,(e,t)=>{KJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r)}),w5=Y(`ZodUnknown`,(e,t)=>{qJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r)}),T5=Y(`ZodNever`,(e,t)=>{JJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),E5=Y(`ZodVoid`,(e,t)=>{YJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),D5=Y(`ZodDate`,(e,t)=>{XJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.min=(t,n)=>e.check(e2(t,n)),e.max=(t,n)=>e.check(Q0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),O5=Y(`ZodArray`,(e,t)=>{n6(),ZJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(u2(e,t))},nonempty(e){return this.check(u2(1,e))},max(e,t){return this.check(l2(e,t))},length(e,t){return this.check(d2(e,t))},unwrap(){return this.element}}),k5=Y(`ZodObject`,(e,t)=>{n6(),tY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),gW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return u8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:K6()})},loose(){return this.clone({...this._zod.def,catchall:K6()})},strict(){return this.clone({...this._zod.def,catchall:q6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return JU(this,e)},safeExtend(e){return YU(this,e)},merge(e){return XU(this,e)},pick(e){return KU(this,e)},omit(e){return qU(this,e)},partial(...e){return ZU(H5,this,e[0])},exactPartial(...e){return ZU(U5,this,e[0],`exactPartial`)},required(...e){return QU(q5,this,e[0])}}),A5=Y(`ZodUnion`,(e,t)=>{nY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.options=t.options}),j5=Y(`ZodXor`,(e,t)=>{A5.init(e,t),rY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.options=t.options}),M5=Y(`ZodDiscriminatedUnion`,(e,t)=>{A5.init(e,t),iY.init(e,t)}),N5=Y(`ZodIntersection`,(e,t)=>{aY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)}),P5=Y(`ZodTuple`,(e,t)=>{n6(),oY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new H5({type:`optional`,innerType:e}))})}}),F5=Y(`ZodRecord`,(e,t)=>{n6(),sY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),I5=Y(`ZodMap`,(e,t)=>{n6(),cY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(s2(...t)),e.nonempty=t=>e.check(s2(1,t)),e.max=(...t)=>e.check(o2(...t)),e.size=(...t)=>e.check(c2(...t))}),L5=Y(`ZodSet`,(e,t)=>{n6(),lY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.min=(...t)=>e.check(s2(...t)),e.nonempty=t=>e.check(s2(1,t)),e.max=(...t)=>e.check(o2(...t)),e.size=(...t)=>e.check(c2(...t))}),R5=Y(`ZodEnum`,(e,t)=>{uY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})}}),z5=Y(`ZodLiteral`,(e,t)=>{dY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),B5=Y(`ZodFile`,(e,t)=>{fY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.min=(t,n)=>e.check(s2(t,n)),e.max=(t,n)=>e.check(o2(t,n)),e.mime=(t,n)=>e.check(b2(Array.isArray(t)?t:[t],n))}),V5=Y(`ZodTransform`,(e,t)=>{n6(),pY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(lW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(lW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),H5=Y(`ZodOptional`,(e,t)=>{mY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodExactOptional`,(e,t)=>{hY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodNullable`,(e,t)=>{gY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),G5=Y(`ZodDefault`,(e,t)=>{_Y.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),K5=Y(`ZodPrefault`,(e,t)=>{vY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodNonOptional`,(e,t)=>{yY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodSuccess`,(e,t)=>{bY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Y5=Y(`ZodCatch`,(e,t)=>{xY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),X5=Y(`ZodNaN`,(e,t)=>{SY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),Z5=Y(`ZodPipe`,(e,t)=>{CY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.in=t.in,e.out=t.out}),Q5=Y(`ZodCodec`,(e,t)=>{Z5.init(e,t),wY.init(e,t)}),$5=Y(`ZodPreprocess`,(e,t)=>{Z5.init(e,t),TY.init(e,t)}),e7=Y(`ZodReadonly`,(e,t)=>{EY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),t7=Y(`ZodTemplateLiteral`,(e,t)=>{DY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r)}),n7=Y(`ZodLazy`,(e,t)=>{AY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),r7=Y(`ZodPromise`,(e,t)=>{kY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),i7=Y(`ZodFunction`,(e,t)=>{OY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r)}),a7=Y(`ZodCustom`,(e,t)=>{jY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)}),o7=n4,s7=r4,c7=(...e)=>i4({Codec:Q5,Boolean:_5,String:V8},...e)}));function u7(e){MW({customError:e})}function d7(){return MW().customError}var f7,p7,Die=o((()=>{T3(),f7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},p7||={}})),m7=c({ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,date:()=>Oie,datetime:()=>h7,duration:()=>Aie,time:()=>kie});function h7(e){return w0(U8,e)}function Oie(e){return T0(W8,e)}function kie(e){return E0(G8,e)}function Aie(e){return D0(K8,e)}var g7=o((()=>{T3(),l7()}));function jie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function _7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function v7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():b7(e,t)}function y7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=b7(Nie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>y7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(C7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?b7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=b7(r,t);FU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=b7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!BU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=Pie(r,b7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=_7(n.map(e=>b7(e,t)),a),s=Array.isArray(i)?void 0:v7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=_7(i.map(e=>b7(e,t)),n),o=v7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=b7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=y7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>b7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>b7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:b7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function x7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:jie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??O$};return b7(n,r)}var $,S7,C7,Fie=o((()=>{k$(),J(),P3(),g7(),l7(),$={...e6,...N3,iso:m7},S7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),C7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function w7(e){return E3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:e8(t.options)}})}var Iie=o((()=>{O3(),l7()}));function Lie(e,t){if(!t?.length)return e;let n=e._zod.def;return UU(e,IU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function T7(e){return Lie(e.out,e.checks)}function Rie(e){return e.in._zod.traits.has(`$ZodTransform`)?T7(e):e.in}function E7(e){return E3(e,{pipe:e=>Rie(e._zod.def),default:(e,t)=>t?m8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function D7(e){return E3(e,{pipe:e=>T7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var zie=o((()=>{J(),O3(),l7()})),O7=c({bigint:()=>Uie,boolean:()=>Hie,date:()=>Wie,number:()=>Vie,string:()=>Bie});function Bie(e){return $1(V8,e)}function Vie(e){return k0(h5,e)}function Hie(e){return I0(_5,e)}function Uie(e){return R0(v5,e)}function Wie(e){return Y0(D5,e)}var Gie=o((()=>{T3(),l7()})),k7=c({$brand:()=>LW,$input:()=>E$,$output:()=>T$,NEVER:()=>PW,TimePrecision:()=>o4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>R3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>z3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>UU,codec:()=>T8,coerce:()=>O7,compile:()=>j$,config:()=>MW,core:()=>w3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>K3,decodeAsync:()=>J3,deepPartial:()=>w7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>G3,encodeAsync:()=>q3,endsWith:()=>_2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>HW,float32:()=>P6,float64:()=>F6,formatError:()=>UW,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Hq,getErrorMap:()=>d7,globalRegistry:()=>O$,gt:()=>$0,gte:()=>e2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>h2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>d2,literal:()=>Q,locales:()=>x$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,mac:()=>y6,map:()=>c8,maxLength:()=>l2,maxSize:()=>o2,memoizer:()=>LY,meta:()=>s7,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>n2,never:()=>q6,nonnegative:()=>i2,nonoptional:()=>b8,nonpositive:()=>r2,normalize:()=>S2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>x2,parse:()=>V3,parseAsync:()=>H3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>t2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>KW,promise:()=>A8,properties:()=>y2,property:()=>v2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>f2,regexes:()=>MG,registry:()=>C$,safeDecode:()=>X3,safeDecodeAsync:()=>Q3,safeEncode:()=>Y3,safeEncodeAsync:()=>Z3,safeParse:()=>U3,safeParseAsync:()=>W3,set:()=>l8,setErrorMap:()=>u7,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>k4,toLowerCase:()=>w2,toUpperCase:()=>T2,toZod:()=>DU,transform:()=>p8,treeifyError:()=>WW,trim:()=>C2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>m2,url:()=>l6,util:()=>EU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>pG,validateAsync:()=>mG,void:()=>J6,xid:()=>g6,xor:()=>t8}),A7=o((()=>{T3(),l7(),P3(),B3(),$3(),Die(),y3(),Fie(),Iie(),zie(),S$(),g7(),Gie()})),Kie=o((()=>{A7(),A7()})),qie=c({$brand:()=>LW,$input:()=>E$,$output:()=>T$,NEVER:()=>PW,TimePrecision:()=>o4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>R3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>z3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>UU,codec:()=>T8,coerce:()=>O7,compile:()=>j$,config:()=>MW,core:()=>w3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>K3,decodeAsync:()=>J3,deepPartial:()=>w7,default:()=>k7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>G3,encodeAsync:()=>q3,endsWith:()=>_2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>HW,float32:()=>P6,float64:()=>F6,formatError:()=>UW,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Hq,getErrorMap:()=>d7,globalRegistry:()=>O$,gt:()=>$0,gte:()=>e2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>h2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>d2,literal:()=>Q,locales:()=>x$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,mac:()=>y6,map:()=>c8,maxLength:()=>l2,maxSize:()=>o2,memoizer:()=>LY,meta:()=>s7,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>n2,never:()=>q6,nonnegative:()=>i2,nonoptional:()=>b8,nonpositive:()=>r2,normalize:()=>S2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>x2,parse:()=>V3,parseAsync:()=>H3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>t2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>KW,promise:()=>A8,properties:()=>y2,property:()=>v2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>f2,regexes:()=>MG,registry:()=>C$,safeDecode:()=>X3,safeDecodeAsync:()=>Q3,safeEncode:()=>Y3,safeEncodeAsync:()=>Z3,safeParse:()=>U3,safeParseAsync:()=>W3,set:()=>l8,setErrorMap:()=>u7,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>k4,toLowerCase:()=>w2,toUpperCase:()=>T2,toZod:()=>DU,transform:()=>p8,treeifyError:()=>WW,trim:()=>C2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>m2,url:()=>l6,util:()=>EU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>pG,validateAsync:()=>mG,void:()=>J6,xid:()=>g6,xor:()=>t8,z:()=>k7}),j7=o((()=>{A7(),Kie()}));j7();var M7=`io.modelcontextprotocol/related-task`,N7=N8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),P7=e8([X(),M6().int()]),F7=X();$6({ttl:M6().optional(),pollInterval:M6().optional()});var Jie=Z({ttl:M6().optional()}),Yie=Z({taskId:X()}),I7=$6({progressToken:P7.optional(),[M7]:Yie.optional()}),L7=Z({_meta:I7.optional()}),R7=L7.extend({task:Jie.optional()}),Xie=e=>R7.safeParse(e).success,z7=Z({method:X(),params:L7.loose().optional()}),B7=Z({_meta:I7.optional()}),V7=Z({method:X(),params:B7.loose().optional()}),H7=$6({_meta:I7.optional()}),U7=e8([X(),M6().int()]),W7=Z({jsonrpc:Q(`2.0`),id:U7,...z7.shape}).strict(),G7=e=>W7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),...V7.shape}).strict(),Zie=e=>K7.safeParse(e).success,q7=Z({jsonrpc:Q(`2.0`),id:U7,result:H7}).strict(),J7=e=>q7.safeParse(e).success,Y7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y7||={});var X7=Z({jsonrpc:Q(`2.0`),id:U7.optional(),error:Z({code:M6().int(),message:X(),data:K6().optional()})}).strict(),Qie=e=>X7.safeParse(e).success,$ie=e8([W7,K7,q7,X7]);e8([q7,X7]);var Z7=H7.strict(),eae=B7.extend({requestId:U7.optional(),reason:X().optional()}),Q7=V7.extend({method:Q(`notifications/cancelled`),params:eae}),$7=Z({icons:X6(Z({src:X(),mimeType:X().optional(),sizes:X6(X()).optional(),theme:u8([`light`,`dark`]).optional()})).optional()}),e9=Z({name:X(),title:X().optional()}),t9=e9.extend({...e9.shape,...$7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),tae=R8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,r8(Z({form:r8(Z({applyDefaults:R6().optional()}),a8(X(),K6())).optional(),url:N7.optional()}),a8(X(),K6()).optional())),nae=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({sampling:$6({createMessage:N7.optional()}).optional(),elicitation:$6({create:N7.optional()}).optional()}).optional()}),rae=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({tools:$6({call:N7.optional()}).optional()}).optional()}),iae=Z({experimental:a8(X(),N7).optional(),sampling:Z({context:N7.optional(),tools:N7.optional()}).optional(),elicitation:tae.optional(),roots:Z({listChanged:R6().optional()}).optional(),tasks:nae.optional(),extensions:a8(X(),N7).optional()}),aae=L7.extend({protocolVersion:X(),capabilities:iae,clientInfo:t9}),oae=z7.extend({method:Q(`initialize`),params:aae}),sae=Z({experimental:a8(X(),N7).optional(),logging:N7.optional(),completions:N7.optional(),prompts:Z({listChanged:R6().optional()}).optional(),resources:Z({subscribe:R6().optional(),listChanged:R6().optional()}).optional(),tools:Z({listChanged:R6().optional()}).optional(),tasks:rae.optional(),extensions:a8(X(),N7).optional()}),cae=H7.extend({protocolVersion:X(),capabilities:sae,serverInfo:t9,instructions:X().optional()}),lae=V7.extend({method:Q(`notifications/initialized`),params:B7.optional()}),n9=z7.extend({method:Q(`ping`),params:L7.optional()}),uae=Z({progress:M6(),total:m8(M6()),message:m8(X())}),dae=Z({...B7.shape,...uae.shape,progressToken:P7}),r9=V7.extend({method:Q(`notifications/progress`),params:dae}),fae=L7.extend({cursor:F7.optional()}),i9=z7.extend({params:fae.optional()}),a9=H7.extend({nextCursor:F7.optional()}),pae=u8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),o9=Z({taskId:X(),status:pae,ttl:e8([M6(),W6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:m8(M6()),statusMessage:m8(X())}),s9=H7.extend({task:o9}),mae=B7.merge(o9),c9=V7.extend({method:Q(`notifications/tasks/status`),params:mae}),l9=z7.extend({method:Q(`tasks/get`),params:L7.extend({taskId:X()})}),u9=H7.merge(o9),d9=z7.extend({method:Q(`tasks/result`),params:L7.extend({taskId:X()})});H7.loose();var f9=i9.extend({method:Q(`tasks/list`)}),p9=a9.extend({tasks:X6(o9)}),m9=z7.extend({method:Q(`tasks/cancel`),params:L7.extend({taskId:X()})}),hae=H7.merge(o9),h9=Z({uri:X(),mimeType:m8(X()),_meta:a8(X(),K6()).optional()}),g9=h9.extend({text:X()}),_9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),v9=h9.extend({blob:_9}),y9=u8([`user`,`assistant`]),b9=Z({audience:X6(y9).optional(),priority:M6().min(0).max(1).optional(),lastModified:h7({offset:!0}).optional()}),x9=Z({...e9.shape,...$7.shape,uri:X(),description:m8(X()),mimeType:m8(X()),size:m8(M6()),annotations:b9.optional(),_meta:m8($6({}))}),gae=Z({...e9.shape,...$7.shape,uriTemplate:X(),description:m8(X()),mimeType:m8(X()),annotations:b9.optional(),_meta:m8($6({}))}),_ae=i9.extend({method:Q(`resources/list`)}),S9=a9.extend({resources:X6(x9)}),vae=i9.extend({method:Q(`resources/templates/list`)}),yae=a9.extend({resourceTemplates:X6(gae)}),C9=L7.extend({uri:X()}),bae=C9,xae=z7.extend({method:Q(`resources/read`),params:bae}),w9=H7.extend({contents:X6(e8([g9,v9]))}),Sae=V7.extend({method:Q(`notifications/resources/list_changed`),params:B7.optional()}),Cae=C9,wae=z7.extend({method:Q(`resources/subscribe`),params:Cae}),T9=C9,Tae=z7.extend({method:Q(`resources/unsubscribe`),params:T9}),Eae=B7.extend({uri:X()}),Dae=V7.extend({method:Q(`notifications/resources/updated`),params:Eae}),Oae=Z({name:X(),description:m8(X()),required:m8(R6())}),kae=Z({...e9.shape,...$7.shape,description:m8(X()),arguments:m8(X6(Oae)),_meta:m8($6({}))}),Aae=i9.extend({method:Q(`prompts/list`)}),jae=a9.extend({prompts:X6(kae)}),Mae=L7.extend({name:X(),arguments:a8(X(),X()).optional()}),Nae=z7.extend({method:Q(`prompts/get`),params:Mae}),E9=Z({type:Q(`text`),text:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),D9=Z({type:Q(`image`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),O9=Z({type:Q(`audio`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),Pae=Z({type:Q(`tool_use`),name:X(),id:X(),input:a8(X(),K6()),_meta:a8(X(),K6()).optional()}),k9=Z({type:Q(`resource`),resource:e8([g9,v9]),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),A9=x9.extend({type:Q(`resource_link`)}),j9=e8([E9,D9,O9,A9,k9]),Fae=Z({role:y9,content:j9}),Iae=H7.extend({description:X().optional(),messages:X6(Fae)}),Lae=V7.extend({method:Q(`notifications/prompts/list_changed`),params:B7.optional()}),Rae=Z({title:X().optional(),readOnlyHint:R6().optional(),destructiveHint:R6().optional(),idempotentHint:R6().optional(),openWorldHint:R6().optional()}),zae=Z({taskSupport:u8([`required`,`optional`,`forbidden`]).optional()}),M9=Z({...e9.shape,...$7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()),outputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()).optional(),annotations:Rae.optional(),execution:zae.optional(),_meta:a8(X(),K6()).optional()}),N9=i9.extend({method:Q(`tools/list`)}),Bae=a9.extend({tools:X6(M9)}),P9=H7.extend({content:X6(j9).default([]),structuredContent:a8(X(),K6()).optional(),isError:R6().optional()});P9.or(H7.extend({toolResult:K6()}));var Vae=R7.extend({name:X(),arguments:a8(X(),K6()).optional()}),F9=z7.extend({method:Q(`tools/call`),params:Vae}),Hae=V7.extend({method:Q(`notifications/tools/list_changed`),params:B7.optional()});Z({autoRefresh:R6().default(!0),debounceMs:M6().int().nonnegative().default(300)});var I9=u8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Uae=L7.extend({level:I9}),Wae=z7.extend({method:Q(`logging/setLevel`),params:Uae}),Gae=B7.extend({level:I9,logger:X().optional(),data:K6()}),Kae=V7.extend({method:Q(`notifications/message`),params:Gae}),qae=Z({hints:X6(Z({name:X().optional()})).optional(),costPriority:M6().min(0).max(1).optional(),speedPriority:M6().min(0).max(1).optional(),intelligencePriority:M6().min(0).max(1).optional()}),Jae=Z({mode:u8([`auto`,`required`,`none`]).optional()}),Yae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:X6(j9).default([]),structuredContent:Z({}).loose().optional(),isError:R6().optional(),_meta:a8(X(),K6()).optional()}),Xae=n8(`type`,[E9,D9,O9]),L9=n8(`type`,[E9,D9,O9,Pae,Yae]),Zae=Z({role:y9,content:e8([L9,X6(L9)]),_meta:a8(X(),K6()).optional()}),Qae=R7.extend({messages:X6(Zae),modelPreferences:qae.optional(),systemPrompt:X().optional(),includeContext:u8([`none`,`thisServer`,`allServers`]).optional(),temperature:M6().optional(),maxTokens:M6().int(),stopSequences:X6(X()).optional(),metadata:N7.optional(),tools:X6(M9).optional(),toolChoice:Jae.optional()}),$ae=z7.extend({method:Q(`sampling/createMessage`),params:Qae}),R9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:y9,content:Xae}),z9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:y9,content:e8([L9,X6(L9)])}),eoe=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:R6().optional()}),toe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:M6().optional(),maxLength:M6().optional(),format:u8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),noe=Z({type:u8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:M6().optional(),maximum:M6().optional(),default:M6().optional()}),roe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),default:X().optional()}),ioe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:X6(Z({const:X(),title:X()})),default:X().optional()}),aoe=e8([e8([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),enumNames:X6(X()).optional(),default:X().optional()}),e8([roe,ioe]),e8([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({type:Q(`string`),enum:X6(X())}),default:X6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({anyOf:X6(Z({const:X(),title:X()}))}),default:X6(X()).optional()})])]),eoe,toe,noe]),ooe=e8([R7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:a8(X(),aoe),required:X6(X()).optional()})}),R7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),soe=z7.extend({method:Q(`elicitation/create`),params:ooe}),coe=B7.extend({elicitationId:X()}),loe=V7.extend({method:Q(`notifications/elicitation/complete`),params:coe}),uoe=H7.extend({action:u8([`accept`,`decline`,`cancel`]),content:R8(e=>e===null?void 0:e,a8(X(),e8([X(),M6(),R6(),X6(X())])).optional())}),doe=Z({type:Q(`ref/resource`),uri:X()}),foe=Z({type:Q(`ref/prompt`),name:X()}),poe=L7.extend({ref:e8([foe,doe]),argument:Z({name:X(),value:X()}),context:Z({arguments:a8(X(),X()).optional()}).optional()}),moe=z7.extend({method:Q(`completion/complete`),params:poe}),hoe=H7.extend({completion:$6({values:X6(X()).max(100),total:m8(M6().int()),hasMore:m8(R6())})}),goe=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:a8(X(),K6()).optional()}),_oe=z7.extend({method:Q(`roots/list`),params:L7.optional()}),voe=H7.extend({roots:X6(goe)}),yoe=V7.extend({method:Q(`notifications/roots/list_changed`),params:B7.optional()});e8([n9,oae,moe,Wae,Nae,Aae,_ae,vae,xae,wae,Tae,F9,N9,l9,d9,f9,m9]),e8([Q7,r9,lae,yoe,c9]),e8([Z7,R9,z9,uoe,voe,u9,p9,s9]),e8([n9,$ae,soe,_oe,l9,d9,f9,m9]),e8([Q7,r9,Kae,Dae,Sae,Hae,Lae,c9,loe]),e8([Z7,cae,hoe,Iae,jae,S9,yae,w9,P9,Bae,u9,p9,s9]);var B9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new boe(e.elicitations,n)}return new e(t,n,r)}},boe=class extends B9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function V9(e){return e===`completed`||e===`failed`||e===`cancelled`}function H9(e){let t=j3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=M3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function U9(e,t){let n=A3(e,t);if(!n.success)throw n.error;return n.data}var xoe=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Q7,e=>{this._oncancel(e)}),this.setNotificationHandler(r9,e=>{this._onprogress(e)}),this.setRequestHandler(n9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(l9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new B9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(d9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new B9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new B9(Y7.InvalidParams,`Task not found: ${r}`);if(!V9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(V9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[M7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(f9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new B9(Y7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(m9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new B9(Y7.InvalidParams,`Task not found: ${e.params.taskId}`);if(V9(n.status))throw new B9(Y7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new B9(Y7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof B9?e:new B9(Y7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),B9.fromError(Y7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),J7(e)||Qie(e)?this._onresponse(e):G7(e)?this._onrequest(e,t):Zie(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=B9.fromError(Y7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[M7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Y7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Xie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new B9(Y7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Y7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),J7(e)?n(e):n(new B9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(J7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),J7(e)?r(e):r(B9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof B9?e:new B9(Y7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,s9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new B9(Y7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},V9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new B9(Y7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new B9(Y7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof B9?e:new B9(Y7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[M7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof B9?e:new B9(Y7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=A3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(B9.fromError(Y7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},u9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},p9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},hae,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[M7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[M7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[M7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=H9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=U9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=H9(e);this._notificationHandlers.set(n,n=>{let r=U9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&G7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new B9(Y7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new B9(Y7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new B9(Y7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new B9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=c9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),V9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new B9(Y7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(V9(a.status))throw new B9(Y7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=c9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),V9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function W9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Soe(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=W9(a)&&W9(i)?{...a,...i}:i}return n}var Coe=`modulepreload`,woe=function(e,t){return new URL(e,t).href},G9={},Toe=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=woe(t,n),t=s(t),t in G9)return;G9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Coe,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};j7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var Eoe=class extends xoe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Doe=`2026-01-26`,K9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=$ie.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Ooe=e8([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),q9=e8([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),koe=a8(e8([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function m4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;m4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function h4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function g4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!b4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??h4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}FU(n,r,e.length===1?e[0]:g4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=h4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function _4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of b4)if(t in e)return;let n=t.filter(e=>x4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=g4(t);else{let e=n[0],i=x4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>g4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,c4(e,r))}function v4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):c4(i,s),c4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())m4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])_4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}c4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,FU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:C4(t,`input`,e.processors),output:C4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function y4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return y4(r.element,n);if(r.type===`set`)return y4(r.valueType,n);if(r.type===`lazy`)return y4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return y4(r.innerType,n);if(r.type===`intersection`)return y4(r.left,n)||y4(r.right,n);if(r.type===`record`||r.type===`map`)return y4(r.keyType,n)||y4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:y4(r.in,n)||y4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(y4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(y4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(y4(e,n))return!0;return!!(r.rest&&y4(r.rest,n))}return!1}var b4,x4,S4,C4,w4=o((()=>{k$(),J(),b4=new Set([`type`,`properties`,`required`,`additionalProperties`]),x4=[`oneOf`,`anyOf`],S4=(e,t={})=>n=>{let r=l4({...n,processors:t});return d4(e,r),p4(r,e),v4(r,e)},C4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=l4({...i??{},target:a,io:t,processors:n});return d4(e,o),p4(o,e),v4(o,e)}}));function T4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?T4(t.out):t.type===`catch`?T4(t.innerType):e._zod.optin}function E4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=E4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>E4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?wK:CK).source),p):p}function D4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of a3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=E4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function O4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(u4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),l3):JSON.parse(o)}function k4(e,t){if(`_idmap`in e){let n=e,r=l4({...t,processors:v3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;d4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;p4(r,n),FU(a,t,v4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=l4({...t,processors:v3});return d4(e,n),p4(n,e),v4(n,e)}var A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3,y3=o((()=>{KK(),w4(),J(),A4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},j4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=A4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},M4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):u4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},N4=(e,t,n,r)=>{n.type=`boolean`},P4=(e,t,n,r)=>{u4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},F4=(e,t,n,r)=>{u4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},I4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},L4=(e,t,n,r)=>{u4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},R4=(e,t,n,r)=>{u4(e,t,n,r,`Void cannot be represented in JSON Schema`)},z4=(e,t,n,r)=>{n.not={}},B4=(e,t,n,r)=>{},V4=(e,t,n,r)=>{},H4=(e,t,n,r)=>{u4(e,t,n,r,`Date cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{let i=e._zod.def,a=OU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},W4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(u4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(u4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},G4=(e,t,n,r)=>{u4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},K4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},q4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},J4=(e,t,n,r)=>{n.type=`boolean`},Y4=(e,t,n,r)=>{u4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{u4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{u4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{u4(e,t,n,r,`Map cannot be represented in JSON Schema`)},$4=(e,t,n,r)=>{u4(e,t,n,r,`Set cannot be represented in JSON Schema`)},e3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=d4(a.element,t,{...r,path:[...r.path,`items`]})},t3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&u4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)FU(i.properties,e,d4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?T4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=d4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},n3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>d4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},r3=(e,t,n,r)=>{let i=e._zod.def,a=d4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=d4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},i3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>d4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?d4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?T4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},a3=new WeakMap,o3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=d4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)FU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=d4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=a3.get(t);n||(n=[],a3.set(t,n),t.deferred.push(()=>D4(t))),n.push(e)}i.additionalProperties=d4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&T4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},s3=(e,t,n,r)=>{let i=e._zod.def,a=d4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},c3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},l3=Symbol(),u3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=O4(i.defaultValue,e,t,n,r);o!==l3&&(n.default=o)},d3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=O4(i.defaultValue,e,t,n,r);o!==l3&&(n._prefault=o)},f3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{u4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},p3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;d4(o,t,r);let s=t.seen.get(e);s.ref=o},m3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},h3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g3=(e,t,n,r)=>{let i=e._zod.def;d4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_3=(e,t,n,r)=>{let i=e._zod.innerType;d4(i,t,r);let a=t.seen.get(e);a.ref=i},v3={string:j4,number:M4,boolean:N4,bigint:P4,symbol:F4,null:I4,undefined:L4,void:R4,never:z4,any:B4,unknown:V4,date:H4,enum:U4,literal:W4,nan:G4,template_literal:K4,file:q4,success:J4,custom:Y4,function:X4,transform:Z4,map:Q4,set:$4,array:e3,object:t3,union:n3,intersection:r3,tuple:i3,record:o3,nullable:s3,nonoptional:c3,default:u3,prefault:d3,catch:f3,pipe:p3,readonly:m3,promise:h3,optional:g3,lazy:_3}})),b3,x3=o((()=>{y3(),w4(),b3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=l4({processors:v3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return d4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,p4(this.ctx,e);let{"~standard":n,...r}=v4(this.ctx,e);return r}}})),S3=c({}),C3=o((()=>{})),w3=c({$ZodAny:()=>KJ,$ZodArray:()=>ZJ,$ZodAsyncError:()=>RW,$ZodBase64:()=>jJ,$ZodBase64URL:()=>MJ,$ZodBigInt:()=>VJ,$ZodBigIntFormat:()=>HJ,$ZodBoolean:()=>BJ,$ZodCIDRv4:()=>kJ,$ZodCIDRv6:()=>AJ,$ZodCUID:()=>gJ,$ZodCUID2:()=>_J,$ZodCatch:()=>xY,$ZodCheck:()=>JK,$ZodCheckBigIntFormat:()=>nq,$ZodCheckEndsWith:()=>hq,$ZodCheckGreaterThan:()=>$K,$ZodCheckIncludes:()=>pq,$ZodCheckLengthEquals:()=>cq,$ZodCheckLessThan:()=>QK,$ZodCheckLowerCase:()=>dq,$ZodCheckMaxLength:()=>oq,$ZodCheckMaxSize:()=>rq,$ZodCheckMimeType:()=>_q,$ZodCheckMinLength:()=>sq,$ZodCheckMinSize:()=>iq,$ZodCheckMultipleOf:()=>eq,$ZodCheckNumberFormat:()=>tq,$ZodCheckOverwrite:()=>vq,$ZodCheckProperty:()=>gq,$ZodCheckRegex:()=>uq,$ZodCheckSizeEquals:()=>aq,$ZodCheckStartsWith:()=>mq,$ZodCheckStringFormat:()=>lq,$ZodCheckUpperCase:()=>fq,$ZodCodec:()=>wY,$ZodCreditCard:()=>FJ,$ZodCustom:()=>jY,$ZodCustomStringFormat:()=>LJ,$ZodCyclicError:()=>zY,$ZodDate:()=>XJ,$ZodDefault:()=>_Y,$ZodDiscriminatedUnion:()=>iY,$ZodE164:()=>NJ,$ZodEmail:()=>dJ,$ZodEmoji:()=>mJ,$ZodEncodeError:()=>zW,$ZodEnum:()=>uY,$ZodError:()=>QW,$ZodExactOptional:()=>hY,$ZodFile:()=>fY,$ZodFunction:()=>OY,$ZodGUID:()=>lJ,$ZodIPv4:()=>TJ,$ZodIPv6:()=>DJ,$ZodISODate:()=>SJ,$ZodISODateTime:()=>xJ,$ZodISODuration:()=>wJ,$ZodISOTime:()=>CJ,$ZodIntersection:()=>aY,$ZodJWT:()=>IJ,$ZodKSUID:()=>bJ,$ZodLazy:()=>AY,$ZodLiteral:()=>dY,$ZodMAC:()=>OJ,$ZodMap:()=>cY,$ZodNaN:()=>SY,$ZodNanoID:()=>hJ,$ZodNever:()=>JJ,$ZodNonOptional:()=>yY,$ZodNull:()=>GJ,$ZodNullable:()=>gY,$ZodNumber:()=>RJ,$ZodNumberFormat:()=>zJ,$ZodObject:()=>eY,$ZodObjectJIT:()=>tY,$ZodOptional:()=>mY,$ZodPipe:()=>CY,$ZodPrefault:()=>vY,$ZodPreprocess:()=>TY,$ZodPromise:()=>kY,$ZodReadonly:()=>EY,$ZodRealError:()=>$W,$ZodRecord:()=>sY,$ZodRegistry:()=>D$,$ZodSet:()=>lY,$ZodString:()=>sJ,$ZodStringFormat:()=>cJ,$ZodSuccess:()=>bY,$ZodSymbol:()=>UJ,$ZodTemplateLiteral:()=>DY,$ZodTransform:()=>pY,$ZodTuple:()=>oY,$ZodType:()=>aJ,$ZodULID:()=>vJ,$ZodURL:()=>pJ,$ZodUUID:()=>uJ,$ZodUndefined:()=>WJ,$ZodUnion:()=>nY,$ZodUnknown:()=>qJ,$ZodVoid:()=>YJ,$ZodXID:()=>yJ,$ZodXor:()=>rY,$brand:()=>LW,$constructor:()=>Y,$input:()=>E$,$output:()=>T$,Doc:()=>bq,INVALID:()=>G1,JSONSchema:()=>S3,JSONSchemaGenerator:()=>b3,NEVER:()=>PW,TimePrecision:()=>o4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,_any:()=>W0,_array:()=>D2,_base64:()=>y0,_base64url:()=>b0,_bigint:()=>L0,_boolean:()=>F0,_catch:()=>K2,_check:()=>t4,_cidrv4:()=>_0,_cidrv6:()=>v0,_coercedBigint:()=>R0,_coercedBoolean:()=>I0,_coercedDate:()=>Y0,_coercedNumber:()=>k0,_coercedString:()=>$1,_creditCard:()=>S0,_cuid:()=>l0,_cuid2:()=>u0,_custom:()=>Q2,_date:()=>J0,_decode:()=>_G,_decodeAsync:()=>xG,_default:()=>U2,_discriminatedUnion:()=>A2,_e164:()=>x0,_email:()=>e0,_emoji:()=>s0,_encode:()=>hG,_encodeAsync:()=>yG,_endsWith:()=>_2,_enum:()=>I2,_file:()=>z2,_float32:()=>j0,_float64:()=>M0,_gt:()=>$0,_gte:()=>e2,_guid:()=>t0,_includes:()=>h2,_int:()=>A0,_int32:()=>N0,_int64:()=>z0,_intersection:()=>j2,_ipv4:()=>m0,_ipv6:()=>h0,_isoDate:()=>T0,_isoDateTime:()=>w0,_isoDuration:()=>D0,_isoTime:()=>E0,_jwt:()=>C0,_ksuid:()=>p0,_lazy:()=>X2,_length:()=>d2,_literal:()=>R2,_lowercase:()=>p2,_lt:()=>Z0,_lte:()=>Q0,_mac:()=>g0,_map:()=>P2,_max:()=>Q0,_maxLength:()=>l2,_maxSize:()=>o2,_mime:()=>b2,_min:()=>e2,_minLength:()=>u2,_minSize:()=>s2,_multipleOf:()=>a2,_nan:()=>X0,_nanoid:()=>c0,_nativeEnum:()=>L2,_negative:()=>n2,_never:()=>K0,_nonnegative:()=>i2,_nonoptional:()=>W2,_nonpositive:()=>r2,_normalize:()=>S2,_null:()=>U0,_nullable:()=>H2,_number:()=>O0,_optional:()=>V2,_overwrite:()=>x2,_parse:()=>rG,_parseAsync:()=>aG,_pipe:()=>q2,_positive:()=>t2,_promise:()=>Z2,_properties:()=>y2,_property:()=>v2,_readonly:()=>J2,_record:()=>N2,_refine:()=>$2,_regex:()=>f2,_safeDecode:()=>TG,_safeDecodeAsync:()=>kG,_safeEncode:()=>CG,_safeEncodeAsync:()=>DG,_safeParse:()=>sG,_safeParseAsync:()=>lG,_set:()=>F2,_size:()=>c2,_slugify:()=>E2,_startsWith:()=>g2,_string:()=>Q1,_stringFormat:()=>a4,_stringbool:()=>i4,_success:()=>G2,_superRefine:()=>e4,_symbol:()=>V0,_templateLiteral:()=>Y2,_toLowerCase:()=>w2,_toUpperCase:()=>T2,_transform:()=>B2,_trim:()=>C2,_tuple:()=>M2,_uint32:()=>P0,_uint64:()=>B0,_ulid:()=>d0,_undefined:()=>H0,_union:()=>O2,_unknown:()=>G0,_uppercase:()=>m2,_url:()=>o0,_uuid:()=>n0,_uuidv4:()=>r0,_uuidv6:()=>i0,_uuidv7:()=>a0,_void:()=>q0,_xid:()=>f0,_xor:()=>k2,clone:()=>UU,compile:()=>j$,compileFn:()=>N$,config:()=>MW,createStandardJSONSchemaMethod:()=>C4,createToJSONSchemaMethod:()=>S4,decode:()=>vG,decodeAsync:()=>SG,describe:()=>n4,encode:()=>gG,encodeAsync:()=>bG,extractDefs:()=>p4,finalize:()=>v4,flattenError:()=>HW,formatError:()=>UW,getDiscriminatedOption:()=>Hq,globalConfig:()=>BW,globalRegistry:()=>O$,handleUnrepresentable:()=>u4,initializeContext:()=>l4,isBackEdge:()=>RY,isRecursiveSchema:()=>FY,isValidBase64:()=>jq,isValidBase64URL:()=>Mq,isValidCIDRv6:()=>Aq,isValidCreditCard:()=>Pq,isValidIPv6:()=>kq,isValidJWT:()=>Fq,locales:()=>x$,memoizer:()=>LY,mergeValues:()=>Uq,meta:()=>r4,parse:()=>iG,parseAsync:()=>oG,parseURLObject:()=>Tq,prettifyError:()=>KW,process:()=>d4,regexes:()=>MG,registry:()=>C$,safeDecode:()=>EG,safeDecodeAsync:()=>AG,safeEncode:()=>wG,safeEncodeAsync:()=>OG,safeParse:()=>cG,safeParseAsync:()=>uG,standardProps:()=>wq,stripTabAndNewline:()=>Eq,toDotPath:()=>GW,toJSONSchema:()=>k4,toZod:()=>DU,treeifyError:()=>WW,urlHostnameOk:()=>Dq,urlProtocolOk:()=>Oq,util:()=>EU,validate:()=>pG,validateAsync:()=>mG,version:()=>Sq}),T3=o((()=>{VW(),jG(),eG(),MY(),KY(),yq(),Cq(),J(),KK(),S$(),k$(),xq(),Z1(),s4(),w4(),y3(),x3(),C3()}));function E3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===D3)return new AY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,D3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?UU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:UU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?UU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:UU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:UU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?UU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:UU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:UU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:UU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:UU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return UU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var D3,O3=o((()=>{MY(),J(),D3=Symbol(`z.visit/resolving`)}));jG();function k3(e){return!!e._zod}function A3(e,t){return k3(e)?cG(e,t):e.safeParse(t)}function j3(e){if(!e)return;let t;if(t=k3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function M3(e){if(k3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var N3=c({endsWith:()=>_2,gt:()=>$0,gte:()=>e2,includes:()=>h2,length:()=>d2,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,maxLength:()=>l2,maxSize:()=>o2,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,negative:()=>n2,nonnegative:()=>i2,nonpositive:()=>r2,normalize:()=>S2,overwrite:()=>x2,positive:()=>t2,properties:()=>y2,property:()=>v2,regex:()=>f2,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,toLowerCase:()=>w2,toUpperCase:()=>T2,trim:()=>C2,uppercase:()=>m2}),P3=o((()=>{T3()}));function F3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var I3,L3,R3,z3,B3=o((()=>{T3(),J(),I3=new WeakSet([Object.prototype,Error.prototype]),L3=(e,t)=>{QW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);I3.has(n)||(I3.add(n),F3(n,`format`,e=>t=>UW(e,t)),F3(n,`flatten`,e=>t=>HW(e,t)),F3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,kU,2)}),F3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,kU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},R3=Y(`ZodError`,L3),z3=Y(`ZodError`,L3,void 0,{Parent:Error})})),V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3,$3=o((()=>{T3(),B3(),V3=rG(z3),H3=aG(z3),U3=sG(z3),W3=lG(z3),G3=hG(z3),K3=_G(z3),q3=yG(z3),J3=xG(z3),Y3=CG(z3),X3=TG(z3),Z3=DG(z3),Q3=kG(z3)})),e6=c({ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,codec:()=>T8,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,float32:()=>P6,float64:()=>F6,function:()=>j8,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,literal:()=>Q,looseObject:()=>$6,looseRecord:()=>s8,mac:()=>y6,map:()=>c8,meta:()=>s7,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,never:()=>q6,nonoptional:()=>b8,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,partialRecord:()=>o8,pipe:()=>w8,prefault:()=>y8,preprocess:()=>R8,promise:()=>A8,readonly:()=>D8,record:()=>a8,refine:()=>P8,set:()=>l8,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,transform:()=>p8,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,url:()=>l6,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,void:()=>J6,xid:()=>g6,xor:()=>t8});function t6(){BW.localeError||MW(DX())}function n6(){BW.memoizer||MW({memoizer:LY()})}function X(e){return Q1(V8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(J8,e)}function a6(e){return n0(Y8,e)}function o6(e){return r0(Y8,e)}function s6(e){return i0(Y8,e)}function c6(e){return a0(Y8,e)}function l6(e){return o0(X8,e)}function u6(e){return o0(X8,{protocol:gK,hostname:hK,...q(e)})}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return p0(r5,e)}function v6(e){return m0(i5,e)}function y6(e){return g0(a5,e)}function b6(e){return h0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e){return S0(f5,e)}function D6(e){return C0(p5,e)}function O6(e,t,n={}){return a4(m5,e,t,n)}function k6(e){return a4(m5,`hostname`,mK,e)}function A6(e){return a4(m5,`hex`,AK,e)}function j6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=MG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return a4(m5,n,r,t)}function M6(e){return O0(h5,e)}function N6(e){return A0(g5,e)}function P6(e){return j0(g5,e)}function F6(e){return M0(g5,e)}function I6(e){return N0(g5,e)}function L6(e){return P0(g5,e)}function R6(e){return F0(_5,e)}function z6(e){return L0(v5,e)}function B6(e){return z0(y5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(e){return H0(x5,e)}function W6(e){return U0(S5,e)}function G6(){return W0(C5)}function K6(){return G0(w5)}function q6(e){return K0(T5,e)}function J6(e){return q0(E5,e)}function Y6(e){return J0(D5,e)}function X6(e,t){return D2(O5,e,t)}function Z6(e){let t=e._zod.def.shape;return u8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new k5(n)}function Q6(e,t){return new k5({type:`object`,shape:e,catchall:q6(),...q(t)})}function $6(e,t){return new k5({type:`object`,shape:e,catchall:K6(),...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,...q(t)})}function t8(e,t){return new j5({type:`union`,options:e,inclusive:!1,...q(t)})}function n8(e,t,n){return new M5({type:`union`,options:t,discriminator:e,...q(n)})}function r8(e,t){return new N5({type:`intersection`,left:e,right:t})}function i8(e,t,n){let r=t instanceof aJ;return new P5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function a8(e,t,n){return!t||!t._zod?new F5({type:`record`,keyType:X(),valueType:e,...q(t)}):new F5({type:`record`,keyType:e,valueType:t,...q(n)})}function o8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function s8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function c8(e,t,n){return new I5({type:`map`,keyType:e,valueType:t,...q(n)})}function l8(e,t){return new L5({type:`set`,valueType:e,...q(t)})}function u8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new R5({type:`enum`,entries:n,...q(t)})}function d8(e,t){return new R5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new z5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function f8(e){return z2(B5,e)}function p8(e){return new V5({type:`transform`,transform:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`optional`,innerType:e})}function g8(e){return new W5({type:`nullable`,innerType:e})}function _8(e){return m8(g8(e))}function v8(e,t){return new G5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function y8(e,t){return new K5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():VU(t)}})}function b8(e,t){return new q5({type:`nonoptional`,innerType:e,...q(t)})}function x8(e){return new J5({type:`success`,innerType:e})}function S8(e,t){return new Y5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:_W(t)})}function C8(e){return X0(X5,e)}function w8(e,t){return new Z5({type:`pipe`,in:e,out:t})}function T8(e,t,n){return new Q5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function E8(e){let t=e._zod.def;return new Q5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function D8(e){return new e7({type:`readonly`,innerType:e})}function O8(e,t){return new t7({type:`template_literal`,parts:e,...q(t)})}function k8(e){return new n7({type:`lazy`,getter:e})}function A8(e){return new r7({type:`promise`,innerType:e})}function j8(e){return new i7({type:`function`,input:Array.isArray(e?.input)?i8(e?.input):e?.input??X6(K6()),output:e?.output??K6()})}function M8(e){let t=new JK({check:`custom`});return t._zod.check=e,t}function N8(e,t){return Q2(a7,e??(()=>!0),t)}function P8(e,t={}){return $2(a7,e,t)}function F8(e,t){return e4(e,t)}function I8(e,t={}){let n=new a7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function L8(e){let t=k8(()=>e8([X(e),M6(),R6(),W6(),X6(t),a8(X(),t)]));return t}function R8(e,t){return new $5({type:`pipe`,in:p8(e),out:t})}var z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7,l7=o((()=>{T3(),y3(),w4(),kX(),P3(),$3(),z8=Y(`ZodType`,(e,t)=>(t6(),aJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(IU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return UU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(P8(e,t))},superRefine(e,t){return this.check(F8(e,t))},overwrite(e){return this.check(x2(e))},optional(){return m8(this)},exactOptional(){return h8(this)},nullable(){return g8(this)},nullish(){return m8(g8(this))},nonoptional(e){return b8(this,e)},array(){return X6(this)},or(e){return e8([this,e])},and(e){return r8(this,e)},transform(e){return w8(this,p8(e))},default(e){return v8(this,e)},prefault(e){return y8(this,e)},catch(e){return S8(this,e)},pipe(e){return w8(this,e)},readonly(){return D8(this)},describe(e){let t=this.clone();return O$.add(t,{description:e}),t},meta(...e){if(e.length===0)return O$.get(this);let t=this.clone();return O$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return mW(this,`~standard`,{...wq(this),jsonSchema:{input:C4(this,`input`),output:C4(this,`output`)}})},set"~standard"(e){pW(this,`~standard`,e)},parse:function e(t,n){return V3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await H3(this,t,n,{callee:e})},safeParse(e,t){return U3(this,e,t)},async safeParseAsync(e,t){return W3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){pW(this,`spa`,e)},encode:function e(t,n){return G3(this,t,n,{callee:e})},decode:function e(t,n){return K3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await q3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await J3(this,t,n,{callee:e})},safeEncode(e,t){return Y3(this,e,t)},safeDecode(e,t){return X3(this,e,t)},async safeEncodeAsync(e,t){return Z3(this,e,t)},async safeDecodeAsync(e,t){return Q3(this,e,t)},toJSONSchema(e){return S4(this,{})(e)},get description(){return O$.get(this)?.description},get _def(){return this._zod.def}}),B8=Y(`_ZodString`,(e,t)=>{sJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(f2(...e))},includes(...e){return this.check(h2(...e))},startsWith(...e){return this.check(g2(...e))},endsWith(...e){return this.check(_2(...e))},min(...e){return this.check(u2(...e))},max(...e){return this.check(l2(...e))},length(...e){return this.check(d2(...e))},nonempty(...e){return this.check(u2(1,...e))},lowercase(e){return this.check(p2(e))},uppercase(e){return this.check(m2(e))},trim(){return this.check(C2())},normalize(...e){return this.check(S2(...e))},toLowerCase(){return this.check(w2())},toUpperCase(){return this.check(T2())},slugify(){return this.check(E2())}}),V8=Y(`ZodString`,(e,t)=>{sJ.init(e,t),B8.init(e,t)},{email(e){return this.check(e0(q8,e))},url(e){return this.check(o0(X8,e))},jwt(e){return this.check(C0(p5,e))},emoji(e){return this.check(s0(Z8,e))},guid(e){return this.check(t0(J8,e))},uuid(e){return this.check(n0(Y8,e))},uuidv4(e){return this.check(r0(Y8,e))},uuidv6(e){return this.check(i0(Y8,e))},uuidv7(e){return this.check(a0(Y8,e))},nanoid(e){return this.check(c0(Q8,e))},cuid(e){return this.check(l0($8,e))},cuid2(e){return this.check(u0(e5,e))},ulid(e){return this.check(d0(t5,e))},base64(e){return this.check(y0(l5,e))},base64url(e){return this.check(b0(u5,e))},xid(e){return this.check(f0(n5,e))},ksuid(e){return this.check(p0(r5,e))},ipv4(e){return this.check(m0(i5,e))},ipv6(e){return this.check(h0(o5,e))},cidrv4(e){return this.check(_0(s5,e))},cidrv6(e){return this.check(v0(c5,e))},e164(e){return this.check(x0(d5,e))},datetime(e){return this.check(w0(U8,e))},date(e){return this.check(T0(W8,e))},time(e){return this.check(E0(G8,e))},duration(e){return this.check(D0(K8,e))}}),H8=Y(`ZodStringFormat`,(e,t)=>{cJ.init(e,t),B8.init(e,t)}),U8=Y(`ZodISODateTime`,(e,t)=>{xJ.init(e,t),H8.init(e,t)}),W8=Y(`ZodISODate`,(e,t)=>{SJ.init(e,t),H8.init(e,t)}),G8=Y(`ZodISOTime`,(e,t)=>{CJ.init(e,t),H8.init(e,t)}),K8=Y(`ZodISODuration`,(e,t)=>{wJ.init(e,t),H8.init(e,t)}),q8=Y(`ZodEmail`,(e,t)=>{dJ.init(e,t),H8.init(e,t)}),J8=Y(`ZodGUID`,(e,t)=>{lJ.init(e,t),H8.init(e,t)}),Y8=Y(`ZodUUID`,(e,t)=>{uJ.init(e,t),H8.init(e,t)}),X8=Y(`ZodURL`,(e,t)=>{pJ.init(e,t),H8.init(e,t)}),Z8=Y(`ZodEmoji`,(e,t)=>{mJ.init(e,t),H8.init(e,t)}),Q8=Y(`ZodNanoID`,(e,t)=>{hJ.init(e,t),H8.init(e,t)}),$8=Y(`ZodCUID`,(e,t)=>{gJ.init(e,t),H8.init(e,t)}),e5=Y(`ZodCUID2`,(e,t)=>{_J.init(e,t),H8.init(e,t)}),t5=Y(`ZodULID`,(e,t)=>{vJ.init(e,t),H8.init(e,t)}),n5=Y(`ZodXID`,(e,t)=>{yJ.init(e,t),H8.init(e,t)}),r5=Y(`ZodKSUID`,(e,t)=>{bJ.init(e,t),H8.init(e,t)}),i5=Y(`ZodIPv4`,(e,t)=>{TJ.init(e,t),H8.init(e,t)}),a5=Y(`ZodMAC`,(e,t)=>{OJ.init(e,t),H8.init(e,t)}),o5=Y(`ZodIPv6`,(e,t)=>{DJ.init(e,t),H8.init(e,t)}),s5=Y(`ZodCIDRv4`,(e,t)=>{kJ.init(e,t),H8.init(e,t)}),c5=Y(`ZodCIDRv6`,(e,t)=>{AJ.init(e,t),H8.init(e,t)}),l5=Y(`ZodBase64`,(e,t)=>{jJ.init(e,t),H8.init(e,t)}),u5=Y(`ZodBase64URL`,(e,t)=>{MJ.init(e,t),H8.init(e,t)}),d5=Y(`ZodE164`,(e,t)=>{NJ.init(e,t),H8.init(e,t)}),f5=Y(`ZodCreditCard`,(e,t)=>{FJ.init(e,t),H8.init(e,t)}),p5=Y(`ZodJWT`,(e,t)=>{IJ.init(e,t),H8.init(e,t)}),m5=Y(`ZodCustomStringFormat`,(e,t)=>{LJ.init(e,t),H8.init(e,t)}),h5=Y(`ZodNumber`,(e,t)=>{RJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check($0(e,t))},gte(e,t){return this.check(e2(e,t))},min(e,t){return this.check(e2(e,t))},lt(e,t){return this.check(Z0(e,t))},lte(e,t){return this.check(Q0(e,t))},max(e,t){return this.check(Q0(e,t))},int(e){return this.check(N6(e))},safe(e){return this.check(N6(e))},positive(e){return this.check($0(0,e))},nonnegative(e){return this.check(e2(0,e))},negative(e){return this.check(Z0(0,e))},nonpositive(e){return this.check(Q0(0,e))},multipleOf(e,t){return this.check(a2(e,t))},step(e,t){return this.check(a2(e,t))},finite(){return this}}),g5=Y(`ZodNumberFormat`,(e,t)=>{zJ.init(e,t),h5.init(e,t)}),_5=Y(`ZodBoolean`,(e,t)=>{BJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r)}),v5=Y(`ZodBigInt`,(e,t)=>{VJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(e2(e,t))},min(e,t){return this.check(e2(e,t))},gt(e,t){return this.check($0(e,t))},lt(e,t){return this.check(Z0(e,t))},lte(e,t){return this.check(Q0(e,t))},max(e,t){return this.check(Q0(e,t))},positive(e){return this.check($0(BigInt(0),e))},negative(e){return this.check(Z0(BigInt(0),e))},nonpositive(e){return this.check(Q0(BigInt(0),e))},nonnegative(e){return this.check(e2(BigInt(0),e))},multipleOf(e,t){return this.check(a2(e,t))}}),y5=Y(`ZodBigIntFormat`,(e,t)=>{HJ.init(e,t),v5.init(e,t)}),b5=Y(`ZodSymbol`,(e,t)=>{UJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),x5=Y(`ZodUndefined`,(e,t)=>{WJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),S5=Y(`ZodNull`,(e,t)=>{GJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),C5=Y(`ZodAny`,(e,t)=>{KJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r)}),w5=Y(`ZodUnknown`,(e,t)=>{qJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r)}),T5=Y(`ZodNever`,(e,t)=>{JJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),E5=Y(`ZodVoid`,(e,t)=>{YJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),D5=Y(`ZodDate`,(e,t)=>{XJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.min=(t,n)=>e.check(e2(t,n)),e.max=(t,n)=>e.check(Q0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),O5=Y(`ZodArray`,(e,t)=>{n6(),ZJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(u2(e,t))},nonempty(e){return this.check(u2(1,e))},max(e,t){return this.check(l2(e,t))},length(e,t){return this.check(d2(e,t))},unwrap(){return this.element}}),k5=Y(`ZodObject`,(e,t)=>{n6(),tY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),gW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return u8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:K6()})},loose(){return this.clone({...this._zod.def,catchall:K6()})},strict(){return this.clone({...this._zod.def,catchall:q6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return JU(this,e)},safeExtend(e){return YU(this,e)},merge(e){return XU(this,e)},pick(e){return KU(this,e)},omit(e){return qU(this,e)},partial(...e){return ZU(H5,this,e[0])},exactPartial(...e){return ZU(U5,this,e[0],`exactPartial`)},required(...e){return QU(q5,this,e[0])}}),A5=Y(`ZodUnion`,(e,t)=>{nY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.options=t.options}),j5=Y(`ZodXor`,(e,t)=>{A5.init(e,t),rY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.options=t.options}),M5=Y(`ZodDiscriminatedUnion`,(e,t)=>{A5.init(e,t),iY.init(e,t)}),N5=Y(`ZodIntersection`,(e,t)=>{aY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)}),P5=Y(`ZodTuple`,(e,t)=>{n6(),oY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new H5({type:`optional`,innerType:e}))})}}),F5=Y(`ZodRecord`,(e,t)=>{n6(),sY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),I5=Y(`ZodMap`,(e,t)=>{n6(),cY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(s2(...t)),e.nonempty=t=>e.check(s2(1,t)),e.max=(...t)=>e.check(o2(...t)),e.size=(...t)=>e.check(c2(...t))}),L5=Y(`ZodSet`,(e,t)=>{n6(),lY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),e.min=(...t)=>e.check(s2(...t)),e.nonempty=t=>e.check(s2(1,t)),e.max=(...t)=>e.check(o2(...t)),e.size=(...t)=>e.check(c2(...t))}),R5=Y(`ZodEnum`,(e,t)=>{uY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})}}),z5=Y(`ZodLiteral`,(e,t)=>{dY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),B5=Y(`ZodFile`,(e,t)=>{fY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r),e.min=(t,n)=>e.check(s2(t,n)),e.max=(t,n)=>e.check(o2(t,n)),e.mime=(t,n)=>e.check(b2(Array.isArray(t)?t:[t],n))}),V5=Y(`ZodTransform`,(e,t)=>{n6(),pY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new zW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(lW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(lW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),H5=Y(`ZodOptional`,(e,t)=>{mY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodExactOptional`,(e,t)=>{hY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodNullable`,(e,t)=>{gY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),G5=Y(`ZodDefault`,(e,t)=>{_Y.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),K5=Y(`ZodPrefault`,(e,t)=>{vY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodNonOptional`,(e,t)=>{yY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodSuccess`,(e,t)=>{bY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Y5=Y(`ZodCatch`,(e,t)=>{xY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),X5=Y(`ZodNaN`,(e,t)=>{SY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),Z5=Y(`ZodPipe`,(e,t)=>{CY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.in=t.in,e.out=t.out}),Q5=Y(`ZodCodec`,(e,t)=>{Z5.init(e,t),wY.init(e,t)}),$5=Y(`ZodPreprocess`,(e,t)=>{Z5.init(e,t),TY.init(e,t)}),e7=Y(`ZodReadonly`,(e,t)=>{EY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),t7=Y(`ZodTemplateLiteral`,(e,t)=>{DY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r)}),n7=Y(`ZodLazy`,(e,t)=>{AY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),r7=Y(`ZodPromise`,(e,t)=>{kY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),i7=Y(`ZodFunction`,(e,t)=>{OY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r)}),a7=Y(`ZodCustom`,(e,t)=>{jY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)}),o7=n4,s7=r4,c7=(...e)=>i4({Codec:Q5,Boolean:_5,String:V8},...e)}));function u7(e){MW({customError:e})}function d7(){return MW().customError}var f7,p7,Aie=o((()=>{T3(),f7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},p7||={}})),m7=c({ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,date:()=>jie,datetime:()=>h7,duration:()=>Nie,time:()=>Mie});function h7(e){return w0(U8,e)}function jie(e){return T0(W8,e)}function Mie(e){return E0(G8,e)}function Nie(e){return D0(K8,e)}var g7=o((()=>{T3(),l7()}));function Pie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function _7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function v7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():b7(e,t)}function y7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=b7(Iie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>y7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(C7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?b7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=b7(r,t);FU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=b7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!BU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=Lie(r,b7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=_7(n.map(e=>b7(e,t)),a),s=Array.isArray(i)?void 0:v7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=_7(i.map(e=>b7(e,t)),n),o=v7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=b7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=y7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>b7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>b7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:b7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function x7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Pie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??O$};return b7(n,r)}var $,S7,C7,Rie=o((()=>{k$(),J(),P3(),g7(),l7(),$={...e6,...N3,iso:m7},S7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),C7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function w7(e){return E3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:e8(t.options)}})}var zie=o((()=>{O3(),l7()}));function Bie(e,t){if(!t?.length)return e;let n=e._zod.def;return UU(e,IU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function T7(e){return Bie(e.out,e.checks)}function Vie(e){return e.in._zod.traits.has(`$ZodTransform`)?T7(e):e.in}function E7(e){return E3(e,{pipe:e=>Vie(e._zod.def),default:(e,t)=>t?m8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function D7(e){return E3(e,{pipe:e=>T7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Hie=o((()=>{J(),O3(),l7()})),O7=c({bigint:()=>Kie,boolean:()=>Gie,date:()=>qie,number:()=>Wie,string:()=>Uie});function Uie(e){return $1(V8,e)}function Wie(e){return k0(h5,e)}function Gie(e){return I0(_5,e)}function Kie(e){return R0(v5,e)}function qie(e){return Y0(D5,e)}var Jie=o((()=>{T3(),l7()})),k7=c({$brand:()=>LW,$input:()=>E$,$output:()=>T$,NEVER:()=>PW,TimePrecision:()=>o4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>R3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>z3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>UU,codec:()=>T8,coerce:()=>O7,compile:()=>j$,config:()=>MW,core:()=>w3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>K3,decodeAsync:()=>J3,deepPartial:()=>w7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>G3,encodeAsync:()=>q3,endsWith:()=>_2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>HW,float32:()=>P6,float64:()=>F6,formatError:()=>UW,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Hq,getErrorMap:()=>d7,globalRegistry:()=>O$,gt:()=>$0,gte:()=>e2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>h2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>d2,literal:()=>Q,locales:()=>x$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,mac:()=>y6,map:()=>c8,maxLength:()=>l2,maxSize:()=>o2,memoizer:()=>LY,meta:()=>s7,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>n2,never:()=>q6,nonnegative:()=>i2,nonoptional:()=>b8,nonpositive:()=>r2,normalize:()=>S2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>x2,parse:()=>V3,parseAsync:()=>H3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>t2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>KW,promise:()=>A8,properties:()=>y2,property:()=>v2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>f2,regexes:()=>MG,registry:()=>C$,safeDecode:()=>X3,safeDecodeAsync:()=>Q3,safeEncode:()=>Y3,safeEncodeAsync:()=>Z3,safeParse:()=>U3,safeParseAsync:()=>W3,set:()=>l8,setErrorMap:()=>u7,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>k4,toLowerCase:()=>w2,toUpperCase:()=>T2,toZod:()=>DU,transform:()=>p8,treeifyError:()=>WW,trim:()=>C2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>m2,url:()=>l6,util:()=>EU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>pG,validateAsync:()=>mG,void:()=>J6,xid:()=>g6,xor:()=>t8}),A7=o((()=>{T3(),l7(),P3(),B3(),$3(),Aie(),y3(),Rie(),zie(),Hie(),S$(),g7(),Jie()})),Yie=o((()=>{A7(),A7()})),Xie=c({$brand:()=>LW,$input:()=>E$,$output:()=>T$,NEVER:()=>PW,TimePrecision:()=>o4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>q1,ZodCompileUnsupportedError:()=>J1,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>R3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>z3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>UU,codec:()=>T8,coerce:()=>O7,compile:()=>j$,config:()=>MW,core:()=>w3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>K3,decodeAsync:()=>J3,deepPartial:()=>w7,default:()=>k7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>G3,encodeAsync:()=>q3,endsWith:()=>_2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>HW,float32:()=>P6,float64:()=>F6,formatError:()=>UW,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Hq,getErrorMap:()=>d7,globalRegistry:()=>O$,gt:()=>$0,gte:()=>e2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>h2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>d2,literal:()=>Q,locales:()=>x$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>p2,lt:()=>Z0,lte:()=>Q0,mac:()=>y6,map:()=>c8,maxLength:()=>l2,maxSize:()=>o2,memoizer:()=>LY,meta:()=>s7,mime:()=>b2,minLength:()=>u2,minSize:()=>s2,multipleOf:()=>a2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>n2,never:()=>q6,nonnegative:()=>i2,nonoptional:()=>b8,nonpositive:()=>r2,normalize:()=>S2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>x2,parse:()=>V3,parseAsync:()=>H3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>t2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>KW,promise:()=>A8,properties:()=>y2,property:()=>v2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>f2,regexes:()=>MG,registry:()=>C$,safeDecode:()=>X3,safeDecodeAsync:()=>Q3,safeEncode:()=>Y3,safeEncodeAsync:()=>Z3,safeParse:()=>U3,safeParseAsync:()=>W3,set:()=>l8,setErrorMap:()=>u7,size:()=>c2,slugify:()=>E2,startsWith:()=>g2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>k4,toLowerCase:()=>w2,toUpperCase:()=>T2,toZod:()=>DU,transform:()=>p8,treeifyError:()=>WW,trim:()=>C2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>m2,url:()=>l6,util:()=>EU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>pG,validateAsync:()=>mG,void:()=>J6,xid:()=>g6,xor:()=>t8,z:()=>k7}),j7=o((()=>{A7(),Yie()}));j7();var M7=`io.modelcontextprotocol/related-task`,N7=N8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),P7=e8([X(),M6().int()]),F7=X();$6({ttl:M6().optional(),pollInterval:M6().optional()});var Zie=Z({ttl:M6().optional()}),Qie=Z({taskId:X()}),I7=$6({progressToken:P7.optional(),[M7]:Qie.optional()}),L7=Z({_meta:I7.optional()}),R7=L7.extend({task:Zie.optional()}),$ie=e=>R7.safeParse(e).success,z7=Z({method:X(),params:L7.loose().optional()}),B7=Z({_meta:I7.optional()}),V7=Z({method:X(),params:B7.loose().optional()}),H7=$6({_meta:I7.optional()}),U7=e8([X(),M6().int()]),W7=Z({jsonrpc:Q(`2.0`),id:U7,...z7.shape}).strict(),G7=e=>W7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),...V7.shape}).strict(),eae=e=>K7.safeParse(e).success,q7=Z({jsonrpc:Q(`2.0`),id:U7,result:H7}).strict(),J7=e=>q7.safeParse(e).success,Y7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y7||={});var X7=Z({jsonrpc:Q(`2.0`),id:U7.optional(),error:Z({code:M6().int(),message:X(),data:K6().optional()})}).strict(),tae=e=>X7.safeParse(e).success,nae=e8([W7,K7,q7,X7]);e8([q7,X7]);var Z7=H7.strict(),rae=B7.extend({requestId:U7.optional(),reason:X().optional()}),Q7=V7.extend({method:Q(`notifications/cancelled`),params:rae}),$7=Z({icons:X6(Z({src:X(),mimeType:X().optional(),sizes:X6(X()).optional(),theme:u8([`light`,`dark`]).optional()})).optional()}),e9=Z({name:X(),title:X().optional()}),t9=e9.extend({...e9.shape,...$7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),iae=R8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,r8(Z({form:r8(Z({applyDefaults:R6().optional()}),a8(X(),K6())).optional(),url:N7.optional()}),a8(X(),K6()).optional())),aae=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({sampling:$6({createMessage:N7.optional()}).optional(),elicitation:$6({create:N7.optional()}).optional()}).optional()}),oae=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({tools:$6({call:N7.optional()}).optional()}).optional()}),sae=Z({experimental:a8(X(),N7).optional(),sampling:Z({context:N7.optional(),tools:N7.optional()}).optional(),elicitation:iae.optional(),roots:Z({listChanged:R6().optional()}).optional(),tasks:aae.optional(),extensions:a8(X(),N7).optional()}),cae=L7.extend({protocolVersion:X(),capabilities:sae,clientInfo:t9}),lae=z7.extend({method:Q(`initialize`),params:cae}),uae=Z({experimental:a8(X(),N7).optional(),logging:N7.optional(),completions:N7.optional(),prompts:Z({listChanged:R6().optional()}).optional(),resources:Z({subscribe:R6().optional(),listChanged:R6().optional()}).optional(),tools:Z({listChanged:R6().optional()}).optional(),tasks:oae.optional(),extensions:a8(X(),N7).optional()}),dae=H7.extend({protocolVersion:X(),capabilities:uae,serverInfo:t9,instructions:X().optional()}),fae=V7.extend({method:Q(`notifications/initialized`),params:B7.optional()}),n9=z7.extend({method:Q(`ping`),params:L7.optional()}),pae=Z({progress:M6(),total:m8(M6()),message:m8(X())}),mae=Z({...B7.shape,...pae.shape,progressToken:P7}),r9=V7.extend({method:Q(`notifications/progress`),params:mae}),hae=L7.extend({cursor:F7.optional()}),i9=z7.extend({params:hae.optional()}),a9=H7.extend({nextCursor:F7.optional()}),gae=u8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),o9=Z({taskId:X(),status:gae,ttl:e8([M6(),W6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:m8(M6()),statusMessage:m8(X())}),s9=H7.extend({task:o9}),_ae=B7.merge(o9),c9=V7.extend({method:Q(`notifications/tasks/status`),params:_ae}),l9=z7.extend({method:Q(`tasks/get`),params:L7.extend({taskId:X()})}),u9=H7.merge(o9),d9=z7.extend({method:Q(`tasks/result`),params:L7.extend({taskId:X()})});H7.loose();var f9=i9.extend({method:Q(`tasks/list`)}),p9=a9.extend({tasks:X6(o9)}),m9=z7.extend({method:Q(`tasks/cancel`),params:L7.extend({taskId:X()})}),vae=H7.merge(o9),h9=Z({uri:X(),mimeType:m8(X()),_meta:a8(X(),K6()).optional()}),g9=h9.extend({text:X()}),_9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),v9=h9.extend({blob:_9}),y9=u8([`user`,`assistant`]),b9=Z({audience:X6(y9).optional(),priority:M6().min(0).max(1).optional(),lastModified:h7({offset:!0}).optional()}),x9=Z({...e9.shape,...$7.shape,uri:X(),description:m8(X()),mimeType:m8(X()),size:m8(M6()),annotations:b9.optional(),_meta:m8($6({}))}),yae=Z({...e9.shape,...$7.shape,uriTemplate:X(),description:m8(X()),mimeType:m8(X()),annotations:b9.optional(),_meta:m8($6({}))}),bae=i9.extend({method:Q(`resources/list`)}),S9=a9.extend({resources:X6(x9)}),xae=i9.extend({method:Q(`resources/templates/list`)}),Sae=a9.extend({resourceTemplates:X6(yae)}),C9=L7.extend({uri:X()}),Cae=C9,wae=z7.extend({method:Q(`resources/read`),params:Cae}),w9=H7.extend({contents:X6(e8([g9,v9]))}),T9=V7.extend({method:Q(`notifications/resources/list_changed`),params:B7.optional()}),Tae=C9,Eae=z7.extend({method:Q(`resources/subscribe`),params:Tae}),Dae=C9,Oae=z7.extend({method:Q(`resources/unsubscribe`),params:Dae}),kae=B7.extend({uri:X()}),Aae=V7.extend({method:Q(`notifications/resources/updated`),params:kae}),jae=Z({name:X(),description:m8(X()),required:m8(R6())}),Mae=Z({...e9.shape,...$7.shape,description:m8(X()),arguments:m8(X6(jae)),_meta:m8($6({}))}),Nae=i9.extend({method:Q(`prompts/list`)}),Pae=a9.extend({prompts:X6(Mae)}),Fae=L7.extend({name:X(),arguments:a8(X(),X()).optional()}),Iae=z7.extend({method:Q(`prompts/get`),params:Fae}),E9=Z({type:Q(`text`),text:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),D9=Z({type:Q(`image`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),O9=Z({type:Q(`audio`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),Lae=Z({type:Q(`tool_use`),name:X(),id:X(),input:a8(X(),K6()),_meta:a8(X(),K6()).optional()}),k9=Z({type:Q(`resource`),resource:e8([g9,v9]),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),A9=x9.extend({type:Q(`resource_link`)}),j9=e8([E9,D9,O9,A9,k9]),Rae=Z({role:y9,content:j9}),zae=H7.extend({description:X().optional(),messages:X6(Rae)}),Bae=V7.extend({method:Q(`notifications/prompts/list_changed`),params:B7.optional()}),Vae=Z({title:X().optional(),readOnlyHint:R6().optional(),destructiveHint:R6().optional(),idempotentHint:R6().optional(),openWorldHint:R6().optional()}),Hae=Z({taskSupport:u8([`required`,`optional`,`forbidden`]).optional()}),M9=Z({...e9.shape,...$7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()),outputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()).optional(),annotations:Vae.optional(),execution:Hae.optional(),_meta:a8(X(),K6()).optional()}),N9=i9.extend({method:Q(`tools/list`)}),Uae=a9.extend({tools:X6(M9)}),P9=H7.extend({content:X6(j9).default([]),structuredContent:a8(X(),K6()).optional(),isError:R6().optional()});P9.or(H7.extend({toolResult:K6()}));var Wae=R7.extend({name:X(),arguments:a8(X(),K6()).optional()}),F9=z7.extend({method:Q(`tools/call`),params:Wae}),Gae=V7.extend({method:Q(`notifications/tools/list_changed`),params:B7.optional()});Z({autoRefresh:R6().default(!0),debounceMs:M6().int().nonnegative().default(300)});var I9=u8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Kae=L7.extend({level:I9}),qae=z7.extend({method:Q(`logging/setLevel`),params:Kae}),Jae=B7.extend({level:I9,logger:X().optional(),data:K6()}),Yae=V7.extend({method:Q(`notifications/message`),params:Jae}),Xae=Z({hints:X6(Z({name:X().optional()})).optional(),costPriority:M6().min(0).max(1).optional(),speedPriority:M6().min(0).max(1).optional(),intelligencePriority:M6().min(0).max(1).optional()}),Zae=Z({mode:u8([`auto`,`required`,`none`]).optional()}),Qae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:X6(j9).default([]),structuredContent:Z({}).loose().optional(),isError:R6().optional(),_meta:a8(X(),K6()).optional()}),$ae=n8(`type`,[E9,D9,O9]),L9=n8(`type`,[E9,D9,O9,Lae,Qae]),eoe=Z({role:y9,content:e8([L9,X6(L9)]),_meta:a8(X(),K6()).optional()}),toe=R7.extend({messages:X6(eoe),modelPreferences:Xae.optional(),systemPrompt:X().optional(),includeContext:u8([`none`,`thisServer`,`allServers`]).optional(),temperature:M6().optional(),maxTokens:M6().int(),stopSequences:X6(X()).optional(),metadata:N7.optional(),tools:X6(M9).optional(),toolChoice:Zae.optional()}),noe=z7.extend({method:Q(`sampling/createMessage`),params:toe}),R9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:y9,content:$ae}),z9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:y9,content:e8([L9,X6(L9)])}),roe=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:R6().optional()}),ioe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:M6().optional(),maxLength:M6().optional(),format:u8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),aoe=Z({type:u8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:M6().optional(),maximum:M6().optional(),default:M6().optional()}),ooe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),default:X().optional()}),soe=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:X6(Z({const:X(),title:X()})),default:X().optional()}),coe=e8([e8([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),enumNames:X6(X()).optional(),default:X().optional()}),e8([ooe,soe]),e8([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({type:Q(`string`),enum:X6(X())}),default:X6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({anyOf:X6(Z({const:X(),title:X()}))}),default:X6(X()).optional()})])]),roe,ioe,aoe]),loe=e8([R7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:a8(X(),coe),required:X6(X()).optional()})}),R7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),uoe=z7.extend({method:Q(`elicitation/create`),params:loe}),doe=B7.extend({elicitationId:X()}),foe=V7.extend({method:Q(`notifications/elicitation/complete`),params:doe}),poe=H7.extend({action:u8([`accept`,`decline`,`cancel`]),content:R8(e=>e===null?void 0:e,a8(X(),e8([X(),M6(),R6(),X6(X())])).optional())}),moe=Z({type:Q(`ref/resource`),uri:X()}),hoe=Z({type:Q(`ref/prompt`),name:X()}),goe=L7.extend({ref:e8([hoe,moe]),argument:Z({name:X(),value:X()}),context:Z({arguments:a8(X(),X()).optional()}).optional()}),_oe=z7.extend({method:Q(`completion/complete`),params:goe}),voe=H7.extend({completion:$6({values:X6(X()).max(100),total:m8(M6().int()),hasMore:m8(R6())})}),yoe=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:a8(X(),K6()).optional()}),boe=z7.extend({method:Q(`roots/list`),params:L7.optional()}),xoe=H7.extend({roots:X6(yoe)}),Soe=V7.extend({method:Q(`notifications/roots/list_changed`),params:B7.optional()});e8([n9,lae,_oe,qae,Iae,Nae,bae,xae,wae,Eae,Oae,F9,N9,l9,d9,f9,m9]),e8([Q7,r9,fae,Soe,c9]),e8([Z7,R9,z9,poe,xoe,u9,p9,s9]),e8([n9,noe,uoe,boe,l9,d9,f9,m9]),e8([Q7,r9,Yae,Aae,T9,Gae,Bae,c9,foe]),e8([Z7,dae,voe,zae,Pae,S9,Sae,w9,P9,Uae,u9,p9,s9]);var B9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Coe(e.elicitations,n)}return new e(t,n,r)}},Coe=class extends B9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function V9(e){return e===`completed`||e===`failed`||e===`cancelled`}function H9(e){let t=j3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=M3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function U9(e,t){let n=A3(e,t);if(!n.success)throw n.error;return n.data}var woe=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Q7,e=>{this._oncancel(e)}),this.setNotificationHandler(r9,e=>{this._onprogress(e)}),this.setRequestHandler(n9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(l9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new B9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(d9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new B9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new B9(Y7.InvalidParams,`Task not found: ${r}`);if(!V9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(V9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[M7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(f9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new B9(Y7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(m9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new B9(Y7.InvalidParams,`Task not found: ${e.params.taskId}`);if(V9(n.status))throw new B9(Y7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new B9(Y7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof B9?e:new B9(Y7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),B9.fromError(Y7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),J7(e)||tae(e)?this._onresponse(e):G7(e)?this._onrequest(e,t):eae(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=B9.fromError(Y7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[M7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Y7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=$ie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new B9(Y7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Y7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),J7(e)?n(e):n(new B9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(J7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),J7(e)?r(e):r(B9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof B9?e:new B9(Y7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,s9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new B9(Y7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},V9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new B9(Y7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new B9(Y7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof B9?e:new B9(Y7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[M7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof B9?e:new B9(Y7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=A3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(B9.fromError(Y7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},u9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},p9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},vae,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[M7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[M7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[M7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=H9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=U9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=H9(e);this._notificationHandlers.set(n,n=>{let r=U9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&G7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new B9(Y7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new B9(Y7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new B9(Y7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new B9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=c9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),V9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new B9(Y7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(V9(a.status))throw new B9(Y7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=c9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),V9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function W9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Toe(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=W9(a)&&W9(i)?{...a,...i}:i}return n}var Eoe=`modulepreload`,Doe=function(e,t){return new URL(e,t).href},G9={},Ooe=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Doe(t,n),t=s(t),t in G9)return;G9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Eoe,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};j7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var koe=class extends woe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Aoe=`2026-01-26`,K9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=nae.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},joe=e8([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),q9=e8([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),Moe=a8(e8([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -94,7 +94,7 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var Aoe=Z({isError:R6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),joe=Z({isError:R6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Moe=Z({isError:R6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var J9=Z({connectDomains:X6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var Noe=Z({isError:R6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Poe=Z({isError:R6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Foe=Z({isError:R6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var J9=Z({connectDomains:X6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive - Empty or omitted → no network connections (secure default)`),resourceDomains:X6(X()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:X6(X()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:X6(X()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),Y9=Z({camera:Z({}).optional().describe(`Request camera access. @@ -105,7 +105,7 @@ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Z({}).optional().describe(`Request clipboard write access. -Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:M6().optional().describe(`New width in pixels.`),height:M6().optional().describe(`New height in pixels.`)})});var Noe=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:a8(X(),K6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Poe=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:a8(X(),K6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Foe=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Ioe=Z({fonts:X().optional()}),Loe=Z({variables:koe.optional().describe(`CSS variables for theming the app.`),css:Ioe.optional().describe(`CSS blocks that apps can inject.`)}),Roe=Z({method:Q(`ui/resource-teardown`),params:Z({})});a8(X(),K6());var X9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var zoe=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:R6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:R6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:Y9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:J9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:X9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:X9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Boe=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:R6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:X6(q9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:J9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Y9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. +Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:M6().optional().describe(`New width in pixels.`),height:M6().optional().describe(`New height in pixels.`)})});var Ioe=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:a8(X(),K6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Loe=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:a8(X(),K6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Roe=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),zoe=Z({fonts:X().optional()}),Boe=Z({variables:Moe.optional().describe(`CSS variables for theming the app.`),css:zoe.optional().describe(`CSS blocks that apps can inject.`)}),Voe=Z({method:Q(`ui/resource-teardown`),params:Z({})});a8(X(),K6());var X9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var Hoe=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:R6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:R6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:Y9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:J9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:X9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:X9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Uoe=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:R6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:X6(q9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:J9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:Y9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. @@ -119,10 +119,10 @@ - \`true\`: request visible border + background - \`false\`: request no visible border + background -- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:q9.describe(`The display mode being requested.`)})});var Voe=Z({mode:q9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Hoe=e8([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:X6(Hoe).optional().describe(`Who can access this tool. Default: ["model", "app"] +- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:q9.describe(`The display mode being requested.`)})});var Woe=Z({mode:q9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Goe=e8([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:X6(Goe).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:q6().optional(),permissions:q6().optional()}),Z({mimeTypes:X6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:X6(e8([k9,A9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:X6(j9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:J9.optional().describe(`CSP configuration from resource metadata.`),permissions:Y9.optional().describe(`Sandbox permissions from resource metadata.`)})});var Uoe=Z({method:Q(`ui/notifications/tool-result`),params:P9.describe(`Standard MCP tool execution result.`)}),Z9=Z({toolInfo:Z({id:U7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:M9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Ooe.optional().describe(`Current color theme preference.`),styles:Loe.optional().describe(`Style configuration for theming the app.`),displayMode:q9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:X6(q9).optional().describe(`Display modes the host supports.`),containerDimensions:e8([Z({height:M6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:e8([M6(),U6()]).optional().describe(`Maximum container height in pixels.`)})]).and(e8([Z({width:M6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:e8([M6(),U6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:e8([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:R6().optional().describe(`Whether the device supports touch input.`),hover:R6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:M6().describe(`Top safe area inset in pixels.`),right:M6().describe(`Right safe area inset in pixels.`),bottom:M6().describe(`Bottom safe area inset in pixels.`),left:M6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),Woe=Z({method:Q(`ui/notifications/host-context-changed`),params:Z9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:X6(j9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:a8(X(),K6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:t9.describe(`App identification (name and version).`),appCapabilities:Boe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var Goe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:t9.describe(`Host application identification and version.`),hostCapabilities:zoe.describe(`Features and capabilities provided by the host.`),hostContext:Z9.describe(`Rich context about the host environment.`)}).passthrough(),Koe={target:`draft-2020-12`};async function Q9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](Koe);if(n.vendor===`zod`){let{z:n}=await Toe(async()=>{let{z:e}=await Promise.resolve().then(()=>(j7(),qie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function $9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var qoe=class e extends Eoe{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Noe,toolinputpartial:Poe,toolresult:Uoe,toolcancelled:Foe,hostcontextchanged:Woe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||MW({jitless:!0}),this.setRequestHandler(n9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Soe(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await $9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await $9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Q9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Q9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Roe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(F9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(N9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},P9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},w9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},S9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?z9:R9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Moe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Z7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Aoe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},joe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},Voe,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new K9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Doe}},Goe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function Joe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new K9(window.parent,window.parent);if(s=new qoe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function Yoe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=Joe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function Xoe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}XD([wte]);function Zoe(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=Yoe(`Fanout log explorer`),[o,s]=(0,W.useState)(`ALL`),[c,l]=(0,W.useState)(``),u=r?.theme===`dark`,d=(0,W.useMemo)(()=>(i?.data.entries??[]).filter(e=>(o===`ALL`||e.severity.toUpperCase()===o)&&(!c||e.body.toLowerCase().includes(c.toLowerCase())||e.service.toLowerCase().includes(c.toLowerCase()))),[i,c,o]);return(0,G.jsxs)(FR,{dark:u,children:[(0,G.jsx)(IR,{title:`Logs`,summary:i?`${i.data.entries.length} entries in this time range`:void 0,onRefresh:()=>t(`search_logs`),disabled:!e}),(0,G.jsx)(LR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Searching logs…`:void 0,retry:()=>void t(`search_logs`)}),i&&i.data.entries.length===0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(RR,{tall:!0,icon:(0,G.jsx)(oR,{size:20,weight:`duotone`}),title:`No logs matched`,children:`Try a wider time window, a different service, or a less restrictive search.`}),(0,G.jsx)(zR,{left:wU(i.provenance.window),right:`No entries found`})]}),i&&i.data.entries.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Qoe,{data:i.data,dark:u,window:i.provenance.window}),(0,G.jsxs)(UF,{px:{base:`md`,sm:`lg`},py:`sm`,justify:`space-between`,align:`center`,children:[(0,G.jsx)(vL,{size:`xs`,value:o,onChange:s,data:[`ALL`,`ERROR`,`WARN`,`INFO`]}),(0,G.jsx)(RL,{"aria-label":`Filter visible logs`,type:`search`,size:`xs`,value:c,onChange:e=>l(e.currentTarget.value),placeholder:`Filter visible logs…`,leftSection:(0,G.jsx)(cR,{size:15}),w:{base:`100%`,xs:250}})]}),(0,G.jsx)($oe,{entries:d,window:i.provenance.window,onTrace:t=>Xoe(e,`Investigate trace ${t.trace_id} related to this ${t.severity} log from ${t.service}.`)}),(0,G.jsx)(zR,{left:wU(i.provenance.window),right:`${d.length} matching`})]})]})}function Qoe({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>{let r=HR(t),i=[...new Set(e.buckets.map(e=>e.time))],a=[...new Set(e.buckets.map(e=>e.severity))],o=new Map(e.buckets.map(e=>[`${e.time}\u0000${e.severity}`,e.count]));return{color:a.map(e=>GR(e,t)),grid:{left:42,right:18,top:30,bottom:28},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:r.surface,borderColor:r.border,textStyle:{color:r.text,fontSize:bR.micro}},legend:{top:0,right:0,textStyle:{color:r.muted,fontSize:bR.micro},itemWidth:7,itemHeight:7,icon:`circle`},xAxis:{type:`category`,data:i.map(e=>TU(e,n)),axisLabel:{color:r.muted,fontSize:bR.micro,hideOverlap:!0},axisLine:{lineStyle:{color:r.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:r.grid}},axisLabel:{color:r.muted,fontSize:bR.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:22,data:i.map(t=>o.get(`${t}\u0000${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[t,e.buckets,n]);return(0,G.jsx)(XP,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},p:`xs`,children:(0,G.jsx)(rie,{option:r,height:190,label:`Log volume by severity over time`})})}function $oe({entries:e,onTrace:t,window:n}){let r=BR(e,6);return e.length===0?(0,G.jsx)(RR,{icon:(0,G.jsx)(cR,{size:20,weight:`duotone`}),title:`No visible matches`,children:`Adjust the local severity or text filter.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(LL.ScrollContainer,{minWidth:680,children:(0,G.jsxs)(LL,{striped:!0,highlightOnHover:!0,verticalSpacing:`xs`,children:[(0,G.jsx)(LL.Thead,{children:(0,G.jsxs)(LL.Tr,{children:[(0,G.jsx)(LL.Th,{children:`Time`}),(0,G.jsx)(LL.Th,{children:`Level`}),(0,G.jsx)(LL.Th,{children:`Service`}),(0,G.jsx)(LL.Th,{children:`Message`}),(0,G.jsx)(LL.Th,{})]})}),(0,G.jsx)(LL.Tbody,{children:r.pageItems.map((e,i)=>(0,G.jsxs)(LL.Tr,{children:[(0,G.jsx)(LL.Td,{style:{whiteSpace:`nowrap`},children:(0,G.jsx)(yI,{size:`xs`,ff:`monospace`,children:TU(e.time,n,!0)})}),(0,G.jsx)(LL.Td,{children:(0,G.jsx)(SI,{size:`sm`,color:WR(e.severity),variant:`light`,children:e.severity||`LOG`})}),(0,G.jsx)(LL.Td,{children:(0,G.jsx)(yI,{size:`sm`,fw:600,children:e.service})}),(0,G.jsx)(LL.Td,{children:(0,G.jsx)(yI,{size:`sm`,lineClamp:2,title:e.body,children:e.body})}),(0,G.jsx)(LL.Td,{children:e.trace_id&&(0,G.jsx)(mL,{label:`Investigate trace`,children:(0,G.jsx)(NF,{variant:`subtle`,"aria-label":`Investigate trace ${e.trace_id}`,onClick:()=>t(e),children:(0,G.jsx)(iR,{size:15,weight:`bold`})})})})]},`${e.time}-${r.from+i}`))})]})}),(0,G.jsx)(VR,{...r,onChange:r.setPage})]})}(0,fR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Zoe,{})})); +- "app": Tool callable by the app from this server only`),csp:q6().optional(),permissions:q6().optional()}),Z({mimeTypes:X6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:X6(e8([k9,A9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:X6(j9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:J9.optional().describe(`CSP configuration from resource metadata.`),permissions:Y9.optional().describe(`Sandbox permissions from resource metadata.`)})});var Koe=Z({method:Q(`ui/notifications/tool-result`),params:P9.describe(`Standard MCP tool execution result.`)}),Z9=Z({toolInfo:Z({id:U7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:M9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:joe.optional().describe(`Current color theme preference.`),styles:Boe.optional().describe(`Style configuration for theming the app.`),displayMode:q9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:X6(q9).optional().describe(`Display modes the host supports.`),containerDimensions:e8([Z({height:M6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:e8([M6(),U6()]).optional().describe(`Maximum container height in pixels.`)})]).and(e8([Z({width:M6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:e8([M6(),U6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:e8([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:R6().optional().describe(`Whether the device supports touch input.`),hover:R6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:M6().describe(`Top safe area inset in pixels.`),right:M6().describe(`Right safe area inset in pixels.`),bottom:M6().describe(`Bottom safe area inset in pixels.`),left:M6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),qoe=Z({method:Q(`ui/notifications/host-context-changed`),params:Z9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:X6(j9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:a8(X(),K6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:t9.describe(`App identification (name and version).`),appCapabilities:Uoe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var Joe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:t9.describe(`Host application identification and version.`),hostCapabilities:Hoe.describe(`Features and capabilities provided by the host.`),hostContext:Z9.describe(`Rich context about the host environment.`)}).passthrough(),Yoe={target:`draft-2020-12`};async function Q9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](Yoe);if(n.vendor===`zod`){let{z:n}=await Ooe(async()=>{let{z:e}=await Promise.resolve().then(()=>(j7(),Xie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function $9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var Xoe=class e extends koe{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Ioe,toolinputpartial:Loe,toolresult:Koe,toolcancelled:Roe,hostcontextchanged:qoe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||MW({jitless:!0}),this.setRequestHandler(n9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Toe(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await $9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await $9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Q9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Q9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Voe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(F9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(N9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},P9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},w9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},S9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?z9:R9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Foe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Z7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Noe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Poe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},Woe,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new K9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Aoe}},Joe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function Zoe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new K9(window.parent,window.parent);if(s=new Xoe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function Qoe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=Zoe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function $oe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}ZD([Tte]);function ese(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=Qoe(`Fanout log explorer`),[o,s]=(0,W.useState)(`ALL`),[c,l]=(0,W.useState)(``),u=r?.theme===`dark`,d=(0,W.useMemo)(()=>(i?.data.entries??[]).filter(e=>(o===`ALL`||e.severity.toUpperCase()===o)&&(!c||e.body.toLowerCase().includes(c.toLowerCase())||e.service.toLowerCase().includes(c.toLowerCase()))),[i,c,o]);return(0,G.jsxs)(NR,{dark:u,children:[(0,G.jsx)(PR,{title:`Logs`,summary:i?`${i.data.entries.length} entries in this time range`:void 0,onRefresh:()=>t(`search_logs`),disabled:!e}),(0,G.jsx)(FR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Searching logs…`:void 0,retry:()=>void t(`search_logs`)}),i&&i.data.entries.length===0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(IR,{tall:!0,icon:(0,G.jsx)(iR,{size:20,weight:`duotone`}),title:`No logs matched`,children:`Try a wider time window, a different service, or a less restrictive search.`}),(0,G.jsx)(LR,{left:CU(i.provenance.window),right:`No entries found`})]}),i&&i.data.entries.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(tse,{data:i.data,dark:u,window:i.provenance.window}),(0,G.jsxs)(HF,{px:{base:`md`,sm:`lg`},py:`sm`,justify:`space-between`,align:`center`,children:[(0,G.jsx)(gL,{size:`xs`,value:o,onChange:s,data:[`ALL`,`ERROR`,`WARN`,`INFO`]}),(0,G.jsx)(IL,{"aria-label":`Filter visible logs`,type:`search`,size:`xs`,value:c,onChange:e=>l(e.currentTarget.value),placeholder:`Filter visible logs…`,leftSection:(0,G.jsx)(oR,{size:15}),w:{base:`100%`,xs:250}})]}),(0,G.jsx)(nse,{entries:d,window:i.provenance.window,onTrace:t=>$oe(e,`Investigate trace ${t.trace_id} related to this ${t.severity} log from ${t.service}.`)}),(0,G.jsx)(LR,{left:CU(i.provenance.window),right:`${d.length} matching`})]})]})}function tse({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>{let r=VR(t),i=[...new Set(e.buckets.map(e=>e.time))],a=[...new Set(e.buckets.map(e=>e.severity))],o=new Map(e.buckets.map(e=>[`${e.time}\u0000${e.severity}`,e.count]));return{color:a.map(e=>WR(e,t)),grid:{left:42,right:18,top:30,bottom:28},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:r.surface,borderColor:r.border,textStyle:{color:r.text,fontSize:vR.micro}},legend:{top:0,right:0,textStyle:{color:r.muted,fontSize:vR.micro},itemWidth:7,itemHeight:7,icon:`circle`},xAxis:{type:`category`,data:i.map(e=>wU(e,n)),axisLabel:{color:r.muted,fontSize:vR.micro,hideOverlap:!0},axisLine:{lineStyle:{color:r.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:r.grid}},axisLabel:{color:r.muted,fontSize:vR.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:22,data:i.map(t=>o.get(`${t}\u0000${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[t,e.buckets,n]);return(0,G.jsx)(YP,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},p:`xs`,children:(0,G.jsx)(aie,{option:r,height:190,label:`Log volume by severity over time`})})}function nse({entries:e,onTrace:t,window:n}){let r=RR(e,6);return e.length===0?(0,G.jsx)(IR,{icon:(0,G.jsx)(oR,{size:20,weight:`duotone`}),title:`No visible matches`,children:`Adjust the local severity or text filter.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(FL.ScrollContainer,{minWidth:680,children:(0,G.jsxs)(FL,{striped:!0,highlightOnHover:!0,verticalSpacing:`xs`,children:[(0,G.jsx)(FL.Thead,{children:(0,G.jsxs)(FL.Tr,{children:[(0,G.jsxs)(FL.Th,{children:[`Time (`,TU(r.pageItems[0]?.time),`)`]}),(0,G.jsx)(FL.Th,{children:`Level`}),(0,G.jsx)(FL.Th,{children:`Service`}),(0,G.jsx)(FL.Th,{children:`Message`}),(0,G.jsx)(FL.Th,{})]})}),(0,G.jsx)(FL.Tbody,{children:r.pageItems.map((e,i)=>(0,G.jsxs)(FL.Tr,{children:[(0,G.jsx)(FL.Td,{style:{whiteSpace:`nowrap`},children:(0,G.jsx)(vI,{size:`xs`,ff:`monospace`,title:oie(e.time),children:wU(e.time,n,!0)})}),(0,G.jsx)(FL.Td,{children:(0,G.jsx)(xI,{size:`sm`,color:UR(e.severity),variant:`light`,children:e.severity||`LOG`})}),(0,G.jsx)(FL.Td,{children:(0,G.jsx)(vI,{size:`sm`,fw:600,children:e.service})}),(0,G.jsx)(FL.Td,{children:(0,G.jsx)(vI,{size:`sm`,lineClamp:2,title:e.body,children:e.body})}),(0,G.jsx)(FL.Td,{children:e.trace_id&&(0,G.jsx)(fL,{label:`Investigate trace`,children:(0,G.jsx)(MF,{variant:`subtle`,"aria-label":`Investigate trace ${e.trace_id}`,onClick:()=>t(e),children:(0,G.jsx)(nR,{size:15,weight:`bold`})})})})]},`${e.time}-${r.from+i}`))})]})}),(0,G.jsx)(BR,{...r,onChange:r.setPage})]})}(0,uR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(ese,{})}));
diff --git a/internal/mcp/apps/overview.html b/internal/mcp/apps/overview.html index 750b1979f..1e7e8542a 100644 --- a/internal/mcp/apps/overview.html +++ b/internal/mcp/apps/overview.html @@ -7,16 +7,16 @@ `);for(i=r=0;ri||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{be=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ye(n):``}function Se(e,t){switch(e.tag){case 26:case 27:case 5:return ye(e.type);case 16:return ye(`Lazy`);case 13:return e.child!==t&&t!==null?ye(`Suspense Fallback`):ye(`Suspense`);case 19:return ye(`SuspenseList`);case 0:case 15:return xe(e.type,!1);case 11:return xe(e.type.render,!1);case 1:return xe(e.type,!0);case 31:return ye(`Activity`);default:return``}}function Ce(e){try{var t=``,n=null;do t+=Se(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var we=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e=F),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Yn&&er(e,t)?(e=vn(),_n=gn=hn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=fn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Bt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Rd(Nr,`onSelect`),0>=o,i-=o,Oi=1<<32-He(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Li&&Ai(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Li&&Ai(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Li&&Ai(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ja(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,La(o),c);if(o.$$typeof===b)return x(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=x(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,L&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Yl&p)===p:(r&p)===p){p!==0&&p===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ua=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Bs(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,ya(c,r),Eu(e)):zs(e,t,r,Eu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,re,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Eu())}function Ns(){return ia(cp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=Ka(n);var r=qa(t,e,n);r!==null&&(Ou(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ii(e,t,n,r),n!==null&&(Ou(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Eu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Ou(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:wd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Ou(t,e,2)}function Vs(e){var t=e.alternate;return e===I||t!==null&&t===I}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ws={readContext:ia,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ia,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,I,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=Fo();if(Li){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));Yl&127||Ko(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=ql.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Vi(t,!0)}else e=Qd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return me(),e===null&&Pd(t.stateNode.containerInfo),Wc(t),null;case 10:return Qi(t.type),Wc(t),null;case 19:if(se(mo),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return ce(mo,mo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Wc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=mo.current,ce(mo,a?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(mo),null;case 4:return me(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&se(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function qc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),me();break;case 26:case 27:case 5:ge(t);break;case 4:me();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:se(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&se(xa);break;case 24:Qi(ua)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){R(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){R(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){R(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){R(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){R(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){R(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){R(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){R(e,t,n)}else n.current=null}}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){R(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ft]=t}catch(t){R(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[dt]=e,t[ft]=n}catch(t){R(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Xd=_p,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},_p=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,L&6)throw Error(i(331));var c=L;if(L|=4,Hl(o.current),Pl(o,o.current,s,n),L=c,_d(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{M.p=a,j.T=r,ed(e,t)}}function rd(e,t,n){t=bi(n,t),t=ic(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(tt(e,2),gd(e))}function R(e,t,n){if(e.tag===3)rd(e,e,n);else for(;t!==null;){if(t.tag===3){rd(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=bi(n,e),n=ac(2),r=qa(t,n,2),r!==null&&(oc(n,r,t,e),tt(r,2),gd(r));break}}t=t.return}}function id(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(eu=!0,i.add(n),e=ad.bind(null,e,t,n),t.then(e,e))}function ad(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(Yl&n)===n&&(nu===4||nu===3&&(Yl&62914560)===Yl&&300>Ae()-du?!(L&2)&&Fu(e,0):au|=n,su===Yl&&(su=0)),gd(e)}function od(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),gd(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return Ee(e,t)}var ud=null,dd=null,fd=!1,pd=!1,md=!1,hd=0;function gd(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,Cd())}function _d(e,t){if(!md&&pd){md=!0;do for(var n=!1,r=ud;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Sd(r,a))}else a=Yl,a=Xe(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,Sd(r,a))}r=r.next}while(n);md=!1}}function vd(){yd()}function yd(){pd=fd=!1;var e=0;hd!==0&&rf()&&(e=hd);for(var t=Ae(),n=null,r=ud;r!==null;){var i=r.next,a=bd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}_u!==0&&_u!==5||_d(e,!1),hd!==0&&(hd=0)}function bd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=Ct(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);wt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=de.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ht(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),wt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ht(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Kd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,wt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=pu()}))(),hu=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],gu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],_u=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],vu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],yu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],bu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],xu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Su={micro:11,small:12,body:14,title:16,section:22,page:32},Cu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},wu={brand:gu,ok:_u,warn:vu,bad:yu,info:bu},Tu={light:7,dark:5};function Eu(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Du(e){let t=Eu(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Ou(e){return Object.fromEntries(Object.entries(wu).map(([t,n])=>[`--fanout-color-${t}-contrast`,Du(n[Tu[e]])]))}function ku(e){return t=>{let n=t.color??Mu.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(wu,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Au=.25,ju={xs:9,sm:10,md:11,lg:13,xl:16},Mu={primaryColor:`brand`,primaryShade:Tu,autoContrast:!0,luminanceThreshold:Au,colors:{dark:hu,brand:gu,ok:_u,warn:vu,bad:yu,info:bu},defaultRadius:`md`,fontFamily:Cu.body,fontFamilyMonospace:Cu.display,headings:{fontFamily:Cu.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Fu(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Fu(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Pu(t.size)})}}},Nu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":xu.light.muted,...Ou(`light`)},dark:Ou(`dark`)});function Pu(e){let t=ju[e??`md`];return t===void 0||t>=Su.micro?{}:{"--badge-fz":`${Su.micro/16}rem`}}function Fu(e,t){return!e||e===Mu.primaryColor?{[t]:`var(--fanout-color-${Mu.primaryColor}-contrast)`}:{}}var Iu=Gt({...Mu,variantColorResolver:ku(et)});function Lu({dark:e,children:t}){return(0,N.jsx)(Wt,{theme:Iu,cssVariablesResolver:Nu,forceColorScheme:e?`dark`:`light`,children:(0,N.jsx)(ls,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Ru({title:e,summary:t,onRefresh:n,disabled:r}){return(0,N.jsxs)(nc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,N.jsxs)(F,{miw:0,children:[(0,N.jsx)(nu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,N.jsx)(yl,{label:`Refresh this view`,children:(0,N.jsx)(Ks,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,N.jsx)(cu,{size:15,weight:`bold`})})})]})}function zu({error:e,loading:t,retry:n}){return e?(0,N.jsx)(ac,{color:`bad`,m:`md`,radius:`md`,children:(0,N.jsxs)(nc,{justify:`space-between`,children:[(0,N.jsx)(uc,{size:`sm`,children:e}),n&&(0,N.jsx)(Sc,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,N.jsxs)(wc,{mih:160,p:`xl`,children:[(0,N.jsx)(Rs,{size:`sm`}),(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function Bu({icon:e,title:t,children:n,tall:r=!1}){return(0,N.jsx)(wc,{mih:r?220:130,p:`xl`,children:(0,N.jsxs)(nc,{wrap:`nowrap`,children:[(0,N.jsx)(Yl,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,N.jsxs)(F,{children:[(0,N.jsx)(uc,{fw:700,size:`sm`,children:t}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Vu({left:e,right:t}){return(0,N.jsxs)(nc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function Hu({label:e,value:t,color:n}){return(0,N.jsxs)(ls,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Uu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function Wu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,N.jsxs)(nc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsxs)(uc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,N.jsx)(Xc,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Gu(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}var Ku=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function qu(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function Ju(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${Ju(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function Yu(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var Xu=c({BIGINT_FORMAT_RANGES:()=>pf,CONSTANT_CATCH:()=>yf,Class:()=>hf,NUMBER_FORMAT_RANGES:()=>ff,aborted:()=>Pd,allowsEval:()=>cf,assert:()=>nd,assertEqual:()=>Zu,assertIs:()=>ed,assertNever:()=>td,assertNotEqual:()=>Qu,assignProp:()=>dd,attachSchema:()=>Rd,base64ToUint8Array:()=>Gd,base64urlToUint8Array:()=>qd,cached:()=>ad,captureStackTrace:()=>sf,cleanEnum:()=>Wd,cleanRegex:()=>sd,clone:()=>wd,cloneDef:()=>pd,codePointLength:()=>Vd,constantCatch:()=>af,createTransparentProxy:()=>Td,defineLazy:()=>ld,defineLazyInternal:()=>nf,esc:()=>_d,escapeRegex:()=>Cd,explicitlyAborted:()=>Fd,extend:()=>kd,finalizeIssue:()=>zd,floatSafeRemainder:()=>cd,getElementAtPath:()=>md,getEnumValues:()=>rd,getLengthableOrigin:()=>Hd,getParsedType:()=>lf,getSizableOrigin:()=>Bd,hexToUint8Array:()=>Yd,hide:()=>$d,installLazyProp:()=>rf,isObject:()=>yd,isPlainObject:()=>bd,issue:()=>Ud,joinValues:()=>R,jsonStringifyReplacer:()=>id,members:()=>Zd,merge:()=>jd,mergeDefs:()=>fd,normalizeParams:()=>z,nullish:()=>od,numKeys:()=>Sd,objectClone:()=>ud,omit:()=>Od,optionalKeys:()=>Ed,own:()=>Qd,parsedType:()=>V,partial:()=>Md,pick:()=>Dd,prefixIssues:()=>Id,primitiveTypes:()=>df,promiseAllObject:()=>hd,propertyKeyTypes:()=>uf,randomString:()=>gd,required:()=>Nd,safeExtend:()=>Ad,shallowClone:()=>xd,slugify:()=>vd,stringifyPrimitive:()=>B,toZod:()=>$u,uint8ArrayToBase64:()=>Kd,uint8ArrayToBase64url:()=>Jd,uint8ArrayToHex:()=>Xd,unwrapMessage:()=>Ld});function Zu(e){return e}function Qu(e){return e}function $u(){return e=>e}function ed(e){}function td(e){throw Error(`Unexpected value in exhaustive check`)}function nd(e){}function rd(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function R(e,t=`|`){return e.map(e=>B(e)).join(t)}function id(e,t){return typeof t==`bigint`?t.toString():t}function ad(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function od(e){return e==null}function sd(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function cd(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function hd(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Td(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function B(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ed(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function Dd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return wd(e,fd(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&dd(e,r,n.shape[r])}return dd(this,`shape`,e),e},checks:[]}))}function Od(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return wd(e,fd(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return dd(this,`shape`,r),r},checks:[]}))}function kd(e,t){if(!bd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return wd(e,fd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return dd(this,`shape`,n),n}}))}function Ad(e,t){if(!bd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return wd(e,fd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return dd(this,`shape`,n),n}}))}function jd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return wd(e,fd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return dd(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Md(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return wd(t,fd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return dd(this,`shape`,i),i},checks:[]}))}function Nd(e,t,n){return wd(t,fd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return dd(this,`shape`,i),i}}))}function Pd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ld(e){return typeof e==`string`?e:e?.message}function Rd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function Gd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function Zd(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):ef(e,n,r.value)}}function Qd(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function $d(e,t,n){return Qd(e,t,n,!1)}function ef(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Qd(this,t,n.bind(this))},set(e){Qd(this,t,e)}})}function tf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function nf(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&gf!==e._zod){gf=void 0;return}gf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,vf);let e=_f;_f=!1;try{let r=n(this);return _f?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),_f||=e,r}catch(n){throw delete this[t],_f||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function rf(e,t,n,r){let i=tf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function af(e){let t=()=>e;return t[yf]=!0,t}var of,sf,cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,H=o((()=>{Af(),of=Symbol(`evaluating`),sf=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},cf=ad(()=>{if(kf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),lf=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},uf=new Set([`string`,`number`,`symbol`]),df=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),ff={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},pf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},mf=/[\uD800-\uDBFF]/,hf=class{constructor(...e){}},_f=!1,vf={configurable:!0,get(){_f=!0}},yf=`~constantCatch`}));function bf(e){let t=Tf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Tf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){wf.value=new a(r);try{Object.defineProperty(n,"_zod",wf)}finally{wf.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Zd(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?bf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function xf(e){return e&&Object.assign(kf,e),kf}var Sf,Cf,wf,Tf,Ef,Df,Of,kf,Af=o((()=>{H(),Cf=Object.freeze({status:`aborted`}),wf={value:void 0,enumerable:!1},Tf=`captureStackTrace`in Error?Error:null,Ef=Symbol(`zod_brand`),Df=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Of=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Sf=globalThis).__zod_globalConfig??(Sf.__zod_globalConfig={}),kf=globalThis.__zod_globalConfig}));function jf(){let e=this._zod;return e.message??=JSON.stringify(e.def,id,2),e.message}function Mf(e){this._zod.message=e}function Nf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Pf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Nf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Ff(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Rf(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${Lf(e.path)}`);return t.join(` -`)}var zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf=o((()=>{Af(),H(),zf={get:jf,set:Mf,enumerable:!0,configurable:!0},Bf={value:void 0,enumerable:!1},Vf={value:void 0,enumerable:!1},Hf=new WeakSet([Object.prototype,Error.prototype]),Uf=(e,t)=>{e.name=`$ZodError`,Bf.value=e._zod,Object.defineProperty(e,"_zod",Bf),Vf.value=t,Object.defineProperty(e,"issues",Vf),Bf.value=void 0,Vf.value=void 0,Object.defineProperty(e,"message",zf);let n=Object.getPrototypeOf(e);Hf.has(n)||(Hf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Wf=U(`$ZodError`,Uf),Gf=U(`$ZodError`,Uf,void 0,{Parent:Error})}));function qf(e,t){return{callee:t?.callee??e,Err:t?.Err}}function Jf(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[ip]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Df;return a.issues.length===0}var Yf,Xf,Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp=o((()=>{Af(),Kf(),H(),Yf=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Df;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>zd(e,o,xf())));throw sf(n,a?.callee??t),n}return s.value};return t},Xf=Yf(Gf),Zf=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>zd(e,o,xf())));throw sf(n,a?.callee??t),n}return s.value};return t},Qf=Zf(Gf),$f=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Df;return a.issues.length?{success:!1,error:new(e??Wf)(a.issues.map(e=>zd(e,i,xf())))}:{success:!0,data:a.value}},ep=$f(Gf),tp=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>zd(e,i,xf())))}:{success:!0,data:a.value}},np=tp(Gf),rp=Symbol.for(`zod.compile.invalid`),ip=Symbol.for(`zod.compile.fallback`),ap=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==rp||Jf(e,t,n)}),op=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},sp=e=>{let t=Yf(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,qf(n,a))};return n},cp=sp(Gf),lp=e=>{let t=Yf(e),n=(e,r,i,a)=>t(e,r,i,qf(n,a));return n},up=lp(Gf),dp=e=>{let t=Zf(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,qf(n,a))};return n},fp=dp(Gf),pp=e=>{let t=Zf(e),n=async(e,r,i,a)=>await t(e,r,i,qf(n,a));return n},mp=pp(Gf),hp=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return $f(e)(t,n,i)},gp=hp(Gf),_p=e=>(t,n,r)=>$f(e)(t,n,r),vp=_p(Gf),yp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tp(e)(t,n,i)},bp=yp(Gf),xp=e=>async(t,n,r)=>tp(e)(t,n,r),Sp=xp(Gf)})),wp=c({base64:()=>im,base64url:()=>am,bigint:()=>mm,boolean:()=>_m,browserEmail:()=>Zp,cidrv4:()=>nm,cidrv6:()=>rm,creditCard:()=>um,cuid:()=>Np,cuid2:()=>Pp,date:()=>fm,datetime:()=>Ap,domain:()=>sm,duration:()=>zp,e164:()=>lm,email:()=>Kp,emoji:()=>Ep,extendedDuration:()=>Bp,guid:()=>Vp,hex:()=>Sm,hostname:()=>om,html5Email:()=>qp,httpProtocol:()=>cm,idnEmail:()=>Xp,integer:()=>hm,ipv4:()=>$p,ipv6:()=>em,ksuid:()=>Lp,lowercase:()=>bm,mac:()=>tm,md5_base64:()=>wm,md5_base64url:()=>Tm,md5_hex:()=>Cm,nanoid:()=>Rp,nanoidOfLength:()=>Tp,null:()=>vm,number:()=>gm,rfc5322Email:()=>Jp,sha1_base64:()=>Dm,sha1_base64url:()=>Om,sha1_hex:()=>Em,sha256_base64:()=>Am,sha256_base64url:()=>jm,sha256_hex:()=>km,sha384_base64:()=>Nm,sha384_base64url:()=>Pm,sha384_hex:()=>Mm,sha512_base64:()=>Im,sha512_base64url:()=>Lm,sha512_hex:()=>Fm,string:()=>pm,time:()=>kp,ulid:()=>Fp,undefined:()=>ym,unicodeEmail:()=>Yp,uppercase:()=>xm,uuid:()=>Hp,uuid4:()=>Up,uuid6:()=>Wp,uuid7:()=>Gp,xid:()=>Ip});function Tp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function Ep(){return new RegExp(Qp,`u`)}function Dp(e){return RegExp(`^${e}$`)}function Op(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function kp(e){return RegExp(`^${Op(e)}$`)}function Ap(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Op({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Op({precision:e.precision})}`:n;return RegExp(`^${dm}T(?:${r})$`)}function jp(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Mp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm=o((()=>{H(),Np=/^[cC][0-9a-z]{6,}$/,Pp=/^[0-9a-z]+$/,Fp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Ip=/^[0-9a-vA-V]{20}$/,Lp=/^[A-Za-z0-9]{27}$/,Rp=/^[a-zA-Z0-9_-]{21}$/,zp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Vp=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Hp=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Up=Hp(4),Wp=Hp(6),Gp=Hp(7),Kp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,qp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Jp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Yp=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Xp=Yp,Zp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qp=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,$p=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,em=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tm=e=>{let t=Cd(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},nm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,im=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,am=/^[A-Za-z0-9_-]*$/,om=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,sm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,cm=/^https?$/,lm=/^\+[1-9]\d{6,14}$/,um=/^\d(?:[ -]?\d){11,18}$/,dm=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,fm=Dp(dm),pm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},mm=/^-?\d+n?$/,hm=/^-?\d+$/,gm=/^-?\d+(?:\.\d+)?$/,_m=/^(?:true|false)$/i,vm=/^null$/i,ym=/^undefined$/i,bm=/^[^A-Z]*$/,xm=/^[^a-z]*$/,Sm=/^[0-9a-fA-F]*$/,Cm=/^[0-9a-fA-F]{32}$/,wm=jp(22,`==`),Tm=Mp(22),Em=/^[0-9a-fA-F]{40}$/,Dm=jp(27,`=`),Om=Mp(27),km=/^[0-9a-fA-F]{64}$/,Am=jp(43,`=`),jm=Mp(43),Mm=/^[0-9a-fA-F]{96}$/,Nm=jp(64,``),Pm=Mp(64),Fm=/^[0-9a-fA-F]{128}$/,Im=jp(86,`==`),Lm=Mp(86)}));function zm(e,t,n){e.issues.length&&t.issues.push(...Id(n,e.issues))}var Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch,lh,uh,dh=o((()=>{Af(),Rm(),H(),Bm=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Vm=e=>{let t=e.value;return!od(t)&&t.size!==void 0},Hm=e=>{let t=e.value;return!od(t)&&t.length!==void 0},Um={number:`number`,bigint:`bigint`,object:`date`},Wm=U(`$ZodCheckLessThan`,(e,t)=>{Bm.init(e,t);let n=Um[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{Bm.init(e,t);let n=Um[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Um[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Km=U(`$ZodCheckMultipleOf`,(e,t)=>{Bm.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):cd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),qm=U(`$ZodCheckNumberFormat`,(e,t)=>{Bm.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ff[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=hm)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Jm=U(`$ZodCheckBigIntFormat`,(e,t)=>{Bm.init(e,t);let[n,r]=pf[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Ym=U(`$ZodCheckMaxSize`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Vm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Bd(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xm=U(`$ZodCheckMinSize`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Vm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Bd(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zm=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Vm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Bd(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qm=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Hm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Vd(r):i)<=t.maximum)return;let a=Hd(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$m=U(`$ZodCheckMinLength`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Hm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Hd(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),eh=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Bm.init(e,t),(n=e._zod.def).when??(n.when=Hm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Vd(r):i;if(a===t.length)return;let o=Hd(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),th=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Bm.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nh=U(`$ZodCheckRegex`,(e,t)=>{th.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rh=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=bm,th.init(e,t)}),ih=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=xm,th.init(e,t)}),ah=U(`$ZodCheckIncludes`,(e,t)=>{Bm.init(e,t);let n=Cd(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),oh=U(`$ZodCheckStartsWith`,(e,t)=>{Bm.init(e,t);let n=RegExp(`^${Cd(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),sh=U(`$ZodCheckEndsWith`,(e,t)=>{Bm.init(e,t);let n=RegExp(`.*${Cd(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),ch=U(`$ZodCheckProperty`,(e,t)=>{Bm.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>zm(n,e,t.property));zm(n,e,t.property)}}),lh=U(`$ZodCheckMimeType`,(e,t)=>{Bm.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),uh=U(`$ZodCheckOverwrite`,(e,t)=>{Bm.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),fh,ph=o((()=>{fh=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`+e.stack}}var we=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Pe=t.unstable_NormalPriority,Fe=t.unstable_LowPriority,Ie=t.unstable_IdlePriority,Le=t.log,Re=t.unstable_setDisableYieldValue,ze=null,Be=null;function Ve(e){if(typeof Le==`function`&&Re(e),Be&&typeof Be.setStrictMode==`function`)try{Be.setStrictMode(ze,e)}catch{}}var He=Math.clz32?Math.clz32:Ge,Ue=Math.log,We=Math.LN2;function Ge(e){return e>>>=0,e===0?32:31-(Ue(e)/We|0)|0}var Ke=256,qe=262144,Je=4194304;function Ye(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Xe(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Ye(n))):i=Ye(o):i=Ye(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ye(n))):i=Ye(o)):i=Ye(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ze(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qe(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $e(){var e=Je;return Je<<=1,!(Je&62914560)&&(Je=4194304),e}function et(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function nt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),pn=!1;if(fn)try{var mn={};Object.defineProperty(mn,"passive",{get:function(){pn=!0}}),window.addEventListener(`test`,mn,mn),window.removeEventListener(`test`,mn,mn)}catch{pn=!1}var hn=null,gn=null,_n=null;function vn(){if(_n)return _n;var e,t=gn,n=t.length,r,i=`value`in hn?hn.value:hn.textContent,a=i.length;for(e=0;e=F),Qn=` `,$n=!1;function er(e,t){switch(e){case`keyup`:return Jn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function tr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var nr=!1;function rr(e,t){switch(e){case`compositionend`:return tr(t);case`keypress`:return t.which===32?($n=!0,Qn):null;case`textInput`:return e=t.data,e===Qn&&$n?null:e;default:return null}}function ir(e,t){if(nr)return e===`compositionend`||!Yn&&er(e,t)?(e=vn(),_n=gn=hn=null,nr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Er(n)}}function Or(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Or(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Bt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Bt(e.document)}return t}function Ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var jr=fn&&`documentMode`in document&&11>=document.documentMode,Mr=null,Nr=null,Pr=null,Fr=!1;function Ir(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Fr||Mr==null||Mr!==Bt(r)||(r=Mr,`selectionStart`in r&&Ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Pr&&Tr(Pr,r)||(Pr=r,r=Rd(Nr,`onSelect`),0>=o,i-=o,Oi=1<<32-He(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Li&&Ai(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Li&&Ai(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Li&&Ai(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Li&&Ai(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&ja(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ra(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=hi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=mi(o.type,o.key,o.props,null,e.mode,c),Ra(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=vi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=ja(o),x(e,r,o,c)}if(A(o))return v(e,r,o,c);if(O(o)){if(l=O(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,La(o),c);if(o.$$typeof===b)return x(e,r,aa(e,o),c);za(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=gi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ia=0;var i=x(e,t,n,r);return Fa=null,i}catch(t){if(t===Ta||t===Da)throw t;var a=ui(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Va=Ba(!0),Ha=Ba(!1),Ua=!1;function Wa(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ga(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ka(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qa(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,L&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=si(e),oi(e,null,n),t}return ri(e,r,t,n),si(e)}function Ja(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}function Ya(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Xa=!1;function Za(){if(Xa){var e=ga;if(e!==null)throw e}}function Qa(e,t,n,r){Xa=!1;var i=e.updateQueue;Ua=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Yl&p)===p:(r&p)===p){p!==0&&p===ha&&(Xa=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ua=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ru|=o,e.lanes=o,e.memoizedState=d}}function $a(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function eo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Bs(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?zs(e,t,ya(c,r),Eu(e)):zs(e,t,r,Eu(e))}catch(n){zs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function ks(){}function As(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=js(e).queue;Os(e,a,t,re,n===null?ks:function(){return Ms(e),n(r)})}function js(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:re,baseState:re,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:re},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ms(e){var t=js(e);t.next===null&&(t=e.alternate.memoizedState),zs(e,t.next.queue,{},Eu())}function Ns(){return ia(cp)}function Ps(){return Io().memoizedState}function Fs(){return Io().memoizedState}function Is(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=Ka(n);var r=qa(t,e,n);r!==null&&(Ou(r,t,n),Ja(r,t,n)),t={cache:da()},e.payload=t;return}t=t.return}}function Ls(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Vs(e)?Hs(t,n):(n=ii(e,t,n,r),n!==null&&(Ou(n,e,r),Us(n,t,r)))}function Rs(e,t,n){zs(e,t,n,Eu())}function zs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Vs(e))Hs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,wr(s,o))return ri(e,t,i,0),ql===null&&ni(),!1}catch{}if(n=ii(e,t,i,r),n!==null)return Ou(n,e,r),Us(n,t,r),!0}return!1}function Bs(e,t,n,r){if(r={lane:2,revertLane:wd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vs(e)){if(t)throw Error(i(479))}else t=ii(e,n,r,2),t!==null&&Ou(t,e,2)}function Vs(e){var t=e.alternate;return e===I||t!==null&&t===I}function Hs(e,t){bo=yo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Us(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,it(e,n)}}var Ws={readContext:ia,use:zo,useCallback:Eo,useContext:Eo,useEffect:Eo,useImperativeHandle:Eo,useLayoutEffect:Eo,useInsertionEffect:Eo,useMemo:Eo,useReducer:Eo,useRef:Eo,useState:Eo,useDebugValue:Eo,useDeferredValue:Eo,useTransition:Eo,useSyncExternalStore:Eo,useId:Eo,useHostTransitionStatus:Eo,useFormState:Eo,useActionState:Eo,useOptimistic:Eo,useMemoCache:Eo,useCacheRefresh:Eo};Ws.useEffectEvent=Eo;var Gs={readContext:ia,use:zo,useCallback:function(e,t){return Fo().memoizedState=[e,t===void 0?null:t],e},useContext:ia,useEffect:hs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ps(4194308,4,xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ps(4194308,4,e,t)},useInsertionEffect:function(e,t){ps(4,2,e,t)},useMemo:function(e,t){var n=Fo();t=t===void 0?null:t;var r=e();if(xo){Ve(!0);try{e()}finally{Ve(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Fo();if(n!==void 0){var i=n(t);if(xo){Ve(!0);try{n(t)}finally{Ve(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Ls.bind(null,I,e),[r.memoizedState,e]},useRef:function(e){var t=Fo();return e={current:e},t.memoizedState=e},useState:function(e){e=Zo(e);var t=e.queue,n=Rs.bind(null,I,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Cs,useDeferredValue:function(e,t){return Es(Fo(),e,t)},useTransition:function(){var e=Zo(!1);return e=Os.bind(null,I,e.queue,!0,!1),Fo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=I,a=Fo();if(Li){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));Yl&127||Ko(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,hs(Jo.bind(null,r,o,e),[e]),r.flags|=2048,ds(9,{destroy:void 0},qo.bind(null,r,o,n,t),null),n},useId:function(){var e=Fo(),t=ql.identifierPrefix;if(Li){var n=ki,r=Oi;n=(r&~(1<<32-He(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=So++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[dt]=t,o[ft]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=de.current,Wi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Fi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[dt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Wd(e.nodeValue,n)),e||Vi(t,!0)}else e=Qd(e).createTextNode(r),e[dt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Wi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(po(t),t):(po(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Wi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[dt]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(po(t),t):(po(t),null)}return po(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return me(),e===null&&Pd(t.stateNode.containerInfo),Wc(t),null;case 10:return Qi(t.type),Wc(t),null;case 19:if(se(mo),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if(nu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=ho(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)pi(n,e),n=n.sibling;return ce(mo,mo.current&1|2),Li&&Ai(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=ho(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Li)return Wc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=mo.current,ce(mo,a?n&1|2:n&1),Li&&Ai(t,r.treeForkCount),e);case 22:case 23:return po(t),ao(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&se(xa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Qi(ua),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Ni(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Qi(ua),me(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ge(t),null;case 31:if(t.memoizedState!==null){if(po(t),t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(po(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(mo),null;case 4:return me(),null;case 10:return Qi(t.type),null;case 22:case 23:return po(t),ao(),e!==null&&se(xa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Qi(ua),null;case 25:return null;default:return null}}function qc(e,t){switch(Ni(t),t.tag){case 3:Qi(ua),me();break;case 26:case 27:case 5:ge(t);break;case 4:me();break;case 31:t.memoizedState!==null&&po(t);break;case 13:po(t);break;case 19:se(mo);break;case 10:Qi(t.type);break;case 22:case 23:po(t),ao(),e!==null&&se(xa);break;case 24:Qi(ua)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){id(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){id(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){id(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{eo(t,n)}catch(t){id(e,e.return,t)}}}function Zc(e,t,n){n.props=Qs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){id(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){id(e,t,n)}}function $c(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){id(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){id(e,t,n)}else n.current=null}}function el(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){id(e,e.return,t)}}function tl(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[ft]=t}catch(t){id(e,e.return,t)}}function nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function rl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||nl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=nn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[dt]=e,t[ft]=n}catch(t){id(e,e.return,t)}}var sl=!1,cl=!1,ll=!1,ul=typeof WeakSet==`function`?WeakSet:Set,dl=null;function fl(e,t){if(e=e.containerInfo,Xd=_p,e=kr(e),Ar(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},_p=!1,dl=t;dl!==null;)if(t=dl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,dl=e;else for(;dl!==null;){switch(t=dl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[dt]=e,wt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Dr(s,h),v=Dr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,L&6)throw Error(i(331));var c=L;if(L|=4,Hl(o.current),Pl(o,o.current,s,n),L=c,_d(0,!1),Be&&typeof Be.onPostCommitFiberRoot==`function`)try{Be.onPostCommitFiberRoot(ze,o)}catch{}return!0}finally{M.p=a,j.T=r,ed(e,t)}}function rd(e,t,n){t=bi(n,t),t=ic(e.stateNode,t,2),e=qa(e,t,2),e!==null&&(tt(e,2),gd(e))}function id(e,t,n){if(e.tag===3)rd(e,e,n);else for(;t!==null;){if(t.tag===3){rd(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=bi(n,e),n=ac(2),r=qa(t,n,2),r!==null&&(oc(n,r,t,e),tt(r,2),gd(r));break}}t=t.return}}function ad(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Kl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(eu=!0,i.add(n),e=R.bind(null,e,t,n),t.then(e,e))}function R(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(Yl&n)===n&&(nu===4||nu===3&&(Yl&62914560)===Yl&&300>Ae()-du?!(L&2)&&Fu(e,0):au|=n,su===Yl&&(su=0)),gd(e)}function od(e,t){t===0&&(t=$e()),e=ai(e,t),e!==null&&(tt(e,t),gd(e))}function sd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),od(e,n)}function cd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),od(e,n)}function ld(e,t){return Ee(e,t)}var ud=null,dd=null,fd=!1,pd=!1,md=!1,hd=0;function gd(e){e!==dd&&e.next===null&&(dd===null?ud=dd=e:dd=dd.next=e),pd=!0,fd||(fd=!0,Cd())}function _d(e,t){if(!md&&pd){md=!0;do for(var n=!1,r=ud;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-He(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Sd(r,a))}else a=Yl,a=Xe(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ze(r,a)||(n=!0,Sd(r,a))}r=r.next}while(n);md=!1}}function vd(){yd()}function yd(){pd=fd=!1;var e=0;hd!==0&&rf()&&(e=hd);for(var t=Ae(),n=null,r=ud;r!==null;){var i=r.next,a=bd(r,t);a===0?(r.next=null,n===null?ud=i:n.next=i,i===null&&(dd=n)):(n=r,(e!==0||a&3)&&(pd=!0)),r=i}_u!==0&&_u!==5||_d(e,!1),hd!==0&&(hd=0)}function bd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Ht(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ht(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ht(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ht(n.imageSizes)+`"]`)):i+=`[href="`+Ht(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),wt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ht(r)+`"][href="`+Ht(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),wt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=Ct(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);wt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=Ct(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),wt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=de.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=Ct(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=Ct(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=Ct(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ht(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),wt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ht(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ht(n.href)+`"]`);if(r)return t.instance=r,wt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),wt(r),Kd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,wt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),wt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,wt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),wt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,wt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),wt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=pu()}))(),hu=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],gu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],_u=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],vu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],yu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],bu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],xu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Su={micro:11,small:12,body:14,title:16,section:22,page:32},Cu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},wu={brand:gu,ok:_u,warn:vu,bad:yu,info:bu},Tu={light:7,dark:5};function Eu(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Du(e){let t=Eu(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Ou(e){return Object.fromEntries(Object.entries(wu).map(([t,n])=>[`--fanout-color-${t}-contrast`,Du(n[Tu[e]])]))}function ku(e){return t=>{let n=t.color??Mu.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(wu,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Au=.25,ju={xs:9,sm:10,md:11,lg:13,xl:16},Mu={primaryColor:`brand`,primaryShade:Tu,autoContrast:!0,luminanceThreshold:Au,colors:{dark:hu,brand:gu,ok:_u,warn:vu,bad:yu,info:bu},defaultRadius:`md`,fontFamily:Cu.body,fontFamilyMonospace:Cu.display,headings:{fontFamily:Cu.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Fu(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Fu(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Pu(t.size)})}}},Nu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":xu.light.muted,...Ou(`light`)},dark:Ou(`dark`)});function Pu(e){let t=ju[e??`md`];return t===void 0||t>=Su.micro?{}:{"--badge-fz":`${Su.micro/16}rem`}}function Fu(e,t){return!e||e===Mu.primaryColor?{[t]:`var(--fanout-color-${Mu.primaryColor}-contrast)`}:{}}var Iu=Gt({...Mu,variantColorResolver:ku(et)});function Lu({dark:e,children:t}){return(0,N.jsx)(Wt,{theme:Iu,cssVariablesResolver:Nu,forceColorScheme:e?`dark`:`light`,children:(0,N.jsx)(ls,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function Ru({title:e,summary:t,onRefresh:n,disabled:r}){return(0,N.jsxs)(nc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,N.jsxs)(F,{miw:0,children:[(0,N.jsx)(nu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,N.jsx)(yl,{label:`Refresh this view`,children:(0,N.jsx)(Ks,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,N.jsx)(cu,{size:15,weight:`bold`})})})]})}function zu({error:e,loading:t,retry:n}){return e?(0,N.jsx)(ac,{color:`bad`,m:`md`,radius:`md`,children:(0,N.jsxs)(nc,{justify:`space-between`,children:[(0,N.jsx)(uc,{size:`sm`,children:e}),n&&(0,N.jsx)(Sc,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,N.jsxs)(wc,{mih:160,p:`xl`,children:[(0,N.jsx)(Rs,{size:`sm`}),(0,N.jsx)(uc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function Bu({icon:e,title:t,children:n,tall:r=!1}){return(0,N.jsx)(wc,{mih:r?220:130,p:`xl`,children:(0,N.jsxs)(nc,{wrap:`nowrap`,children:[(0,N.jsx)(Yl,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,N.jsxs)(F,{children:[(0,N.jsx)(uc,{fw:700,size:`sm`,children:t}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function Vu({left:e,right:t}){return(0,N.jsxs)(nc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function Hu({label:e,value:t,color:n}){return(0,N.jsxs)(ls,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:e}),(0,N.jsx)(uc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function Uu(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}var Wu={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`};function Gu({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,N.jsxs)(nc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,N.jsxs)(uc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,N.jsx)(Xc,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`,getItemProps:e=>({"aria-label":`Page ${e}`}),getControlProps:e=>({"aria-label":Wu[e]})})]})}function Ku(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}var qu=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function Ju(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function Yu(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${Yu(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function Xu(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function Zu(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?Zu(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}var Qu=c({BIGINT_FORMAT_RANGES:()=>hf,CONSTANT_CATCH:()=>xf,Class:()=>_f,NUMBER_FORMAT_RANGES:()=>mf,aborted:()=>Id,allowsEval:()=>uf,assert:()=>id,assertEqual:()=>$u,assertIs:()=>nd,assertNever:()=>rd,assertNotEqual:()=>ed,assignProp:()=>pd,attachSchema:()=>Bd,base64ToUint8Array:()=>qd,base64urlToUint8Array:()=>Yd,cached:()=>sd,captureStackTrace:()=>lf,cleanEnum:()=>Kd,cleanRegex:()=>ld,clone:()=>Ed,cloneDef:()=>hd,codePointLength:()=>Ud,constantCatch:()=>sf,createTransparentProxy:()=>Dd,defineLazy:()=>dd,defineLazyInternal:()=>af,esc:()=>yd,escapeRegex:()=>Td,explicitlyAborted:()=>Ld,extend:()=>jd,finalizeIssue:()=>Vd,floatSafeRemainder:()=>ud,getElementAtPath:()=>gd,getEnumValues:()=>ad,getLengthableOrigin:()=>Wd,getParsedType:()=>df,getSizableOrigin:()=>Hd,hexToUint8Array:()=>Zd,hide:()=>tf,installLazyProp:()=>of,isObject:()=>xd,isPlainObject:()=>Sd,issue:()=>Gd,joinValues:()=>R,jsonStringifyReplacer:()=>od,members:()=>$d,merge:()=>Nd,mergeDefs:()=>md,normalizeParams:()=>z,nullish:()=>cd,numKeys:()=>wd,objectClone:()=>fd,omit:()=>Ad,optionalKeys:()=>Od,own:()=>ef,parsedType:()=>V,partial:()=>Pd,pick:()=>kd,prefixIssues:()=>Rd,primitiveTypes:()=>pf,promiseAllObject:()=>_d,propertyKeyTypes:()=>ff,randomString:()=>vd,required:()=>Fd,safeExtend:()=>Md,shallowClone:()=>Cd,slugify:()=>bd,stringifyPrimitive:()=>B,toZod:()=>td,uint8ArrayToBase64:()=>Jd,uint8ArrayToBase64url:()=>Xd,uint8ArrayToHex:()=>Qd,unwrapMessage:()=>zd});function $u(e){return e}function ed(e){return e}function td(){return e=>e}function nd(e){}function rd(e){throw Error(`Unexpected value in exhaustive check`)}function id(e){}function ad(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function R(e,t=`|`){return e.map(e=>B(e)).join(t)}function od(e,t){return typeof t==`bigint`?t.toString():t}function sd(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function cd(e){return e==null}function ld(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ud(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function _d(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Dd(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function B(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Od(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function kd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Ed(e,md(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&pd(e,r,n.shape[r])}return pd(this,`shape`,e),e},checks:[]}))}function Ad(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Ed(e,md(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return pd(this,`shape`,r),r},checks:[]}))}function jd(e,t){if(!Sd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ed(e,md(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return pd(this,`shape`,n),n}}))}function Md(e,t){if(!Sd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Ed(e,md(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return pd(this,`shape`,n),n}}))}function Nd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Ed(e,md(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return pd(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Pd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return Ed(t,md(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return pd(this,`shape`,i),i},checks:[]}))}function Fd(e,t,n){return Ed(t,md(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return pd(this,`shape`,i),i}}))}function Id(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function zd(e){return typeof e==`string`?e:e?.message}function Bd(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qd(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function $d(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nf(e,n,r.value)}}function ef(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function tf(e,t,n){return ef(e,t,n,!1)}function nf(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:ef(this,t,n.bind(this))},set(e){ef(this,t,e)}})}function rf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function af(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&vf!==e._zod){vf=void 0;return}vf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,bf);let e=yf;yf=!1;try{let r=n(this);return yf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),yf||=e,r}catch(n){throw delete this[t],yf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function of(e,t,n,r){let i=rf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function sf(e){let t=()=>e;return t[xf]=!0,t}var cf,lf,uf,df,ff,pf,mf,hf,gf,_f,vf,yf,bf,xf,H=o((()=>{Mf(),cf=Symbol(`evaluating`),lf=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},uf=sd(()=>{if(jf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),df=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},ff=new Set([`string`,`number`,`symbol`]),pf=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),mf={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},hf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},gf=/[\uD800-\uDBFF]/,_f=class{constructor(...e){}},yf=!1,bf={configurable:!0,get(){yf=!0}},xf=`~constantCatch`}));function Sf(e){let t=Df;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Df=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Ef.value=new a(r);try{Object.defineProperty(n,"_zod",Ef)}finally{Ef.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),$d(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Sf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function Cf(e){return e&&Object.assign(jf,e),jf}var wf,Tf,Ef,Df,Of,kf,Af,jf,Mf=o((()=>{H(),Tf=Object.freeze({status:`aborted`}),Ef={value:void 0,enumerable:!1},Df=`captureStackTrace`in Error?Error:null,Of=Symbol(`zod_brand`),kf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Af=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(wf=globalThis).__zod_globalConfig??(wf.__zod_globalConfig={}),jf=globalThis.__zod_globalConfig}));function Nf(){let e=this._zod;return e.message??=JSON.stringify(e.def,od,2),e.message}function Pf(e){this._zod.message=e}function Ff(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function If(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Ff(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Lf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function Bf(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${zf(e.path)}`);return t.join(` +`)}var Vf,Hf,Uf,Wf,Gf,Kf,qf,Jf=o((()=>{Mf(),H(),Vf={get:Nf,set:Pf,enumerable:!0,configurable:!0},Hf={value:void 0,enumerable:!1},Uf={value:void 0,enumerable:!1},Wf=new WeakSet([Object.prototype,Error.prototype]),Gf=(e,t)=>{e.name=`$ZodError`,Hf.value=e._zod,Object.defineProperty(e,"_zod",Hf),Uf.value=t,Object.defineProperty(e,"issues",Uf),Hf.value=void 0,Uf.value=void 0,Object.defineProperty(e,"message",Vf);let n=Object.getPrototypeOf(e);Wf.has(n)||(Wf.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Kf=U(`$ZodError`,Gf),qf=U(`$ZodError`,Gf,void 0,{Parent:Error})}));function Yf(e,t){return{callee:t?.callee??e,Err:t?.Err}}function Xf(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[op]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new kf;return a.issues.length===0}var Zf,Qf,$f,ep,tp,np,rp,ip,ap,op,sp,cp,lp,up,dp,fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp=o((()=>{Mf(),Jf(),H(),Zf=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new kf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Vd(e,o,Cf())));throw lf(n,a?.callee??t),n}return s.value};return t},Qf=Zf(qf),$f=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Vd(e,o,Cf())));throw lf(n,a?.callee??t),n}return s.value};return t},ep=$f(qf),tp=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new kf;return a.issues.length?{success:!1,error:new(e??Kf)(a.issues.map(e=>Vd(e,i,Cf())))}:{success:!0,data:a.value}},np=tp(qf),rp=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>Vd(e,i,Cf())))}:{success:!0,data:a.value}},ip=rp(qf),ap=Symbol.for(`zod.compile.invalid`),op=Symbol.for(`zod.compile.fallback`),sp=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==ap||Xf(e,t,n)}),cp=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},lp=e=>{let t=Zf(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,Yf(n,a))};return n},up=lp(qf),dp=e=>{let t=Zf(e),n=(e,r,i,a)=>t(e,r,i,Yf(n,a));return n},fp=dp(qf),pp=e=>{let t=$f(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,Yf(n,a))};return n},mp=pp(qf),hp=e=>{let t=$f(e),n=async(e,r,i,a)=>await t(e,r,i,Yf(n,a));return n},gp=hp(qf),_p=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return tp(e)(t,n,i)},vp=_p(qf),yp=e=>(t,n,r)=>tp(e)(t,n,r),bp=yp(qf),xp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return rp(e)(t,n,i)},Sp=xp(qf),Cp=e=>async(t,n,r)=>rp(e)(t,n,r),wp=Cp(qf)})),Ep=c({base64:()=>om,base64url:()=>sm,bigint:()=>gm,boolean:()=>ym,browserEmail:()=>$p,cidrv4:()=>im,cidrv6:()=>am,creditCard:()=>fm,cuid:()=>Fp,cuid2:()=>Ip,date:()=>mm,datetime:()=>Mp,domain:()=>lm,duration:()=>Vp,e164:()=>dm,email:()=>Jp,emoji:()=>Op,extendedDuration:()=>Hp,guid:()=>Up,hex:()=>wm,hostname:()=>cm,html5Email:()=>Yp,httpProtocol:()=>um,idnEmail:()=>Qp,integer:()=>_m,ipv4:()=>tm,ipv6:()=>nm,ksuid:()=>zp,lowercase:()=>Sm,mac:()=>rm,md5_base64:()=>Em,md5_base64url:()=>Dm,md5_hex:()=>Tm,nanoid:()=>Bp,nanoidOfLength:()=>Dp,null:()=>bm,number:()=>vm,rfc5322Email:()=>Xp,sha1_base64:()=>km,sha1_base64url:()=>Am,sha1_hex:()=>Om,sha256_base64:()=>Mm,sha256_base64url:()=>Nm,sha256_hex:()=>jm,sha384_base64:()=>Fm,sha384_base64url:()=>Im,sha384_hex:()=>Pm,sha512_base64:()=>Rm,sha512_base64url:()=>zm,sha512_hex:()=>Lm,string:()=>hm,time:()=>jp,ulid:()=>Lp,undefined:()=>xm,unicodeEmail:()=>Zp,uppercase:()=>Cm,uuid:()=>Wp,uuid4:()=>Gp,uuid6:()=>Kp,uuid7:()=>qp,xid:()=>Rp});function Dp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function Op(){return new RegExp(em,`u`)}function kp(e){return RegExp(`^${e}$`)}function Ap(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function jp(e){return RegExp(`^${Ap(e)}$`)}function Mp(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Ap({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Ap({precision:e.precision})}`:n;return RegExp(`^${pm}T(?:${r})$`)}function Np(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Pp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm=o((()=>{H(),Fp=/^[cC][0-9a-z]{6,}$/,Ip=/^[0-9a-z]+$/,Lp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Rp=/^[0-9a-vA-V]{20}$/,zp=/^[A-Za-z0-9]{27}$/,Bp=/^[a-zA-Z0-9_-]{21}$/,Vp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hp=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Up=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Wp=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Gp=Wp(4),Kp=Wp(6),qp=Wp(7),Jp=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Yp=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Xp=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Zp=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Qp=Zp,$p=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,em=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,tm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,nm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,rm=e=>{let t=Td(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},im=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,am=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,om=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,sm=/^[A-Za-z0-9_-]*$/,cm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,lm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,um=/^https?$/,dm=/^\+[1-9]\d{6,14}$/,fm=/^\d(?:[ -]?\d){11,18}$/,pm=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,mm=kp(pm),hm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},gm=/^-?\d+n?$/,_m=/^-?\d+$/,vm=/^-?\d+(?:\.\d+)?$/,ym=/^(?:true|false)$/i,bm=/^null$/i,xm=/^undefined$/i,Sm=/^[^A-Z]*$/,Cm=/^[^a-z]*$/,wm=/^[0-9a-fA-F]*$/,Tm=/^[0-9a-fA-F]{32}$/,Em=Np(22,`==`),Dm=Pp(22),Om=/^[0-9a-fA-F]{40}$/,km=Np(27,`=`),Am=Pp(27),jm=/^[0-9a-fA-F]{64}$/,Mm=Np(43,`=`),Nm=Pp(43),Pm=/^[0-9a-fA-F]{96}$/,Fm=Np(64,``),Im=Pp(64),Lm=/^[0-9a-fA-F]{128}$/,Rm=Np(86,`==`),zm=Pp(86)}));function Vm(e,t,n){e.issues.length&&t.issues.push(...Rd(n,e.issues))}var Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph=o((()=>{Mf(),Bm(),H(),Hm=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Um=e=>{let t=e.value;return!cd(t)&&t.size!==void 0},Wm=e=>{let t=e.value;return!cd(t)&&t.length!==void 0},Gm={number:`number`,bigint:`bigint`,object:`date`},Km=U(`$ZodCheckLessThan`,(e,t)=>{Hm.init(e,t);let n=Gm[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{Hm.init(e,t);let n=Gm[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Gm[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Jm=U(`$ZodCheckMultipleOf`,(e,t)=>{Hm.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ud(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),Ym=U(`$ZodCheckNumberFormat`,(e,t)=>{Hm.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=mf[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=_m)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Xm=U(`$ZodCheckBigIntFormat`,(e,t)=>{Hm.init(e,t);let[n,r]=hf[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Zm=U(`$ZodCheckMaxSize`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Um),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Hd(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Qm=U(`$ZodCheckMinSize`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Um),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Hd(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$m=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Um),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Hd(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),eh=U(`$ZodCheckMaxLength`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Wm),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Ud(r):i)<=t.maximum)return;let a=Wd(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),th=U(`$ZodCheckMinLength`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Wm),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=Wd(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nh=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;Hm.init(e,t),(n=e._zod.def).when??(n.when=Wm),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Ud(r):i;if(a===t.length)return;let o=Wd(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),rh=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;Hm.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),ih=U(`$ZodCheckRegex`,(e,t)=>{rh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),ah=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Sm,rh.init(e,t)}),oh=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Cm,rh.init(e,t)}),sh=U(`$ZodCheckIncludes`,(e,t)=>{Hm.init(e,t);let n=Td(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),ch=U(`$ZodCheckStartsWith`,(e,t)=>{Hm.init(e,t);let n=RegExp(`^${Td(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),lh=U(`$ZodCheckEndsWith`,(e,t)=>{Hm.init(e,t);let n=RegExp(`.*${Td(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),uh=U(`$ZodCheckProperty`,(e,t)=>{Hm.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>Vm(n,e,t.property));Vm(n,e,t.property)}}),dh=U(`$ZodCheckMimeType`,(e,t)=>{Hm.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),fh=U(`$ZodCheckOverwrite`,(e,t)=>{Hm.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),mh,hh=o((()=>{mh=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` -`)}\n};`)(...Object.values(this.closed))}}})),mh,hh=o((()=>{mh={major:4,minor:5,patch:4}}));function gh(e){return{validate:t=>{try{return Zh(ep(e,t))}catch{return np(e,t).then(Zh)}},vendor:`zod`,version:1}}function _h(e,t){if(!t.normalize&&t.protocol?.source===cm.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function vh(e){return e.replace(rg,``)}function yh(e,t){return t.lastIndex=0,t.test(e.hostname)}function bh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function xh(e){if(!_g.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Sh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:xh(n)}function Ch(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function wh(e){if(!am.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Ch(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Th(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Eh(e){return um.test(e)?Th(e.replace(Tg,``)):!1}function Dh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Oh(e,t,n){e.issues.length&&t.issues.push(...Id(n,e.issues)),t.value[n]=e.value}function kh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Id(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Ah(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ug,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Ed(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function jh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>kh(e,n,i,t,u,d))):kh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Mh(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Pd(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>zd(e,r,xf())))}),t)}function Nh(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>zd(e,r,xf())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Ph(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Fh(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(bd(e)&&bd(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Fh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Fh(t.value,n.value);if(!c.valid){if(Pd(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Lh(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Rh(e,t,n){e.issues.length&&t.issues.push(...Id(n,e.issues)),t.value[n]=e.value}function zh(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...Id(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Bh(e,t,n,r,i,a,o){e.issues.length&&(uf.has(typeof r)?n.issues.push(...Id(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>zd(e,o,xf()))})),t.issues.length&&(uf.has(typeof r)?n.issues.push(...Id(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>zd(e,o,xf()))})),n.value.set(e.value,t.value)}function Vh(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Hh(e,t){return e.value=t.issues.length?void 0:t.value,e}function Uh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Wh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Gh(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>zd(e,r,xf()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function Kh(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function qh(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Jh(e,r,t.out,n)):Jh(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Jh(e,r,t.in,n)):Jh(e,r,t.in,n)}}function Jh(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function Yh(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Xh(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ud(e))}}var W,Zh,Qh,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_=o((()=>{dh(),Af(),ph(),Cp(),Rm(),H(),hh(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=mh;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Pd(t),a;for(let o of n){if(o._zod.def.when){if(Fd(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Df;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Rd(t.issues,n,e),i||=Pd(t,n))});else{if(t.issues.length===n)continue;Rd(t.issues,n,e),i||=Pd(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Pd(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Df;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Df;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return $d(this,`~standard`,gh(this))},set"~standard"(e){Qd(this,`~standard`,e)}}),Zh=e=>e.success?{value:e.data}:{issues:e.error?.issues},Qh=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??pm(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),$h=U(`$ZodStringFormat`,(e,t)=>{th.init(e,t),Qh.init(e,t)}),eg=U(`$ZodGUID`,(e,t)=>{t.pattern??=Vp,$h.init(e,t)}),tg=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Hp(e)}else t.pattern??=Hp();$h.init(e,t)}),ng=U(`$ZodEmail`,(e,t)=>{t.pattern??=Kp,$h.init(e,t)}),rg=/[\t\n\r]/g,ig=U(`$ZodURL`,(e,t)=>{$h.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=_h(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!yh(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!bh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:vh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),ag=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Ep(),$h.init(e,t)}),og=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Rp:Tp(t.length),$h.init(e,t)}),sg=U(`$ZodCUID`,(e,t)=>{t.pattern??=Np,$h.init(e,t)}),cg=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Pp,$h.init(e,t)}),lg=U(`$ZodULID`,(e,t)=>{t.pattern??=Fp,$h.init(e,t)}),ug=U(`$ZodXID`,(e,t)=>{t.pattern??=Ip,$h.init(e,t)}),dg=U(`$ZodKSUID`,(e,t)=>{t.pattern??=Lp,$h.init(e,t)}),fg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Ap(t),$h.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),pg=U(`$ZodISODate`,(e,t)=>{t.pattern??=fm,$h.init(e,t)}),mg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=kp(t),$h.init(e,t)}),hg=U(`$ZodISODuration`,(e,t)=>{t.pattern??=zp,$h.init(e,t)}),gg=U(`$ZodIPv4`,(e,t)=>{t.pattern??=$p,$h.init(e,t),e._zod.bag.format=`ipv4`}),_g=/^[0-9a-fA-F:.]+$/,vg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=em,$h.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{xh(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),yg=U(`$ZodMAC`,(e,t)=>{t.pattern??=tm(t.delimiter),$h.init(e,t),e._zod.bag.format=`mac`}),bg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=nm,$h.init(e,t)}),xg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=rm,$h.init(e,t),e._zod.check=n=>{Sh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),Sg=U(`$ZodBase64`,(e,t)=>{t.pattern??=im,$h.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Ch(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Cg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=am,$h.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{wh(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),wg=U(`$ZodE164`,(e,t)=>{t.pattern??=lm,$h.init(e,t)}),Tg=/[- ]/g,Eg=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=um,$h.init(e,t),e._zod.check=n=>{Eh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),Dg=U(`$ZodJWT`,(e,t)=>{$h.init(e,t),e._zod.check=n=>{Dh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Og=U(`$ZodCustomStringFormat`,(e,t)=>{$h.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),kg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??gm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Ag=U(`$ZodNumberFormat`,(e,t)=>{qm.init(e,t),kg.init(e,t)}),jg=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=_m,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Mg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=mm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Ng=U(`$ZodBigIntFormat`,(e,t)=>{Jm.init(e,t),Mg.init(e,t)}),Pg=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Fg=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=ym,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Ig=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=vm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Lg=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Rg=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),zg=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Bg=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Vg=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),Hg=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eOh(t,r,e))):Oh(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),Ug=[],Wg=new WeakMap,Gg=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Wg.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Wg.set(t,n),n}})}let n=ad(()=>Ah(t));nf(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||dd(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=yd,i=t.catchall,a,o=kf.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>kh(n,t,e,c,r,i))):kh(a,t,e,c,r,i)}return i?jh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Kg=U(`$ZodObjectJIT`,(e,t)=>{Gg.init(e,t);let n=e._zod.parse,r=ad(()=>Ah(t)),i=kf.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new fh([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` +`)}\n};`)(...Object.values(this.closed))}}})),gh,_h=o((()=>{gh={major:4,minor:5,patch:4}}));function vh(e){return{validate:t=>{try{return $h(np(e,t))}catch{return ip(e,t).then($h)}},vendor:`zod`,version:1}}function yh(e,t){if(!t.normalize&&t.protocol?.source===um.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function bh(e){return e.replace(ag,``)}function xh(e,t){return t.lastIndex=0,t.test(e.hostname)}function Sh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Ch(e){if(!yg.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function wh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Ch(n)}function Th(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Eh(e){if(!sm.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Th(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Dh(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Oh(e){return fm.test(e)?Dh(e.replace(Dg,``)):!1}function kh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Ah(e,t,n){e.issues.length&&t.issues.push(...Rd(n,e.issues)),t.value[n]=e.value}function jh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Rd(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Mh(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Gg,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Od(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Nh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>jh(e,n,i,t,u,d))):jh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Ph(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Id(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Vd(e,r,Cf())))}),t)}function Fh(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>Vd(e,r,Cf())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Ih(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Lh(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Sd(e)&&Sd(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Lh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Lh(t.value,n.value);if(!c.valid){if(Id(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function zh(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Bh(e,t,n){e.issues.length&&t.issues.push(...Rd(n,e.issues)),t.value[n]=e.value}function Vh(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...Rd(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Hh(e,t,n,r,i,a,o){e.issues.length&&(ff.has(typeof r)?n.issues.push(...Rd(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>Vd(e,o,Cf()))})),t.issues.length&&(ff.has(typeof r)?n.issues.push(...Rd(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>Vd(e,o,Cf()))})),n.value.set(e.value,t.value)}function Uh(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Wh(e,t){return e.value=t.issues.length?void 0:t.value,e}function Gh(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Kh(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function qh(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Vd(e,r,Cf()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function Jh(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function Yh(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>Xh(e,r,t.out,n)):Xh(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>Xh(e,r,t.in,n)):Xh(e,r,t.in,n)}}function Xh(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function Zh(e){return e.memo||(e.value=Object.freeze(e.value)),e}function Qh(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Gd(e))}}var W,$h,eg,tg,ng,rg,ig,ag,og,sg,cg,lg,ug,dg,fg,pg,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_=o((()=>{ph(),Mf(),hh(),Tp(),Bm(),H(),_h(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=gh;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Id(t),a;for(let o of n){if(o._zod.def.when){if(Ld(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new kf;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Bd(t.issues,n,e),i||=Id(t,n))});else{if(t.issues.length===n)continue;Bd(t.issues,n,e),i||=Id(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Id(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new kf;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new kf;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return tf(this,`~standard`,vh(this))},set"~standard"(e){ef(this,`~standard`,e)}}),$h=e=>e.success?{value:e.data}:{issues:e.error?.issues},eg=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??hm(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),tg=U(`$ZodStringFormat`,(e,t)=>{rh.init(e,t),eg.init(e,t)}),ng=U(`$ZodGUID`,(e,t)=>{t.pattern??=Up,tg.init(e,t)}),rg=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Wp(e)}else t.pattern??=Wp();tg.init(e,t)}),ig=U(`$ZodEmail`,(e,t)=>{t.pattern??=Jp,tg.init(e,t)}),ag=/[\t\n\r]/g,og=U(`$ZodURL`,(e,t)=>{tg.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=yh(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!xh(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Sh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:bh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),sg=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Op(),tg.init(e,t)}),cg=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?Bp:Dp(t.length),tg.init(e,t)}),lg=U(`$ZodCUID`,(e,t)=>{t.pattern??=Fp,tg.init(e,t)}),ug=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Ip,tg.init(e,t)}),dg=U(`$ZodULID`,(e,t)=>{t.pattern??=Lp,tg.init(e,t)}),fg=U(`$ZodXID`,(e,t)=>{t.pattern??=Rp,tg.init(e,t)}),pg=U(`$ZodKSUID`,(e,t)=>{t.pattern??=zp,tg.init(e,t)}),mg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Mp(t),tg.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),hg=U(`$ZodISODate`,(e,t)=>{t.pattern??=mm,tg.init(e,t)}),gg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=jp(t),tg.init(e,t)}),_g=U(`$ZodISODuration`,(e,t)=>{t.pattern??=Vp,tg.init(e,t)}),vg=U(`$ZodIPv4`,(e,t)=>{t.pattern??=tm,tg.init(e,t),e._zod.bag.format=`ipv4`}),yg=/^[0-9a-fA-F:.]+$/,bg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=nm,tg.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Ch(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),xg=U(`$ZodMAC`,(e,t)=>{t.pattern??=rm(t.delimiter),tg.init(e,t),e._zod.bag.format=`mac`}),Sg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=im,tg.init(e,t)}),Cg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=am,tg.init(e,t),e._zod.check=n=>{wh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),wg=U(`$ZodBase64`,(e,t)=>{t.pattern??=om,tg.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Th(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Tg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=sm,tg.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Eh(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Eg=U(`$ZodE164`,(e,t)=>{t.pattern??=dm,tg.init(e,t)}),Dg=/[- ]/g,Og=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=fm,tg.init(e,t),e._zod.check=n=>{Oh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),kg=U(`$ZodJWT`,(e,t)=>{tg.init(e,t),e._zod.check=n=>{kh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Ag=U(`$ZodCustomStringFormat`,(e,t)=>{tg.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),jg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??vm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Mg=U(`$ZodNumberFormat`,(e,t)=>{Ym.init(e,t),jg.init(e,t)}),Ng=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=ym,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Pg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=gm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Fg=U(`$ZodBigIntFormat`,(e,t)=>{Xm.init(e,t),Pg.init(e,t)}),Ig=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Lg=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=xm,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Rg=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=bm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),zg=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Bg=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),Vg=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),Hg=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),Ug=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),Wg=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=jf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eAh(t,r,e))):Ah(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),Gg=[],Kg=new WeakMap,qg=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;Kg.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),Kg.set(t,n),n}})}let n=sd(()=>Mh(t));af(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||pd(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=xd,i=t.catchall,a,o=jf.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>jh(n,t,e,c,r,i))):jh(a,t,e,c,r,i)}return i?Nh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),Jg=U(`$ZodObjectJIT`,(e,t)=>{qg.init(e,t);let n=e._zod.parse,r=sd(()=>Mh(t)),i=jf.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new mh([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; payload.issues.push(iss); - }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:_d(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` + }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:yd(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` const ${n}_present = ${i}; if (!${n}.issues.length || ${n}_present) { if (${n}.issues.length) {${c(n,r)} @@ -56,16 +56,16 @@ newResult[${r}] = ${n}.value; } - `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=yd,c=!kf.jitless,l=c&&cf.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?jh([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),qg=U(`$ZodUnion`,(e,t)=>{W.init(e,t),nf(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),nf(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),nf(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),nf(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>sd(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Mh(t,r,e,i)):Mh(o,r,e,i)}}),Jg=U(`$ZodXor`,(e,t)=>{qg.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Nh(t,r,e,i)):Nh(o,r,e,i)}}),Yg=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,qg.init(e,t);let n=e._zod.parse;nf(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||dd(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=Wg.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ad(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!yd(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Xg=U(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Ih(e,t,n)):Ih(e,i,a)}}),Zg=U(`$ZodTuple`,(e,t)=>{W.init(e,t);let n=t.items,r=kf.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Lh(n,`optin`),l=Lh(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Rh(t,i,e))):Rh(r,i,e)}}return s.length?Promise.all(s).then(()=>zh(u,i,n,o,l)):zh(u,i,n,o,l)}}),Qg=U(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!bd(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>zd(e,i,xf())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Id(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Id(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&gm.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>zd(e,i,xf())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Id(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Id(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),$g=U(`$ZodMap`,(e,t)=>{W.init(e,t);let n=kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{Bh(t,o,r,n,a,e,i)})):Bh(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),e_=U(`$ZodSet`,(e,t)=>{W.init(e,t);let n=kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>Vh(e,r))):Vh(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),t_=U(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=rd(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>uf.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>Cd(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),n_=U(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?Cd(e):e?Cd(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),r_=U(`$ZodFile`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),i_=U(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,kf.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Of(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Df;return n.value=i,n}}),a_=U(`$ZodOptional`,(e,t)=>{W.init(e,t),nf(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,nf(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),nf(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${sd(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Hh(e,t)):Hh(e,r)}return t.innerType._zod.run(e,n)}}),o_=U(`$ZodExactOptional`,(e,t)=>{a_.init(e,t),nf(e,`values`,e=>e.def.innerType._zod.values),nf(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),s_=U(`$ZodNullable`,(e,t)=>{W.init(e,t),nf(e,`optin`,e=>e.def.innerType._zod.optin),nf(e,`optout`,e=>e.def.innerType._zod.optout),nf(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${sd(t.source)}|null)$`):void 0}),nf(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),c_=U(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,nf(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Uh(e,t)):Uh(r,t)}}),l_=U(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,nf(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),u_=U(`$ZodNonOptional`,(e,t)=>{W.init(e,t),nf(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Wh(t,e)):Wh(i,e)}}),d_=U(`$ZodSuccess`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Of(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),f_=U(`$ZodCatch`,(e,t)=>{W.init(e,t),nf(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),nf(e,`optout`,e=>e.def.innerType._zod.optout),nf(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Gh(e,r,t,n)):Gh(e,r,t,n)}}),p_=U(`$ZodNaN`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),m_=U(`$ZodPipe`,(e,t)=>{W.init(e,t),nf(e,`values`,e=>e.def.in._zod.values),nf(e,`optin`,e=>e.def.in._zod.optin),nf(e,`optout`,e=>e.def.out._zod.optout),nf(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Kh(e,t.in,n)):Kh(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Kh(e,t.out,n)):Kh(r,t.out,n)}}),h_=U(`$ZodCodec`,(e,t)=>{W.init(e,t),nf(e,`values`,e=>e.def.in._zod.values),nf(e,`optin`,e=>e.def.in._zod.optin),nf(e,`optout`,e=>e.def.out._zod.optout),nf(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>qh(e,t,n)):qh(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>qh(e,t,n)):qh(r,t,n)}}}),g_=U(`$ZodPreprocess`,(e,t)=>{m_.init(e,t)}),__=U(`$ZodReadonly`,(e,t)=>{W.init(e,t),nf(e,`propValues`,e=>e.def.innerType._zod.propValues),nf(e,`values`,e=>e.def.innerType._zod.values),nf(e,`optin`,e=>e.def.innerType?._zod?.optin),nf(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Yh):Yh(r)}}),v_=U(`$ZodTemplateLiteral`,(e,t)=>{W.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||df.has(typeof e))n.push(Cd(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),y_=U(`$ZodFunction`,(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?Xf(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Xf(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await Qf(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await Qf(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new Zg({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),b_=U(`$ZodPromise`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),x_=U(`$ZodLazy`,(e,t)=>{W.init(e,t),ld(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),nf(e,`pattern`,e=>e.innerType?._zod?.pattern),nf(e,`propValues`,e=>e.innerType?._zod?.propValues),nf(e,`optin`,e=>e.innerType?._zod?.optin??void 0),nf(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),S_=U(`$ZodCustom`,(e,t)=>{Bm.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Xh(t,n,r,e));Xh(i,n,r,e)}})}));function w_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function T_(e,t){let n=N_.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&T_(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),N_.set(e,r),r}function E_(e){return T_(e,new Set)}function D_(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function O_(){return I_}function k_(e,t){let n=e[j_]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var A_,j_,M_,N_,P_,F_,I_,L_=o((()=>{A_=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},j_=`~memo`,M_=[],N_=new WeakMap,F_=[],I_={alloc(e,t,n){let r=P_;if(!r)return n;P_=void 0;let i={value:n,issues:null};return r.set(t.value,i),F_.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&k_(n,e.value))throw new A_;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=T_(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[j_];l||(l={buckets:new Map,backEdges:void 0},s[j_]=l);let u;r===s?u=i:(u=D_(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...w_(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;P_=u;let f=F_.length,p=t(o,s);P_=void 0;let m=F_.length>f?F_.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?w_(e.issues):M_),e)):(m&&(m.issues=p.issues.length?w_(p.issues):M_),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function R_(){return{localeError:z_()}}var z_,B_=o((()=>{H(),z_=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${B(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${R(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function V_(){return{localeError:H_()}}var H_,U_=o((()=>{H(),H_=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${B(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function W_(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function G_(){return{localeError:K_()}}var K_,q_=o((()=>{H(),K_=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${B(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=W_(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=W_(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function J_(){return{localeError:Y_()}}var Y_,X_=o((()=>{H(),Y_=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${B(e.values[0])}`:`Невалидна опция: очаквано едно от ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function Z_(){return{localeError:Q_()}}var Q_,$_=o((()=>{H(),Q_=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${B(e.values[0])}`:`অবৈধ অপশন: ${R(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function ev(){return{localeError:tv()}}var tv,nv=o((()=>{H(),tv=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${B(e.values[0])}`:`Opció invàlida: s'esperava una de ${R(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function rv(){return{localeError:iv()}}var iv,av=o((()=>{H(),iv=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${B(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${R(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${R(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function ov(){return{localeError:sv()}}var sv,cv=o((()=>{H(),sv=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${B(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function lv(){return{localeError:uv()}}var uv,dv=o((()=>{H(),uv=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${B(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function fv(){return{localeError:pv()}}var pv,mv=o((()=>{H(),pv=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${B(e.values[0])}`:`Ungültige Option: erwartet eine von ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function hv(){return{localeError:gv()}}var gv,_v=o((()=>{H(),gv=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${B(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function vv(){return{localeError:yv()}}var yv,bv=o((()=>{H(),yv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(V(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${B(e.values[0])}`:`Invalid option: expected one of ${R(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function xv(){return{localeError:Sv()}}var Sv,Cv=o((()=>{H(),Sv=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${B(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function wv(){return{localeError:Tv()}}var Tv,Ev=o((()=>{H(),Tv=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${B(e.values[0])}`:`Opción inválida: se esperaba una de ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function Dv(){return{localeError:Ov()}}var Ov,kv=o((()=>{H(),Ov=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${B(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${R(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${R(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function Av(){return{localeError:jv()}}var jv,Mv=o((()=>{H(),jv=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${B(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function Nv(){return{localeError:Pv()}}var Pv,Fv=o((()=>{H(),Pv=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${B(e.values[0])} attendu`:`Option invalide : une valeur parmi ${R(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${R(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Iv(){return{localeError:Lv()}}var Lv,Rv=o((()=>{H(),Lv=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${B(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${R(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function zv(){return{localeError:Bv()}}var Bv,Vv=o((()=>{H(),Bv=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${B(e.values[0])}`:`અમાન્ય વિકલ્પ: ${R(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function Hv(){return{localeError:Uv()}}var Uv,Wv=o((()=>{H(),Uv=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=V(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${B(t.values[0])}`;let e=t.values.map(e=>B(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${R(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function Gv(){return{localeError:Kv()}}var Kv,qv=o((()=>{H(),Kv=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${B(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function Jv(){return{localeError:Yv()}}var Yv,Xv=o((()=>{H(),Yv=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${B(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function Zv(){return{localeError:Qv()}}var Qv,$v=o((()=>{H(),Qv=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${B(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function ey(e,t,n){return Math.abs(e)===1?t:n}function ty(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function ny(){return{localeError:ry()}}var ry,iy=o((()=>{H(),ry=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${B(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ey(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ty(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ty(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ey(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ty(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ty(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${R(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${ty(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${ty(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function ay(){return{localeError:oy()}}var oy,sy=o((()=>{H(),oy=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${B(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function cy(){return{localeError:ly()}}var ly,uy=o((()=>{H(),ly=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${B(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function dy(){return{localeError:fy()}}var fy,py=o((()=>{H(),fy=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${B(e.values[0])}`:`Opzione non valida: atteso uno tra ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function my(){return{localeError:hy()}}var hy,gy=o((()=>{H(),hy=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${B(e.values[0])}が期待されました`:`無効な選択: ${R(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${R(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function _y(){return{localeError:vy()}}var vy,yy=o((()=>{H(),vy=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${B(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${R(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function by(){return{localeError:xy()}}var xy,Sy=o((()=>{H(),xy=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${B(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${R(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function Cy(){return by()}var wy=o((()=>{Sy()}));function Ty(){return{localeError:Ey()}}var Ey,Dy=o((()=>{H(),Ey=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${B(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function Oy(){return{localeError:ky()}}var ky,Ay=o((()=>{H(),ky=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${B(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${R(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${R(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function jy(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function My(){return{localeError:Py()}}var Ny,Py,Fy=o((()=>{H(),Ny=e=>e.charAt(0).toUpperCase()+e.slice(1),Py=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${B(e.values[0])}`:`Privalo būti vienas iš ${R(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,jy(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${Ny(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${Ny(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,jy(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${Ny(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${Ny(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${Ny(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function Iy(){return{localeError:Ly()}}var Ly,Ry=o((()=>{H(),Ly=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${B(e.values[0])}`:`Грешана опција: се очекува една ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function zy(){return{localeError:By()}}var By,Vy=o((()=>{H(),By=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${B(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${R(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function Hy(){return{localeError:Uy()}}var Uy,Wy=o((()=>{H(),Uy=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${B(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function Gy(){return{localeError:Ky()}}var Ky,qy=o((()=>{H(),Ky=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${B(e.values[0])}`:`Ongeldige optie: verwacht één van ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function Jy(){return{localeError:Yy()}}var Yy,Xy=o((()=>{H(),Yy=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${B(e.values[0])}`:`Ugyldig val: forventa eitt av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function Zy(){return{localeError:Qy()}}var Qy,$y=o((()=>{H(),Qy=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${B(e.values[0])}`:`Ugyldig valg: forventet en av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function eb(){return{localeError:tb()}}var tb,nb=o((()=>{H(),tb=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${B(e.values[0])}`:`Fâsit tercih: mûteberler ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function rb(){return{localeError:ib()}}var ib,ab=o((()=>{H(),ib=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${B(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${R(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function ob(){return{localeError:sb()}}var sb,cb=o((()=>{H(),sb=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${B(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function lb(){return{localeError:ub()}}var ub,db=o((()=>{H(),ub=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(V(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${B(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${R(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function fb(){return{localeError:pb()}}var pb,mb=o((()=>{H(),pb=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(V(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${B(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${R(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function hb(){return{localeError:gb()}}var gb,_b=o((()=>{H(),gb=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${B(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${R(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function vb(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function yb(){return{localeError:bb()}}var bb,xb=o((()=>{H(),bb=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${B(e.values[0])}`:`Неверный вариант: ожидалось одно из ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=vb(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=vb(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function Sb(){return{localeError:Cb()}}var Cb,wb=o((()=>{H(),Cb=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${B(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Tb(){return{localeError:Eb()}}var Eb,Db=o((()=>{H(),Eb=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${B(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Ob(){return{localeError:kb()}}var kb,Ab=o((()=>{H(),kb=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${B(e.values[0])}`:`Ogiltigt val: förväntade en av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function jb(){return{localeError:Mb()}}var Mb,Nb=o((()=>{H(),Mb=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${B(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${R(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Pb(){return{localeError:Fb()}}var Fb,Ib=o((()=>{H(),Fb=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${B(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${R(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function Lb(){return{localeError:Rb()}}var Rb,zb=o((()=>{H(),Rb=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${B(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function Bb(){return{localeError:Vb()}}var Vb,Hb=o((()=>{H(),Vb=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${B(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function Ub(){return{localeError:Wb()}}var Wb,Gb=o((()=>{H(),Wb=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${B(e.values[0])}`:`Неправильна опція: очікується одне з ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function Kb(){return Ub()}var qb=o((()=>{Gb()}));function Jb(){return{localeError:Yb()}}var Yb,Xb=o((()=>{H(),Yb=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${B(e.values[0])} متوقع تھا`:`غلط آپشن: ${R(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${R(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function Zb(){return{localeError:Qb()}}var Qb,$b=o((()=>{H(),Qb=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${B(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function ex(){return{localeError:tx()}}var tx,nx=o((()=>{H(),tx=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${B(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${R(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function rx(){return{localeError:ix()}}var ix,ax=o((()=>{H(),ix=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${B(e.values[0])}`:`无效选项:期望以下之一 ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function ox(){return{localeError:sx()}}var sx,cx=o((()=>{H(),sx=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${B(e.values[0])}`:`無效的選項:預期為以下其中之一 ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${R(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function lx(){return{localeError:ux()}}var ux,dx=o((()=>{H(),ux=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${B(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${R(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),fx=c({ar:()=>R_,az:()=>V_,be:()=>G_,bg:()=>J_,bn:()=>Z_,ca:()=>ev,ckb:()=>rv,cs:()=>ov,da:()=>lv,de:()=>fv,el:()=>hv,en:()=>vv,eo:()=>xv,es:()=>wv,fa:()=>Dv,fi:()=>Av,fr:()=>Nv,frCA:()=>Iv,gu:()=>zv,he:()=>Hv,hi:()=>Gv,hr:()=>Jv,hu:()=>Zv,hy:()=>ny,id:()=>ay,is:()=>cy,it:()=>dy,ja:()=>my,ka:()=>_y,kh:()=>Cy,km:()=>by,kn:()=>Ty,ko:()=>Oy,lt:()=>My,mk:()=>Iy,ms:()=>zy,ne:()=>Hy,nl:()=>Gy,nn:()=>Jy,no:()=>Zy,ota:()=>eb,pl:()=>ob,ps:()=>rb,pt:()=>lb,ptBR:()=>fb,ro:()=>hb,ru:()=>yb,sk:()=>Sb,sl:()=>Tb,sv:()=>Ob,ta:()=>jb,th:()=>Pb,tk:()=>Lb,tr:()=>Bb,ua:()=>Kb,uk:()=>Ub,ur:()=>Jb,uz:()=>Zb,vi:()=>ex,yo:()=>lx,zhCN:()=>rx,zhTW:()=>ox}),px=o((()=>{B_(),U_(),q_(),X_(),$_(),nv(),av(),cv(),dv(),mv(),_v(),bv(),Cv(),Ev(),kv(),Mv(),Fv(),Rv(),Vv(),Wv(),qv(),Xv(),$v(),iy(),sy(),uy(),py(),gy(),yy(),wy(),Sy(),Dy(),Ay(),Fy(),Ry(),Vy(),Wy(),qy(),Xy(),$y(),nb(),ab(),cb(),db(),mb(),_b(),xb(),wb(),Db(),Ab(),Nb(),Ib(),zb(),Hb(),qb(),Gb(),Xb(),$b(),nx(),ax(),cx(),dx()}));function mx(){return new vx}var hx,gx,_x,vx,yx,bx=o((()=>{gx=Symbol(`ZodOutput`),_x=Symbol(`ZodInput`),vx=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(hx=globalThis).__zod_globalRegistry??(hx.__zod_globalRegistry=mx()),yx=globalThis.__zod_globalRegistry}));function xx(e,t){try{return wx(e,{assertOnly:!0})}catch{return t}}function Sx(e,t){try{let t=wx(e),n=wd(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[FS]||n&&k_(n,e.value))return i(e,n);let r=t(e.value);return r===PS?(n&&(n[FS]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=xx(e,t),n._zod.run=a,r.__originalRun||Cx(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function Cx(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===PS?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===PS?e(t,r):i}}}function wx(e,t){let n=!0;try{n=E_(e)}catch{}if(n)throw new LS(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new fh([`input`]),a=Wx(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[PS,...r.constants.values()],c=i.content.join(` -`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new LS(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function G(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function K(e){return`v${e.varCounter++}`}function Tx(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return PS;let r=n;return r.issues.length===0?r.value:PS}function Ex(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return Wx(e,t,n,r,i)}catch(i){if(!(i instanceof LS)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,Dx(e,t,n,r)}}function Dx(e,t,n,r){let i=G(t,n),a=G(t,Tx),o=K(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function Ox(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!RS.has(r.check))throw new LS(`check with a custom "when" condition`);switch(r.check){case`greater_than`:Mx(e,t,r,a);break;case`less_than`:Nx(e,t,r,a);break;case`multiple_of`:Px(e,t,r,a);break;case`number_format`:Fx(e,r,a);break;case`min_length`:{let n=Ax(r.minimum,`min_length`),i=kx(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=Ax(r.maximum,`max_length`),i=kx(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=Ax(r.length,`length_equals`),i=kx(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${Ax(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${Ax(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${Ax(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=Ux(e,t,r,a);break;case`custom`:a=Hx(e,t,n,a);break;case`bigint_format`:Ix(e,r,a);break;case`mime_type`:Lx(e,t,r,a);break;case`property`:Rx(e,t,r,a);break;case`overwrite`:{let r=K(t);zx(e,t,n,a,r),a=r;break}default:throw new LS(`check type ${r.check}`)}}return a}function kx(e,t,n,r){let i=G(t,Vd),a=K(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function Ax(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new LS(`${t} bound of type ${typeof e}`);return`${e}`}function jx(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new LS(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new LS(`comparison check with Invalid Date bound`);return G(e,t)}throw new LS(`comparison check bound of type ${typeof t}`)}function Mx(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${jx(t,n.value)}) return INVALID;`)}function Nx(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${jx(t,n.value)}) return INVALID;`)}function Px(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new LS(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=G(t,cd);e.write(`if (${i}(${r}, ${Ax(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function Fx(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new LS(`number format ${r}`)}}function Ix(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new LS(`bigint format ${r}`)}}function Lx(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=G(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function Rx(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;Wx(e,t,n.schema,i)}function zx(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new LS(`overwrite check without a transform function`);if(kS(a))throw new IS(`z.compile: async overwrite transforms are not supported`);let o=G(t,a);e.write(`const ${i} = ${o}(${r});`)}function Bx(){throw new Df}function Vx(e){this.issues.push(e)}function Hx(e,t,n,r){let i=n._zod.def;if(i.fn){if(kS(i.fn))throw new IS(`z.compile: async .refine() predicates are not supported`);let n=G(t,i.fn),a=G(t,Bx),o=K(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(kS(n._zod.check))throw new IS(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=G(t,e=>{let t={value:e,issues:[],addIssue:Vx};return i(t)instanceof Promise&&Bx(),t.issues.length===0?t.value:PS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new LS(`custom check without a predicate or check function`)}function Ux(e,t,n,r){let i=n.format;if(i===`base64`){let n=G(t,Ch);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=G(t,wh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=G(t,Dh),a=G(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=G(t,xh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=G(t,Sh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=G(t,Eh);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=G(t,_h),o=G(t,n),s=K(t),c=K(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=G(t,yh);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=G(t,bh);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=K(t),u=a.normalize?`${c}.href`:`${G(t,vh)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(kS(o))throw new LS(`async string format ${i}`);let n=G(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(zS.has(i)&&n.pattern){let i=G(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new LS(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${_d(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${_d(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${_d(t)}) return INVALID;`);break}default:throw new LS(`string format ${s}`)}return r}function Wx(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new LS(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=Gx(e,t,n,r);break;case`number`:c=Kx(e,n,r);break;case`boolean`:c=qx(e,r);break;case`bigint`:c=Jx(e,n,r);break;case`symbol`:c=Yx(e,r);break;case`undefined`:c=Xx(e,r);break;case`null`:c=Zx(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=Qx(e,r);break;case`nan`:c=$x(e,r);break;case`date`:c=eS(e,r);break;case`object`:c=tS(e,t,n,r,s);break;case`optional`:c=nS(e,t,n,r,s);break;case`nullable`:c=cS(e,t,n,r,s);break;case`array`:c=lS(e,t,n,r,s);break;case`literal`:c=uS(e,t,n,r);break;case`enum`:c=dS(e,t,n,r);break;case`readonly`:{let i=fS(e,t,n,r),a=K(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:fS(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=pS(e,t,n,r);break;case`nonoptional`:c=mS(e,t,n,r);break;case`tuple`:c=hS(e,t,n,r);break;case`union`:c=_S(e,t,n,r);break;case`intersection`:c=bS(e,t,n,r);break;case`record`:c=xS(e,t,n,r);break;case`map`:c=CS(e,t,n,r);break;case`set`:c=wS(e,t,n,r);break;case`file`:c=TS(e,r);break;case`template_literal`:c=ES(e,t,n,r);break;case`lazy`:c=DS(e,t,n,r);break;case`pipe`:c=OS(e,t,n,r);break;case`custom`:c=AS(e,t,n,r);break;case`transform`:c=NS(e,t,n,r);break;case`catch`:c=MS(e,t,n,r);break;default:throw new LS(`schema type ${o}`)}return c===null?null:Ox(e,t,n,c)}function Gx(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:Ux(e,t,i,r)}function Kx(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&Fx(e,{format:r.format},n),n}function qx(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Jx(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function Yx(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Xx(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Zx(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function Qx(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function $x(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function eS(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function tS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?G(t,e):_d(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:_d(e),f=o;if(s.includes(`__proto__`))throw new LS(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=K(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=K(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=Ex(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{iS(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=Ex(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${_d(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=K(t),_=l.some(e=>sS(f[e])||oS(f[e]));if(!i){if(h===`schema`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=K(t);e.write(`const ${i} = ${r}[k];`),Ex(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);oS(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):sS(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=K(t);e.write(`const ${n} = ${r}[k];`);let i=Ex(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function nS(e,t,n,r,i=!0){let a=n._zod.def;if(rS(n))return Wx(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=K(t),i=K(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=Wx(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=Wx(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?K(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=Wx(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function rS(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function iS(e){return e._zod.optin===void 0&&aS(e)}function aS(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?aS(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||aS(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(aS);case`intersection`:return!t.left||!t.right||aS(t.left)&&aS(t.right);case`pipe`:return!t.in||aS(t.in);default:return!0}}function oS(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function sS(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||sS(t.innerType);case`union`:return!t.options||t.options.some(sS);case`intersection`:return!t.left||!t.right||sS(t.left)||sS(t.right);case`pipe`:return!t.out||sS(t.out);default:return!0}}function cS(e,t,n,r,i=!0){let a=n._zod.def,o=i?K(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=Wx(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function lS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?K(t):null,s=K(t),c=K(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=Ex(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function uS(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${_d(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new LS(`literal type ${typeof a}`);return r}function dS(e,t,n,r){let i=n._zod.values;if(!i)throw new LS(`enum schema without enumerated values`);let a=G(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function fS(e,t,n,r){let i=n._zod.def;return Wx(e,t,i.innerType,r)}function pS(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return Wx(e,t,i.innerType,r);let n=G(t,a),o=K(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),Wx(e,t,i.innerType,o)}let o=K(t);if(a){let n=G(t,a),s=G(t,xd);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=Wx(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=Wx(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function mS(e,t,n,r){let i=n._zod.def,a=Wx(e,t,i.innerType,r),o=K(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function hS(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=gS(a,`optin`),c=gS(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=K(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ex(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(oS(i)){e.write(`${l}.length = ${n};`);return}let r=K(t),a=K(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=Ex(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ex(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=K(t),i=K(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=Ex(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function gS(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function _S(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return vS(e,t,i,r);if(i.inclusive===!1)throw new LS(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return Wx(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=G(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=K(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=Wx(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function vS(e,t,n,r){if(n.unionFallback)throw new LS(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=K(t),a=K(t);e.write(`const ${i} = ${r}?.[${_d(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new LS(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new LS(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>yS(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=Wx(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function yS(e,t,n){if(typeof n==`string`)return`${t} === ${_d(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${G(e,n)}`;throw new LS(`literal discriminator value ${String(n)}`)}function bS(e,t,n,r){let i=n._zod.def,a=Ex(e,t,i.left,r),o=Ex(e,t,i.right,r),s=G(t,Fh),c=K(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function xS(e,t,n,r){let i=n._zod.def,a=G(t,bd);e.write(`if (!${a}(${r})) return INVALID;`);let o=K(t),s=K(t),c=K(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new LS(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new LS(`record key "__proto__"`);n.push(s);let c=G(t,a),l=Wx(e,t,i.keyType,c),u=K(t);e.write(`const ${u} = ${r}[${SS(t,s)}];`);let d=Ex(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=G(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=G(t,wx(i.keyType)),c=G(t,gm),l=G(t,Object.prototype.propertyIsEnumerable),u=K(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=K(t);e.write(`const ${d} = ${r}[${s}];`);let f=Ex(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=G(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=Ex(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function SS(e,t){return typeof t==`string`?_d(t):G(e,t)}function CS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=K(t),o=K(t),s=K(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=Wx(e,t,i.keyType,o),r=Wx(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function wS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=K(t),o=K(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=Wx(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function TS(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function ES(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=G(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function DS(e,t,n,r){let i=n._zod.def,a=G(t,i.getter),o=G(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=K(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function OS(e,t,n,r){let i=n._zod.def,a=Wx(e,t,i.in,r);if(i.transform){if(kS(i.transform))throw new IS(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=G(t,e=>{let t={value:e,issues:[],addIssue:Vx},r=n(e,t);return r instanceof Promise?PS:t.issues.length===0?r:PS}),o=K(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),Wx(e,t,i.out,o)}return Wx(e,t,i.out,a)}function kS(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function AS(e,t,n,r){let i=n._zod.def;if(i.fn){if(kS(i.fn))throw new IS(`z.compile: async custom predicates are not supported`);let n=G(t,i.fn),a=G(t,Bx),o=K(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new LS(`custom schema without a predicate function`);return r}function jS(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return PS;let i=r;return i.issues.length===0?i.value:t()}function MS(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new LS(`catch with a callback (only a constant catch value compiles)`,!1);let a=K(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=Ex(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=G(t,i.innerType),s=G(t,i.catchValue),c=G(t,jS);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function NS(e,t,n,r){let i=n._zod.def;if(i.transform){if(kS(i.transform))throw new IS(`z.compile: async transforms are not supported`);let n=i.transform,a=G(t,e=>{let t={value:e,issues:[],addIssue:Vx},r=n(e,t);return r instanceof Promise?PS:t.issues.length===0?r:PS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var PS,FS,IS,LS,RS,zS,BS=o((()=>{Af(),ph(),L_(),Rm(),C_(),H(),PS=Symbol.for(`zod.compile.invalid`),FS=Symbol.for(`zod.compile.fallback`),IS=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},LS=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},RS=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),zS=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function VS(e,t){return new e({type:`string`,...z(t)})}function HS(e,t){return new e({type:`string`,coerce:!0,...z(t)})}function US(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...z(t)})}function WS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...z(t)})}function GS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...z(t)})}function KS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...z(t)})}function qS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...z(t)})}function JS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...z(t)})}function YS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...z(t)})}function XS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...z(t)})}function ZS(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...z(t)})}function QS(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...z(t)})}function $S(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...z(t)})}function eC(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...z(t)})}function tC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...z(t)})}function nC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...z(t)})}function rC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...z(t)})}function iC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...z(t)})}function aC(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...z(t)})}function oC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...z(t)})}function sC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...z(t)})}function cC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...z(t)})}function lC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...z(t)})}function uC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...z(t)})}function dC(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...z(t)})}function fC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...z(t)})}function pC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...z(t)})}function mC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...z(t)})}function hC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...z(t)})}function gC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...z(t)})}function _C(e,t){return new e({type:`number`,checks:[],...z(t)})}function vC(e,t){return new e({type:`number`,coerce:!0,checks:[],...z(t)})}function yC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...z(t)})}function bC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...z(t)})}function xC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...z(t)})}function SC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...z(t)})}function CC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...z(t)})}function wC(e,t){return new e({type:`boolean`,...z(t)})}function TC(e,t){return new e({type:`boolean`,coerce:!0,...z(t)})}function EC(e,t){return new e({type:`bigint`,...z(t)})}function DC(e,t){return new e({type:`bigint`,coerce:!0,...z(t)})}function OC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...z(t)})}function kC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...z(t)})}function AC(e,t){return new e({type:`symbol`,...z(t)})}function jC(e,t){return new e({type:`undefined`,...z(t)})}function MC(e,t){return new e({type:`null`,...z(t)})}function NC(e){return new e({type:`any`})}function PC(e){return new e({type:`unknown`})}function FC(e,t){return new e({type:`never`,...z(t)})}function IC(e,t){return new e({type:`void`,...z(t)})}function LC(e,t){return new e({type:`date`,...z(t)})}function RC(e,t){return new e({type:`date`,coerce:!0,...z(t)})}function zC(e,t){return new e({type:`nan`,...z(t)})}function BC(e,t){return new Wm({check:`less_than`,...z(t),value:e,inclusive:!1})}function VC(e,t){return new Wm({check:`less_than`,...z(t),value:e,inclusive:!0})}function HC(e,t){return new Gm({check:`greater_than`,...z(t),value:e,inclusive:!1})}function UC(e,t){return new Gm({check:`greater_than`,...z(t),value:e,inclusive:!0})}function WC(e){return HC(0,e)}function GC(e){return BC(0,e)}function KC(e){return VC(0,e)}function qC(e){return UC(0,e)}function JC(e,t){return new Km({check:`multiple_of`,...z(t),value:e})}function YC(e,t){return new Ym({check:`max_size`,...z(t),maximum:e})}function XC(e,t){return new Xm({check:`min_size`,...z(t),minimum:e})}function ZC(e,t){return new Zm({check:`size_equals`,...z(t),size:e})}function QC(e,t){return new Qm({check:`max_length`,...z(t),maximum:e})}function $C(e,t){return new $m({check:`min_length`,...z(t),minimum:e})}function ew(e,t){return new eh({check:`length_equals`,...z(t),length:e})}function tw(e,t){return new nh({check:`string_format`,format:`regex`,...z(t),pattern:e})}function nw(e){return new rh({check:`string_format`,format:`lowercase`,...z(e)})}function rw(e){return new ih({check:`string_format`,format:`uppercase`,...z(e)})}function iw(e,t){return new ah({check:`string_format`,format:`includes`,...z(t),includes:e})}function aw(e,t){return new oh({check:`string_format`,format:`starts_with`,...z(t),prefix:e})}function ow(e,t){return new sh({check:`string_format`,format:`ends_with`,...z(t),suffix:e})}function sw(e,t,n){return new ch({check:`property`,property:e,schema:t,...z(n)})}function cw(e){return Object.entries(e).map(([e,t])=>new ch({check:`property`,property:e,schema:t}))}function lw(e,t){return new lh({check:`mime_type`,mime:e,...z(t)})}function uw(e){return new uh({check:`overwrite`,tx:e})}function dw(e){return uw(t=>t.normalize(e))}function fw(){return uw(e=>e.trim())}function pw(){return uw(e=>e.toLowerCase())}function mw(){return uw(e=>e.toUpperCase())}function hw(){return uw(e=>vd(e))}function gw(e,t,n){return new e({type:`array`,element:t,...z(n)})}function _w(e,t,n){return new e({type:`union`,options:t,...z(n)})}function vw(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...z(n)})}function yw(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...z(r)})}function bw(e,t,n){return new e({type:`intersection`,left:t,right:n})}function xw(e,t,n,r){let i=n instanceof W;return new e({type:`tuple`,items:t,rest:i?n:null,...z(i?r:n)})}function Sw(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...z(r)})}function Cw(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...z(r)})}function ww(e,t,n){return new e({type:`set`,valueType:t,...z(n)})}function Tw(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...z(n)})}function Ew(e,t,n){return new e({type:`enum`,entries:t,...z(n)})}function Dw(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...z(n)})}function Ow(e,t){return new e({type:`file`,...z(t)})}function kw(e,t){return new e({type:`transform`,transform:t})}function Aw(e,t){return new e({type:`optional`,innerType:t})}function jw(e,t){return new e({type:`nullable`,innerType:t})}function Mw(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():xd(n)}})}function Nw(e,t,n){return new e({type:`nonoptional`,innerType:t,...z(n)})}function Pw(e,t){return new e({type:`success`,innerType:t})}function Fw(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:af(n)})}function Iw(e,t,n){return new e({type:`pipe`,in:t,out:n})}function Lw(e,t){return new e({type:`readonly`,innerType:t})}function Rw(e,t,n){return new e({type:`template_literal`,parts:t,...z(n)})}function zw(e,t){return new e({type:`lazy`,getter:t})}function Bw(e,t){return new e({type:`promise`,innerType:t})}function Vw(e,t,n){let r=z(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Hw(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...z(n)})}function Uw(e,t){let n=Ww(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ud(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ud(r))}},e(t.value,t)),t);return n}function Ww(e,t){let n=new Bm({check:`custom`,...z(t)});return n._zod.check=e,n}function Gw(e){let t=new Bm({check:`describe`});return t._zod.onattach=[t=>{let n=yx.get(t)??{};yx.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Kw(e){let t=new Bm({check:`meta`});return t._zod.onattach=[t=>{let n=yx.get(t)??{};yx.add(t,{...n,...e})}],t._zod.check=()=>{},t}function qw(e,t){let n=z(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??h_,c=e.Boolean??jg,l=new s({type:`pipe`,in:new(e.String??Qh)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function Jw(e,t,n,r={}){let i=z(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var Yw,Xw=o((()=>{dh(),bx(),C_(),H(),Yw={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function Zw(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&dd(e,t,n[t]);return e}function Qw(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??yx,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function $w(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function eT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,eT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Zw(o.schema,c),t.io===`input`&&cT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function tT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function nT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${tT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+tT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ + `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xd,c=!jf.jitless,l=c&&uf.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Nh([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),Yg=U(`$ZodUnion`,(e,t)=>{W.init(e,t),af(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),af(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),af(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),af(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>ld(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Ph(t,r,e,i)):Ph(o,r,e,i)}}),Xg=U(`$ZodXor`,(e,t)=>{Yg.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Fh(t,r,e,i)):Fh(o,r,e,i)}}),Zg=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Yg.init(e,t);let n=e._zod.parse;af(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||pd(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=Kg.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=sd(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!xd(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),Qg=U(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Rh(e,t,n)):Rh(e,i,a)}}),$g=U(`$ZodTuple`,(e,t)=>{W.init(e,t);let n=t.items,r=jf.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=zh(n,`optin`),l=zh(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Bh(t,i,e))):Bh(r,i,e)}}return s.length?Promise.all(s).then(()=>Vh(u,i,n,o,l)):Vh(u,i,n,o,l)}}),e_=U(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=jf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Sd(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Vd(e,i,Cf())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Rd(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Rd(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&vm.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Vd(e,i,Cf())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Rd(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Rd(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),t_=U(`$ZodMap`,(e,t)=>{W.init(e,t);let n=jf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{Hh(t,o,r,n,a,e,i)})):Hh(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),n_=U(`$ZodSet`,(e,t)=>{W.init(e,t);let n=jf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>Uh(e,r))):Uh(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),r_=U(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=ad(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>ff.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>Td(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),i_=U(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?Td(e):e?Td(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),a_=U(`$ZodFile`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),o_=U(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,jf.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Af(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new kf;return n.value=i,n}}),s_=U(`$ZodOptional`,(e,t)=>{W.init(e,t),af(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,af(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),af(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ld(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Wh(e,t)):Wh(e,r)}return t.innerType._zod.run(e,n)}}),c_=U(`$ZodExactOptional`,(e,t)=>{s_.init(e,t),af(e,`values`,e=>e.def.innerType._zod.values),af(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),l_=U(`$ZodNullable`,(e,t)=>{W.init(e,t),af(e,`optin`,e=>e.def.innerType._zod.optin),af(e,`optout`,e=>e.def.innerType._zod.optout),af(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${ld(t.source)}|null)$`):void 0}),af(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),u_=U(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,af(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Gh(e,t)):Gh(r,t)}}),d_=U(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,af(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),f_=U(`$ZodNonOptional`,(e,t)=>{W.init(e,t),af(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Kh(t,e)):Kh(i,e)}}),p_=U(`$ZodSuccess`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Af(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),m_=U(`$ZodCatch`,(e,t)=>{W.init(e,t),af(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),af(e,`optout`,e=>e.def.innerType._zod.optout),af(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>qh(e,r,t,n)):qh(e,r,t,n)}}),h_=U(`$ZodNaN`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),g_=U(`$ZodPipe`,(e,t)=>{W.init(e,t),af(e,`values`,e=>e.def.in._zod.values),af(e,`optin`,e=>e.def.in._zod.optin),af(e,`optout`,e=>e.def.out._zod.optout),af(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Jh(e,t.in,n)):Jh(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Jh(e,t.out,n)):Jh(r,t.out,n)}}),__=U(`$ZodCodec`,(e,t)=>{W.init(e,t),af(e,`values`,e=>e.def.in._zod.values),af(e,`optin`,e=>e.def.in._zod.optin),af(e,`optout`,e=>e.def.out._zod.optout),af(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Yh(e,t,n)):Yh(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Yh(e,t,n)):Yh(r,t,n)}}}),v_=U(`$ZodPreprocess`,(e,t)=>{g_.init(e,t)}),y_=U(`$ZodReadonly`,(e,t)=>{W.init(e,t),af(e,`propValues`,e=>e.def.innerType._zod.propValues),af(e,`values`,e=>e.def.innerType._zod.values),af(e,`optin`,e=>e.def.innerType?._zod?.optin),af(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(Zh):Zh(r)}}),b_=U(`$ZodTemplateLiteral`,(e,t)=>{W.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||pf.has(typeof e))n.push(Td(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),x_=U(`$ZodFunction`,(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?Qf(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?Qf(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await ep(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await ep(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new $g({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),S_=U(`$ZodPromise`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),C_=U(`$ZodLazy`,(e,t)=>{W.init(e,t),dd(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),af(e,`pattern`,e=>e.innerType?._zod?.pattern),af(e,`propValues`,e=>e.innerType?._zod?.propValues),af(e,`optin`,e=>e.innerType?._zod?.optin??void 0),af(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),w_=U(`$ZodCustom`,(e,t)=>{Hm.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Qh(t,n,r,e));Qh(i,n,r,e)}})}));function E_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function D_(e,t){let n=F_.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&D_(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),F_.set(e,r),r}function O_(e){return D_(e,new Set)}function k_(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function A_(){return R_}function j_(e,t){let n=e[N_]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var M_,N_,P_,F_,I_,L_,R_,z_=o((()=>{M_=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},N_=`~memo`,P_=[],F_=new WeakMap,L_=[],R_={alloc(e,t,n){let r=I_;if(!r)return n;I_=void 0;let i={value:n,issues:null};return r.set(t.value,i),L_.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&j_(n,e.value))throw new M_;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=D_(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[N_];l||(l={buckets:new Map,backEdges:void 0},s[N_]=l);let u;r===s?u=i:(u=k_(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...E_(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;I_=u;let f=L_.length,p=t(o,s);I_=void 0;let m=L_.length>f?L_.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?E_(e.issues):P_),e)):(m&&(m.issues=p.issues.length?E_(p.issues):P_),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function B_(){return{localeError:V_()}}var V_,H_=o((()=>{H(),V_=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${B(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${R(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function U_(){return{localeError:W_()}}var W_,G_=o((()=>{H(),W_=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${B(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function K_(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function q_(){return{localeError:J_()}}var J_,Y_=o((()=>{H(),J_=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${B(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=K_(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=K_(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function X_(){return{localeError:Z_()}}var Z_,Q_=o((()=>{H(),Z_=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${B(e.values[0])}`:`Невалидна опция: очаквано едно от ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function $_(){return{localeError:ev()}}var ev,tv=o((()=>{H(),ev=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${B(e.values[0])}`:`অবৈধ অপশন: ${R(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function nv(){return{localeError:rv()}}var rv,iv=o((()=>{H(),rv=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${B(e.values[0])}`:`Opció invàlida: s'esperava una de ${R(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function av(){return{localeError:ov()}}var ov,sv=o((()=>{H(),ov=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${B(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${R(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${R(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function cv(){return{localeError:lv()}}var lv,uv=o((()=>{H(),lv=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${B(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function dv(){return{localeError:fv()}}var fv,pv=o((()=>{H(),fv=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${B(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function mv(){return{localeError:hv()}}var hv,gv=o((()=>{H(),hv=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${B(e.values[0])}`:`Ungültige Option: erwartet eine von ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function _v(){return{localeError:vv()}}var vv,yv=o((()=>{H(),vv=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${B(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function bv(){return{localeError:xv()}}var xv,Sv=o((()=>{H(),xv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(V(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${B(e.values[0])}`:`Invalid option: expected one of ${R(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function Cv(){return{localeError:wv()}}var wv,Tv=o((()=>{H(),wv=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${B(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function Ev(){return{localeError:Dv()}}var Dv,Ov=o((()=>{H(),Dv=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${B(e.values[0])}`:`Opción inválida: se esperaba una de ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function kv(){return{localeError:Av()}}var Av,jv=o((()=>{H(),Av=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${B(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${R(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${R(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function Mv(){return{localeError:Nv()}}var Nv,Pv=o((()=>{H(),Nv=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${B(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function Fv(){return{localeError:Iv()}}var Iv,Lv=o((()=>{H(),Iv=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${B(e.values[0])} attendu`:`Option invalide : une valeur parmi ${R(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${R(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Rv(){return{localeError:zv()}}var zv,Bv=o((()=>{H(),zv=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${B(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${R(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function Vv(){return{localeError:Hv()}}var Hv,Uv=o((()=>{H(),Hv=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${B(e.values[0])}`:`અમાન્ય વિકલ્પ: ${R(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function Wv(){return{localeError:Gv()}}var Gv,Kv=o((()=>{H(),Gv=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=V(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${B(t.values[0])}`;let e=t.values.map(e=>B(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${R(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function qv(){return{localeError:Jv()}}var Jv,Yv=o((()=>{H(),Jv=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${B(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function Xv(){return{localeError:Zv()}}var Zv,Qv=o((()=>{H(),Zv=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${B(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function $v(){return{localeError:ey()}}var ey,ty=o((()=>{H(),ey=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${B(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function ny(e,t,n){return Math.abs(e)===1?t:n}function ry(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function iy(){return{localeError:ay()}}var ay,oy=o((()=>{H(),ay=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${B(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ny(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ry(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${ry(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ny(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ry(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${ry(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${R(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${ry(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${ry(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function sy(){return{localeError:cy()}}var cy,ly=o((()=>{H(),cy=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${B(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function uy(){return{localeError:dy()}}var dy,fy=o((()=>{H(),dy=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${B(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function py(){return{localeError:my()}}var my,hy=o((()=>{H(),my=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${B(e.values[0])}`:`Opzione non valida: atteso uno tra ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function gy(){return{localeError:_y()}}var _y,vy=o((()=>{H(),_y=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${B(e.values[0])}が期待されました`:`無効な選択: ${R(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${R(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function yy(){return{localeError:by()}}var by,xy=o((()=>{H(),by=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${B(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${R(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function Sy(){return{localeError:Cy()}}var Cy,wy=o((()=>{H(),Cy=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${B(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${R(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function Ty(){return Sy()}var Ey=o((()=>{wy()}));function Dy(){return{localeError:Oy()}}var Oy,ky=o((()=>{H(),Oy=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${B(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function Ay(){return{localeError:jy()}}var jy,My=o((()=>{H(),jy=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${B(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${R(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${R(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function Ny(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function Py(){return{localeError:Iy()}}var Fy,Iy,Ly=o((()=>{H(),Fy=e=>e.charAt(0).toUpperCase()+e.slice(1),Iy=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${B(e.values[0])}`:`Privalo būti vienas iš ${R(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,Ny(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${Fy(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${Fy(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,Ny(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${Fy(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${Fy(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${Fy(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function Ry(){return{localeError:zy()}}var zy,By=o((()=>{H(),zy=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${B(e.values[0])}`:`Грешана опција: се очекува една ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function Vy(){return{localeError:Hy()}}var Hy,Uy=o((()=>{H(),Hy=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${B(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${R(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function Wy(){return{localeError:Gy()}}var Gy,Ky=o((()=>{H(),Gy=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${B(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function qy(){return{localeError:Jy()}}var Jy,Yy=o((()=>{H(),Jy=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${B(e.values[0])}`:`Ongeldige optie: verwacht één van ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function Xy(){return{localeError:Zy()}}var Zy,Qy=o((()=>{H(),Zy=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${B(e.values[0])}`:`Ugyldig val: forventa eitt av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function $y(){return{localeError:eb()}}var eb,tb=o((()=>{H(),eb=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${B(e.values[0])}`:`Ugyldig valg: forventet en av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function nb(){return{localeError:rb()}}var rb,ib=o((()=>{H(),rb=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${B(e.values[0])}`:`Fâsit tercih: mûteberler ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function ab(){return{localeError:ob()}}var ob,sb=o((()=>{H(),ob=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${B(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${R(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function cb(){return{localeError:lb()}}var lb,ub=o((()=>{H(),lb=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${B(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function db(){return{localeError:fb()}}var fb,pb=o((()=>{H(),fb=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(V(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${B(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${R(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function mb(){return{localeError:hb()}}var hb,gb=o((()=>{H(),hb=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(V(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${B(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${R(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function _b(){return{localeError:vb()}}var vb,yb=o((()=>{H(),vb=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${B(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${R(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function bb(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function xb(){return{localeError:Sb()}}var Sb,Cb=o((()=>{H(),Sb=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${B(e.values[0])}`:`Неверный вариант: ожидалось одно из ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=bb(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=bb(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function wb(){return{localeError:Tb()}}var Tb,Eb=o((()=>{H(),Tb=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${B(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Db(){return{localeError:Ob()}}var Ob,kb=o((()=>{H(),Ob=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${B(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Ab(){return{localeError:jb()}}var jb,Mb=o((()=>{H(),jb=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${B(e.values[0])}`:`Ogiltigt val: förväntade en av ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Nb(){return{localeError:Pb()}}var Pb,Fb=o((()=>{H(),Pb=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${B(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${R(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Ib(){return{localeError:Lb()}}var Lb,Rb=o((()=>{H(),Lb=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${B(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${R(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function zb(){return{localeError:Bb()}}var Bb,Vb=o((()=>{H(),Bb=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${B(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function Hb(){return{localeError:Ub()}}var Ub,Wb=o((()=>{H(),Ub=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${B(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function Gb(){return{localeError:Kb()}}var Kb,qb=o((()=>{H(),Kb=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${B(e.values[0])}`:`Неправильна опція: очікується одне з ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function Jb(){return Gb()}var Yb=o((()=>{qb()}));function Xb(){return{localeError:Zb()}}var Zb,Qb=o((()=>{H(),Zb=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${B(e.values[0])} متوقع تھا`:`غلط آپشن: ${R(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${R(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function $b(){return{localeError:ex()}}var ex,tx=o((()=>{H(),ex=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${B(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function nx(){return{localeError:rx()}}var rx,ix=o((()=>{H(),rx=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${B(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${R(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function ax(){return{localeError:ox()}}var ox,sx=o((()=>{H(),ox=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${B(e.values[0])}`:`无效选项:期望以下之一 ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${R(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function cx(){return{localeError:lx()}}var lx,ux=o((()=>{H(),lx=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${B(e.values[0])}`:`無效的選項:預期為以下其中之一 ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${R(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function dx(){return{localeError:fx()}}var fx,px=o((()=>{H(),fx=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=V(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${B(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${R(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${R(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),mx=c({ar:()=>B_,az:()=>U_,be:()=>q_,bg:()=>X_,bn:()=>$_,ca:()=>nv,ckb:()=>av,cs:()=>cv,da:()=>dv,de:()=>mv,el:()=>_v,en:()=>bv,eo:()=>Cv,es:()=>Ev,fa:()=>kv,fi:()=>Mv,fr:()=>Fv,frCA:()=>Rv,gu:()=>Vv,he:()=>Wv,hi:()=>qv,hr:()=>Xv,hu:()=>$v,hy:()=>iy,id:()=>sy,is:()=>uy,it:()=>py,ja:()=>gy,ka:()=>yy,kh:()=>Ty,km:()=>Sy,kn:()=>Dy,ko:()=>Ay,lt:()=>Py,mk:()=>Ry,ms:()=>Vy,ne:()=>Wy,nl:()=>qy,nn:()=>Xy,no:()=>$y,ota:()=>nb,pl:()=>cb,ps:()=>ab,pt:()=>db,ptBR:()=>mb,ro:()=>_b,ru:()=>xb,sk:()=>wb,sl:()=>Db,sv:()=>Ab,ta:()=>Nb,th:()=>Ib,tk:()=>zb,tr:()=>Hb,ua:()=>Jb,uk:()=>Gb,ur:()=>Xb,uz:()=>$b,vi:()=>nx,yo:()=>dx,zhCN:()=>ax,zhTW:()=>cx}),hx=o((()=>{H_(),G_(),Y_(),Q_(),tv(),iv(),sv(),uv(),pv(),gv(),yv(),Sv(),Tv(),Ov(),jv(),Pv(),Lv(),Bv(),Uv(),Kv(),Yv(),Qv(),ty(),oy(),ly(),fy(),hy(),vy(),xy(),Ey(),wy(),ky(),My(),Ly(),By(),Uy(),Ky(),Yy(),Qy(),tb(),ib(),sb(),ub(),pb(),gb(),yb(),Cb(),Eb(),kb(),Mb(),Fb(),Rb(),Vb(),Wb(),Yb(),qb(),Qb(),tx(),ix(),sx(),ux(),px()}));function gx(){return new bx}var _x,vx,yx,bx,xx,Sx=o((()=>{vx=Symbol(`ZodOutput`),yx=Symbol(`ZodInput`),bx=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(_x=globalThis).__zod_globalRegistry??(_x.__zod_globalRegistry=gx()),xx=globalThis.__zod_globalRegistry}));function Cx(e,t){try{return Ex(e,{assertOnly:!0})}catch{return t}}function wx(e,t){try{let t=Ex(e),n=Ed(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[LS]||n&&j_(n,e.value))return i(e,n);let r=t(e.value);return r===IS?(n&&(n[LS]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=Cx(e,t),n._zod.run=a,r.__originalRun||Tx(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function Tx(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===IS?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===IS?e(t,r):i}}}function Ex(e,t){let n=!0;try{n=O_(e)}catch{}if(n)throw new zS(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new mh([`input`]),a=Kx(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[IS,...r.constants.values()],c=i.content.join(` +`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new zS(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function G(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function K(e){return`v${e.varCounter++}`}function Dx(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return IS;let r=n;return r.issues.length===0?r.value:IS}function Ox(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return Kx(e,t,n,r,i)}catch(i){if(!(i instanceof zS)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,kx(e,t,n,r)}}function kx(e,t,n,r){let i=G(t,n),a=G(t,Dx),o=K(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function Ax(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!BS.has(r.check))throw new zS(`check with a custom "when" condition`);switch(r.check){case`greater_than`:Px(e,t,r,a);break;case`less_than`:Fx(e,t,r,a);break;case`multiple_of`:Ix(e,t,r,a);break;case`number_format`:Lx(e,r,a);break;case`min_length`:{let n=Mx(r.minimum,`min_length`),i=jx(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=Mx(r.maximum,`max_length`),i=jx(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=Mx(r.length,`length_equals`),i=jx(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${Mx(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${Mx(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${Mx(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=Gx(e,t,r,a);break;case`custom`:a=Wx(e,t,n,a);break;case`bigint_format`:Rx(e,r,a);break;case`mime_type`:zx(e,t,r,a);break;case`property`:Bx(e,t,r,a);break;case`overwrite`:{let r=K(t);Vx(e,t,n,a,r),a=r;break}default:throw new zS(`check type ${r.check}`)}}return a}function jx(e,t,n,r){let i=G(t,Ud),a=K(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function Mx(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new zS(`${t} bound of type ${typeof e}`);return`${e}`}function Nx(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new zS(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new zS(`comparison check with Invalid Date bound`);return G(e,t)}throw new zS(`comparison check bound of type ${typeof t}`)}function Px(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${Nx(t,n.value)}) return INVALID;`)}function Fx(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${Nx(t,n.value)}) return INVALID;`)}function Ix(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new zS(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=G(t,ud);e.write(`if (${i}(${r}, ${Mx(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function Lx(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new zS(`number format ${r}`)}}function Rx(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new zS(`bigint format ${r}`)}}function zx(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=G(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function Bx(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;Kx(e,t,n.schema,i)}function Vx(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new zS(`overwrite check without a transform function`);if(jS(a))throw new RS(`z.compile: async overwrite transforms are not supported`);let o=G(t,a);e.write(`const ${i} = ${o}(${r});`)}function Hx(){throw new kf}function Ux(e){this.issues.push(e)}function Wx(e,t,n,r){let i=n._zod.def;if(i.fn){if(jS(i.fn))throw new RS(`z.compile: async .refine() predicates are not supported`);let n=G(t,i.fn),a=G(t,Hx),o=K(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(jS(n._zod.check))throw new RS(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=G(t,e=>{let t={value:e,issues:[],addIssue:Ux};return i(t)instanceof Promise&&Hx(),t.issues.length===0?t.value:IS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new zS(`custom check without a predicate or check function`)}function Gx(e,t,n,r){let i=n.format;if(i===`base64`){let n=G(t,Th);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=G(t,Eh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=G(t,kh),a=G(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=G(t,Ch);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=G(t,wh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=G(t,Oh);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=G(t,yh),o=G(t,n),s=K(t),c=K(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=G(t,xh);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=G(t,Sh);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=K(t),u=a.normalize?`${c}.href`:`${G(t,bh)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(jS(o))throw new zS(`async string format ${i}`);let n=G(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(VS.has(i)&&n.pattern){let i=G(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new zS(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${yd(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${yd(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${yd(t)}) return INVALID;`);break}default:throw new zS(`string format ${s}`)}return r}function Kx(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new zS(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=qx(e,t,n,r);break;case`number`:c=Jx(e,n,r);break;case`boolean`:c=Yx(e,r);break;case`bigint`:c=Xx(e,n,r);break;case`symbol`:c=Zx(e,r);break;case`undefined`:c=Qx(e,r);break;case`null`:c=$x(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=eS(e,r);break;case`nan`:c=tS(e,r);break;case`date`:c=nS(e,r);break;case`object`:c=rS(e,t,n,r,s);break;case`optional`:c=iS(e,t,n,r,s);break;case`nullable`:c=uS(e,t,n,r,s);break;case`array`:c=dS(e,t,n,r,s);break;case`literal`:c=fS(e,t,n,r);break;case`enum`:c=pS(e,t,n,r);break;case`readonly`:{let i=mS(e,t,n,r),a=K(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:mS(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=hS(e,t,n,r);break;case`nonoptional`:c=gS(e,t,n,r);break;case`tuple`:c=_S(e,t,n,r);break;case`union`:c=yS(e,t,n,r);break;case`intersection`:c=SS(e,t,n,r);break;case`record`:c=CS(e,t,n,r);break;case`map`:c=TS(e,t,n,r);break;case`set`:c=ES(e,t,n,r);break;case`file`:c=DS(e,r);break;case`template_literal`:c=OS(e,t,n,r);break;case`lazy`:c=kS(e,t,n,r);break;case`pipe`:c=AS(e,t,n,r);break;case`custom`:c=MS(e,t,n,r);break;case`transform`:c=FS(e,t,n,r);break;case`catch`:c=PS(e,t,n,r);break;default:throw new zS(`schema type ${o}`)}return c===null?null:Ax(e,t,n,c)}function qx(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:Gx(e,t,i,r)}function Jx(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&Lx(e,{format:r.format},n),n}function Yx(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Xx(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function Zx(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Qx(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function $x(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function eS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function tS(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function nS(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function rS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?G(t,e):yd(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:yd(e),f=o;if(s.includes(`__proto__`))throw new zS(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=K(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=K(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=Ox(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{oS(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=Ox(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${yd(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=K(t),_=l.some(e=>lS(f[e])||cS(f[e]));if(!i){if(h===`schema`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=K(t);e.write(`const ${i} = ${r}[k];`),Ox(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);cS(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):lS(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=K(t);e.write(`const ${n} = ${r}[k];`);let i=Ox(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function iS(e,t,n,r,i=!0){let a=n._zod.def;if(aS(n))return Kx(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=K(t),i=K(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=Kx(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=Kx(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?K(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=Kx(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function aS(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function oS(e){return e._zod.optin===void 0&&sS(e)}function sS(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?sS(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||sS(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(sS);case`intersection`:return!t.left||!t.right||sS(t.left)&&sS(t.right);case`pipe`:return!t.in||sS(t.in);default:return!0}}function cS(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function lS(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||lS(t.innerType);case`union`:return!t.options||t.options.some(lS);case`intersection`:return!t.left||!t.right||lS(t.left)||lS(t.right);case`pipe`:return!t.out||lS(t.out);default:return!0}}function uS(e,t,n,r,i=!0){let a=n._zod.def,o=i?K(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=Kx(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function dS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?K(t):null,s=K(t),c=K(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=Ox(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function fS(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${yd(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new zS(`literal type ${typeof a}`);return r}function pS(e,t,n,r){let i=n._zod.values;if(!i)throw new zS(`enum schema without enumerated values`);let a=G(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function mS(e,t,n,r){let i=n._zod.def;return Kx(e,t,i.innerType,r)}function hS(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return Kx(e,t,i.innerType,r);let n=G(t,a),o=K(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),Kx(e,t,i.innerType,o)}let o=K(t);if(a){let n=G(t,a),s=G(t,Cd);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=Kx(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=Kx(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function gS(e,t,n,r){let i=n._zod.def,a=Kx(e,t,i.innerType,r),o=K(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function _S(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=vS(a,`optin`),c=vS(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=K(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ox(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(cS(i)){e.write(`${l}.length = ${n};`);return}let r=K(t),a=K(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=Ox(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ox(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=K(t),i=K(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=Ox(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function vS(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function yS(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return bS(e,t,i,r);if(i.inclusive===!1)throw new zS(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return Kx(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=G(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=K(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=Kx(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function bS(e,t,n,r){if(n.unionFallback)throw new zS(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=K(t),a=K(t);e.write(`const ${i} = ${r}?.[${yd(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new zS(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new zS(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>xS(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=Kx(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function xS(e,t,n){if(typeof n==`string`)return`${t} === ${yd(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${G(e,n)}`;throw new zS(`literal discriminator value ${String(n)}`)}function SS(e,t,n,r){let i=n._zod.def,a=Ox(e,t,i.left,r),o=Ox(e,t,i.right,r),s=G(t,Lh),c=K(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function CS(e,t,n,r){let i=n._zod.def,a=G(t,Sd);e.write(`if (!${a}(${r})) return INVALID;`);let o=K(t),s=K(t),c=K(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new zS(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new zS(`record key "__proto__"`);n.push(s);let c=G(t,a),l=Kx(e,t,i.keyType,c),u=K(t);e.write(`const ${u} = ${r}[${wS(t,s)}];`);let d=Ox(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=G(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=G(t,Ex(i.keyType)),c=G(t,vm),l=G(t,Object.prototype.propertyIsEnumerable),u=K(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=K(t);e.write(`const ${d} = ${r}[${s}];`);let f=Ox(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=G(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=Ox(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function wS(e,t){return typeof t==`string`?yd(t):G(e,t)}function TS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=K(t),o=K(t),s=K(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=Kx(e,t,i.keyType,o),r=Kx(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function ES(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=K(t),o=K(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=Kx(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function DS(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function OS(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=G(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function kS(e,t,n,r){let i=n._zod.def,a=G(t,i.getter),o=G(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=K(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function AS(e,t,n,r){let i=n._zod.def,a=Kx(e,t,i.in,r);if(i.transform){if(jS(i.transform))throw new RS(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=G(t,e=>{let t={value:e,issues:[],addIssue:Ux},r=n(e,t);return r instanceof Promise?IS:t.issues.length===0?r:IS}),o=K(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),Kx(e,t,i.out,o)}return Kx(e,t,i.out,a)}function jS(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function MS(e,t,n,r){let i=n._zod.def;if(i.fn){if(jS(i.fn))throw new RS(`z.compile: async custom predicates are not supported`);let n=G(t,i.fn),a=G(t,Hx),o=K(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new zS(`custom schema without a predicate function`);return r}function NS(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return IS;let i=r;return i.issues.length===0?i.value:t()}function PS(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new zS(`catch with a callback (only a constant catch value compiles)`,!1);let a=K(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=Ox(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=G(t,i.innerType),s=G(t,i.catchValue),c=G(t,NS);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function FS(e,t,n,r){let i=n._zod.def;if(i.transform){if(jS(i.transform))throw new RS(`z.compile: async transforms are not supported`);let n=i.transform,a=G(t,e=>{let t={value:e,issues:[],addIssue:Ux},r=n(e,t);return r instanceof Promise?IS:t.issues.length===0?r:IS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var IS,LS,RS,zS,BS,VS,HS=o((()=>{Mf(),hh(),z_(),Bm(),T_(),H(),IS=Symbol.for(`zod.compile.invalid`),LS=Symbol.for(`zod.compile.fallback`),RS=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},zS=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},BS=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),VS=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function US(e,t){return new e({type:`string`,...z(t)})}function WS(e,t){return new e({type:`string`,coerce:!0,...z(t)})}function GS(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...z(t)})}function KS(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...z(t)})}function qS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...z(t)})}function JS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...z(t)})}function YS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...z(t)})}function XS(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...z(t)})}function ZS(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...z(t)})}function QS(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...z(t)})}function $S(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...z(t)})}function eC(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...z(t)})}function tC(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...z(t)})}function nC(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...z(t)})}function rC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...z(t)})}function iC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...z(t)})}function aC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...z(t)})}function oC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...z(t)})}function sC(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...z(t)})}function cC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...z(t)})}function lC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...z(t)})}function uC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...z(t)})}function dC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...z(t)})}function fC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...z(t)})}function pC(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...z(t)})}function mC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...z(t)})}function hC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...z(t)})}function gC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...z(t)})}function _C(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...z(t)})}function vC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...z(t)})}function yC(e,t){return new e({type:`number`,checks:[],...z(t)})}function bC(e,t){return new e({type:`number`,coerce:!0,checks:[],...z(t)})}function xC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...z(t)})}function SC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...z(t)})}function CC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...z(t)})}function wC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...z(t)})}function TC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...z(t)})}function EC(e,t){return new e({type:`boolean`,...z(t)})}function DC(e,t){return new e({type:`boolean`,coerce:!0,...z(t)})}function OC(e,t){return new e({type:`bigint`,...z(t)})}function kC(e,t){return new e({type:`bigint`,coerce:!0,...z(t)})}function AC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...z(t)})}function jC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...z(t)})}function MC(e,t){return new e({type:`symbol`,...z(t)})}function NC(e,t){return new e({type:`undefined`,...z(t)})}function PC(e,t){return new e({type:`null`,...z(t)})}function FC(e){return new e({type:`any`})}function IC(e){return new e({type:`unknown`})}function LC(e,t){return new e({type:`never`,...z(t)})}function RC(e,t){return new e({type:`void`,...z(t)})}function zC(e,t){return new e({type:`date`,...z(t)})}function BC(e,t){return new e({type:`date`,coerce:!0,...z(t)})}function VC(e,t){return new e({type:`nan`,...z(t)})}function HC(e,t){return new Km({check:`less_than`,...z(t),value:e,inclusive:!1})}function UC(e,t){return new Km({check:`less_than`,...z(t),value:e,inclusive:!0})}function WC(e,t){return new qm({check:`greater_than`,...z(t),value:e,inclusive:!1})}function GC(e,t){return new qm({check:`greater_than`,...z(t),value:e,inclusive:!0})}function KC(e){return WC(0,e)}function qC(e){return HC(0,e)}function JC(e){return UC(0,e)}function YC(e){return GC(0,e)}function XC(e,t){return new Jm({check:`multiple_of`,...z(t),value:e})}function ZC(e,t){return new Zm({check:`max_size`,...z(t),maximum:e})}function QC(e,t){return new Qm({check:`min_size`,...z(t),minimum:e})}function $C(e,t){return new $m({check:`size_equals`,...z(t),size:e})}function ew(e,t){return new eh({check:`max_length`,...z(t),maximum:e})}function tw(e,t){return new th({check:`min_length`,...z(t),minimum:e})}function nw(e,t){return new nh({check:`length_equals`,...z(t),length:e})}function rw(e,t){return new ih({check:`string_format`,format:`regex`,...z(t),pattern:e})}function iw(e){return new ah({check:`string_format`,format:`lowercase`,...z(e)})}function aw(e){return new oh({check:`string_format`,format:`uppercase`,...z(e)})}function ow(e,t){return new sh({check:`string_format`,format:`includes`,...z(t),includes:e})}function sw(e,t){return new ch({check:`string_format`,format:`starts_with`,...z(t),prefix:e})}function cw(e,t){return new lh({check:`string_format`,format:`ends_with`,...z(t),suffix:e})}function lw(e,t,n){return new uh({check:`property`,property:e,schema:t,...z(n)})}function uw(e){return Object.entries(e).map(([e,t])=>new uh({check:`property`,property:e,schema:t}))}function dw(e,t){return new dh({check:`mime_type`,mime:e,...z(t)})}function fw(e){return new fh({check:`overwrite`,tx:e})}function pw(e){return fw(t=>t.normalize(e))}function mw(){return fw(e=>e.trim())}function hw(){return fw(e=>e.toLowerCase())}function gw(){return fw(e=>e.toUpperCase())}function _w(){return fw(e=>bd(e))}function vw(e,t,n){return new e({type:`array`,element:t,...z(n)})}function yw(e,t,n){return new e({type:`union`,options:t,...z(n)})}function bw(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...z(n)})}function xw(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...z(r)})}function Sw(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Cw(e,t,n,r){let i=n instanceof W;return new e({type:`tuple`,items:t,rest:i?n:null,...z(i?r:n)})}function ww(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...z(r)})}function Tw(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...z(r)})}function Ew(e,t,n){return new e({type:`set`,valueType:t,...z(n)})}function Dw(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...z(n)})}function Ow(e,t,n){return new e({type:`enum`,entries:t,...z(n)})}function kw(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...z(n)})}function Aw(e,t){return new e({type:`file`,...z(t)})}function jw(e,t){return new e({type:`transform`,transform:t})}function Mw(e,t){return new e({type:`optional`,innerType:t})}function Nw(e,t){return new e({type:`nullable`,innerType:t})}function Pw(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():Cd(n)}})}function Fw(e,t,n){return new e({type:`nonoptional`,innerType:t,...z(n)})}function Iw(e,t){return new e({type:`success`,innerType:t})}function Lw(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:sf(n)})}function Rw(e,t,n){return new e({type:`pipe`,in:t,out:n})}function zw(e,t){return new e({type:`readonly`,innerType:t})}function Bw(e,t,n){return new e({type:`template_literal`,parts:t,...z(n)})}function Vw(e,t){return new e({type:`lazy`,getter:t})}function Hw(e,t){return new e({type:`promise`,innerType:t})}function Uw(e,t,n){let r=z(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Ww(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...z(n)})}function Gw(e,t){let n=Kw(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Gd(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Gd(r))}},e(t.value,t)),t);return n}function Kw(e,t){let n=new Hm({check:`custom`,...z(t)});return n._zod.check=e,n}function qw(e){let t=new Hm({check:`describe`});return t._zod.onattach=[t=>{let n=xx.get(t)??{};xx.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function Jw(e){let t=new Hm({check:`meta`});return t._zod.onattach=[t=>{let n=xx.get(t)??{};xx.add(t,{...n,...e})}],t._zod.check=()=>{},t}function Yw(e,t){let n=z(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??__,c=e.Boolean??Ng,l=new s({type:`pipe`,in:new(e.String??eg)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function Xw(e,t,n,r={}){let i=z(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var Zw,Qw=o((()=>{ph(),Sx(),T_(),H(),Zw={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function $w(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&pd(e,t,n[t]);return e}function eT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??xx,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function tT(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function nT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,nT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&$w(o.schema,c),t.io===`input`&&uT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function rT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function iT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${rT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+rT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function rT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;rT(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function iT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function aT(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!lT.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??iT(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}dd(n,r,e.length===1?e[0]:aT(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=iT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function oT(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of lT)if(t in e)return;let n=t.filter(e=>uT.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=aT(t);else{let e=n[0],i=uT.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>aT([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,Zw(e,r))}function sT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):Zw(i,s),Zw(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())rT(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])oT(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}Zw(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,dd(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:fT(t,`input`,e.processors),output:fT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function cT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return cT(r.element,n);if(r.type===`set`)return cT(r.valueType,n);if(r.type===`lazy`)return cT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return cT(r.innerType,n);if(r.type===`intersection`)return cT(r.left,n)||cT(r.right,n);if(r.type===`record`||r.type===`map`)return cT(r.keyType,n)||cT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:cT(r.in,n)||cT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(cT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(cT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(cT(e,n))return!0;return!!(r.rest&&cT(r.rest,n))}return!1}var lT,uT,dT,fT,pT=o((()=>{bx(),H(),lT=new Set([`type`,`properties`,`required`,`additionalProperties`]),uT=[`oneOf`,`anyOf`],dT=(e,t={})=>n=>{let r=Qw({...n,processors:t});return eT(e,r),nT(r,e),sT(r,e)},fT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Qw({...i??{},target:a,io:t,processors:n});return eT(e,o),nT(o,e),sT(o,e)}}));function mT(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?mT(t.out):t.type===`catch`?mT(t.innerType):e._zod.optin}function hT(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=hT(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>hT(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?gm:hm).source),p):p}function gT(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of JT.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=hT(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function _T(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?($w(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),QT):JSON.parse(o)}function vT(e,t){if(`_idmap`in e){let n=e,r=Qw({...t,processors:sE}),i={};for(let e of n._idmap.entries()){let[t,n]=e;eT(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;nT(r,n),dd(a,t,sT(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Qw({...t,processors:sE});return eT(e,n),nT(n,e),sT(n,e)}var yT,bT,xT,ST,CT,wT,TT,ET,DT,OT,kT,AT,jT,MT,NT,PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE=o((()=>{Rm(),pT(),H(),yT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},bT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=yT[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},xT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):$w(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},ST=(e,t,n,r)=>{n.type=`boolean`},CT=(e,t,n,r)=>{$w(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},wT=(e,t,n,r)=>{$w(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},TT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},ET=(e,t,n,r)=>{$w(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},DT=(e,t,n,r)=>{$w(e,t,n,r,`Void cannot be represented in JSON Schema`)},OT=(e,t,n,r)=>{n.not={}},kT=(e,t,n,r)=>{},AT=(e,t,n,r)=>{},jT=(e,t,n,r)=>{$w(e,t,n,r,`Date cannot be represented in JSON Schema`)},MT=(e,t,n,r)=>{let i=e._zod.def,a=rd(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},NT=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if($w(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if($w(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},PT=(e,t,n,r)=>{$w(e,t,n,r,`NaN cannot be represented in JSON Schema`)},FT=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},IT=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},LT=(e,t,n,r)=>{n.type=`boolean`},RT=(e,t,n,r)=>{$w(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},zT=(e,t,n,r)=>{$w(e,t,n,r,`Function types cannot be represented in JSON Schema`)},BT=(e,t,n,r)=>{$w(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},VT=(e,t,n,r)=>{$w(e,t,n,r,`Map cannot be represented in JSON Schema`)},HT=(e,t,n,r)=>{$w(e,t,n,r,`Set cannot be represented in JSON Schema`)},UT=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=eT(a.element,t,{...r,path:[...r.path,`items`]})},WT=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&$w(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)dd(i.properties,e,eT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?mT(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=eT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},GT=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>eT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},KT=(e,t,n,r)=>{let i=e._zod.def,a=eT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=eT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},qT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>eT(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?eT(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?mT(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},JT=new WeakMap,YT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=eT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)dd(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=eT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=JT.get(t);n||(n=[],JT.set(t,n),t.deferred.push(()=>gT(t))),n.push(e)}i.additionalProperties=eT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&mT(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},XT=(e,t,n,r)=>{let i=e._zod.def,a=eT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},ZT=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},QT=Symbol(),$T=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=_T(i.defaultValue,e,t,n,r);o!==QT&&(n.default=o)},eE=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=_T(i.defaultValue,e,t,n,r);o!==QT&&(n._prefault=o)},tE=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{$w(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},nE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;eT(o,t,r);let s=t.seen.get(e);s.ref=o},rE=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},iE=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},aE=(e,t,n,r)=>{let i=e._zod.def;eT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},oE=(e,t,n,r)=>{let i=e._zod.innerType;eT(i,t,r);let a=t.seen.get(e);a.ref=i},sE={string:bT,number:xT,boolean:ST,bigint:CT,symbol:wT,null:TT,undefined:ET,void:DT,never:OT,any:kT,unknown:AT,date:jT,enum:MT,literal:NT,nan:PT,template_literal:FT,file:IT,success:LT,custom:RT,function:zT,transform:BT,map:VT,set:HT,array:UT,object:WT,union:GT,intersection:KT,tuple:qT,record:YT,nullable:XT,nonoptional:ZT,default:$T,prefault:eE,catch:tE,pipe:nE,readonly:rE,promise:iE,optional:aE,lazy:oE}})),lE,uE=o((()=>{cE(),pT(),lE=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=Qw({processors:sE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return eT(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,nT(this.ctx,e);let{"~standard":n,...r}=sT(this.ctx,e);return r}}})),dE=c({}),fE=o((()=>{})),pE=c({$ZodAny:()=>Lg,$ZodArray:()=>Hg,$ZodAsyncError:()=>Df,$ZodBase64:()=>Sg,$ZodBase64URL:()=>Cg,$ZodBigInt:()=>Mg,$ZodBigIntFormat:()=>Ng,$ZodBoolean:()=>jg,$ZodCIDRv4:()=>bg,$ZodCIDRv6:()=>xg,$ZodCUID:()=>sg,$ZodCUID2:()=>cg,$ZodCatch:()=>f_,$ZodCheck:()=>Bm,$ZodCheckBigIntFormat:()=>Jm,$ZodCheckEndsWith:()=>sh,$ZodCheckGreaterThan:()=>Gm,$ZodCheckIncludes:()=>ah,$ZodCheckLengthEquals:()=>eh,$ZodCheckLessThan:()=>Wm,$ZodCheckLowerCase:()=>rh,$ZodCheckMaxLength:()=>Qm,$ZodCheckMaxSize:()=>Ym,$ZodCheckMimeType:()=>lh,$ZodCheckMinLength:()=>$m,$ZodCheckMinSize:()=>Xm,$ZodCheckMultipleOf:()=>Km,$ZodCheckNumberFormat:()=>qm,$ZodCheckOverwrite:()=>uh,$ZodCheckProperty:()=>ch,$ZodCheckRegex:()=>nh,$ZodCheckSizeEquals:()=>Zm,$ZodCheckStartsWith:()=>oh,$ZodCheckStringFormat:()=>th,$ZodCheckUpperCase:()=>ih,$ZodCodec:()=>h_,$ZodCreditCard:()=>Eg,$ZodCustom:()=>S_,$ZodCustomStringFormat:()=>Og,$ZodCyclicError:()=>A_,$ZodDate:()=>Vg,$ZodDefault:()=>c_,$ZodDiscriminatedUnion:()=>Yg,$ZodE164:()=>wg,$ZodEmail:()=>ng,$ZodEmoji:()=>ag,$ZodEncodeError:()=>Of,$ZodEnum:()=>t_,$ZodError:()=>Wf,$ZodExactOptional:()=>o_,$ZodFile:()=>r_,$ZodFunction:()=>y_,$ZodGUID:()=>eg,$ZodIPv4:()=>gg,$ZodIPv6:()=>vg,$ZodISODate:()=>pg,$ZodISODateTime:()=>fg,$ZodISODuration:()=>hg,$ZodISOTime:()=>mg,$ZodIntersection:()=>Xg,$ZodJWT:()=>Dg,$ZodKSUID:()=>dg,$ZodLazy:()=>x_,$ZodLiteral:()=>n_,$ZodMAC:()=>yg,$ZodMap:()=>$g,$ZodNaN:()=>p_,$ZodNanoID:()=>og,$ZodNever:()=>zg,$ZodNonOptional:()=>u_,$ZodNull:()=>Ig,$ZodNullable:()=>s_,$ZodNumber:()=>kg,$ZodNumberFormat:()=>Ag,$ZodObject:()=>Gg,$ZodObjectJIT:()=>Kg,$ZodOptional:()=>a_,$ZodPipe:()=>m_,$ZodPrefault:()=>l_,$ZodPreprocess:()=>g_,$ZodPromise:()=>b_,$ZodReadonly:()=>__,$ZodRealError:()=>Gf,$ZodRecord:()=>Qg,$ZodRegistry:()=>vx,$ZodSet:()=>e_,$ZodString:()=>Qh,$ZodStringFormat:()=>$h,$ZodSuccess:()=>d_,$ZodSymbol:()=>Pg,$ZodTemplateLiteral:()=>v_,$ZodTransform:()=>i_,$ZodTuple:()=>Zg,$ZodType:()=>W,$ZodULID:()=>lg,$ZodURL:()=>ig,$ZodUUID:()=>tg,$ZodUndefined:()=>Fg,$ZodUnion:()=>qg,$ZodUnknown:()=>Rg,$ZodVoid:()=>Bg,$ZodXID:()=>ug,$ZodXor:()=>Jg,$brand:()=>Ef,$constructor:()=>U,$input:()=>_x,$output:()=>gx,Doc:()=>fh,INVALID:()=>PS,JSONSchema:()=>dE,JSONSchemaGenerator:()=>lE,NEVER:()=>Cf,TimePrecision:()=>Yw,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>IS,ZodCompileUnsupportedError:()=>LS,_any:()=>NC,_array:()=>gw,_base64:()=>cC,_base64url:()=>lC,_bigint:()=>EC,_boolean:()=>wC,_catch:()=>Fw,_check:()=>Ww,_cidrv4:()=>oC,_cidrv6:()=>sC,_coercedBigint:()=>DC,_coercedBoolean:()=>TC,_coercedDate:()=>RC,_coercedNumber:()=>vC,_coercedString:()=>HS,_creditCard:()=>dC,_cuid:()=>QS,_cuid2:()=>$S,_custom:()=>Vw,_date:()=>LC,_decode:()=>lp,_decodeAsync:()=>pp,_default:()=>Mw,_discriminatedUnion:()=>yw,_e164:()=>uC,_email:()=>US,_emoji:()=>XS,_encode:()=>sp,_encodeAsync:()=>dp,_endsWith:()=>ow,_enum:()=>Tw,_file:()=>Ow,_float32:()=>bC,_float64:()=>xC,_gt:()=>HC,_gte:()=>UC,_guid:()=>WS,_includes:()=>iw,_int:()=>yC,_int32:()=>SC,_int64:()=>OC,_intersection:()=>bw,_ipv4:()=>rC,_ipv6:()=>iC,_isoDate:()=>mC,_isoDateTime:()=>pC,_isoDuration:()=>gC,_isoTime:()=>hC,_jwt:()=>fC,_ksuid:()=>nC,_lazy:()=>zw,_length:()=>ew,_literal:()=>Dw,_lowercase:()=>nw,_lt:()=>BC,_lte:()=>VC,_mac:()=>aC,_map:()=>Cw,_max:()=>VC,_maxLength:()=>QC,_maxSize:()=>YC,_mime:()=>lw,_min:()=>UC,_minLength:()=>$C,_minSize:()=>XC,_multipleOf:()=>JC,_nan:()=>zC,_nanoid:()=>ZS,_nativeEnum:()=>Ew,_negative:()=>GC,_never:()=>FC,_nonnegative:()=>qC,_nonoptional:()=>Nw,_nonpositive:()=>KC,_normalize:()=>dw,_null:()=>MC,_nullable:()=>jw,_number:()=>_C,_optional:()=>Aw,_overwrite:()=>uw,_parse:()=>Yf,_parseAsync:()=>Zf,_pipe:()=>Iw,_positive:()=>WC,_promise:()=>Bw,_properties:()=>cw,_property:()=>sw,_readonly:()=>Lw,_record:()=>Sw,_refine:()=>Hw,_regex:()=>tw,_safeDecode:()=>_p,_safeDecodeAsync:()=>xp,_safeEncode:()=>hp,_safeEncodeAsync:()=>yp,_safeParse:()=>$f,_safeParseAsync:()=>tp,_set:()=>ww,_size:()=>ZC,_slugify:()=>hw,_startsWith:()=>aw,_string:()=>VS,_stringFormat:()=>Jw,_stringbool:()=>qw,_success:()=>Pw,_superRefine:()=>Uw,_symbol:()=>AC,_templateLiteral:()=>Rw,_toLowerCase:()=>pw,_toUpperCase:()=>mw,_transform:()=>kw,_trim:()=>fw,_tuple:()=>xw,_uint32:()=>CC,_uint64:()=>kC,_ulid:()=>eC,_undefined:()=>jC,_union:()=>_w,_unknown:()=>PC,_uppercase:()=>rw,_url:()=>YS,_uuid:()=>GS,_uuidv4:()=>KS,_uuidv6:()=>qS,_uuidv7:()=>JS,_void:()=>IC,_xid:()=>tC,_xor:()=>vw,clone:()=>wd,compile:()=>Sx,compileFn:()=>wx,config:()=>xf,createStandardJSONSchemaMethod:()=>fT,createToJSONSchemaMethod:()=>dT,decode:()=>up,decodeAsync:()=>mp,describe:()=>Gw,encode:()=>cp,encodeAsync:()=>fp,extractDefs:()=>nT,finalize:()=>sT,flattenError:()=>Pf,formatError:()=>Ff,getDiscriminatedOption:()=>Ph,globalConfig:()=>kf,globalRegistry:()=>yx,handleUnrepresentable:()=>$w,initializeContext:()=>Qw,isBackEdge:()=>k_,isRecursiveSchema:()=>E_,isValidBase64:()=>Ch,isValidBase64URL:()=>wh,isValidCIDRv6:()=>Sh,isValidCreditCard:()=>Eh,isValidIPv6:()=>xh,isValidJWT:()=>Dh,locales:()=>fx,memoizer:()=>O_,mergeValues:()=>Fh,meta:()=>Kw,parse:()=>Xf,parseAsync:()=>Qf,parseURLObject:()=>_h,prettifyError:()=>Rf,process:()=>eT,regexes:()=>wp,registry:()=>mx,safeDecode:()=>vp,safeDecodeAsync:()=>Sp,safeEncode:()=>gp,safeEncodeAsync:()=>bp,safeParse:()=>ep,safeParseAsync:()=>np,standardProps:()=>gh,stripTabAndNewline:()=>vh,toDotPath:()=>Lf,toJSONSchema:()=>vT,toZod:()=>$u,treeifyError:()=>If,urlHostnameOk:()=>yh,urlProtocolOk:()=>bh,util:()=>Xu,validate:()=>ap,validateAsync:()=>op,version:()=>mh}),mE=o((()=>{Af(),Cp(),Kf(),C_(),L_(),dh(),hh(),H(),Rm(),px(),bx(),ph(),BS(),Xw(),pT(),cE(),uE(),fE()}));function hE(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===gE)return new x_({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,gE);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?wd(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:wd(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?wd(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:wd(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:wd(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?wd(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:wd(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:wd(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:wd(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:wd(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return wd(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var gE,_E=o((()=>{C_(),H(),gE=Symbol(`z.visit/resolving`)}));Cp();function vE(e){return!!e._zod}function yE(e,t){return vE(e)?ep(e,t):e.safeParse(t)}function bE(e){if(!e)return;let t;if(t=vE(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function xE(e){if(vE(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var SE=c({endsWith:()=>ow,gt:()=>HC,gte:()=>UC,includes:()=>iw,length:()=>ew,lowercase:()=>nw,lt:()=>BC,lte:()=>VC,maxLength:()=>QC,maxSize:()=>YC,mime:()=>lw,minLength:()=>$C,minSize:()=>XC,multipleOf:()=>JC,negative:()=>GC,nonnegative:()=>qC,nonpositive:()=>KC,normalize:()=>dw,overwrite:()=>uw,positive:()=>WC,properties:()=>cw,property:()=>sw,regex:()=>tw,size:()=>ZC,slugify:()=>hw,startsWith:()=>aw,toLowerCase:()=>pw,toUpperCase:()=>mw,trim:()=>fw,uppercase:()=>rw}),CE=o((()=>{mE()}));function wE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var TE,EE,DE,OE,kE=o((()=>{mE(),H(),TE=new WeakSet([Object.prototype,Error.prototype]),EE=(e,t)=>{Wf.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);TE.has(n)||(TE.add(n),wE(n,`format`,e=>t=>Ff(e,t)),wE(n,`flatten`,e=>t=>Pf(e,t)),wE(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,id,2)}),wE(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,id,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},DE=U(`ZodError`,EE),OE=U(`ZodError`,EE,void 0,{Parent:Error})})),AE,jE,ME,NE,PE,FE,IE,LE,RE,zE,BE,VE,HE=o((()=>{mE(),kE(),AE=Yf(OE),jE=Zf(OE),ME=$f(OE),NE=tp(OE),PE=sp(OE),FE=lp(OE),IE=dp(OE),LE=pp(OE),RE=hp(OE),zE=_p(OE),BE=yp(OE),VE=xp(OE)})),UE=c({ZodAny:()=>lk,ZodArray:()=>mk,ZodBase64:()=>YO,ZodBase64URL:()=>XO,ZodBigInt:()=>ik,ZodBigIntFormat:()=>ak,ZodBoolean:()=>rk,ZodCIDRv4:()=>qO,ZodCIDRv6:()=>JO,ZodCUID:()=>zO,ZodCUID2:()=>BO,ZodCatch:()=>Fk,ZodCodec:()=>Rk,ZodCreditCard:()=>QO,ZodCustom:()=>Gk,ZodCustomStringFormat:()=>ek,ZodDate:()=>pk,ZodDefault:()=>jk,ZodDiscriminatedUnion:()=>vk,ZodE164:()=>ZO,ZodEmail:()=>NO,ZodEmoji:()=>LO,ZodEnum:()=>wk,ZodExactOptional:()=>kk,ZodFile:()=>Ek,ZodFunction:()=>Wk,ZodGUID:()=>PO,ZodIPv4:()=>WO,ZodIPv6:()=>KO,ZodISODate:()=>AO,ZodISODateTime:()=>kO,ZodISODuration:()=>MO,ZodISOTime:()=>jO,ZodIntersection:()=>yk,ZodJWT:()=>$O,ZodKSUID:()=>UO,ZodLazy:()=>Hk,ZodLiteral:()=>Tk,ZodMAC:()=>GO,ZodMap:()=>Sk,ZodNaN:()=>Ik,ZodNanoID:()=>RO,ZodNever:()=>dk,ZodNonOptional:()=>Nk,ZodNull:()=>ck,ZodNullable:()=>Ak,ZodNumber:()=>tk,ZodNumberFormat:()=>nk,ZodObject:()=>hk,ZodOptional:()=>Ok,ZodPipe:()=>Lk,ZodPrefault:()=>Mk,ZodPreprocess:()=>zk,ZodPromise:()=>Uk,ZodReadonly:()=>Bk,ZodRecord:()=>xk,ZodSet:()=>Ck,ZodString:()=>DO,ZodStringFormat:()=>OO,ZodSuccess:()=>Pk,ZodSymbol:()=>ok,ZodTemplateLiteral:()=>Vk,ZodTransform:()=>Dk,ZodTuple:()=>bk,ZodType:()=>Q,ZodULID:()=>VO,ZodURL:()=>IO,ZodUUID:()=>FO,ZodUndefined:()=>sk,ZodUnion:()=>gk,ZodUnknown:()=>uk,ZodVoid:()=>fk,ZodXID:()=>HO,ZodXor:()=>_k,_ZodString:()=>EO,_default:()=>aO,_function:()=>vO,any:()=>ND,array:()=>Y,base64:()=>fD,base64url:()=>pD,bigint:()=>DD,boolean:()=>ED,catch:()=>lO,check:()=>yO,cidrv4:()=>uD,cidrv6:()=>dD,codec:()=>fO,creditCard:()=>hD,cuid:()=>nD,cuid2:()=>rD,custom:()=>bO,date:()=>LD,describe:()=>Kk,discriminatedUnion:()=>UD,e164:()=>mD,email:()=>KE,emoji:()=>eD,enum:()=>ZD,exactOptional:()=>nO,file:()=>$D,float32:()=>SD,float64:()=>CD,function:()=>vO,guid:()=>qE,hash:()=>bD,hex:()=>yD,hostname:()=>vD,httpUrl:()=>$E,instanceof:()=>CO,int:()=>xD,int32:()=>wD,int64:()=>OD,intersection:()=>WD,invertCodec:()=>pO,ipv4:()=>sD,ipv6:()=>lD,json:()=>wO,jwt:()=>gD,keyof:()=>RD,ksuid:()=>oD,lazy:()=>gO,literal:()=>Z,looseObject:()=>BD,looseRecord:()=>JD,mac:()=>cD,map:()=>YD,meta:()=>qk,nan:()=>uO,nanoid:()=>tD,nativeEnum:()=>QD,never:()=>FD,nonoptional:()=>sO,null:()=>MD,nullable:()=>rO,nullish:()=>iO,number:()=>J,object:()=>X,optional:()=>tO,partialRecord:()=>qD,pipe:()=>dO,prefault:()=>oO,preprocess:()=>TO,promise:()=>_O,readonly:()=>mO,record:()=>KD,refine:()=>xO,set:()=>XD,strictObject:()=>zD,string:()=>q,stringFormat:()=>_D,stringbool:()=>Jk,success:()=>cO,superRefine:()=>SO,symbol:()=>AD,templateLiteral:()=>hO,transform:()=>eO,tuple:()=>GD,uint32:()=>TD,uint64:()=>kD,ulid:()=>iD,undefined:()=>jD,union:()=>VD,unknown:()=>PD,url:()=>QE,uuid:()=>JE,uuidv4:()=>YE,uuidv6:()=>XE,uuidv7:()=>ZE,void:()=>ID,xid:()=>aD,xor:()=>HD});function WE(){kf.localeError||xf(vv())}function GE(){kf.memoizer||xf({memoizer:O_()})}function q(e){return VS(DO,e)}function KE(e){return US(NO,e)}function qE(e){return WS(PO,e)}function JE(e){return GS(FO,e)}function YE(e){return KS(FO,e)}function XE(e){return qS(FO,e)}function ZE(e){return JS(FO,e)}function QE(e){return YS(IO,e)}function $E(e){return YS(IO,{protocol:cm,hostname:sm,...z(e)})}function eD(e){return XS(LO,e)}function tD(e){return ZS(RO,e)}function nD(e){return QS(zO,e)}function rD(e){return $S(BO,e)}function iD(e){return eC(VO,e)}function aD(e){return tC(HO,e)}function oD(e){return nC(UO,e)}function sD(e){return rC(WO,e)}function cD(e){return aC(GO,e)}function lD(e){return iC(KO,e)}function uD(e){return oC(qO,e)}function dD(e){return sC(JO,e)}function fD(e){return cC(YO,e)}function pD(e){return lC(XO,e)}function mD(e){return uC(ZO,e)}function hD(e){return dC(QO,e)}function gD(e){return fC($O,e)}function _D(e,t,n={}){return Jw(ek,e,t,n)}function vD(e){return Jw(ek,`hostname`,om,e)}function yD(e){return Jw(ek,`hex`,Sm,e)}function bD(e,t){let n=`${e}_${t?.enc??`hex`}`,r=wp[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return Jw(ek,n,r,t)}function J(e){return _C(tk,e)}function xD(e){return yC(nk,e)}function SD(e){return bC(nk,e)}function CD(e){return xC(nk,e)}function wD(e){return SC(nk,e)}function TD(e){return CC(nk,e)}function ED(e){return wC(rk,e)}function DD(e){return EC(ik,e)}function OD(e){return OC(ak,e)}function kD(e){return kC(ak,e)}function AD(e){return AC(ok,e)}function jD(e){return jC(sk,e)}function MD(e){return MC(ck,e)}function ND(){return NC(lk)}function PD(){return PC(uk)}function FD(e){return FC(dk,e)}function ID(e){return IC(fk,e)}function LD(e){return LC(pk,e)}function Y(e,t){return gw(mk,e,t)}function RD(e){let t=e._zod.def.shape;return ZD(Object.keys(t))}function X(e,t){let n={type:`object`,shape:e??{},...z(t)};return new hk(n)}function zD(e,t){return new hk({type:`object`,shape:e,catchall:FD(),...z(t)})}function BD(e,t){return new hk({type:`object`,shape:e,catchall:PD(),...z(t)})}function VD(e,t){return new gk({type:`union`,options:e,...z(t)})}function HD(e,t){return new _k({type:`union`,options:e,inclusive:!1,...z(t)})}function UD(e,t,n){return new vk({type:`union`,options:t,discriminator:e,...z(n)})}function WD(e,t){return new yk({type:`intersection`,left:e,right:t})}function GD(e,t,n){let r=t instanceof W;return new bk({type:`tuple`,items:e,rest:r?t:null,...z(r?n:t)})}function KD(e,t,n){return!t||!t._zod?new xk({type:`record`,keyType:q(),valueType:e,...z(t)}):new xk({type:`record`,keyType:e,valueType:t,...z(n)})}function qD(e,t,n){return new xk({type:`record`,keyType:e,valueType:t,...z(n),partial:!0})}function JD(e,t,n){return new xk({type:`record`,keyType:e,valueType:t,mode:`loose`,...z(n)})}function YD(e,t,n){return new Sk({type:`map`,keyType:e,valueType:t,...z(n)})}function XD(e,t){return new Ck({type:`set`,valueType:e,...z(t)})}function ZD(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new wk({type:`enum`,entries:n,...z(t)})}function QD(e,t){return new wk({type:`enum`,entries:e,...z(t)})}function Z(e,t){return new Tk({type:`literal`,values:Array.isArray(e)?e:[e],...z(t)})}function $D(e){return Ow(Ek,e)}function eO(e){return new Dk({type:`transform`,transform:e})}function tO(e){return new Ok({type:`optional`,innerType:e})}function nO(e){return new kk({type:`optional`,innerType:e})}function rO(e){return new Ak({type:`nullable`,innerType:e})}function iO(e){return tO(rO(e))}function aO(e,t){return new jk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():xd(t)}})}function oO(e,t){return new Mk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():xd(t)}})}function sO(e,t){return new Nk({type:`nonoptional`,innerType:e,...z(t)})}function cO(e){return new Pk({type:`success`,innerType:e})}function lO(e,t){return new Fk({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:af(t)})}function uO(e){return zC(Ik,e)}function dO(e,t){return new Lk({type:`pipe`,in:e,out:t})}function fO(e,t,n){return new Rk({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function pO(e){let t=e._zod.def;return new Rk({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function mO(e){return new Bk({type:`readonly`,innerType:e})}function hO(e,t){return new Vk({type:`template_literal`,parts:e,...z(t)})}function gO(e){return new Hk({type:`lazy`,getter:e})}function _O(e){return new Uk({type:`promise`,innerType:e})}function vO(e){return new Wk({type:`function`,input:Array.isArray(e?.input)?GD(e?.input):e?.input??Y(PD()),output:e?.output??PD()})}function yO(e){let t=new Bm({check:`custom`});return t._zod.check=e,t}function bO(e,t){return Vw(Gk,e??(()=>!0),t)}function xO(e,t={}){return Hw(Gk,e,t)}function SO(e,t){return Uw(e,t)}function CO(e,t={}){let n=new Gk({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...z(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function wO(e){let t=gO(()=>VD([q(e),J(),ED(),MD(),Y(t),KD(q(),t)]));return t}function TO(e,t){return new zk({type:`pipe`,in:eO(e),out:t})}var Q,EO,DO,OO,kO,AO,jO,MO,NO,PO,FO,IO,LO,RO,zO,BO,VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk=o((()=>{mE(),cE(),pT(),bv(),CE(),HE(),Q=U(`ZodType`,(e,t)=>(WE(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(fd(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return wd(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(xO(e,t))},superRefine(e,t){return this.check(SO(e,t))},overwrite(e){return this.check(uw(e))},optional(){return tO(this)},exactOptional(){return nO(this)},nullable(){return rO(this)},nullish(){return tO(rO(this))},nonoptional(e){return sO(this,e)},array(){return Y(this)},or(e){return VD([this,e])},and(e){return WD(this,e)},transform(e){return dO(this,eO(e))},default(e){return aO(this,e)},prefault(e){return oO(this,e)},catch(e){return lO(this,e)},pipe(e){return dO(this,e)},readonly(){return mO(this)},describe(e){let t=this.clone();return yx.add(t,{description:e}),t},meta(...e){if(e.length===0)return yx.get(this);let t=this.clone();return yx.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return $d(this,`~standard`,{...gh(this),jsonSchema:{input:fT(this,`input`),output:fT(this,`output`)}})},set"~standard"(e){Qd(this,`~standard`,e)},parse:function e(t,n){return AE(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await jE(this,t,n,{callee:e})},safeParse(e,t){return ME(this,e,t)},async safeParseAsync(e,t){return NE(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Qd(this,`spa`,e)},encode:function e(t,n){return PE(this,t,n,{callee:e})},decode:function e(t,n){return FE(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await IE(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await LE(this,t,n,{callee:e})},safeEncode(e,t){return RE(this,e,t)},safeDecode(e,t){return zE(this,e,t)},async safeEncodeAsync(e,t){return BE(this,e,t)},async safeDecodeAsync(e,t){return VE(this,e,t)},toJSONSchema(e){return dT(this,{})(e)},get description(){return yx.get(this)?.description},get _def(){return this._zod.def}}),EO=U(`_ZodString`,(e,t)=>{Qh.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bT(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(tw(...e))},includes(...e){return this.check(iw(...e))},startsWith(...e){return this.check(aw(...e))},endsWith(...e){return this.check(ow(...e))},min(...e){return this.check($C(...e))},max(...e){return this.check(QC(...e))},length(...e){return this.check(ew(...e))},nonempty(...e){return this.check($C(1,...e))},lowercase(e){return this.check(nw(e))},uppercase(e){return this.check(rw(e))},trim(){return this.check(fw())},normalize(...e){return this.check(dw(...e))},toLowerCase(){return this.check(pw())},toUpperCase(){return this.check(mw())},slugify(){return this.check(hw())}}),DO=U(`ZodString`,(e,t)=>{Qh.init(e,t),EO.init(e,t)},{email(e){return this.check(US(NO,e))},url(e){return this.check(YS(IO,e))},jwt(e){return this.check(fC($O,e))},emoji(e){return this.check(XS(LO,e))},guid(e){return this.check(WS(PO,e))},uuid(e){return this.check(GS(FO,e))},uuidv4(e){return this.check(KS(FO,e))},uuidv6(e){return this.check(qS(FO,e))},uuidv7(e){return this.check(JS(FO,e))},nanoid(e){return this.check(ZS(RO,e))},cuid(e){return this.check(QS(zO,e))},cuid2(e){return this.check($S(BO,e))},ulid(e){return this.check(eC(VO,e))},base64(e){return this.check(cC(YO,e))},base64url(e){return this.check(lC(XO,e))},xid(e){return this.check(tC(HO,e))},ksuid(e){return this.check(nC(UO,e))},ipv4(e){return this.check(rC(WO,e))},ipv6(e){return this.check(iC(KO,e))},cidrv4(e){return this.check(oC(qO,e))},cidrv6(e){return this.check(sC(JO,e))},e164(e){return this.check(uC(ZO,e))},datetime(e){return this.check(pC(kO,e))},date(e){return this.check(mC(AO,e))},time(e){return this.check(hC(jO,e))},duration(e){return this.check(gC(MO,e))}}),OO=U(`ZodStringFormat`,(e,t)=>{$h.init(e,t),EO.init(e,t)}),kO=U(`ZodISODateTime`,(e,t)=>{fg.init(e,t),OO.init(e,t)}),AO=U(`ZodISODate`,(e,t)=>{pg.init(e,t),OO.init(e,t)}),jO=U(`ZodISOTime`,(e,t)=>{mg.init(e,t),OO.init(e,t)}),MO=U(`ZodISODuration`,(e,t)=>{hg.init(e,t),OO.init(e,t)}),NO=U(`ZodEmail`,(e,t)=>{ng.init(e,t),OO.init(e,t)}),PO=U(`ZodGUID`,(e,t)=>{eg.init(e,t),OO.init(e,t)}),FO=U(`ZodUUID`,(e,t)=>{tg.init(e,t),OO.init(e,t)}),IO=U(`ZodURL`,(e,t)=>{ig.init(e,t),OO.init(e,t)}),LO=U(`ZodEmoji`,(e,t)=>{ag.init(e,t),OO.init(e,t)}),RO=U(`ZodNanoID`,(e,t)=>{og.init(e,t),OO.init(e,t)}),zO=U(`ZodCUID`,(e,t)=>{sg.init(e,t),OO.init(e,t)}),BO=U(`ZodCUID2`,(e,t)=>{cg.init(e,t),OO.init(e,t)}),VO=U(`ZodULID`,(e,t)=>{lg.init(e,t),OO.init(e,t)}),HO=U(`ZodXID`,(e,t)=>{ug.init(e,t),OO.init(e,t)}),UO=U(`ZodKSUID`,(e,t)=>{dg.init(e,t),OO.init(e,t)}),WO=U(`ZodIPv4`,(e,t)=>{gg.init(e,t),OO.init(e,t)}),GO=U(`ZodMAC`,(e,t)=>{yg.init(e,t),OO.init(e,t)}),KO=U(`ZodIPv6`,(e,t)=>{vg.init(e,t),OO.init(e,t)}),qO=U(`ZodCIDRv4`,(e,t)=>{bg.init(e,t),OO.init(e,t)}),JO=U(`ZodCIDRv6`,(e,t)=>{xg.init(e,t),OO.init(e,t)}),YO=U(`ZodBase64`,(e,t)=>{Sg.init(e,t),OO.init(e,t)}),XO=U(`ZodBase64URL`,(e,t)=>{Cg.init(e,t),OO.init(e,t)}),ZO=U(`ZodE164`,(e,t)=>{wg.init(e,t),OO.init(e,t)}),QO=U(`ZodCreditCard`,(e,t)=>{Eg.init(e,t),OO.init(e,t)}),$O=U(`ZodJWT`,(e,t)=>{Dg.init(e,t),OO.init(e,t)}),ek=U(`ZodCustomStringFormat`,(e,t)=>{Og.init(e,t),OO.init(e,t)}),tk=U(`ZodNumber`,(e,t)=>{kg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xT(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(HC(e,t))},gte(e,t){return this.check(UC(e,t))},min(e,t){return this.check(UC(e,t))},lt(e,t){return this.check(BC(e,t))},lte(e,t){return this.check(VC(e,t))},max(e,t){return this.check(VC(e,t))},int(e){return this.check(xD(e))},safe(e){return this.check(xD(e))},positive(e){return this.check(HC(0,e))},nonnegative(e){return this.check(UC(0,e))},negative(e){return this.check(BC(0,e))},nonpositive(e){return this.check(VC(0,e))},multipleOf(e,t){return this.check(JC(e,t))},step(e,t){return this.check(JC(e,t))},finite(){return this}}),nk=U(`ZodNumberFormat`,(e,t)=>{Ag.init(e,t),tk.init(e,t)}),rk=U(`ZodBoolean`,(e,t)=>{jg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ST(e,t,n,r)}),ik=U(`ZodBigInt`,(e,t)=>{Mg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CT(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(UC(e,t))},min(e,t){return this.check(UC(e,t))},gt(e,t){return this.check(HC(e,t))},lt(e,t){return this.check(BC(e,t))},lte(e,t){return this.check(VC(e,t))},max(e,t){return this.check(VC(e,t))},positive(e){return this.check(HC(BigInt(0),e))},negative(e){return this.check(BC(BigInt(0),e))},nonpositive(e){return this.check(VC(BigInt(0),e))},nonnegative(e){return this.check(UC(BigInt(0),e))},multipleOf(e,t){return this.check(JC(e,t))}}),ak=U(`ZodBigIntFormat`,(e,t)=>{Ng.init(e,t),ik.init(e,t)}),ok=U(`ZodSymbol`,(e,t)=>{Pg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wT(e,t,n,r)}),sk=U(`ZodUndefined`,(e,t)=>{Fg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ET(e,t,n,r)}),ck=U(`ZodNull`,(e,t)=>{Ig.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TT(e,t,n,r)}),lk=U(`ZodAny`,(e,t)=>{Lg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kT(e,t,n,r)}),uk=U(`ZodUnknown`,(e,t)=>{Rg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AT(e,t,n,r)}),dk=U(`ZodNever`,(e,t)=>{zg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OT(e,t,n,r)}),fk=U(`ZodVoid`,(e,t)=>{Bg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DT(e,t,n,r)}),pk=U(`ZodDate`,(e,t)=>{Vg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jT(e,t,n,r),e.min=(t,n)=>e.check(UC(t,n)),e.max=(t,n)=>e.check(VC(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),mk=U(`ZodArray`,(e,t)=>{GE(),Hg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UT(e,t,n,r),e.element=t.element},{min(e,t){return this.check($C(e,t))},nonempty(e){return this.check($C(1,e))},max(e,t){return this.check(QC(e,t))},length(e,t){return this.check(ew(e,t))},unwrap(){return this.element}}),hk=U(`ZodObject`,(e,t)=>{GE(),Kg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WT(e,t,n,r),rf(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return ZD(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:PD()})},loose(){return this.clone({...this._zod.def,catchall:PD()})},strict(){return this.clone({...this._zod.def,catchall:FD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return kd(this,e)},safeExtend(e){return Ad(this,e)},merge(e){return jd(this,e)},pick(e){return Dd(this,e)},omit(e){return Od(this,e)},partial(...e){return Md(Ok,this,e[0])},exactPartial(...e){return Md(kk,this,e[0],`exactPartial`)},required(...e){return Nd(Nk,this,e[0])}}),gk=U(`ZodUnion`,(e,t)=>{qg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r),e.options=t.options}),_k=U(`ZodXor`,(e,t)=>{gk.init(e,t),Jg.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r),e.options=t.options}),vk=U(`ZodDiscriminatedUnion`,(e,t)=>{gk.init(e,t),Yg.init(e,t)}),yk=U(`ZodIntersection`,(e,t)=>{Xg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KT(e,t,n,r)}),bk=U(`ZodTuple`,(e,t)=>{GE(),Zg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Ok({type:`optional`,innerType:e}))})}}),xk=U(`ZodRecord`,(e,t)=>{GE(),Qg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),Sk=U(`ZodMap`,(e,t)=>{GE(),$g.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(XC(...t)),e.nonempty=t=>e.check(XC(1,t)),e.max=(...t)=>e.check(YC(...t)),e.size=(...t)=>e.check(ZC(...t))}),Ck=U(`ZodSet`,(e,t)=>{GE(),e_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HT(e,t,n,r),e.min=(...t)=>e.check(XC(...t)),e.nonempty=t=>e.check(XC(1,t)),e.max=(...t)=>e.check(YC(...t)),e.size=(...t)=>e.check(ZC(...t))}),wk=U(`ZodEnum`,(e,t)=>{t_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new wk({...t,checks:[],...z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new wk({...t,checks:[],...z(r),entries:i})}}),Tk=U(`ZodLiteral`,(e,t)=>{n_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NT(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Ek=U(`ZodFile`,(e,t)=>{r_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IT(e,t,n,r),e.min=(t,n)=>e.check(XC(t,n)),e.max=(t,n)=>e.check(YC(t,n)),e.mime=(t,n)=>e.check(lw(Array.isArray(t)?t:[t],n))}),Dk=U(`ZodTransform`,(e,t)=>{GE(),i_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BT(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Of(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ud(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ud(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),Ok=U(`ZodOptional`,(e,t)=>{a_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),kk=U(`ZodExactOptional`,(e,t)=>{o_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ak=U(`ZodNullable`,(e,t)=>{s_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),jk=U(`ZodDefault`,(e,t)=>{c_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$T(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Mk=U(`ZodPrefault`,(e,t)=>{l_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Nk=U(`ZodNonOptional`,(e,t)=>{u_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Pk=U(`ZodSuccess`,(e,t)=>{d_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Fk=U(`ZodCatch`,(e,t)=>{f_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Ik=U(`ZodNaN`,(e,t)=>{p_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PT(e,t,n,r)}),Lk=U(`ZodPipe`,(e,t)=>{m_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nE(e,t,n,r),e.in=t.in,e.out=t.out}),Rk=U(`ZodCodec`,(e,t)=>{Lk.init(e,t),h_.init(e,t)}),zk=U(`ZodPreprocess`,(e,t)=>{Lk.init(e,t),g_.init(e,t)}),Bk=U(`ZodReadonly`,(e,t)=>{__.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Vk=U(`ZodTemplateLiteral`,(e,t)=>{v_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FT(e,t,n,r)}),Hk=U(`ZodLazy`,(e,t)=>{x_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),Uk=U(`ZodPromise`,(e,t)=>{b_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Wk=U(`ZodFunction`,(e,t)=>{y_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zT(e,t,n,r)}),Gk=U(`ZodCustom`,(e,t)=>{S_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RT(e,t,n,r)}),Kk=Gw,qk=Kw,Jk=(...e)=>qw({Codec:Rk,Boolean:rk,String:DO},...e)}));function Xk(e){xf({customError:e})}function Zk(){return xf().customError}var Qk,$k,eA=o((()=>{mE(),Qk={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},$k||={}})),tA=c({ZodISODate:()=>AO,ZodISODateTime:()=>kO,ZodISODuration:()=>MO,ZodISOTime:()=>jO,date:()=>rA,datetime:()=>nA,duration:()=>aA,time:()=>iA});function nA(e){return pC(kO,e)}function rA(e){return mC(AO,e)}function iA(e){return hC(jO,e)}function aA(e){return gC(MO,e)}var oA=o((()=>{mE(),Yk()}));function sA(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function cA(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function fA(e,t){if(e!==!1)return e===void 0||e===!0?$.any():mA(e,t)}function pA(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=mA(uA(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>pA({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(_A)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?mA(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=mA(r,t);dd(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=mA(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!bd(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=dA(r,mA(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=cA(n.map(e=>mA(e,t)),a),s=Array.isArray(i)?void 0:fA(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=cA(i.map(e=>mA(e,t)),n),o=fA(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=mA(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function mA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=pA(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>mA(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>mA(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:mA(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function hA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:sA(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??yx};return mA(n,r)}var $,gA,_A,vA=o((()=>{bx(),H(),CE(),oA(),Yk(),$={...UE,...SE,iso:tA},gA=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),_A=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function yA(e){return hE(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:VD(t.options)}})}var bA=o((()=>{_E(),Yk()}));function xA(e,t){if(!t?.length)return e;let n=e._zod.def;return wd(e,fd(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function SA(e){return xA(e.out,e.checks)}function CA(e){return e.in._zod.traits.has(`$ZodTransform`)?SA(e):e.in}function wA(e){return hE(e,{pipe:e=>CA(e._zod.def),default:(e,t)=>t?tO(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function TA(e){return hE(e,{pipe:e=>SA(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var EA=o((()=>{H(),_E(),Yk()})),DA=c({bigint:()=>jA,boolean:()=>AA,date:()=>MA,number:()=>kA,string:()=>OA});function OA(e){return HS(DO,e)}function kA(e){return vC(tk,e)}function AA(e){return TC(rk,e)}function jA(e){return DC(ik,e)}function MA(e){return RC(pk,e)}var NA=o((()=>{mE(),Yk()})),PA=c({$brand:()=>Ef,$input:()=>_x,$output:()=>gx,NEVER:()=>Cf,TimePrecision:()=>Yw,ZodAny:()=>lk,ZodArray:()=>mk,ZodBase64:()=>YO,ZodBase64URL:()=>XO,ZodBigInt:()=>ik,ZodBigIntFormat:()=>ak,ZodBoolean:()=>rk,ZodCIDRv4:()=>qO,ZodCIDRv6:()=>JO,ZodCUID:()=>zO,ZodCUID2:()=>BO,ZodCatch:()=>Fk,ZodCodec:()=>Rk,ZodCompileAsyncError:()=>IS,ZodCompileUnsupportedError:()=>LS,ZodCreditCard:()=>QO,ZodCustom:()=>Gk,ZodCustomStringFormat:()=>ek,ZodDate:()=>pk,ZodDefault:()=>jk,ZodDiscriminatedUnion:()=>vk,ZodE164:()=>ZO,ZodEmail:()=>NO,ZodEmoji:()=>LO,ZodEnum:()=>wk,ZodError:()=>DE,ZodExactOptional:()=>kk,ZodFile:()=>Ek,ZodFirstPartyTypeKind:()=>$k,ZodFunction:()=>Wk,ZodGUID:()=>PO,ZodIPv4:()=>WO,ZodIPv6:()=>KO,ZodISODate:()=>AO,ZodISODateTime:()=>kO,ZodISODuration:()=>MO,ZodISOTime:()=>jO,ZodIntersection:()=>yk,ZodIssueCode:()=>Qk,ZodJWT:()=>$O,ZodKSUID:()=>UO,ZodLazy:()=>Hk,ZodLiteral:()=>Tk,ZodMAC:()=>GO,ZodMap:()=>Sk,ZodNaN:()=>Ik,ZodNanoID:()=>RO,ZodNever:()=>dk,ZodNonOptional:()=>Nk,ZodNull:()=>ck,ZodNullable:()=>Ak,ZodNumber:()=>tk,ZodNumberFormat:()=>nk,ZodObject:()=>hk,ZodOptional:()=>Ok,ZodPipe:()=>Lk,ZodPrefault:()=>Mk,ZodPreprocess:()=>zk,ZodPromise:()=>Uk,ZodReadonly:()=>Bk,ZodRealError:()=>OE,ZodRecord:()=>xk,ZodSet:()=>Ck,ZodString:()=>DO,ZodStringFormat:()=>OO,ZodSuccess:()=>Pk,ZodSymbol:()=>ok,ZodTemplateLiteral:()=>Vk,ZodTransform:()=>Dk,ZodTuple:()=>bk,ZodType:()=>Q,ZodULID:()=>VO,ZodURL:()=>IO,ZodUUID:()=>FO,ZodUndefined:()=>sk,ZodUnion:()=>gk,ZodUnknown:()=>uk,ZodVoid:()=>fk,ZodXID:()=>HO,ZodXor:()=>_k,_ZodString:()=>EO,_default:()=>aO,_function:()=>vO,any:()=>ND,array:()=>Y,base64:()=>fD,base64url:()=>pD,bigint:()=>DD,boolean:()=>ED,catch:()=>lO,check:()=>yO,cidrv4:()=>uD,cidrv6:()=>dD,clone:()=>wd,codec:()=>fO,coerce:()=>DA,compile:()=>Sx,config:()=>xf,core:()=>pE,creditCard:()=>hD,cuid:()=>nD,cuid2:()=>rD,custom:()=>bO,date:()=>LD,decode:()=>FE,decodeAsync:()=>LE,deepPartial:()=>yA,describe:()=>Kk,discriminatedUnion:()=>UD,e164:()=>mD,email:()=>KE,emoji:()=>eD,encode:()=>PE,encodeAsync:()=>IE,endsWith:()=>ow,enum:()=>ZD,exactOptional:()=>nO,file:()=>$D,flattenError:()=>Pf,float32:()=>SD,float64:()=>CD,formatError:()=>Ff,fromJSONSchema:()=>hA,function:()=>vO,getDiscriminatedOption:()=>Ph,getErrorMap:()=>Zk,globalRegistry:()=>yx,gt:()=>HC,gte:()=>UC,guid:()=>qE,hash:()=>bD,hex:()=>yD,hostname:()=>vD,httpUrl:()=>$E,includes:()=>iw,input:()=>wA,instanceof:()=>CO,int:()=>xD,int32:()=>wD,int64:()=>OD,intersection:()=>WD,invertCodec:()=>pO,ipv4:()=>sD,ipv6:()=>lD,iso:()=>tA,json:()=>wO,jwt:()=>gD,keyof:()=>RD,ksuid:()=>oD,lazy:()=>gO,length:()=>ew,literal:()=>Z,locales:()=>fx,looseObject:()=>BD,looseRecord:()=>JD,lowercase:()=>nw,lt:()=>BC,lte:()=>VC,mac:()=>cD,map:()=>YD,maxLength:()=>QC,maxSize:()=>YC,memoizer:()=>O_,meta:()=>qk,mime:()=>lw,minLength:()=>$C,minSize:()=>XC,multipleOf:()=>JC,nan:()=>uO,nanoid:()=>tD,nativeEnum:()=>QD,negative:()=>GC,never:()=>FD,nonnegative:()=>qC,nonoptional:()=>sO,nonpositive:()=>KC,normalize:()=>dw,null:()=>MD,nullable:()=>rO,nullish:()=>iO,number:()=>J,object:()=>X,optional:()=>tO,output:()=>TA,overwrite:()=>uw,parse:()=>AE,parseAsync:()=>jE,partialRecord:()=>qD,pipe:()=>dO,positive:()=>WC,prefault:()=>oO,preprocess:()=>TO,prettifyError:()=>Rf,promise:()=>_O,properties:()=>cw,property:()=>sw,readonly:()=>mO,record:()=>KD,refine:()=>xO,regex:()=>tw,regexes:()=>wp,registry:()=>mx,safeDecode:()=>zE,safeDecodeAsync:()=>VE,safeEncode:()=>RE,safeEncodeAsync:()=>BE,safeParse:()=>ME,safeParseAsync:()=>NE,set:()=>XD,setErrorMap:()=>Xk,size:()=>ZC,slugify:()=>hw,startsWith:()=>aw,strictObject:()=>zD,string:()=>q,stringFormat:()=>_D,stringbool:()=>Jk,success:()=>cO,superRefine:()=>SO,symbol:()=>AD,templateLiteral:()=>hO,toJSONSchema:()=>vT,toLowerCase:()=>pw,toUpperCase:()=>mw,toZod:()=>$u,transform:()=>eO,treeifyError:()=>If,trim:()=>fw,tuple:()=>GD,uint32:()=>TD,uint64:()=>kD,ulid:()=>iD,undefined:()=>jD,union:()=>VD,unknown:()=>PD,uppercase:()=>rw,url:()=>QE,util:()=>Xu,uuid:()=>JE,uuidv4:()=>YE,uuidv6:()=>XE,uuidv7:()=>ZE,validate:()=>ap,validateAsync:()=>op,void:()=>ID,xid:()=>aD,xor:()=>HD}),FA=o((()=>{mE(),Yk(),CE(),kE(),HE(),eA(),cE(),vA(),bA(),EA(),px(),oA(),NA()})),IA=o((()=>{FA(),FA()})),LA=c({$brand:()=>Ef,$input:()=>_x,$output:()=>gx,NEVER:()=>Cf,TimePrecision:()=>Yw,ZodAny:()=>lk,ZodArray:()=>mk,ZodBase64:()=>YO,ZodBase64URL:()=>XO,ZodBigInt:()=>ik,ZodBigIntFormat:()=>ak,ZodBoolean:()=>rk,ZodCIDRv4:()=>qO,ZodCIDRv6:()=>JO,ZodCUID:()=>zO,ZodCUID2:()=>BO,ZodCatch:()=>Fk,ZodCodec:()=>Rk,ZodCompileAsyncError:()=>IS,ZodCompileUnsupportedError:()=>LS,ZodCreditCard:()=>QO,ZodCustom:()=>Gk,ZodCustomStringFormat:()=>ek,ZodDate:()=>pk,ZodDefault:()=>jk,ZodDiscriminatedUnion:()=>vk,ZodE164:()=>ZO,ZodEmail:()=>NO,ZodEmoji:()=>LO,ZodEnum:()=>wk,ZodError:()=>DE,ZodExactOptional:()=>kk,ZodFile:()=>Ek,ZodFirstPartyTypeKind:()=>$k,ZodFunction:()=>Wk,ZodGUID:()=>PO,ZodIPv4:()=>WO,ZodIPv6:()=>KO,ZodISODate:()=>AO,ZodISODateTime:()=>kO,ZodISODuration:()=>MO,ZodISOTime:()=>jO,ZodIntersection:()=>yk,ZodIssueCode:()=>Qk,ZodJWT:()=>$O,ZodKSUID:()=>UO,ZodLazy:()=>Hk,ZodLiteral:()=>Tk,ZodMAC:()=>GO,ZodMap:()=>Sk,ZodNaN:()=>Ik,ZodNanoID:()=>RO,ZodNever:()=>dk,ZodNonOptional:()=>Nk,ZodNull:()=>ck,ZodNullable:()=>Ak,ZodNumber:()=>tk,ZodNumberFormat:()=>nk,ZodObject:()=>hk,ZodOptional:()=>Ok,ZodPipe:()=>Lk,ZodPrefault:()=>Mk,ZodPreprocess:()=>zk,ZodPromise:()=>Uk,ZodReadonly:()=>Bk,ZodRealError:()=>OE,ZodRecord:()=>xk,ZodSet:()=>Ck,ZodString:()=>DO,ZodStringFormat:()=>OO,ZodSuccess:()=>Pk,ZodSymbol:()=>ok,ZodTemplateLiteral:()=>Vk,ZodTransform:()=>Dk,ZodTuple:()=>bk,ZodType:()=>Q,ZodULID:()=>VO,ZodURL:()=>IO,ZodUUID:()=>FO,ZodUndefined:()=>sk,ZodUnion:()=>gk,ZodUnknown:()=>uk,ZodVoid:()=>fk,ZodXID:()=>HO,ZodXor:()=>_k,_ZodString:()=>EO,_default:()=>aO,_function:()=>vO,any:()=>ND,array:()=>Y,base64:()=>fD,base64url:()=>pD,bigint:()=>DD,boolean:()=>ED,catch:()=>lO,check:()=>yO,cidrv4:()=>uD,cidrv6:()=>dD,clone:()=>wd,codec:()=>fO,coerce:()=>DA,compile:()=>Sx,config:()=>xf,core:()=>pE,creditCard:()=>hD,cuid:()=>nD,cuid2:()=>rD,custom:()=>bO,date:()=>LD,decode:()=>FE,decodeAsync:()=>LE,deepPartial:()=>yA,default:()=>PA,describe:()=>Kk,discriminatedUnion:()=>UD,e164:()=>mD,email:()=>KE,emoji:()=>eD,encode:()=>PE,encodeAsync:()=>IE,endsWith:()=>ow,enum:()=>ZD,exactOptional:()=>nO,file:()=>$D,flattenError:()=>Pf,float32:()=>SD,float64:()=>CD,formatError:()=>Ff,fromJSONSchema:()=>hA,function:()=>vO,getDiscriminatedOption:()=>Ph,getErrorMap:()=>Zk,globalRegistry:()=>yx,gt:()=>HC,gte:()=>UC,guid:()=>qE,hash:()=>bD,hex:()=>yD,hostname:()=>vD,httpUrl:()=>$E,includes:()=>iw,input:()=>wA,instanceof:()=>CO,int:()=>xD,int32:()=>wD,int64:()=>OD,intersection:()=>WD,invertCodec:()=>pO,ipv4:()=>sD,ipv6:()=>lD,iso:()=>tA,json:()=>wO,jwt:()=>gD,keyof:()=>RD,ksuid:()=>oD,lazy:()=>gO,length:()=>ew,literal:()=>Z,locales:()=>fx,looseObject:()=>BD,looseRecord:()=>JD,lowercase:()=>nw,lt:()=>BC,lte:()=>VC,mac:()=>cD,map:()=>YD,maxLength:()=>QC,maxSize:()=>YC,memoizer:()=>O_,meta:()=>qk,mime:()=>lw,minLength:()=>$C,minSize:()=>XC,multipleOf:()=>JC,nan:()=>uO,nanoid:()=>tD,nativeEnum:()=>QD,negative:()=>GC,never:()=>FD,nonnegative:()=>qC,nonoptional:()=>sO,nonpositive:()=>KC,normalize:()=>dw,null:()=>MD,nullable:()=>rO,nullish:()=>iO,number:()=>J,object:()=>X,optional:()=>tO,output:()=>TA,overwrite:()=>uw,parse:()=>AE,parseAsync:()=>jE,partialRecord:()=>qD,pipe:()=>dO,positive:()=>WC,prefault:()=>oO,preprocess:()=>TO,prettifyError:()=>Rf,promise:()=>_O,properties:()=>cw,property:()=>sw,readonly:()=>mO,record:()=>KD,refine:()=>xO,regex:()=>tw,regexes:()=>wp,registry:()=>mx,safeDecode:()=>zE,safeDecodeAsync:()=>VE,safeEncode:()=>RE,safeEncodeAsync:()=>BE,safeParse:()=>ME,safeParseAsync:()=>NE,set:()=>XD,setErrorMap:()=>Xk,size:()=>ZC,slugify:()=>hw,startsWith:()=>aw,strictObject:()=>zD,string:()=>q,stringFormat:()=>_D,stringbool:()=>Jk,success:()=>cO,superRefine:()=>SO,symbol:()=>AD,templateLiteral:()=>hO,toJSONSchema:()=>vT,toLowerCase:()=>pw,toUpperCase:()=>mw,toZod:()=>$u,transform:()=>eO,treeifyError:()=>If,trim:()=>fw,tuple:()=>GD,uint32:()=>TD,uint64:()=>kD,ulid:()=>iD,undefined:()=>jD,union:()=>VD,unknown:()=>PD,uppercase:()=>rw,url:()=>QE,util:()=>Xu,uuid:()=>JE,uuidv4:()=>YE,uuidv6:()=>XE,uuidv7:()=>ZE,validate:()=>ap,validateAsync:()=>op,void:()=>ID,xid:()=>aD,xor:()=>HD,z:()=>PA}),RA=o((()=>{FA(),IA()}));RA();var zA=`io.modelcontextprotocol/related-task`,BA=bO(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),VA=VD([q(),J().int()]),HA=q();BD({ttl:J().optional(),pollInterval:J().optional()});var UA=X({ttl:J().optional()}),WA=X({taskId:q()}),GA=BD({progressToken:VA.optional(),[zA]:WA.optional()}),KA=X({_meta:GA.optional()}),qA=KA.extend({task:UA.optional()}),JA=e=>qA.safeParse(e).success,YA=X({method:q(),params:KA.loose().optional()}),XA=X({_meta:GA.optional()}),ZA=X({method:q(),params:XA.loose().optional()}),QA=BD({_meta:GA.optional()}),$A=VD([q(),J().int()]),ej=X({jsonrpc:Z(`2.0`),id:$A,...YA.shape}).strict(),tj=e=>ej.safeParse(e).success,nj=X({jsonrpc:Z(`2.0`),...ZA.shape}).strict(),rj=e=>nj.safeParse(e).success,ij=X({jsonrpc:Z(`2.0`),id:$A,result:QA}).strict(),aj=e=>ij.safeParse(e).success,oj;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(oj||={});var sj=X({jsonrpc:Z(`2.0`),id:$A.optional(),error:X({code:J().int(),message:q(),data:PD().optional()})}).strict(),cj=e=>sj.safeParse(e).success,lj=VD([ej,nj,ij,sj]);VD([ij,sj]);var uj=QA.strict(),dj=XA.extend({requestId:$A.optional(),reason:q().optional()}),fj=ZA.extend({method:Z(`notifications/cancelled`),params:dj}),pj=X({icons:Y(X({src:q(),mimeType:q().optional(),sizes:Y(q()).optional(),theme:ZD([`light`,`dark`]).optional()})).optional()}),mj=X({name:q(),title:q().optional()}),hj=mj.extend({...mj.shape,...pj.shape,version:q(),websiteUrl:q().optional(),description:q().optional()}),gj=TO(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,WD(X({form:WD(X({applyDefaults:ED().optional()}),KD(q(),PD())).optional(),url:BA.optional()}),KD(q(),PD()).optional())),_j=BD({list:BA.optional(),cancel:BA.optional(),requests:BD({sampling:BD({createMessage:BA.optional()}).optional(),elicitation:BD({create:BA.optional()}).optional()}).optional()}),vj=BD({list:BA.optional(),cancel:BA.optional(),requests:BD({tools:BD({call:BA.optional()}).optional()}).optional()}),yj=X({experimental:KD(q(),BA).optional(),sampling:X({context:BA.optional(),tools:BA.optional()}).optional(),elicitation:gj.optional(),roots:X({listChanged:ED().optional()}).optional(),tasks:_j.optional(),extensions:KD(q(),BA).optional()}),bj=KA.extend({protocolVersion:q(),capabilities:yj,clientInfo:hj}),xj=YA.extend({method:Z(`initialize`),params:bj}),Sj=X({experimental:KD(q(),BA).optional(),logging:BA.optional(),completions:BA.optional(),prompts:X({listChanged:ED().optional()}).optional(),resources:X({subscribe:ED().optional(),listChanged:ED().optional()}).optional(),tools:X({listChanged:ED().optional()}).optional(),tasks:vj.optional(),extensions:KD(q(),BA).optional()}),Cj=QA.extend({protocolVersion:q(),capabilities:Sj,serverInfo:hj,instructions:q().optional()}),wj=ZA.extend({method:Z(`notifications/initialized`),params:XA.optional()}),Tj=YA.extend({method:Z(`ping`),params:KA.optional()}),Ej=X({progress:J(),total:tO(J()),message:tO(q())}),Dj=X({...XA.shape,...Ej.shape,progressToken:VA}),Oj=ZA.extend({method:Z(`notifications/progress`),params:Dj}),kj=KA.extend({cursor:HA.optional()}),Aj=YA.extend({params:kj.optional()}),jj=QA.extend({nextCursor:HA.optional()}),Mj=ZD([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Nj=X({taskId:q(),status:Mj,ttl:VD([J(),MD()]),createdAt:q(),lastUpdatedAt:q(),pollInterval:tO(J()),statusMessage:tO(q())}),Pj=QA.extend({task:Nj}),Fj=XA.merge(Nj),Ij=ZA.extend({method:Z(`notifications/tasks/status`),params:Fj}),Lj=YA.extend({method:Z(`tasks/get`),params:KA.extend({taskId:q()})}),Rj=QA.merge(Nj),zj=YA.extend({method:Z(`tasks/result`),params:KA.extend({taskId:q()})});QA.loose();var Bj=Aj.extend({method:Z(`tasks/list`)}),Vj=jj.extend({tasks:Y(Nj)}),Hj=YA.extend({method:Z(`tasks/cancel`),params:KA.extend({taskId:q()})}),Uj=QA.merge(Nj),Wj=X({uri:q(),mimeType:tO(q()),_meta:KD(q(),PD()).optional()}),Gj=Wj.extend({text:q()}),Kj=q().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),qj=Wj.extend({blob:Kj}),Jj=ZD([`user`,`assistant`]),Yj=X({audience:Y(Jj).optional(),priority:J().min(0).max(1).optional(),lastModified:nA({offset:!0}).optional()}),Xj=X({...mj.shape,...pj.shape,uri:q(),description:tO(q()),mimeType:tO(q()),size:tO(J()),annotations:Yj.optional(),_meta:tO(BD({}))}),Zj=X({...mj.shape,...pj.shape,uriTemplate:q(),description:tO(q()),mimeType:tO(q()),annotations:Yj.optional(),_meta:tO(BD({}))}),Qj=Aj.extend({method:Z(`resources/list`)}),$j=jj.extend({resources:Y(Xj)}),eM=Aj.extend({method:Z(`resources/templates/list`)}),tM=jj.extend({resourceTemplates:Y(Zj)}),nM=KA.extend({uri:q()}),rM=nM,iM=YA.extend({method:Z(`resources/read`),params:rM}),aM=QA.extend({contents:Y(VD([Gj,qj]))}),oM=ZA.extend({method:Z(`notifications/resources/list_changed`),params:XA.optional()}),sM=nM,cM=YA.extend({method:Z(`resources/subscribe`),params:sM}),lM=nM,uM=YA.extend({method:Z(`resources/unsubscribe`),params:lM}),dM=XA.extend({uri:q()}),fM=ZA.extend({method:Z(`notifications/resources/updated`),params:dM}),pM=X({name:q(),description:tO(q()),required:tO(ED())}),mM=X({...mj.shape,...pj.shape,description:tO(q()),arguments:tO(Y(pM)),_meta:tO(BD({}))}),hM=Aj.extend({method:Z(`prompts/list`)}),gM=jj.extend({prompts:Y(mM)}),_M=KA.extend({name:q(),arguments:KD(q(),q()).optional()}),vM=YA.extend({method:Z(`prompts/get`),params:_M}),yM=X({type:Z(`text`),text:q(),annotations:Yj.optional(),_meta:KD(q(),PD()).optional()}),bM=X({type:Z(`image`),data:Kj,mimeType:q(),annotations:Yj.optional(),_meta:KD(q(),PD()).optional()}),xM=X({type:Z(`audio`),data:Kj,mimeType:q(),annotations:Yj.optional(),_meta:KD(q(),PD()).optional()}),SM=X({type:Z(`tool_use`),name:q(),id:q(),input:KD(q(),PD()),_meta:KD(q(),PD()).optional()}),CM=X({type:Z(`resource`),resource:VD([Gj,qj]),annotations:Yj.optional(),_meta:KD(q(),PD()).optional()}),wM=Xj.extend({type:Z(`resource_link`)}),TM=VD([yM,bM,xM,wM,CM]),EM=X({role:Jj,content:TM}),DM=QA.extend({description:q().optional(),messages:Y(EM)}),OM=ZA.extend({method:Z(`notifications/prompts/list_changed`),params:XA.optional()}),kM=X({title:q().optional(),readOnlyHint:ED().optional(),destructiveHint:ED().optional(),idempotentHint:ED().optional(),openWorldHint:ED().optional()}),AM=X({taskSupport:ZD([`required`,`optional`,`forbidden`]).optional()}),jM=X({...mj.shape,...pj.shape,description:q().optional(),inputSchema:X({type:Z(`object`),properties:KD(q(),BA).optional(),required:Y(q()).optional()}).catchall(PD()),outputSchema:X({type:Z(`object`),properties:KD(q(),BA).optional(),required:Y(q()).optional()}).catchall(PD()).optional(),annotations:kM.optional(),execution:AM.optional(),_meta:KD(q(),PD()).optional()}),MM=Aj.extend({method:Z(`tools/list`)}),NM=jj.extend({tools:Y(jM)}),PM=QA.extend({content:Y(TM).default([]),structuredContent:KD(q(),PD()).optional(),isError:ED().optional()});PM.or(QA.extend({toolResult:PD()}));var FM=qA.extend({name:q(),arguments:KD(q(),PD()).optional()}),IM=YA.extend({method:Z(`tools/call`),params:FM}),LM=ZA.extend({method:Z(`notifications/tools/list_changed`),params:XA.optional()});X({autoRefresh:ED().default(!0),debounceMs:J().int().nonnegative().default(300)});var RM=ZD([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),zM=KA.extend({level:RM}),BM=YA.extend({method:Z(`logging/setLevel`),params:zM}),VM=XA.extend({level:RM,logger:q().optional(),data:PD()}),HM=ZA.extend({method:Z(`notifications/message`),params:VM}),UM=X({hints:Y(X({name:q().optional()})).optional(),costPriority:J().min(0).max(1).optional(),speedPriority:J().min(0).max(1).optional(),intelligencePriority:J().min(0).max(1).optional()}),WM=X({mode:ZD([`auto`,`required`,`none`]).optional()}),GM=X({type:Z(`tool_result`),toolUseId:q().describe(`The unique identifier for the corresponding tool call.`),content:Y(TM).default([]),structuredContent:X({}).loose().optional(),isError:ED().optional(),_meta:KD(q(),PD()).optional()}),KM=UD(`type`,[yM,bM,xM]),qM=UD(`type`,[yM,bM,xM,SM,GM]),JM=X({role:Jj,content:VD([qM,Y(qM)]),_meta:KD(q(),PD()).optional()}),YM=qA.extend({messages:Y(JM),modelPreferences:UM.optional(),systemPrompt:q().optional(),includeContext:ZD([`none`,`thisServer`,`allServers`]).optional(),temperature:J().optional(),maxTokens:J().int(),stopSequences:Y(q()).optional(),metadata:BA.optional(),tools:Y(jM).optional(),toolChoice:WM.optional()}),XM=YA.extend({method:Z(`sampling/createMessage`),params:YM}),ZM=QA.extend({model:q(),stopReason:tO(ZD([`endTurn`,`stopSequence`,`maxTokens`]).or(q())),role:Jj,content:KM}),QM=QA.extend({model:q(),stopReason:tO(ZD([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(q())),role:Jj,content:VD([qM,Y(qM)])}),$M=X({type:Z(`boolean`),title:q().optional(),description:q().optional(),default:ED().optional()}),eN=X({type:Z(`string`),title:q().optional(),description:q().optional(),minLength:J().optional(),maxLength:J().optional(),format:ZD([`email`,`uri`,`date`,`date-time`]).optional(),default:q().optional()}),tN=X({type:ZD([`number`,`integer`]),title:q().optional(),description:q().optional(),minimum:J().optional(),maximum:J().optional(),default:J().optional()}),nN=X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),default:q().optional()}),rN=X({type:Z(`string`),title:q().optional(),description:q().optional(),oneOf:Y(X({const:q(),title:q()})),default:q().optional()}),iN=VD([VD([X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),enumNames:Y(q()).optional(),default:q().optional()}),VD([nN,rN]),VD([X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({type:Z(`string`),enum:Y(q())}),default:Y(q()).optional()}),X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({anyOf:Y(X({const:q(),title:q()}))}),default:Y(q()).optional()})])]),$M,eN,tN]),aN=VD([qA.extend({mode:Z(`form`).optional(),message:q(),requestedSchema:X({type:Z(`object`),properties:KD(q(),iN),required:Y(q()).optional()})}),qA.extend({mode:Z(`url`),message:q(),elicitationId:q(),url:q().url()})]),oN=YA.extend({method:Z(`elicitation/create`),params:aN}),sN=XA.extend({elicitationId:q()}),cN=ZA.extend({method:Z(`notifications/elicitation/complete`),params:sN}),lN=QA.extend({action:ZD([`accept`,`decline`,`cancel`]),content:TO(e=>e===null?void 0:e,KD(q(),VD([q(),J(),ED(),Y(q())])).optional())}),uN=X({type:Z(`ref/resource`),uri:q()}),dN=X({type:Z(`ref/prompt`),name:q()}),fN=KA.extend({ref:VD([dN,uN]),argument:X({name:q(),value:q()}),context:X({arguments:KD(q(),q()).optional()}).optional()}),pN=YA.extend({method:Z(`completion/complete`),params:fN}),mN=QA.extend({completion:BD({values:Y(q()).max(100),total:tO(J().int()),hasMore:tO(ED())})}),hN=X({uri:q().startsWith(`file://`),name:q().optional(),_meta:KD(q(),PD()).optional()}),gN=YA.extend({method:Z(`roots/list`),params:KA.optional()}),_N=QA.extend({roots:Y(hN)}),vN=ZA.extend({method:Z(`notifications/roots/list_changed`),params:XA.optional()});VD([Tj,xj,pN,BM,vM,hM,Qj,eM,iM,cM,uM,IM,MM,Lj,zj,Bj,Hj]),VD([fj,Oj,wj,vN,Ij]),VD([uj,ZM,QM,lN,_N,Rj,Vj,Pj]),VD([Tj,XM,oN,gN,Lj,zj,Bj,Hj]),VD([fj,Oj,HM,fM,oM,LM,OM,Ij,cN]),VD([uj,Cj,mN,DM,gM,$j,tM,aM,PM,NM,Rj,Vj,Pj]);var yN=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===oj.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new bN(e.elicitations,n)}return new e(t,n,r)}},bN=class extends yN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(oj.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function xN(e){return e===`completed`||e===`failed`||e===`cancelled`}function SN(e){let t=bE(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=xE(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function CN(e,t){let n=yE(e,t);if(!n.success)throw n.error;return n.data}var wN=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(fj,e=>{this._oncancel(e)}),this.setNotificationHandler(Oj,e=>{this._onprogress(e)}),this.setRequestHandler(Tj,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(Lj,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new yN(oj.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(zj,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new yN(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new yN(oj.InvalidParams,`Task not found: ${r}`);if(!xN(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(xN(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[zA]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Bj,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new yN(oj.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Hj,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new yN(oj.InvalidParams,`Task not found: ${e.params.taskId}`);if(xN(n.status))throw new yN(oj.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new yN(oj.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof yN?e:new yN(oj.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),yN.fromError(oj.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),aj(e)||cj(e)?this._onresponse(e):tj(e)?this._onrequest(e,t):rj(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=yN.fromError(oj.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[zA]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:oj.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=JA(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new yN(oj.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:oj.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),aj(e)?n(e):n(new yN(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(aj(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),aj(e)?r(e):r(yN.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof yN?e:new yN(oj.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Pj,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new yN(oj.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},xN(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new yN(oj.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new yN(oj.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof yN?e:new yN(oj.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[zA]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof yN?e:new yN(oj.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=yE(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(yN.fromError(oj.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Rj,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Vj,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Uj,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[zA]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[zA]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[zA]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=SN(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=CN(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=SN(e);this._notificationHandlers.set(n,n=>{let r=CN(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&tj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new yN(oj.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new yN(oj.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new yN(oj.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new yN(oj.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Ij.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),xN(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new yN(oj.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(xN(a.status))throw new yN(oj.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Ij.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),xN(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function TN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function EN(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=TN(a)&&TN(i)?{...a,...i}:i}return n}var DN=`modulepreload`,ON=function(e,t){return new URL(e,t).href},kN={},AN=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=ON(t,n),t=s(t),t in kN)return;kN[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:DN,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};RA(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var jN=class extends wN{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},MN=`2026-01-26`,NN=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=lj.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},PN=VD([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),FN=VD([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),IN=KD(VD([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function aT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;aT(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function oT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function sT(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!dT.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??oT(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}pd(n,r,e.length===1?e[0]:sT(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=oT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function cT(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of dT)if(t in e)return;let n=t.filter(e=>fT.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=sT(t);else{let e=n[0],i=fT.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>sT([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,$w(e,r))}function lT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):$w(i,s),$w(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())aT(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])cT(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}$w(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,pd(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:mT(t,`input`,e.processors),output:mT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function uT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return uT(r.element,n);if(r.type===`set`)return uT(r.valueType,n);if(r.type===`lazy`)return uT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return uT(r.innerType,n);if(r.type===`intersection`)return uT(r.left,n)||uT(r.right,n);if(r.type===`record`||r.type===`map`)return uT(r.keyType,n)||uT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:uT(r.in,n)||uT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(uT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(uT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(uT(e,n))return!0;return!!(r.rest&&uT(r.rest,n))}return!1}var dT,fT,pT,mT,hT=o((()=>{Sx(),H(),dT=new Set([`type`,`properties`,`required`,`additionalProperties`]),fT=[`oneOf`,`anyOf`],pT=(e,t={})=>n=>{let r=eT({...n,processors:t});return nT(e,r),iT(r,e),lT(r,e)},mT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=eT({...i??{},target:a,io:t,processors:n});return nT(e,o),iT(o,e),lT(o,e)}}));function gT(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?gT(t.out):t.type===`catch`?gT(t.innerType):e._zod.optin}function _T(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_T(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_T(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?vm:_m).source),p):p}function vT(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of XT.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_T(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function yT(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(tT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),eE):JSON.parse(o)}function bT(e,t){if(`_idmap`in e){let n=e,r=eT({...t,processors:lE}),i={};for(let e of n._idmap.entries()){let[t,n]=e;nT(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;iT(r,n),pd(a,t,lT(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=eT({...t,processors:lE});return nT(e,n),iT(n,e),lT(n,e)}var xT,ST,CT,wT,TT,ET,DT,OT,kT,AT,jT,MT,NT,PT,FT,IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE=o((()=>{Bm(),hT(),H(),xT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},ST=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=xT[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},CT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):tT(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},wT=(e,t,n,r)=>{n.type=`boolean`},TT=(e,t,n,r)=>{tT(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},ET=(e,t,n,r)=>{tT(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},DT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},OT=(e,t,n,r)=>{tT(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},kT=(e,t,n,r)=>{tT(e,t,n,r,`Void cannot be represented in JSON Schema`)},AT=(e,t,n,r)=>{n.not={}},jT=(e,t,n,r)=>{},MT=(e,t,n,r)=>{},NT=(e,t,n,r)=>{tT(e,t,n,r,`Date cannot be represented in JSON Schema`)},PT=(e,t,n,r)=>{let i=e._zod.def,a=ad(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},FT=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(tT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(tT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},IT=(e,t,n,r)=>{tT(e,t,n,r,`NaN cannot be represented in JSON Schema`)},LT=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},RT=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},zT=(e,t,n,r)=>{n.type=`boolean`},BT=(e,t,n,r)=>{tT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},VT=(e,t,n,r)=>{tT(e,t,n,r,`Function types cannot be represented in JSON Schema`)},HT=(e,t,n,r)=>{tT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},UT=(e,t,n,r)=>{tT(e,t,n,r,`Map cannot be represented in JSON Schema`)},WT=(e,t,n,r)=>{tT(e,t,n,r,`Set cannot be represented in JSON Schema`)},GT=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=nT(a.element,t,{...r,path:[...r.path,`items`]})},KT=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&tT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)pd(i.properties,e,nT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?gT(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=nT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},qT=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>nT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},JT=(e,t,n,r)=>{let i=e._zod.def,a=nT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=nT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},YT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>nT(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?nT(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?gT(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},XT=new WeakMap,ZT=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=nT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)pd(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=nT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=XT.get(t);n||(n=[],XT.set(t,n),t.deferred.push(()=>vT(t))),n.push(e)}i.additionalProperties=nT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&gT(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},QT=(e,t,n,r)=>{let i=e._zod.def,a=nT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},$T=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},eE=Symbol(),tE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=yT(i.defaultValue,e,t,n,r);o!==eE&&(n.default=o)},nE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=yT(i.defaultValue,e,t,n,r);o!==eE&&(n._prefault=o)},rE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{tT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},iE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;nT(o,t,r);let s=t.seen.get(e);s.ref=o},aE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},oE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},sE=(e,t,n,r)=>{let i=e._zod.def;nT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},cE=(e,t,n,r)=>{let i=e._zod.innerType;nT(i,t,r);let a=t.seen.get(e);a.ref=i},lE={string:ST,number:CT,boolean:wT,bigint:TT,symbol:ET,null:DT,undefined:OT,void:kT,never:AT,any:jT,unknown:MT,date:NT,enum:PT,literal:FT,nan:IT,template_literal:LT,file:RT,success:zT,custom:BT,function:VT,transform:HT,map:UT,set:WT,array:GT,object:KT,union:qT,intersection:JT,tuple:YT,record:ZT,nullable:QT,nonoptional:$T,default:tE,prefault:nE,catch:rE,pipe:iE,readonly:aE,promise:oE,optional:sE,lazy:cE}})),dE,fE=o((()=>{uE(),hT(),dE=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=eT({processors:lE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return nT(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,iT(this.ctx,e);let{"~standard":n,...r}=lT(this.ctx,e);return r}}})),pE=c({}),mE=o((()=>{})),hE=c({$ZodAny:()=>zg,$ZodArray:()=>Wg,$ZodAsyncError:()=>kf,$ZodBase64:()=>wg,$ZodBase64URL:()=>Tg,$ZodBigInt:()=>Pg,$ZodBigIntFormat:()=>Fg,$ZodBoolean:()=>Ng,$ZodCIDRv4:()=>Sg,$ZodCIDRv6:()=>Cg,$ZodCUID:()=>lg,$ZodCUID2:()=>ug,$ZodCatch:()=>m_,$ZodCheck:()=>Hm,$ZodCheckBigIntFormat:()=>Xm,$ZodCheckEndsWith:()=>lh,$ZodCheckGreaterThan:()=>qm,$ZodCheckIncludes:()=>sh,$ZodCheckLengthEquals:()=>nh,$ZodCheckLessThan:()=>Km,$ZodCheckLowerCase:()=>ah,$ZodCheckMaxLength:()=>eh,$ZodCheckMaxSize:()=>Zm,$ZodCheckMimeType:()=>dh,$ZodCheckMinLength:()=>th,$ZodCheckMinSize:()=>Qm,$ZodCheckMultipleOf:()=>Jm,$ZodCheckNumberFormat:()=>Ym,$ZodCheckOverwrite:()=>fh,$ZodCheckProperty:()=>uh,$ZodCheckRegex:()=>ih,$ZodCheckSizeEquals:()=>$m,$ZodCheckStartsWith:()=>ch,$ZodCheckStringFormat:()=>rh,$ZodCheckUpperCase:()=>oh,$ZodCodec:()=>__,$ZodCreditCard:()=>Og,$ZodCustom:()=>w_,$ZodCustomStringFormat:()=>Ag,$ZodCyclicError:()=>M_,$ZodDate:()=>Ug,$ZodDefault:()=>u_,$ZodDiscriminatedUnion:()=>Zg,$ZodE164:()=>Eg,$ZodEmail:()=>ig,$ZodEmoji:()=>sg,$ZodEncodeError:()=>Af,$ZodEnum:()=>r_,$ZodError:()=>Kf,$ZodExactOptional:()=>c_,$ZodFile:()=>a_,$ZodFunction:()=>x_,$ZodGUID:()=>ng,$ZodIPv4:()=>vg,$ZodIPv6:()=>bg,$ZodISODate:()=>hg,$ZodISODateTime:()=>mg,$ZodISODuration:()=>_g,$ZodISOTime:()=>gg,$ZodIntersection:()=>Qg,$ZodJWT:()=>kg,$ZodKSUID:()=>pg,$ZodLazy:()=>C_,$ZodLiteral:()=>i_,$ZodMAC:()=>xg,$ZodMap:()=>t_,$ZodNaN:()=>h_,$ZodNanoID:()=>cg,$ZodNever:()=>Vg,$ZodNonOptional:()=>f_,$ZodNull:()=>Rg,$ZodNullable:()=>l_,$ZodNumber:()=>jg,$ZodNumberFormat:()=>Mg,$ZodObject:()=>qg,$ZodObjectJIT:()=>Jg,$ZodOptional:()=>s_,$ZodPipe:()=>g_,$ZodPrefault:()=>d_,$ZodPreprocess:()=>v_,$ZodPromise:()=>S_,$ZodReadonly:()=>y_,$ZodRealError:()=>qf,$ZodRecord:()=>e_,$ZodRegistry:()=>bx,$ZodSet:()=>n_,$ZodString:()=>eg,$ZodStringFormat:()=>tg,$ZodSuccess:()=>p_,$ZodSymbol:()=>Ig,$ZodTemplateLiteral:()=>b_,$ZodTransform:()=>o_,$ZodTuple:()=>$g,$ZodType:()=>W,$ZodULID:()=>dg,$ZodURL:()=>og,$ZodUUID:()=>rg,$ZodUndefined:()=>Lg,$ZodUnion:()=>Yg,$ZodUnknown:()=>Bg,$ZodVoid:()=>Hg,$ZodXID:()=>fg,$ZodXor:()=>Xg,$brand:()=>Of,$constructor:()=>U,$input:()=>yx,$output:()=>vx,Doc:()=>mh,INVALID:()=>IS,JSONSchema:()=>pE,JSONSchemaGenerator:()=>dE,NEVER:()=>Tf,TimePrecision:()=>Zw,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>RS,ZodCompileUnsupportedError:()=>zS,_any:()=>FC,_array:()=>vw,_base64:()=>uC,_base64url:()=>dC,_bigint:()=>OC,_boolean:()=>EC,_catch:()=>Lw,_check:()=>Kw,_cidrv4:()=>cC,_cidrv6:()=>lC,_coercedBigint:()=>kC,_coercedBoolean:()=>DC,_coercedDate:()=>BC,_coercedNumber:()=>bC,_coercedString:()=>WS,_creditCard:()=>pC,_cuid:()=>eC,_cuid2:()=>tC,_custom:()=>Uw,_date:()=>zC,_decode:()=>dp,_decodeAsync:()=>hp,_default:()=>Pw,_discriminatedUnion:()=>xw,_e164:()=>fC,_email:()=>GS,_emoji:()=>QS,_encode:()=>lp,_encodeAsync:()=>pp,_endsWith:()=>cw,_enum:()=>Dw,_file:()=>Aw,_float32:()=>SC,_float64:()=>CC,_gt:()=>WC,_gte:()=>GC,_guid:()=>KS,_includes:()=>ow,_int:()=>xC,_int32:()=>wC,_int64:()=>AC,_intersection:()=>Sw,_ipv4:()=>aC,_ipv6:()=>oC,_isoDate:()=>gC,_isoDateTime:()=>hC,_isoDuration:()=>vC,_isoTime:()=>_C,_jwt:()=>mC,_ksuid:()=>iC,_lazy:()=>Vw,_length:()=>nw,_literal:()=>kw,_lowercase:()=>iw,_lt:()=>HC,_lte:()=>UC,_mac:()=>sC,_map:()=>Tw,_max:()=>UC,_maxLength:()=>ew,_maxSize:()=>ZC,_mime:()=>dw,_min:()=>GC,_minLength:()=>tw,_minSize:()=>QC,_multipleOf:()=>XC,_nan:()=>VC,_nanoid:()=>$S,_nativeEnum:()=>Ow,_negative:()=>qC,_never:()=>LC,_nonnegative:()=>YC,_nonoptional:()=>Fw,_nonpositive:()=>JC,_normalize:()=>pw,_null:()=>PC,_nullable:()=>Nw,_number:()=>yC,_optional:()=>Mw,_overwrite:()=>fw,_parse:()=>Zf,_parseAsync:()=>$f,_pipe:()=>Rw,_positive:()=>KC,_promise:()=>Hw,_properties:()=>uw,_property:()=>lw,_readonly:()=>zw,_record:()=>ww,_refine:()=>Ww,_regex:()=>rw,_safeDecode:()=>yp,_safeDecodeAsync:()=>Cp,_safeEncode:()=>_p,_safeEncodeAsync:()=>xp,_safeParse:()=>tp,_safeParseAsync:()=>rp,_set:()=>Ew,_size:()=>$C,_slugify:()=>_w,_startsWith:()=>sw,_string:()=>US,_stringFormat:()=>Xw,_stringbool:()=>Yw,_success:()=>Iw,_superRefine:()=>Gw,_symbol:()=>MC,_templateLiteral:()=>Bw,_toLowerCase:()=>hw,_toUpperCase:()=>gw,_transform:()=>jw,_trim:()=>mw,_tuple:()=>Cw,_uint32:()=>TC,_uint64:()=>jC,_ulid:()=>nC,_undefined:()=>NC,_union:()=>yw,_unknown:()=>IC,_uppercase:()=>aw,_url:()=>ZS,_uuid:()=>qS,_uuidv4:()=>JS,_uuidv6:()=>YS,_uuidv7:()=>XS,_void:()=>RC,_xid:()=>rC,_xor:()=>bw,clone:()=>Ed,compile:()=>wx,compileFn:()=>Ex,config:()=>Cf,createStandardJSONSchemaMethod:()=>mT,createToJSONSchemaMethod:()=>pT,decode:()=>fp,decodeAsync:()=>gp,describe:()=>qw,encode:()=>up,encodeAsync:()=>mp,extractDefs:()=>iT,finalize:()=>lT,flattenError:()=>If,formatError:()=>Lf,getDiscriminatedOption:()=>Ih,globalConfig:()=>jf,globalRegistry:()=>xx,handleUnrepresentable:()=>tT,initializeContext:()=>eT,isBackEdge:()=>j_,isRecursiveSchema:()=>O_,isValidBase64:()=>Th,isValidBase64URL:()=>Eh,isValidCIDRv6:()=>wh,isValidCreditCard:()=>Oh,isValidIPv6:()=>Ch,isValidJWT:()=>kh,locales:()=>mx,memoizer:()=>A_,mergeValues:()=>Lh,meta:()=>Jw,parse:()=>Qf,parseAsync:()=>ep,parseURLObject:()=>yh,prettifyError:()=>Bf,process:()=>nT,regexes:()=>Ep,registry:()=>gx,safeDecode:()=>bp,safeDecodeAsync:()=>wp,safeEncode:()=>vp,safeEncodeAsync:()=>Sp,safeParse:()=>np,safeParseAsync:()=>ip,standardProps:()=>vh,stripTabAndNewline:()=>bh,toDotPath:()=>zf,toJSONSchema:()=>bT,toZod:()=>td,treeifyError:()=>Rf,urlHostnameOk:()=>xh,urlProtocolOk:()=>Sh,util:()=>Qu,validate:()=>sp,validateAsync:()=>cp,version:()=>gh}),gE=o((()=>{Mf(),Tp(),Jf(),T_(),z_(),ph(),_h(),H(),Bm(),hx(),Sx(),hh(),HS(),Qw(),hT(),uE(),fE(),mE()}));function _E(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===vE)return new C_({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,vE);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?Ed(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:Ed(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?Ed(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:Ed(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:Ed(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?Ed(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:Ed(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:Ed(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:Ed(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:Ed(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return Ed(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var vE,yE=o((()=>{T_(),H(),vE=Symbol(`z.visit/resolving`)}));Tp();function bE(e){return!!e._zod}function xE(e,t){return bE(e)?np(e,t):e.safeParse(t)}function SE(e){if(!e)return;let t;if(t=bE(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function CE(e){if(bE(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var wE=c({endsWith:()=>cw,gt:()=>WC,gte:()=>GC,includes:()=>ow,length:()=>nw,lowercase:()=>iw,lt:()=>HC,lte:()=>UC,maxLength:()=>ew,maxSize:()=>ZC,mime:()=>dw,minLength:()=>tw,minSize:()=>QC,multipleOf:()=>XC,negative:()=>qC,nonnegative:()=>YC,nonpositive:()=>JC,normalize:()=>pw,overwrite:()=>fw,positive:()=>KC,properties:()=>uw,property:()=>lw,regex:()=>rw,size:()=>$C,slugify:()=>_w,startsWith:()=>sw,toLowerCase:()=>hw,toUpperCase:()=>gw,trim:()=>mw,uppercase:()=>aw}),TE=o((()=>{gE()}));function EE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var DE,OE,kE,AE,jE=o((()=>{gE(),H(),DE=new WeakSet([Object.prototype,Error.prototype]),OE=(e,t)=>{Kf.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);DE.has(n)||(DE.add(n),EE(n,`format`,e=>t=>Lf(e,t)),EE(n,`flatten`,e=>t=>If(e,t)),EE(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,od,2)}),EE(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,od,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},kE=U(`ZodError`,OE),AE=U(`ZodError`,OE,void 0,{Parent:Error})})),ME,NE,PE,FE,IE,LE,RE,zE,BE,VE,HE,UE,WE=o((()=>{gE(),jE(),ME=Zf(AE),NE=$f(AE),PE=tp(AE),FE=rp(AE),IE=lp(AE),LE=dp(AE),RE=pp(AE),zE=hp(AE),BE=_p(AE),VE=yp(AE),HE=xp(AE),UE=Cp(AE)})),GE=c({ZodAny:()=>dk,ZodArray:()=>gk,ZodBase64:()=>ZO,ZodBase64URL:()=>QO,ZodBigInt:()=>ok,ZodBigIntFormat:()=>sk,ZodBoolean:()=>ak,ZodCIDRv4:()=>YO,ZodCIDRv6:()=>XO,ZodCUID:()=>VO,ZodCUID2:()=>HO,ZodCatch:()=>Lk,ZodCodec:()=>Bk,ZodCreditCard:()=>ek,ZodCustom:()=>qk,ZodCustomStringFormat:()=>nk,ZodDate:()=>hk,ZodDefault:()=>Nk,ZodDiscriminatedUnion:()=>bk,ZodE164:()=>$O,ZodEmail:()=>FO,ZodEmoji:()=>zO,ZodEnum:()=>Ek,ZodExactOptional:()=>jk,ZodFile:()=>Ok,ZodFunction:()=>Kk,ZodGUID:()=>IO,ZodIPv4:()=>KO,ZodIPv6:()=>JO,ZodISODate:()=>MO,ZodISODateTime:()=>jO,ZodISODuration:()=>PO,ZodISOTime:()=>NO,ZodIntersection:()=>xk,ZodJWT:()=>tk,ZodKSUID:()=>GO,ZodLazy:()=>Wk,ZodLiteral:()=>Dk,ZodMAC:()=>qO,ZodMap:()=>wk,ZodNaN:()=>Rk,ZodNanoID:()=>BO,ZodNever:()=>pk,ZodNonOptional:()=>Fk,ZodNull:()=>uk,ZodNullable:()=>Mk,ZodNumber:()=>rk,ZodNumberFormat:()=>ik,ZodObject:()=>_k,ZodOptional:()=>Ak,ZodPipe:()=>zk,ZodPrefault:()=>Pk,ZodPreprocess:()=>Vk,ZodPromise:()=>Gk,ZodReadonly:()=>Hk,ZodRecord:()=>Ck,ZodSet:()=>Tk,ZodString:()=>kO,ZodStringFormat:()=>AO,ZodSuccess:()=>Ik,ZodSymbol:()=>ck,ZodTemplateLiteral:()=>Uk,ZodTransform:()=>kk,ZodTuple:()=>Sk,ZodType:()=>Q,ZodULID:()=>UO,ZodURL:()=>RO,ZodUUID:()=>LO,ZodUndefined:()=>lk,ZodUnion:()=>vk,ZodUnknown:()=>fk,ZodVoid:()=>mk,ZodXID:()=>WO,ZodXor:()=>yk,_ZodString:()=>OO,_default:()=>sO,_function:()=>bO,any:()=>FD,array:()=>Y,base64:()=>mD,base64url:()=>hD,bigint:()=>kD,boolean:()=>OD,catch:()=>dO,check:()=>xO,cidrv4:()=>fD,cidrv6:()=>pD,codec:()=>mO,creditCard:()=>_D,cuid:()=>iD,cuid2:()=>aD,custom:()=>SO,date:()=>zD,describe:()=>Jk,discriminatedUnion:()=>GD,e164:()=>gD,email:()=>JE,emoji:()=>nD,enum:()=>$D,exactOptional:()=>iO,file:()=>tO,float32:()=>wD,float64:()=>TD,function:()=>bO,guid:()=>YE,hash:()=>SD,hex:()=>xD,hostname:()=>bD,httpUrl:()=>tD,instanceof:()=>TO,int:()=>CD,int32:()=>ED,int64:()=>AD,intersection:()=>KD,invertCodec:()=>hO,ipv4:()=>lD,ipv6:()=>dD,json:()=>EO,jwt:()=>vD,keyof:()=>BD,ksuid:()=>cD,lazy:()=>vO,literal:()=>Z,looseObject:()=>HD,looseRecord:()=>XD,mac:()=>uD,map:()=>ZD,meta:()=>Yk,nan:()=>fO,nanoid:()=>rD,nativeEnum:()=>eO,never:()=>LD,nonoptional:()=>lO,null:()=>PD,nullable:()=>aO,nullish:()=>oO,number:()=>J,object:()=>X,optional:()=>rO,partialRecord:()=>YD,pipe:()=>pO,prefault:()=>cO,preprocess:()=>DO,promise:()=>yO,readonly:()=>gO,record:()=>JD,refine:()=>CO,set:()=>QD,strictObject:()=>VD,string:()=>q,stringFormat:()=>yD,stringbool:()=>Xk,success:()=>uO,superRefine:()=>wO,symbol:()=>MD,templateLiteral:()=>_O,transform:()=>nO,tuple:()=>qD,uint32:()=>DD,uint64:()=>jD,ulid:()=>oD,undefined:()=>ND,union:()=>UD,unknown:()=>ID,url:()=>eD,uuid:()=>XE,uuidv4:()=>ZE,uuidv6:()=>QE,uuidv7:()=>$E,void:()=>RD,xid:()=>sD,xor:()=>WD});function KE(){jf.localeError||Cf(bv())}function qE(){jf.memoizer||Cf({memoizer:A_()})}function q(e){return US(kO,e)}function JE(e){return GS(FO,e)}function YE(e){return KS(IO,e)}function XE(e){return qS(LO,e)}function ZE(e){return JS(LO,e)}function QE(e){return YS(LO,e)}function $E(e){return XS(LO,e)}function eD(e){return ZS(RO,e)}function tD(e){return ZS(RO,{protocol:um,hostname:lm,...z(e)})}function nD(e){return QS(zO,e)}function rD(e){return $S(BO,e)}function iD(e){return eC(VO,e)}function aD(e){return tC(HO,e)}function oD(e){return nC(UO,e)}function sD(e){return rC(WO,e)}function cD(e){return iC(GO,e)}function lD(e){return aC(KO,e)}function uD(e){return sC(qO,e)}function dD(e){return oC(JO,e)}function fD(e){return cC(YO,e)}function pD(e){return lC(XO,e)}function mD(e){return uC(ZO,e)}function hD(e){return dC(QO,e)}function gD(e){return fC($O,e)}function _D(e){return pC(ek,e)}function vD(e){return mC(tk,e)}function yD(e,t,n={}){return Xw(nk,e,t,n)}function bD(e){return Xw(nk,`hostname`,cm,e)}function xD(e){return Xw(nk,`hex`,wm,e)}function SD(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Ep[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return Xw(nk,n,r,t)}function J(e){return yC(rk,e)}function CD(e){return xC(ik,e)}function wD(e){return SC(ik,e)}function TD(e){return CC(ik,e)}function ED(e){return wC(ik,e)}function DD(e){return TC(ik,e)}function OD(e){return EC(ak,e)}function kD(e){return OC(ok,e)}function AD(e){return AC(sk,e)}function jD(e){return jC(sk,e)}function MD(e){return MC(ck,e)}function ND(e){return NC(lk,e)}function PD(e){return PC(uk,e)}function FD(){return FC(dk)}function ID(){return IC(fk)}function LD(e){return LC(pk,e)}function RD(e){return RC(mk,e)}function zD(e){return zC(hk,e)}function Y(e,t){return vw(gk,e,t)}function BD(e){let t=e._zod.def.shape;return $D(Object.keys(t))}function X(e,t){let n={type:`object`,shape:e??{},...z(t)};return new _k(n)}function VD(e,t){return new _k({type:`object`,shape:e,catchall:LD(),...z(t)})}function HD(e,t){return new _k({type:`object`,shape:e,catchall:ID(),...z(t)})}function UD(e,t){return new vk({type:`union`,options:e,...z(t)})}function WD(e,t){return new yk({type:`union`,options:e,inclusive:!1,...z(t)})}function GD(e,t,n){return new bk({type:`union`,options:t,discriminator:e,...z(n)})}function KD(e,t){return new xk({type:`intersection`,left:e,right:t})}function qD(e,t,n){let r=t instanceof W;return new Sk({type:`tuple`,items:e,rest:r?t:null,...z(r?n:t)})}function JD(e,t,n){return!t||!t._zod?new Ck({type:`record`,keyType:q(),valueType:e,...z(t)}):new Ck({type:`record`,keyType:e,valueType:t,...z(n)})}function YD(e,t,n){return new Ck({type:`record`,keyType:e,valueType:t,...z(n),partial:!0})}function XD(e,t,n){return new Ck({type:`record`,keyType:e,valueType:t,mode:`loose`,...z(n)})}function ZD(e,t,n){return new wk({type:`map`,keyType:e,valueType:t,...z(n)})}function QD(e,t){return new Tk({type:`set`,valueType:e,...z(t)})}function $D(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Ek({type:`enum`,entries:n,...z(t)})}function eO(e,t){return new Ek({type:`enum`,entries:e,...z(t)})}function Z(e,t){return new Dk({type:`literal`,values:Array.isArray(e)?e:[e],...z(t)})}function tO(e){return Aw(Ok,e)}function nO(e){return new kk({type:`transform`,transform:e})}function rO(e){return new Ak({type:`optional`,innerType:e})}function iO(e){return new jk({type:`optional`,innerType:e})}function aO(e){return new Mk({type:`nullable`,innerType:e})}function oO(e){return rO(aO(e))}function sO(e,t){return new Nk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Cd(t)}})}function cO(e,t){return new Pk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Cd(t)}})}function lO(e,t){return new Fk({type:`nonoptional`,innerType:e,...z(t)})}function uO(e){return new Ik({type:`success`,innerType:e})}function dO(e,t){return new Lk({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:sf(t)})}function fO(e){return VC(Rk,e)}function pO(e,t){return new zk({type:`pipe`,in:e,out:t})}function mO(e,t,n){return new Bk({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function hO(e){let t=e._zod.def;return new Bk({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function gO(e){return new Hk({type:`readonly`,innerType:e})}function _O(e,t){return new Uk({type:`template_literal`,parts:e,...z(t)})}function vO(e){return new Wk({type:`lazy`,getter:e})}function yO(e){return new Gk({type:`promise`,innerType:e})}function bO(e){return new Kk({type:`function`,input:Array.isArray(e?.input)?qD(e?.input):e?.input??Y(ID()),output:e?.output??ID()})}function xO(e){let t=new Hm({check:`custom`});return t._zod.check=e,t}function SO(e,t){return Uw(qk,e??(()=>!0),t)}function CO(e,t={}){return Ww(qk,e,t)}function wO(e,t){return Gw(e,t)}function TO(e,t={}){let n=new qk({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...z(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function EO(e){let t=vO(()=>UD([q(e),J(),OD(),PD(),Y(t),JD(q(),t)]));return t}function DO(e,t){return new Vk({type:`pipe`,in:nO(e),out:t})}var Q,OO,kO,AO,jO,MO,NO,PO,FO,IO,LO,RO,zO,BO,VO,HO,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk=o((()=>{gE(),uE(),hT(),Sv(),TE(),WE(),Q=U(`ZodType`,(e,t)=>(KE(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(md(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ed(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(CO(e,t))},superRefine(e,t){return this.check(wO(e,t))},overwrite(e){return this.check(fw(e))},optional(){return rO(this)},exactOptional(){return iO(this)},nullable(){return aO(this)},nullish(){return rO(aO(this))},nonoptional(e){return lO(this,e)},array(){return Y(this)},or(e){return UD([this,e])},and(e){return KD(this,e)},transform(e){return pO(this,nO(e))},default(e){return sO(this,e)},prefault(e){return cO(this,e)},catch(e){return dO(this,e)},pipe(e){return pO(this,e)},readonly(){return gO(this)},describe(e){let t=this.clone();return xx.add(t,{description:e}),t},meta(...e){if(e.length===0)return xx.get(this);let t=this.clone();return xx.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return tf(this,`~standard`,{...vh(this),jsonSchema:{input:mT(this,`input`),output:mT(this,`output`)}})},set"~standard"(e){ef(this,`~standard`,e)},parse:function e(t,n){return ME(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await NE(this,t,n,{callee:e})},safeParse(e,t){return PE(this,e,t)},async safeParseAsync(e,t){return FE(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){ef(this,`spa`,e)},encode:function e(t,n){return IE(this,t,n,{callee:e})},decode:function e(t,n){return LE(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await RE(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await zE(this,t,n,{callee:e})},safeEncode(e,t){return BE(this,e,t)},safeDecode(e,t){return VE(this,e,t)},async safeEncodeAsync(e,t){return HE(this,e,t)},async safeDecodeAsync(e,t){return UE(this,e,t)},toJSONSchema(e){return pT(this,{})(e)},get description(){return xx.get(this)?.description},get _def(){return this._zod.def}}),OO=U(`_ZodString`,(e,t)=>{eg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ST(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(rw(...e))},includes(...e){return this.check(ow(...e))},startsWith(...e){return this.check(sw(...e))},endsWith(...e){return this.check(cw(...e))},min(...e){return this.check(tw(...e))},max(...e){return this.check(ew(...e))},length(...e){return this.check(nw(...e))},nonempty(...e){return this.check(tw(1,...e))},lowercase(e){return this.check(iw(e))},uppercase(e){return this.check(aw(e))},trim(){return this.check(mw())},normalize(...e){return this.check(pw(...e))},toLowerCase(){return this.check(hw())},toUpperCase(){return this.check(gw())},slugify(){return this.check(_w())}}),kO=U(`ZodString`,(e,t)=>{eg.init(e,t),OO.init(e,t)},{email(e){return this.check(GS(FO,e))},url(e){return this.check(ZS(RO,e))},jwt(e){return this.check(mC(tk,e))},emoji(e){return this.check(QS(zO,e))},guid(e){return this.check(KS(IO,e))},uuid(e){return this.check(qS(LO,e))},uuidv4(e){return this.check(JS(LO,e))},uuidv6(e){return this.check(YS(LO,e))},uuidv7(e){return this.check(XS(LO,e))},nanoid(e){return this.check($S(BO,e))},cuid(e){return this.check(eC(VO,e))},cuid2(e){return this.check(tC(HO,e))},ulid(e){return this.check(nC(UO,e))},base64(e){return this.check(uC(ZO,e))},base64url(e){return this.check(dC(QO,e))},xid(e){return this.check(rC(WO,e))},ksuid(e){return this.check(iC(GO,e))},ipv4(e){return this.check(aC(KO,e))},ipv6(e){return this.check(oC(JO,e))},cidrv4(e){return this.check(cC(YO,e))},cidrv6(e){return this.check(lC(XO,e))},e164(e){return this.check(fC($O,e))},datetime(e){return this.check(hC(jO,e))},date(e){return this.check(gC(MO,e))},time(e){return this.check(_C(NO,e))},duration(e){return this.check(vC(PO,e))}}),AO=U(`ZodStringFormat`,(e,t)=>{tg.init(e,t),OO.init(e,t)}),jO=U(`ZodISODateTime`,(e,t)=>{mg.init(e,t),AO.init(e,t)}),MO=U(`ZodISODate`,(e,t)=>{hg.init(e,t),AO.init(e,t)}),NO=U(`ZodISOTime`,(e,t)=>{gg.init(e,t),AO.init(e,t)}),PO=U(`ZodISODuration`,(e,t)=>{_g.init(e,t),AO.init(e,t)}),FO=U(`ZodEmail`,(e,t)=>{ig.init(e,t),AO.init(e,t)}),IO=U(`ZodGUID`,(e,t)=>{ng.init(e,t),AO.init(e,t)}),LO=U(`ZodUUID`,(e,t)=>{rg.init(e,t),AO.init(e,t)}),RO=U(`ZodURL`,(e,t)=>{og.init(e,t),AO.init(e,t)}),zO=U(`ZodEmoji`,(e,t)=>{sg.init(e,t),AO.init(e,t)}),BO=U(`ZodNanoID`,(e,t)=>{cg.init(e,t),AO.init(e,t)}),VO=U(`ZodCUID`,(e,t)=>{lg.init(e,t),AO.init(e,t)}),HO=U(`ZodCUID2`,(e,t)=>{ug.init(e,t),AO.init(e,t)}),UO=U(`ZodULID`,(e,t)=>{dg.init(e,t),AO.init(e,t)}),WO=U(`ZodXID`,(e,t)=>{fg.init(e,t),AO.init(e,t)}),GO=U(`ZodKSUID`,(e,t)=>{pg.init(e,t),AO.init(e,t)}),KO=U(`ZodIPv4`,(e,t)=>{vg.init(e,t),AO.init(e,t)}),qO=U(`ZodMAC`,(e,t)=>{xg.init(e,t),AO.init(e,t)}),JO=U(`ZodIPv6`,(e,t)=>{bg.init(e,t),AO.init(e,t)}),YO=U(`ZodCIDRv4`,(e,t)=>{Sg.init(e,t),AO.init(e,t)}),XO=U(`ZodCIDRv6`,(e,t)=>{Cg.init(e,t),AO.init(e,t)}),ZO=U(`ZodBase64`,(e,t)=>{wg.init(e,t),AO.init(e,t)}),QO=U(`ZodBase64URL`,(e,t)=>{Tg.init(e,t),AO.init(e,t)}),$O=U(`ZodE164`,(e,t)=>{Eg.init(e,t),AO.init(e,t)}),ek=U(`ZodCreditCard`,(e,t)=>{Og.init(e,t),AO.init(e,t)}),tk=U(`ZodJWT`,(e,t)=>{kg.init(e,t),AO.init(e,t)}),nk=U(`ZodCustomStringFormat`,(e,t)=>{Ag.init(e,t),AO.init(e,t)}),rk=U(`ZodNumber`,(e,t)=>{jg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CT(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(WC(e,t))},gte(e,t){return this.check(GC(e,t))},min(e,t){return this.check(GC(e,t))},lt(e,t){return this.check(HC(e,t))},lte(e,t){return this.check(UC(e,t))},max(e,t){return this.check(UC(e,t))},int(e){return this.check(CD(e))},safe(e){return this.check(CD(e))},positive(e){return this.check(WC(0,e))},nonnegative(e){return this.check(GC(0,e))},negative(e){return this.check(HC(0,e))},nonpositive(e){return this.check(UC(0,e))},multipleOf(e,t){return this.check(XC(e,t))},step(e,t){return this.check(XC(e,t))},finite(){return this}}),ik=U(`ZodNumberFormat`,(e,t)=>{Mg.init(e,t),rk.init(e,t)}),ak=U(`ZodBoolean`,(e,t)=>{Ng.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wT(e,t,n,r)}),ok=U(`ZodBigInt`,(e,t)=>{Pg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TT(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(GC(e,t))},min(e,t){return this.check(GC(e,t))},gt(e,t){return this.check(WC(e,t))},lt(e,t){return this.check(HC(e,t))},lte(e,t){return this.check(UC(e,t))},max(e,t){return this.check(UC(e,t))},positive(e){return this.check(WC(BigInt(0),e))},negative(e){return this.check(HC(BigInt(0),e))},nonpositive(e){return this.check(UC(BigInt(0),e))},nonnegative(e){return this.check(GC(BigInt(0),e))},multipleOf(e,t){return this.check(XC(e,t))}}),sk=U(`ZodBigIntFormat`,(e,t)=>{Fg.init(e,t),ok.init(e,t)}),ck=U(`ZodSymbol`,(e,t)=>{Ig.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ET(e,t,n,r)}),lk=U(`ZodUndefined`,(e,t)=>{Lg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>OT(e,t,n,r)}),uk=U(`ZodNull`,(e,t)=>{Rg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>DT(e,t,n,r)}),dk=U(`ZodAny`,(e,t)=>{zg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>jT(e,t,n,r)}),fk=U(`ZodUnknown`,(e,t)=>{Bg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>MT(e,t,n,r)}),pk=U(`ZodNever`,(e,t)=>{Vg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>AT(e,t,n,r)}),mk=U(`ZodVoid`,(e,t)=>{Hg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>kT(e,t,n,r)}),hk=U(`ZodDate`,(e,t)=>{Ug.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>NT(e,t,n,r),e.min=(t,n)=>e.check(GC(t,n)),e.max=(t,n)=>e.check(UC(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),gk=U(`ZodArray`,(e,t)=>{qE(),Wg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r),e.element=t.element},{min(e,t){return this.check(tw(e,t))},nonempty(e){return this.check(tw(1,e))},max(e,t){return this.check(ew(e,t))},length(e,t){return this.check(nw(e,t))},unwrap(){return this.element}}),_k=U(`ZodObject`,(e,t)=>{qE(),Jg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KT(e,t,n,r),of(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return $D(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:ID()})},loose(){return this.clone({...this._zod.def,catchall:ID()})},strict(){return this.clone({...this._zod.def,catchall:LD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return jd(this,e)},safeExtend(e){return Md(this,e)},merge(e){return Nd(this,e)},pick(e){return kd(this,e)},omit(e){return Ad(this,e)},partial(...e){return Pd(Ak,this,e[0])},exactPartial(...e){return Pd(jk,this,e[0],`exactPartial`)},required(...e){return Fd(Fk,this,e[0])}}),vk=U(`ZodUnion`,(e,t)=>{Yg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r),e.options=t.options}),yk=U(`ZodXor`,(e,t)=>{vk.init(e,t),Xg.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r),e.options=t.options}),bk=U(`ZodDiscriminatedUnion`,(e,t)=>{vk.init(e,t),Zg.init(e,t)}),xk=U(`ZodIntersection`,(e,t)=>{Qg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JT(e,t,n,r)}),Sk=U(`ZodTuple`,(e,t)=>{qE(),$g.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YT(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Ak({type:`optional`,innerType:e}))})}}),Ck=U(`ZodRecord`,(e,t)=>{qE(),e_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),wk=U(`ZodMap`,(e,t)=>{qE(),t_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UT(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(QC(...t)),e.nonempty=t=>e.check(QC(1,t)),e.max=(...t)=>e.check(ZC(...t)),e.size=(...t)=>e.check($C(...t))}),Tk=U(`ZodSet`,(e,t)=>{qE(),n_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WT(e,t,n,r),e.min=(...t)=>e.check(QC(...t)),e.nonempty=t=>e.check(QC(1,t)),e.max=(...t)=>e.check(ZC(...t)),e.size=(...t)=>e.check($C(...t))}),Ek=U(`ZodEnum`,(e,t)=>{r_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>PT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Ek({...t,checks:[],...z(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Ek({...t,checks:[],...z(r),entries:i})}}),Dk=U(`ZodLiteral`,(e,t)=>{i_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>FT(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Ok=U(`ZodFile`,(e,t)=>{a_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RT(e,t,n,r),e.min=(t,n)=>e.check(QC(t,n)),e.max=(t,n)=>e.check(ZC(t,n)),e.mime=(t,n)=>e.check(dw(Array.isArray(t)?t:[t],n))}),kk=U(`ZodTransform`,(e,t)=>{qE(),o_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HT(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Af(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Gd(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Gd(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),Ak=U(`ZodOptional`,(e,t)=>{s_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),jk=U(`ZodExactOptional`,(e,t)=>{c_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Mk=U(`ZodNullable`,(e,t)=>{l_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Nk=U(`ZodDefault`,(e,t)=>{u_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Pk=U(`ZodPrefault`,(e,t)=>{d_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Fk=U(`ZodNonOptional`,(e,t)=>{f_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$T(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Ik=U(`ZodSuccess`,(e,t)=>{p_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zT(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Lk=U(`ZodCatch`,(e,t)=>{m_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Rk=U(`ZodNaN`,(e,t)=>{h_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>IT(e,t,n,r)}),zk=U(`ZodPipe`,(e,t)=>{g_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iE(e,t,n,r),e.in=t.in,e.out=t.out}),Bk=U(`ZodCodec`,(e,t)=>{zk.init(e,t),__.init(e,t)}),Vk=U(`ZodPreprocess`,(e,t)=>{zk.init(e,t),v_.init(e,t)}),Hk=U(`ZodReadonly`,(e,t)=>{y_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Uk=U(`ZodTemplateLiteral`,(e,t)=>{b_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LT(e,t,n,r)}),Wk=U(`ZodLazy`,(e,t)=>{C_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),Gk=U(`ZodPromise`,(e,t)=>{S_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Kk=U(`ZodFunction`,(e,t)=>{x_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VT(e,t,n,r)}),qk=U(`ZodCustom`,(e,t)=>{w_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BT(e,t,n,r)}),Jk=qw,Yk=Jw,Xk=(...e)=>Yw({Codec:Bk,Boolean:ak,String:kO},...e)}));function Qk(e){Cf({customError:e})}function $k(){return Cf().customError}var eA,tA,nA=o((()=>{gE(),eA={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},tA||={}})),rA=c({ZodISODate:()=>MO,ZodISODateTime:()=>jO,ZodISODuration:()=>PO,ZodISOTime:()=>NO,date:()=>aA,datetime:()=>iA,duration:()=>sA,time:()=>oA});function iA(e){return hC(jO,e)}function aA(e){return gC(MO,e)}function oA(e){return _C(NO,e)}function sA(e){return vC(PO,e)}var cA=o((()=>{gE(),Zk()}));function lA(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function uA(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function mA(e,t){if(e!==!1)return e===void 0||e===!0?$.any():gA(e,t)}function hA(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=gA(fA(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>hA({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(yA)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?gA(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=gA(r,t);pd(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=gA(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!Sd(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=pA(r,gA(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=uA(n.map(e=>gA(e,t)),a),s=Array.isArray(i)?void 0:mA(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=uA(i.map(e=>gA(e,t)),n),o=mA(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=gA(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function gA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=hA(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>gA(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>gA(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:gA(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function _A(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:lA(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??xx};return gA(n,r)}var $,vA,yA,bA=o((()=>{Sx(),H(),TE(),cA(),Zk(),$={...GE,...wE,iso:rA},vA=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),yA=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function xA(e){return _E(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:UD(t.options)}})}var SA=o((()=>{yE(),Zk()}));function CA(e,t){if(!t?.length)return e;let n=e._zod.def;return Ed(e,md(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function wA(e){return CA(e.out,e.checks)}function TA(e){return e.in._zod.traits.has(`$ZodTransform`)?wA(e):e.in}function EA(e){return _E(e,{pipe:e=>TA(e._zod.def),default:(e,t)=>t?rO(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function DA(e){return _E(e,{pipe:e=>wA(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var OA=o((()=>{H(),yE(),Zk()})),kA=c({bigint:()=>NA,boolean:()=>MA,date:()=>PA,number:()=>jA,string:()=>AA});function AA(e){return WS(kO,e)}function jA(e){return bC(rk,e)}function MA(e){return DC(ak,e)}function NA(e){return kC(ok,e)}function PA(e){return BC(hk,e)}var FA=o((()=>{gE(),Zk()})),IA=c({$brand:()=>Of,$input:()=>yx,$output:()=>vx,NEVER:()=>Tf,TimePrecision:()=>Zw,ZodAny:()=>dk,ZodArray:()=>gk,ZodBase64:()=>ZO,ZodBase64URL:()=>QO,ZodBigInt:()=>ok,ZodBigIntFormat:()=>sk,ZodBoolean:()=>ak,ZodCIDRv4:()=>YO,ZodCIDRv6:()=>XO,ZodCUID:()=>VO,ZodCUID2:()=>HO,ZodCatch:()=>Lk,ZodCodec:()=>Bk,ZodCompileAsyncError:()=>RS,ZodCompileUnsupportedError:()=>zS,ZodCreditCard:()=>ek,ZodCustom:()=>qk,ZodCustomStringFormat:()=>nk,ZodDate:()=>hk,ZodDefault:()=>Nk,ZodDiscriminatedUnion:()=>bk,ZodE164:()=>$O,ZodEmail:()=>FO,ZodEmoji:()=>zO,ZodEnum:()=>Ek,ZodError:()=>kE,ZodExactOptional:()=>jk,ZodFile:()=>Ok,ZodFirstPartyTypeKind:()=>tA,ZodFunction:()=>Kk,ZodGUID:()=>IO,ZodIPv4:()=>KO,ZodIPv6:()=>JO,ZodISODate:()=>MO,ZodISODateTime:()=>jO,ZodISODuration:()=>PO,ZodISOTime:()=>NO,ZodIntersection:()=>xk,ZodIssueCode:()=>eA,ZodJWT:()=>tk,ZodKSUID:()=>GO,ZodLazy:()=>Wk,ZodLiteral:()=>Dk,ZodMAC:()=>qO,ZodMap:()=>wk,ZodNaN:()=>Rk,ZodNanoID:()=>BO,ZodNever:()=>pk,ZodNonOptional:()=>Fk,ZodNull:()=>uk,ZodNullable:()=>Mk,ZodNumber:()=>rk,ZodNumberFormat:()=>ik,ZodObject:()=>_k,ZodOptional:()=>Ak,ZodPipe:()=>zk,ZodPrefault:()=>Pk,ZodPreprocess:()=>Vk,ZodPromise:()=>Gk,ZodReadonly:()=>Hk,ZodRealError:()=>AE,ZodRecord:()=>Ck,ZodSet:()=>Tk,ZodString:()=>kO,ZodStringFormat:()=>AO,ZodSuccess:()=>Ik,ZodSymbol:()=>ck,ZodTemplateLiteral:()=>Uk,ZodTransform:()=>kk,ZodTuple:()=>Sk,ZodType:()=>Q,ZodULID:()=>UO,ZodURL:()=>RO,ZodUUID:()=>LO,ZodUndefined:()=>lk,ZodUnion:()=>vk,ZodUnknown:()=>fk,ZodVoid:()=>mk,ZodXID:()=>WO,ZodXor:()=>yk,_ZodString:()=>OO,_default:()=>sO,_function:()=>bO,any:()=>FD,array:()=>Y,base64:()=>mD,base64url:()=>hD,bigint:()=>kD,boolean:()=>OD,catch:()=>dO,check:()=>xO,cidrv4:()=>fD,cidrv6:()=>pD,clone:()=>Ed,codec:()=>mO,coerce:()=>kA,compile:()=>wx,config:()=>Cf,core:()=>hE,creditCard:()=>_D,cuid:()=>iD,cuid2:()=>aD,custom:()=>SO,date:()=>zD,decode:()=>LE,decodeAsync:()=>zE,deepPartial:()=>xA,describe:()=>Jk,discriminatedUnion:()=>GD,e164:()=>gD,email:()=>JE,emoji:()=>nD,encode:()=>IE,encodeAsync:()=>RE,endsWith:()=>cw,enum:()=>$D,exactOptional:()=>iO,file:()=>tO,flattenError:()=>If,float32:()=>wD,float64:()=>TD,formatError:()=>Lf,fromJSONSchema:()=>_A,function:()=>bO,getDiscriminatedOption:()=>Ih,getErrorMap:()=>$k,globalRegistry:()=>xx,gt:()=>WC,gte:()=>GC,guid:()=>YE,hash:()=>SD,hex:()=>xD,hostname:()=>bD,httpUrl:()=>tD,includes:()=>ow,input:()=>EA,instanceof:()=>TO,int:()=>CD,int32:()=>ED,int64:()=>AD,intersection:()=>KD,invertCodec:()=>hO,ipv4:()=>lD,ipv6:()=>dD,iso:()=>rA,json:()=>EO,jwt:()=>vD,keyof:()=>BD,ksuid:()=>cD,lazy:()=>vO,length:()=>nw,literal:()=>Z,locales:()=>mx,looseObject:()=>HD,looseRecord:()=>XD,lowercase:()=>iw,lt:()=>HC,lte:()=>UC,mac:()=>uD,map:()=>ZD,maxLength:()=>ew,maxSize:()=>ZC,memoizer:()=>A_,meta:()=>Yk,mime:()=>dw,minLength:()=>tw,minSize:()=>QC,multipleOf:()=>XC,nan:()=>fO,nanoid:()=>rD,nativeEnum:()=>eO,negative:()=>qC,never:()=>LD,nonnegative:()=>YC,nonoptional:()=>lO,nonpositive:()=>JC,normalize:()=>pw,null:()=>PD,nullable:()=>aO,nullish:()=>oO,number:()=>J,object:()=>X,optional:()=>rO,output:()=>DA,overwrite:()=>fw,parse:()=>ME,parseAsync:()=>NE,partialRecord:()=>YD,pipe:()=>pO,positive:()=>KC,prefault:()=>cO,preprocess:()=>DO,prettifyError:()=>Bf,promise:()=>yO,properties:()=>uw,property:()=>lw,readonly:()=>gO,record:()=>JD,refine:()=>CO,regex:()=>rw,regexes:()=>Ep,registry:()=>gx,safeDecode:()=>VE,safeDecodeAsync:()=>UE,safeEncode:()=>BE,safeEncodeAsync:()=>HE,safeParse:()=>PE,safeParseAsync:()=>FE,set:()=>QD,setErrorMap:()=>Qk,size:()=>$C,slugify:()=>_w,startsWith:()=>sw,strictObject:()=>VD,string:()=>q,stringFormat:()=>yD,stringbool:()=>Xk,success:()=>uO,superRefine:()=>wO,symbol:()=>MD,templateLiteral:()=>_O,toJSONSchema:()=>bT,toLowerCase:()=>hw,toUpperCase:()=>gw,toZod:()=>td,transform:()=>nO,treeifyError:()=>Rf,trim:()=>mw,tuple:()=>qD,uint32:()=>DD,uint64:()=>jD,ulid:()=>oD,undefined:()=>ND,union:()=>UD,unknown:()=>ID,uppercase:()=>aw,url:()=>eD,util:()=>Qu,uuid:()=>XE,uuidv4:()=>ZE,uuidv6:()=>QE,uuidv7:()=>$E,validate:()=>sp,validateAsync:()=>cp,void:()=>RD,xid:()=>sD,xor:()=>WD}),LA=o((()=>{gE(),Zk(),TE(),jE(),WE(),nA(),uE(),bA(),SA(),OA(),hx(),cA(),FA()})),RA=o((()=>{LA(),LA()})),zA=c({$brand:()=>Of,$input:()=>yx,$output:()=>vx,NEVER:()=>Tf,TimePrecision:()=>Zw,ZodAny:()=>dk,ZodArray:()=>gk,ZodBase64:()=>ZO,ZodBase64URL:()=>QO,ZodBigInt:()=>ok,ZodBigIntFormat:()=>sk,ZodBoolean:()=>ak,ZodCIDRv4:()=>YO,ZodCIDRv6:()=>XO,ZodCUID:()=>VO,ZodCUID2:()=>HO,ZodCatch:()=>Lk,ZodCodec:()=>Bk,ZodCompileAsyncError:()=>RS,ZodCompileUnsupportedError:()=>zS,ZodCreditCard:()=>ek,ZodCustom:()=>qk,ZodCustomStringFormat:()=>nk,ZodDate:()=>hk,ZodDefault:()=>Nk,ZodDiscriminatedUnion:()=>bk,ZodE164:()=>$O,ZodEmail:()=>FO,ZodEmoji:()=>zO,ZodEnum:()=>Ek,ZodError:()=>kE,ZodExactOptional:()=>jk,ZodFile:()=>Ok,ZodFirstPartyTypeKind:()=>tA,ZodFunction:()=>Kk,ZodGUID:()=>IO,ZodIPv4:()=>KO,ZodIPv6:()=>JO,ZodISODate:()=>MO,ZodISODateTime:()=>jO,ZodISODuration:()=>PO,ZodISOTime:()=>NO,ZodIntersection:()=>xk,ZodIssueCode:()=>eA,ZodJWT:()=>tk,ZodKSUID:()=>GO,ZodLazy:()=>Wk,ZodLiteral:()=>Dk,ZodMAC:()=>qO,ZodMap:()=>wk,ZodNaN:()=>Rk,ZodNanoID:()=>BO,ZodNever:()=>pk,ZodNonOptional:()=>Fk,ZodNull:()=>uk,ZodNullable:()=>Mk,ZodNumber:()=>rk,ZodNumberFormat:()=>ik,ZodObject:()=>_k,ZodOptional:()=>Ak,ZodPipe:()=>zk,ZodPrefault:()=>Pk,ZodPreprocess:()=>Vk,ZodPromise:()=>Gk,ZodReadonly:()=>Hk,ZodRealError:()=>AE,ZodRecord:()=>Ck,ZodSet:()=>Tk,ZodString:()=>kO,ZodStringFormat:()=>AO,ZodSuccess:()=>Ik,ZodSymbol:()=>ck,ZodTemplateLiteral:()=>Uk,ZodTransform:()=>kk,ZodTuple:()=>Sk,ZodType:()=>Q,ZodULID:()=>UO,ZodURL:()=>RO,ZodUUID:()=>LO,ZodUndefined:()=>lk,ZodUnion:()=>vk,ZodUnknown:()=>fk,ZodVoid:()=>mk,ZodXID:()=>WO,ZodXor:()=>yk,_ZodString:()=>OO,_default:()=>sO,_function:()=>bO,any:()=>FD,array:()=>Y,base64:()=>mD,base64url:()=>hD,bigint:()=>kD,boolean:()=>OD,catch:()=>dO,check:()=>xO,cidrv4:()=>fD,cidrv6:()=>pD,clone:()=>Ed,codec:()=>mO,coerce:()=>kA,compile:()=>wx,config:()=>Cf,core:()=>hE,creditCard:()=>_D,cuid:()=>iD,cuid2:()=>aD,custom:()=>SO,date:()=>zD,decode:()=>LE,decodeAsync:()=>zE,deepPartial:()=>xA,default:()=>IA,describe:()=>Jk,discriminatedUnion:()=>GD,e164:()=>gD,email:()=>JE,emoji:()=>nD,encode:()=>IE,encodeAsync:()=>RE,endsWith:()=>cw,enum:()=>$D,exactOptional:()=>iO,file:()=>tO,flattenError:()=>If,float32:()=>wD,float64:()=>TD,formatError:()=>Lf,fromJSONSchema:()=>_A,function:()=>bO,getDiscriminatedOption:()=>Ih,getErrorMap:()=>$k,globalRegistry:()=>xx,gt:()=>WC,gte:()=>GC,guid:()=>YE,hash:()=>SD,hex:()=>xD,hostname:()=>bD,httpUrl:()=>tD,includes:()=>ow,input:()=>EA,instanceof:()=>TO,int:()=>CD,int32:()=>ED,int64:()=>AD,intersection:()=>KD,invertCodec:()=>hO,ipv4:()=>lD,ipv6:()=>dD,iso:()=>rA,json:()=>EO,jwt:()=>vD,keyof:()=>BD,ksuid:()=>cD,lazy:()=>vO,length:()=>nw,literal:()=>Z,locales:()=>mx,looseObject:()=>HD,looseRecord:()=>XD,lowercase:()=>iw,lt:()=>HC,lte:()=>UC,mac:()=>uD,map:()=>ZD,maxLength:()=>ew,maxSize:()=>ZC,memoizer:()=>A_,meta:()=>Yk,mime:()=>dw,minLength:()=>tw,minSize:()=>QC,multipleOf:()=>XC,nan:()=>fO,nanoid:()=>rD,nativeEnum:()=>eO,negative:()=>qC,never:()=>LD,nonnegative:()=>YC,nonoptional:()=>lO,nonpositive:()=>JC,normalize:()=>pw,null:()=>PD,nullable:()=>aO,nullish:()=>oO,number:()=>J,object:()=>X,optional:()=>rO,output:()=>DA,overwrite:()=>fw,parse:()=>ME,parseAsync:()=>NE,partialRecord:()=>YD,pipe:()=>pO,positive:()=>KC,prefault:()=>cO,preprocess:()=>DO,prettifyError:()=>Bf,promise:()=>yO,properties:()=>uw,property:()=>lw,readonly:()=>gO,record:()=>JD,refine:()=>CO,regex:()=>rw,regexes:()=>Ep,registry:()=>gx,safeDecode:()=>VE,safeDecodeAsync:()=>UE,safeEncode:()=>BE,safeEncodeAsync:()=>HE,safeParse:()=>PE,safeParseAsync:()=>FE,set:()=>QD,setErrorMap:()=>Qk,size:()=>$C,slugify:()=>_w,startsWith:()=>sw,strictObject:()=>VD,string:()=>q,stringFormat:()=>yD,stringbool:()=>Xk,success:()=>uO,superRefine:()=>wO,symbol:()=>MD,templateLiteral:()=>_O,toJSONSchema:()=>bT,toLowerCase:()=>hw,toUpperCase:()=>gw,toZod:()=>td,transform:()=>nO,treeifyError:()=>Rf,trim:()=>mw,tuple:()=>qD,uint32:()=>DD,uint64:()=>jD,ulid:()=>oD,undefined:()=>ND,union:()=>UD,unknown:()=>ID,uppercase:()=>aw,url:()=>eD,util:()=>Qu,uuid:()=>XE,uuidv4:()=>ZE,uuidv6:()=>QE,uuidv7:()=>$E,validate:()=>sp,validateAsync:()=>cp,void:()=>RD,xid:()=>sD,xor:()=>WD,z:()=>IA}),BA=o((()=>{LA(),RA()}));BA();var VA=`io.modelcontextprotocol/related-task`,HA=SO(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),UA=UD([q(),J().int()]),WA=q();HD({ttl:J().optional(),pollInterval:J().optional()});var GA=X({ttl:J().optional()}),KA=X({taskId:q()}),qA=HD({progressToken:UA.optional(),[VA]:KA.optional()}),JA=X({_meta:qA.optional()}),YA=JA.extend({task:GA.optional()}),XA=e=>YA.safeParse(e).success,ZA=X({method:q(),params:JA.loose().optional()}),QA=X({_meta:qA.optional()}),$A=X({method:q(),params:QA.loose().optional()}),ej=HD({_meta:qA.optional()}),tj=UD([q(),J().int()]),nj=X({jsonrpc:Z(`2.0`),id:tj,...ZA.shape}).strict(),rj=e=>nj.safeParse(e).success,ij=X({jsonrpc:Z(`2.0`),...$A.shape}).strict(),aj=e=>ij.safeParse(e).success,oj=X({jsonrpc:Z(`2.0`),id:tj,result:ej}).strict(),sj=e=>oj.safeParse(e).success,cj;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(cj||={});var lj=X({jsonrpc:Z(`2.0`),id:tj.optional(),error:X({code:J().int(),message:q(),data:ID().optional()})}).strict(),uj=e=>lj.safeParse(e).success,dj=UD([nj,ij,oj,lj]);UD([oj,lj]);var fj=ej.strict(),pj=QA.extend({requestId:tj.optional(),reason:q().optional()}),mj=$A.extend({method:Z(`notifications/cancelled`),params:pj}),hj=X({icons:Y(X({src:q(),mimeType:q().optional(),sizes:Y(q()).optional(),theme:$D([`light`,`dark`]).optional()})).optional()}),gj=X({name:q(),title:q().optional()}),_j=gj.extend({...gj.shape,...hj.shape,version:q(),websiteUrl:q().optional(),description:q().optional()}),vj=DO(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,KD(X({form:KD(X({applyDefaults:OD().optional()}),JD(q(),ID())).optional(),url:HA.optional()}),JD(q(),ID()).optional())),yj=HD({list:HA.optional(),cancel:HA.optional(),requests:HD({sampling:HD({createMessage:HA.optional()}).optional(),elicitation:HD({create:HA.optional()}).optional()}).optional()}),bj=HD({list:HA.optional(),cancel:HA.optional(),requests:HD({tools:HD({call:HA.optional()}).optional()}).optional()}),xj=X({experimental:JD(q(),HA).optional(),sampling:X({context:HA.optional(),tools:HA.optional()}).optional(),elicitation:vj.optional(),roots:X({listChanged:OD().optional()}).optional(),tasks:yj.optional(),extensions:JD(q(),HA).optional()}),Sj=JA.extend({protocolVersion:q(),capabilities:xj,clientInfo:_j}),Cj=ZA.extend({method:Z(`initialize`),params:Sj}),wj=X({experimental:JD(q(),HA).optional(),logging:HA.optional(),completions:HA.optional(),prompts:X({listChanged:OD().optional()}).optional(),resources:X({subscribe:OD().optional(),listChanged:OD().optional()}).optional(),tools:X({listChanged:OD().optional()}).optional(),tasks:bj.optional(),extensions:JD(q(),HA).optional()}),Tj=ej.extend({protocolVersion:q(),capabilities:wj,serverInfo:_j,instructions:q().optional()}),Ej=$A.extend({method:Z(`notifications/initialized`),params:QA.optional()}),Dj=ZA.extend({method:Z(`ping`),params:JA.optional()}),Oj=X({progress:J(),total:rO(J()),message:rO(q())}),kj=X({...QA.shape,...Oj.shape,progressToken:UA}),Aj=$A.extend({method:Z(`notifications/progress`),params:kj}),jj=JA.extend({cursor:WA.optional()}),Mj=ZA.extend({params:jj.optional()}),Nj=ej.extend({nextCursor:WA.optional()}),Pj=$D([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Fj=X({taskId:q(),status:Pj,ttl:UD([J(),PD()]),createdAt:q(),lastUpdatedAt:q(),pollInterval:rO(J()),statusMessage:rO(q())}),Ij=ej.extend({task:Fj}),Lj=QA.merge(Fj),Rj=$A.extend({method:Z(`notifications/tasks/status`),params:Lj}),zj=ZA.extend({method:Z(`tasks/get`),params:JA.extend({taskId:q()})}),Bj=ej.merge(Fj),Vj=ZA.extend({method:Z(`tasks/result`),params:JA.extend({taskId:q()})});ej.loose();var Hj=Mj.extend({method:Z(`tasks/list`)}),Uj=Nj.extend({tasks:Y(Fj)}),Wj=ZA.extend({method:Z(`tasks/cancel`),params:JA.extend({taskId:q()})}),Gj=ej.merge(Fj),Kj=X({uri:q(),mimeType:rO(q()),_meta:JD(q(),ID()).optional()}),qj=Kj.extend({text:q()}),Jj=q().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Yj=Kj.extend({blob:Jj}),Xj=$D([`user`,`assistant`]),Zj=X({audience:Y(Xj).optional(),priority:J().min(0).max(1).optional(),lastModified:iA({offset:!0}).optional()}),Qj=X({...gj.shape,...hj.shape,uri:q(),description:rO(q()),mimeType:rO(q()),size:rO(J()),annotations:Zj.optional(),_meta:rO(HD({}))}),$j=X({...gj.shape,...hj.shape,uriTemplate:q(),description:rO(q()),mimeType:rO(q()),annotations:Zj.optional(),_meta:rO(HD({}))}),eM=Mj.extend({method:Z(`resources/list`)}),tM=Nj.extend({resources:Y(Qj)}),nM=Mj.extend({method:Z(`resources/templates/list`)}),rM=Nj.extend({resourceTemplates:Y($j)}),iM=JA.extend({uri:q()}),aM=iM,oM=ZA.extend({method:Z(`resources/read`),params:aM}),sM=ej.extend({contents:Y(UD([qj,Yj]))}),cM=$A.extend({method:Z(`notifications/resources/list_changed`),params:QA.optional()}),lM=iM,uM=ZA.extend({method:Z(`resources/subscribe`),params:lM}),dM=iM,fM=ZA.extend({method:Z(`resources/unsubscribe`),params:dM}),pM=QA.extend({uri:q()}),mM=$A.extend({method:Z(`notifications/resources/updated`),params:pM}),hM=X({name:q(),description:rO(q()),required:rO(OD())}),gM=X({...gj.shape,...hj.shape,description:rO(q()),arguments:rO(Y(hM)),_meta:rO(HD({}))}),_M=Mj.extend({method:Z(`prompts/list`)}),vM=Nj.extend({prompts:Y(gM)}),yM=JA.extend({name:q(),arguments:JD(q(),q()).optional()}),bM=ZA.extend({method:Z(`prompts/get`),params:yM}),xM=X({type:Z(`text`),text:q(),annotations:Zj.optional(),_meta:JD(q(),ID()).optional()}),SM=X({type:Z(`image`),data:Jj,mimeType:q(),annotations:Zj.optional(),_meta:JD(q(),ID()).optional()}),CM=X({type:Z(`audio`),data:Jj,mimeType:q(),annotations:Zj.optional(),_meta:JD(q(),ID()).optional()}),wM=X({type:Z(`tool_use`),name:q(),id:q(),input:JD(q(),ID()),_meta:JD(q(),ID()).optional()}),TM=X({type:Z(`resource`),resource:UD([qj,Yj]),annotations:Zj.optional(),_meta:JD(q(),ID()).optional()}),EM=Qj.extend({type:Z(`resource_link`)}),DM=UD([xM,SM,CM,EM,TM]),OM=X({role:Xj,content:DM}),kM=ej.extend({description:q().optional(),messages:Y(OM)}),AM=$A.extend({method:Z(`notifications/prompts/list_changed`),params:QA.optional()}),jM=X({title:q().optional(),readOnlyHint:OD().optional(),destructiveHint:OD().optional(),idempotentHint:OD().optional(),openWorldHint:OD().optional()}),MM=X({taskSupport:$D([`required`,`optional`,`forbidden`]).optional()}),NM=X({...gj.shape,...hj.shape,description:q().optional(),inputSchema:X({type:Z(`object`),properties:JD(q(),HA).optional(),required:Y(q()).optional()}).catchall(ID()),outputSchema:X({type:Z(`object`),properties:JD(q(),HA).optional(),required:Y(q()).optional()}).catchall(ID()).optional(),annotations:jM.optional(),execution:MM.optional(),_meta:JD(q(),ID()).optional()}),PM=Mj.extend({method:Z(`tools/list`)}),FM=Nj.extend({tools:Y(NM)}),IM=ej.extend({content:Y(DM).default([]),structuredContent:JD(q(),ID()).optional(),isError:OD().optional()});IM.or(ej.extend({toolResult:ID()}));var LM=YA.extend({name:q(),arguments:JD(q(),ID()).optional()}),RM=ZA.extend({method:Z(`tools/call`),params:LM}),zM=$A.extend({method:Z(`notifications/tools/list_changed`),params:QA.optional()});X({autoRefresh:OD().default(!0),debounceMs:J().int().nonnegative().default(300)});var BM=$D([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),VM=JA.extend({level:BM}),HM=ZA.extend({method:Z(`logging/setLevel`),params:VM}),UM=QA.extend({level:BM,logger:q().optional(),data:ID()}),WM=$A.extend({method:Z(`notifications/message`),params:UM}),GM=X({hints:Y(X({name:q().optional()})).optional(),costPriority:J().min(0).max(1).optional(),speedPriority:J().min(0).max(1).optional(),intelligencePriority:J().min(0).max(1).optional()}),KM=X({mode:$D([`auto`,`required`,`none`]).optional()}),qM=X({type:Z(`tool_result`),toolUseId:q().describe(`The unique identifier for the corresponding tool call.`),content:Y(DM).default([]),structuredContent:X({}).loose().optional(),isError:OD().optional(),_meta:JD(q(),ID()).optional()}),JM=GD(`type`,[xM,SM,CM]),YM=GD(`type`,[xM,SM,CM,wM,qM]),XM=X({role:Xj,content:UD([YM,Y(YM)]),_meta:JD(q(),ID()).optional()}),ZM=YA.extend({messages:Y(XM),modelPreferences:GM.optional(),systemPrompt:q().optional(),includeContext:$D([`none`,`thisServer`,`allServers`]).optional(),temperature:J().optional(),maxTokens:J().int(),stopSequences:Y(q()).optional(),metadata:HA.optional(),tools:Y(NM).optional(),toolChoice:KM.optional()}),QM=ZA.extend({method:Z(`sampling/createMessage`),params:ZM}),$M=ej.extend({model:q(),stopReason:rO($D([`endTurn`,`stopSequence`,`maxTokens`]).or(q())),role:Xj,content:JM}),eN=ej.extend({model:q(),stopReason:rO($D([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(q())),role:Xj,content:UD([YM,Y(YM)])}),tN=X({type:Z(`boolean`),title:q().optional(),description:q().optional(),default:OD().optional()}),nN=X({type:Z(`string`),title:q().optional(),description:q().optional(),minLength:J().optional(),maxLength:J().optional(),format:$D([`email`,`uri`,`date`,`date-time`]).optional(),default:q().optional()}),rN=X({type:$D([`number`,`integer`]),title:q().optional(),description:q().optional(),minimum:J().optional(),maximum:J().optional(),default:J().optional()}),iN=X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),default:q().optional()}),aN=X({type:Z(`string`),title:q().optional(),description:q().optional(),oneOf:Y(X({const:q(),title:q()})),default:q().optional()}),oN=UD([UD([X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),enumNames:Y(q()).optional(),default:q().optional()}),UD([iN,aN]),UD([X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({type:Z(`string`),enum:Y(q())}),default:Y(q()).optional()}),X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({anyOf:Y(X({const:q(),title:q()}))}),default:Y(q()).optional()})])]),tN,nN,rN]),sN=UD([YA.extend({mode:Z(`form`).optional(),message:q(),requestedSchema:X({type:Z(`object`),properties:JD(q(),oN),required:Y(q()).optional()})}),YA.extend({mode:Z(`url`),message:q(),elicitationId:q(),url:q().url()})]),cN=ZA.extend({method:Z(`elicitation/create`),params:sN}),lN=QA.extend({elicitationId:q()}),uN=$A.extend({method:Z(`notifications/elicitation/complete`),params:lN}),dN=ej.extend({action:$D([`accept`,`decline`,`cancel`]),content:DO(e=>e===null?void 0:e,JD(q(),UD([q(),J(),OD(),Y(q())])).optional())}),fN=X({type:Z(`ref/resource`),uri:q()}),pN=X({type:Z(`ref/prompt`),name:q()}),mN=JA.extend({ref:UD([pN,fN]),argument:X({name:q(),value:q()}),context:X({arguments:JD(q(),q()).optional()}).optional()}),hN=ZA.extend({method:Z(`completion/complete`),params:mN}),gN=ej.extend({completion:HD({values:Y(q()).max(100),total:rO(J().int()),hasMore:rO(OD())})}),_N=X({uri:q().startsWith(`file://`),name:q().optional(),_meta:JD(q(),ID()).optional()}),vN=ZA.extend({method:Z(`roots/list`),params:JA.optional()}),yN=ej.extend({roots:Y(_N)}),bN=$A.extend({method:Z(`notifications/roots/list_changed`),params:QA.optional()});UD([Dj,Cj,hN,HM,bM,_M,eM,nM,oM,uM,fM,RM,PM,zj,Vj,Hj,Wj]),UD([mj,Aj,Ej,bN,Rj]),UD([fj,$M,eN,dN,yN,Bj,Uj,Ij]),UD([Dj,QM,cN,vN,zj,Vj,Hj,Wj]),UD([mj,Aj,WM,mM,cM,zM,AM,Rj,uN]),UD([fj,Tj,gN,kM,vM,tM,rM,sM,IM,FM,Bj,Uj,Ij]);var xN=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===cj.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new SN(e.elicitations,n)}return new e(t,n,r)}},SN=class extends xN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(cj.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function CN(e){return e===`completed`||e===`failed`||e===`cancelled`}function wN(e){let t=SE(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=CE(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function TN(e,t){let n=xE(e,t);if(!n.success)throw n.error;return n.data}var EN=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(mj,e=>{this._oncancel(e)}),this.setNotificationHandler(Aj,e=>{this._onprogress(e)}),this.setRequestHandler(Dj,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(zj,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new xN(cj.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(Vj,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new xN(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new xN(cj.InvalidParams,`Task not found: ${r}`);if(!CN(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(CN(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[VA]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(Hj,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new xN(cj.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(Wj,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new xN(cj.InvalidParams,`Task not found: ${e.params.taskId}`);if(CN(n.status))throw new xN(cj.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new xN(cj.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof xN?e:new xN(cj.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),xN.fromError(cj.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),sj(e)||uj(e)?this._onresponse(e):rj(e)?this._onrequest(e,t):aj(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=xN.fromError(cj.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[VA]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:cj.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=XA(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new xN(cj.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:cj.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),sj(e)?n(e):n(new xN(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(sj(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),sj(e)?r(e):r(xN.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof xN?e:new xN(cj.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Ij,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new xN(cj.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},CN(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new xN(cj.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new xN(cj.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof xN?e:new xN(cj.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[VA]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof xN?e:new xN(cj.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=xE(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(xN.fromError(cj.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},Bj,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},Uj,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Gj,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[VA]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[VA]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[VA]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=wN(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=TN(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=wN(e);this._notificationHandlers.set(n,n=>{let r=TN(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&rj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new xN(cj.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new xN(cj.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new xN(cj.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new xN(cj.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=Rj.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),CN(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new xN(cj.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(CN(a.status))throw new xN(cj.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=Rj.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),CN(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function DN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ON(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=DN(a)&&DN(i)?{...a,...i}:i}return n}var kN=`modulepreload`,AN=function(e,t){return new URL(e,t).href},jN={},MN=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=AN(t,n),t=s(t),t in jN)return;jN[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:kN,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};BA(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var NN=class extends EN{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},PN=`2026-01-26`,FN=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=dj.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},IN=UD([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),LN=UD([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),RN=JD(UD([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),VD([q(),jD()]).describe(`Style variables for theming MCP apps. +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),UD([q(),ND()]).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -77,10 +77,10 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:q().describe(`URL to open in the host's browser`)})});var LN=X({isError:ED().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),RN=X({isError:ED().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),zN=X({isError:ED().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var BN=X({connectDomains:Y(q()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:q().describe(`URL to open in the host's browser`)})});var zN=X({isError:OD().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),BN=X({isError:OD().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),VN=X({isError:OD().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var HN=X({connectDomains:Y(q()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive -- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(q()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(q()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(q()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),VN=X({camera:X({}).optional().describe(`Request camera access. +- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(q()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(q()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(q()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),UN=X({camera:X({}).optional().describe(`Request camera access. Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access. @@ -88,7 +88,7 @@ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access. -Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:J().optional().describe(`New width in pixels.`),height:J().optional().describe(`New height in pixels.`)})});var HN=X({method:Z(`ui/notifications/tool-input`),params:X({arguments:KD(q(),PD().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),UN=X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:KD(q(),PD().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),WN=X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:q().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),GN=X({fonts:q().optional()}),KN=X({variables:IN.optional().describe(`CSS variables for theming the app.`),css:GN.optional().describe(`CSS blocks that apps can inject.`)}),qN=X({method:Z(`ui/resource-teardown`),params:X({})});KD(q(),PD());var JN=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var YN=X({experimental:KD(q(),KD(q(),ND()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:ED().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:ED().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:VN.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:BN.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:JN.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:JN.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),XN=X({experimental:KD(q(),KD(q(),ND()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:X({listChanged:ED().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(FN).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:BN.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:VN.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:q().optional().describe(`Dedicated origin for view sandbox. +Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:J().optional().describe(`New width in pixels.`),height:J().optional().describe(`New height in pixels.`)})});var WN=X({method:Z(`ui/notifications/tool-input`),params:X({arguments:JD(q(),ID().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),GN=X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:JD(q(),ID().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),KN=X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:q().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),qN=X({fonts:q().optional()}),JN=X({variables:RN.optional().describe(`CSS variables for theming the app.`),css:qN.optional().describe(`CSS blocks that apps can inject.`)}),YN=X({method:Z(`ui/resource-teardown`),params:X({})});JD(q(),ID());var XN=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var ZN=X({experimental:JD(q(),JD(q(),FD()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:OD().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:OD().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:UN.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:HN.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:XN.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:XN.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),QN=X({experimental:JD(q(),JD(q(),FD()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:X({listChanged:OD().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(LN).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:HN.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:UN.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:q().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. @@ -96,16 +96,16 @@ - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) -If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:ED().optional().describe(`Visual boundary preference - true if view prefers a visible border. +If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:OD().optional().describe(`Visual boundary preference - true if view prefers a visible border. Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. - \`true\`: request visible border + background - \`false\`: request no visible border + background -- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:FN.describe(`The display mode being requested.`)})});var ZN=X({mode:FN.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),QN=VD([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:q().optional(),visibility:Y(QN).optional().describe(`Who can access this tool. Default: ["model", "app"] +- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:LN.describe(`The display mode being requested.`)})});var $N=X({mode:LN.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),eP=UD([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:q().optional(),visibility:Y(eP).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:FD().optional(),permissions:FD().optional()}),X({mimeTypes:Y(q()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(VD([CM,wM])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(TM).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:q().describe(`HTML content to load into the inner iframe.`),sandbox:q().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:BN.optional().describe(`CSP configuration from resource metadata.`),permissions:VN.optional().describe(`Sandbox permissions from resource metadata.`)})});var $N=X({method:Z(`ui/notifications/tool-result`),params:PM.describe(`Standard MCP tool execution result.`)}),eP=X({toolInfo:X({id:$A.optional().describe(`JSON-RPC id of the tools/call request.`),tool:jM.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:PN.optional().describe(`Current color theme preference.`),styles:KN.optional().describe(`Style configuration for theming the app.`),displayMode:FN.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(FN).optional().describe(`Display modes the host supports.`),containerDimensions:VD([X({height:J().describe(`Fixed container height in pixels.`)}),X({maxHeight:VD([J(),jD()]).optional().describe(`Maximum container height in pixels.`)})]).and(VD([X({width:J().describe(`Fixed container width in pixels.`)}),X({maxWidth:VD([J(),jD()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:q().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:q().optional().describe(`User's timezone in IANA format.`),userAgent:q().optional().describe(`Host application identifier.`),platform:VD([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:ED().optional().describe(`Whether the device supports touch input.`),hover:ED().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:J().describe(`Top safe area inset in pixels.`),right:J().describe(`Right safe area inset in pixels.`),bottom:J().describe(`Bottom safe area inset in pixels.`),left:J().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),tP=X({method:Z(`ui/notifications/host-context-changed`),params:eP.describe(`Partial context update containing only changed fields.`)});X({method:Z(`ui/update-model-context`),params:X({content:Y(TM).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:KD(q(),PD().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:hj.describe(`App identification (name and version).`),appCapabilities:XN.describe(`Features and capabilities this app provides.`),protocolVersion:q().describe(`Protocol version this app supports.`)})});var nP=X({protocolVersion:q().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:hj.describe(`Host application identification and version.`),hostCapabilities:YN.describe(`Features and capabilities provided by the host.`),hostContext:eP.describe(`Rich context about the host environment.`)}).passthrough(),rP={target:`draft-2020-12`};async function iP(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](rP);if(n.vendor===`zod`){let{z:n}=await AN(async()=>{let{z:e}=await Promise.resolve().then(()=>(RA(),LA));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function aP(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var oP=class e extends jN{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:HN,toolinputpartial:UN,toolresult:$N,toolcancelled:WN,hostcontextchanged:tP};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||xf({jitless:!0}),this.setRequestHandler(Tj,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=EN(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await aP(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await aP(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await iP(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await iP(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(qN,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(IM,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(MM,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},PM,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},aM,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},$j,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?QM:ZM;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},zN,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},uj,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},LN,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},RN,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},ZN,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new NN(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:MN}},nP,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function sP({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,E.useState)(null),[s,c]=(0,E.useState)(!1),[l,u]=(0,E.useState)(null);return(0,E.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new NN(window.parent,window.parent);if(s=new oP(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function cP(e){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)({}),[a,o]=(0,E.useState)(),[s,c]=(0,E.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=sP({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,E.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function lP(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}function uP(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=cP(`Fanout system health`);return(0,N.jsxs)(Lu,{dark:r?.theme===`dark`,children:[(0,N.jsx)(Ru,{title:`System health`,summary:i?.summary,onRefresh:()=>t(`observability_overview`),disabled:!e}),(0,N.jsx)(zu,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading system health…`:void 0,retry:()=>void t(`observability_overview`)}),i&&(0,N.jsx)(dP,{result:i,onService:t=>lP(e,`Investigate the ${t} service. Explain its errors and latency.`)})]})}function dP({result:e,onService:t}){let{data:n}=e,r=Math.max(n.service_count,1),i=Uu(n.services,6),a=n.health===`unknown`;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(Ol,{cols:{base:3},spacing:`sm`,px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,N.jsx)(Hu,{label:`Services`,value:Ku.format(n.service_count)}),(0,N.jsx)(Hu,{label:`Operations`,value:Ku.format(n.total_spans)}),(0,N.jsx)(Hu,{label:`Error rate`,value:a?`—`:qu(n.error_rate),color:Gu(n.health)})]}),!a&&(0,N.jsxs)(F,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,N.jsxs)(al.Root,{size:`lg`,"aria-label":`Service health distribution`,children:[(0,N.jsx)(al.Section,{value:n.counts.healthy/r*100,color:`ok`,children:(0,N.jsx)(al.Label,{style:mP(`ok`),children:n.counts.healthy})}),(0,N.jsx)(al.Section,{value:n.counts.degraded/r*100,color:`warn`,children:(0,N.jsx)(al.Label,{style:mP(`warn`),children:n.counts.degraded})}),(0,N.jsx)(al.Section,{value:n.counts.unhealthy/r*100,color:`bad`,children:(0,N.jsx)(al.Label,{style:mP(`bad`),children:n.counts.unhealthy})})]}),(0,N.jsxs)(nc,{mt:`xs`,gap:`lg`,children:[(0,N.jsx)(fP,{color:`ok`,text:`${n.counts.healthy} healthy`}),(0,N.jsx)(fP,{color:`warn`,text:`${n.counts.degraded} degraded`}),(0,N.jsx)(fP,{color:`bad`,text:`${n.counts.unhealthy} unhealthy`})]})]}),n.services.length===0?(0,N.jsx)(Bu,{icon:(0,N.jsx)(uu,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Services will appear as data begins to arrive.`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(L.ScrollContainer,{minWidth:560,children:(0,N.jsxs)(L,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,N.jsx)(L.Thead,{children:(0,N.jsxs)(L.Tr,{children:[(0,N.jsx)(L.Th,{children:`Service`}),(0,N.jsx)(L.Th,{ta:`right`,children:`Traffic`}),(0,N.jsx)(L.Th,{ta:`right`,children:`P95`}),(0,N.jsx)(L.Th,{ta:`right`,children:`Errors`})]})}),(0,N.jsx)(L.Tbody,{children:i.pageItems.map(e=>(0,N.jsx)(pP,{service:e,onClick:()=>t(e.service)},e.service))})]})}),(0,N.jsx)(Wu,{...i,onChange:i.setPage})]}),(0,N.jsx)(Vu,{left:Yu(e.provenance.window),right:`Updated ${new Date(e.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`})]})}function fP({color:e,text:t}){return(0,N.jsxs)(nc,{gap:6,children:[(0,N.jsx)(F,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:t})]})}function pP({service:e,onClick:t}){return(0,N.jsxs)(L.Tr,{onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&t()},tabIndex:0,style:{cursor:`pointer`},children:[(0,N.jsx)(L.Td,{children:(0,N.jsx)(pc,{color:Gu(e.health),variant:`light`,tt:`none`,children:e.service})}),(0,N.jsx)(L.Td,{ta:`right`,children:Ku.format(e.spans)}),(0,N.jsx)(L.Td,{ta:`right`,children:Ju(e.p95_ms)}),(0,N.jsx)(L.Td,{ta:`right`,children:qu(e.error_rate)})]})}(0,mu.createRoot)(document.getElementById(`root`)).render((0,N.jsx)(E.StrictMode,{children:(0,N.jsx)(uP,{})}));function mP(e){return{color:`var(--fanout-color-${e}-contrast)`}} +- "app": Tool callable by the app from this server only`),csp:LD().optional(),permissions:LD().optional()}),X({mimeTypes:Y(q()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(UD([TM,EM])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(DM).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:q().describe(`HTML content to load into the inner iframe.`),sandbox:q().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:HN.optional().describe(`CSP configuration from resource metadata.`),permissions:UN.optional().describe(`Sandbox permissions from resource metadata.`)})});var tP=X({method:Z(`ui/notifications/tool-result`),params:IM.describe(`Standard MCP tool execution result.`)}),nP=X({toolInfo:X({id:tj.optional().describe(`JSON-RPC id of the tools/call request.`),tool:NM.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:IN.optional().describe(`Current color theme preference.`),styles:JN.optional().describe(`Style configuration for theming the app.`),displayMode:LN.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(LN).optional().describe(`Display modes the host supports.`),containerDimensions:UD([X({height:J().describe(`Fixed container height in pixels.`)}),X({maxHeight:UD([J(),ND()]).optional().describe(`Maximum container height in pixels.`)})]).and(UD([X({width:J().describe(`Fixed container width in pixels.`)}),X({maxWidth:UD([J(),ND()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:q().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:q().optional().describe(`User's timezone in IANA format.`),userAgent:q().optional().describe(`Host application identifier.`),platform:UD([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:OD().optional().describe(`Whether the device supports touch input.`),hover:OD().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:J().describe(`Top safe area inset in pixels.`),right:J().describe(`Right safe area inset in pixels.`),bottom:J().describe(`Bottom safe area inset in pixels.`),left:J().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),rP=X({method:Z(`ui/notifications/host-context-changed`),params:nP.describe(`Partial context update containing only changed fields.`)});X({method:Z(`ui/update-model-context`),params:X({content:Y(DM).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:JD(q(),ID().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:_j.describe(`App identification (name and version).`),appCapabilities:QN.describe(`Features and capabilities this app provides.`),protocolVersion:q().describe(`Protocol version this app supports.`)})});var iP=X({protocolVersion:q().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:_j.describe(`Host application identification and version.`),hostCapabilities:ZN.describe(`Features and capabilities provided by the host.`),hostContext:nP.describe(`Rich context about the host environment.`)}).passthrough(),aP={target:`draft-2020-12`};async function oP(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](aP);if(n.vendor===`zod`){let{z:n}=await MN(async()=>{let{z:e}=await Promise.resolve().then(()=>(BA(),zA));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function sP(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var cP=class e extends NN{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:WN,toolinputpartial:GN,toolresult:tP,toolcancelled:KN,hostcontextchanged:rP};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||Cf({jitless:!0}),this.setRequestHandler(Dj,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=ON(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await sP(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await sP(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await oP(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await oP(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(YN,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(RM,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(PM,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},IM,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},sM,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},tM,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?eN:$M;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},VN,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},fj,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},zN,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},BN,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},$N,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new FN(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:PN}},iP,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function lP({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,E.useState)(null),[s,c]=(0,E.useState)(!1),[l,u]=(0,E.useState)(null);return(0,E.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new FN(window.parent,window.parent);if(s=new cP(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function uP(e){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)({}),[a,o]=(0,E.useState)(),[s,c]=(0,E.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=lP({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,E.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function dP(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}function fP(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=uP(`Fanout system health`);return(0,N.jsxs)(Lu,{dark:r?.theme===`dark`,children:[(0,N.jsx)(Ru,{title:`System health`,summary:i?.summary,onRefresh:()=>t(`observability_overview`),disabled:!e}),(0,N.jsx)(zu,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading system health…`:void 0,retry:()=>void t(`observability_overview`)}),i&&(0,N.jsx)(pP,{result:i,onService:t=>dP(e,`Investigate the ${t} service. Explain its errors and latency.`)})]})}function pP({result:e,onService:t}){let{data:n}=e,r=Math.max(n.service_count,1),i=Uu(n.services,6),a=n.health===`unknown`;return(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(Ol,{cols:{base:3},spacing:`sm`,px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,N.jsx)(Hu,{label:`Services`,value:qu.format(n.service_count)}),(0,N.jsx)(Hu,{label:`Operations`,value:qu.format(n.total_spans)}),(0,N.jsx)(Hu,{label:`Error rate`,value:a?`—`:Ju(n.error_rate),color:Ku(n.health)})]}),!a&&(0,N.jsxs)(F,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,N.jsxs)(al.Root,{size:`lg`,"aria-label":`Service health distribution`,children:[(0,N.jsx)(al.Section,{value:n.counts.healthy/r*100,color:`ok`,children:(0,N.jsx)(al.Label,{style:gP(`ok`),children:n.counts.healthy})}),(0,N.jsx)(al.Section,{value:n.counts.degraded/r*100,color:`warn`,children:(0,N.jsx)(al.Label,{style:gP(`warn`),children:n.counts.degraded})}),(0,N.jsx)(al.Section,{value:n.counts.unhealthy/r*100,color:`bad`,children:(0,N.jsx)(al.Label,{style:gP(`bad`),children:n.counts.unhealthy})})]}),(0,N.jsxs)(nc,{mt:`xs`,gap:`lg`,children:[(0,N.jsx)(mP,{color:`ok`,text:`${n.counts.healthy} healthy`}),(0,N.jsx)(mP,{color:`warn`,text:`${n.counts.degraded} degraded`}),(0,N.jsx)(mP,{color:`bad`,text:`${n.counts.unhealthy} unhealthy`})]})]}),n.services.length===0?(0,N.jsx)(Bu,{icon:(0,N.jsx)(uu,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Services will appear as data begins to arrive.`}):(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(L.ScrollContainer,{minWidth:560,children:(0,N.jsxs)(L,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,N.jsx)(L.Thead,{children:(0,N.jsxs)(L.Tr,{children:[(0,N.jsx)(L.Th,{children:`Service`}),(0,N.jsx)(L.Th,{ta:`right`,children:`Traffic`}),(0,N.jsx)(L.Th,{ta:`right`,children:`P95`}),(0,N.jsx)(L.Th,{ta:`right`,children:`Errors`})]})}),(0,N.jsx)(L.Tbody,{children:i.pageItems.map(e=>(0,N.jsx)(hP,{service:e,onClick:()=>t(e.service)},e.service))})]})}),(0,N.jsx)(Gu,{...i,onChange:i.setPage})]}),(0,N.jsx)(Vu,{left:Xu(e.provenance.window),right:`Updated ${new Date(e.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})} ${Zu(e.provenance.generated_at)}`})]})}function mP({color:e,text:t}){return(0,N.jsxs)(nc,{gap:6,children:[(0,N.jsx)(F,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,N.jsx)(uc,{c:`dimmed`,size:`xs`,children:t})]})}function hP({service:e,onClick:t}){return(0,N.jsxs)(L.Tr,{onClick:t,onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&t()},tabIndex:0,style:{cursor:`pointer`},children:[(0,N.jsx)(L.Td,{children:(0,N.jsx)(pc,{color:Ku(e.health),variant:`light`,tt:`none`,children:e.service})}),(0,N.jsx)(L.Td,{ta:`right`,children:qu.format(e.spans)}),(0,N.jsx)(L.Td,{ta:`right`,children:Yu(e.p95_ms)}),(0,N.jsx)(L.Td,{ta:`right`,children:Ju(e.error_rate)})]})}(0,mu.createRoot)(document.getElementById(`root`)).render((0,N.jsx)(E.StrictMode,{children:(0,N.jsx)(fP,{})}));function gP(e){return{color:`var(--fanout-color-${e}-contrast)`}} diff --git a/internal/mcp/apps/performance.html b/internal/mcp/apps/performance.html index 69c524861..4304f0d52 100644 --- a/internal/mcp/apps/performance.html +++ b/internal/mcp/apps/performance.html @@ -5,13 +5,13 @@ `):[],v=_.length*f;if(g??=v,v>g&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=Dn(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)On(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=dn(l),S=0;S<_.length;S++)w=Math.max(_n(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var jn=function(){function e(){}return e}(),Mn=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Nn=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Pn(e,t,n,r,i){var a=new Nn,o=Un(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=Tn.lastIndex=0,h;(h=Tn.exec(o))!=null;){var g=h.index;g>m&&Fn(a,o.substring(m,g),t,p),Fn(a,h[2],t,p,h[1]),m=Tn.lastIndex}md){var te=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` `),l=!0),r.accumWidth=m}else{var h=zn(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` `);for(var g=dn(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ln=se(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Rn(e){return!In(e)||!!Ln[e]}function zn(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=dn(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ei(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Kr(t[i]),s=Kr(t[a]),c=r-i,l=ei([Pr(Br(o[0],s[0],c)),Pr(Br(o[1],s[1],c)),Pr(Br(o[2],s[2],c)),Ir(Br(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Qr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),ei(qr(i),`rgba`)}function $r(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),ei(n,`rgba`)}function ei(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ti(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ni=new dt(100);function ri(e){if(V(e)){var t=ni.get(e);return t||(t=Yr(e,-.1),ni.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ii=Math.round;function ai(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var oi=1e-4;function si(e){return e-oi}function ci(e){return ii(e*1e3)/1e3}function li(e){return ii(e*1e4)/1e4}function ui(e){return`matrix(`+ci(e[0])+`,`+ci(e[1])+`,`+ci(e[2])+`,`+ci(e[3])+`,`+li(e[4])+`,`+li(e[5])+`)`}var di={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function mi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function hi(e){return e&&!!e.image}function gi(e){return e&&!!e.svgElement}function _i(e){return hi(e)||gi(e)}function vi(e){return e.type===`linear`}function yi(e){return e.type===`radial`}function bi(e){return e&&(e.type===`linear`||e.type===`radial`)}function xi(e){return`url(#`+e+`)`}function Si(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ii(o*He)+`deg, `+ii(s*He)+`deg)`),c.join(` `)}var wi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Ti=Array.prototype.slice;function Ei(e,t,n){return(t-e)*n+e}function Di(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Hi,s=t;if(oe(t)){var c=Fi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Ii;else if(V(t)){if(!isNaN(+t))o=Ii;else{var l=Kr(t);l&&(s=l,o=zi)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),vi(t)?o=Bi:yi(t)&&(o=Vi),s=u}i===0?this.valType=o:(o!==this.valType||o===Hi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Wi(r),c=Ui(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Gi:e[s];if((Wi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Wi(i))i===Li?Di(g,f[r],p[r],h):Oi(g,f[r],p[r],h);else if(Ui(i)){var _=f[r],v=p[r],y=i===Bi;e[s]={type:y?`linear`:`radial`,x:Ei(_.x,v.x,h),y:Ei(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ei(e.offset,n.offset,h),color:Pi(Di([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ei(_.x2,v.x2,h),e[s].y2=Ei(_.y2,v.y2,h)):e[s].r=Ei(_.r,v.r,h)}else if(c)Di(g,f[r],p[r],h),n||(e[s]=Pi(g));else{var b=Ei(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Ii?e[n]=e[n]+r:t===zi?(Kr(e[n],Gi),ki(Gi,Gi,r,1),e[n]=Pi(Gi)):t===Li?ki(e[n],e[n],r,1):t===Ri&&Ai(e[n],e[n],r,1)},e}(),qi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Ni(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ni(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ji=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?$i:Qi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ta,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ta;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ha(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_a(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var va=`__zr_style_`+Math.round(Math.random()*10),ya={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ba={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ya[va]=!0;var xa=[`z`,`z2`,`invisible`],Sa=[`invisible`],Ca=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Ma[0]=Aa(i)*n+e,Ma[1]=ka(i)*r+t,Na[0]=Aa(a)*n+e,Na[1]=ka(a)*r+t,l(s,Ma,Na),u(c,Ma,Na),i%=ja,i<0&&(i+=ja),a%=ja,a<0&&(a+=ja),i>a&&!o?a+=ja:ii&&(Pa[0]=Aa(p)*n+e,Pa[1]=ka(p)*r+t,l(s,Pa,s),u(c,Pa,c))}var Va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=[],Ja=Math.min,Ya=Math.max,Xa=Math.cos,Za=Math.sin,Qa=Math.abs,$a=Math.PI,eo=$a*2,to=typeof Float32Array<`u`,no=[];function ro(e){return Math.round(e/$a*1e8)/1e8%2*$a}function io(e,t){var n=ro(e[0]);n<0&&(n+=eo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=eo?i=n+eo:t&&n-i>=eo?i=n-eo:!t&&n>i?i=n+(eo-ro(n-i)):t&&n0&&(this._ux=Qa(n/Xi/e)||0,this._uy=Qa(n/Xi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Va.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qa(e-this._xi),r=Qa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Va.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Va.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Va.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),no[0]=r,no[1]=i,io(no,a),r=no[0],i=no[1];var o=i-r;return this.addData(Va.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xa(i)*n+e,this._yi=Za(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Va.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Va.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&to&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ka[0]=Ka[1]=Number.MAX_VALUE,Ga[0]=Ga[1]=qa[0]=qa[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Qa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Va.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Va.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Va.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Xa(D)*T+C,s=Za(D)*E+w),m=Ya(T,E)*Ja(eo,Math.abs(O)),i=Xa(k)*T+C,a=Za(k)*E+w;break;case Va.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Va.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Va.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Va.L:u=n[x++],d=n[x++];var w=Qa(u-c),T=Qa(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Va.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Ha),br(l,A,ee,N,D,Ua),e.bezierCurveTo(Ha[1],Ua[1],Ha[2],Ua[2],Ha[3],Ua[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Va.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Ha),Dr(l,A,ee,D,Ua),e.quadraticCurveTo(Ha[1],Ua[1],Ha[2],Ua[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Va.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Qa(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Xa(ne)*F+te,s=Za(ne)*I+P),c=Xa(R)*F+te,l=Za(R)*I+P;break;case Va.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+Ja(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+Ja(le,ce)),le-=ce,le>0&&e.lineTo(u+Ya(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ya(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Va.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Va,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function oo(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=fo);var f=Math.atan2(c,s);return f<0&&(f+=fo),f>=r&&f<=i||f+fo>=r&&f+fo<=i}function mo(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var ho=ao.CMD,go=Math.PI*2,_o=1e-4;function vo(e,t){return Math.abs(e-t)<_o}var yo=[-1,-1,-1],bo=[-1,-1];function xo(){var e=bo[0];bo[0]=bo[1],bo[1]=e}function So(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l1&&xo(),p=gr(t,r,a,s,bo[0]),f>1&&(m=gr(t,r,a,s,bo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);yo[0]=-c,yo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=go-1e-4){r=0,i=go;var u=a?1:-1;return o>=yo[0]+e&&o<=yo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=go,i+=go);for(var f=0,p=0;p<2;p++){var m=yo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=go+h),(h>=r&&h<=i||h+go>=r&&h+go<=i)&&(h>Math.PI/2&&h1&&(n||(s+=mo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ho.M:u=a[m++],d=a[m++],c=u,l=d;break;case ho.L:if(n){if(oo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=mo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.C:if(n){if(so(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.Q:if(n){if(co(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Co(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=mo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(po(_,v,b,x,x+S,C,t,w,i))return!0}else s+=wo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ho.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(oo(u,d,f,d,t,r,i)||oo(f,d,f,p,t,r,i)||oo(f,p,u,p,t,r,i)||oo(u,p,u,d,t,r,i))return!0}else s+=mo(f,d,f,p,r,i),s+=mo(u,p,u,d,r,i);break;case ho.Z:if(n){if(oo(c,l,u,d,t,r,i))return!0}else s+=mo(c,l,u,d,r,i);c=u,l=d}}return!n&&!vo(l,d)&&(s+=mo(c,l,u,d,r,i)||0),s!==0}function Eo(e,t,n){return To(e,0,!1,t,n)}function Do(e,t,n,r){return To(e,t,!0,n,r)}var Oo=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ya),ko={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ba.style)},Ao=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),jo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Qi:t>.2?ea:$i}if(e)return $i}return Qi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ti(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ao(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Do(a,o/s,e,t)))return!0}if(this.hasFill())return Eo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Oo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var zo=Math.round;function Bo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(zo(r*2)===zo(i*2)&&(e.x1=e.x2=Ho(r,s,!0)),zo(a*2)===zo(o*2)&&(e.y1=e.y2=Ho(a,s,!0)),e):e}}function Vo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Ho(r,s,!0),e.y=Ho(i,s,!0),e.width=Math.max(Ho(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ho(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Ho(e,t,n){if(!t)return e;var r=zo(e*2);return(r+zo(t))%2==0?r/2:(r+(n?1:-1))/2}var Uo=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Wo={},Go=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Vo(Wo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ro(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(jo);Go.prototype.type=`rect`;var Ko={fill:`#000`},qo=2,Jo={},Yo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ba.style)},Xo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Ko,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ls(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ss(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(No),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=os(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=as(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=qo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),ts(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Go),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Lo),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ns(e)&&(t=[e.fontStyle,e.fontWeight,es(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Ca),Zo={left:!0,right:1,center:1},Qo={top:1,bottom:1,middle:1},$o=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function es(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ts(e,t){for(var n=0;n<$o.length;n++){var r=$o[n],i=t[r];i!=null&&(e[r]=i)}}function ns(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function rs(e){return is(e),R(e.rich,is),e}function is(e){if(e){e.font=Xo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Zo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Qo[n]?n:`top`,e.padding&&=De(e.padding)}}function as(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function os(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ss(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function cs(e){var t=e.text;return t!=null&&(t+=``),t}function ls(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var us=1e-4,ds=20;function fs(e){return e.replace(/^\s+|\s+$/g,``)}var ps=Math.min,ms=Math.max,hs=Math.abs,gs=Math.round,_s=Math.floor,vs=Math.ceil,ys=Math.pow,bs=Math.log,xs=Math.LN10,Ss=Math.PI,Cs=Math.random;function ws(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ts=Es;function Es(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ds(e,t,n)}function Ds(e,t,n){return V(e)?Os(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Os(e){return!!fs(e).match(/%$/)}function ks(e,t,n){return isNaN(t)?n?``+e:+e:(t=ps(ms(0,t),ds),e=(+e).toFixed(t),n?e:+e)}function As(e){return e.sort(function(e,t){return e-t}),e}function js(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(gs(e*t)/t===e)return n}return Ms(e)}function Ms(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ms(0,(a<0?0:i-1-a)-r)}function Ns(e,t,n){var r=hs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=bs(2*hs(n||1)*hs(r))/xs,a=bs(hs(t))/xs,o=ms(0,vs(-i+a));return isFinite(o)||(o=NaN),o}function Ps(e,t){var n=ms(js(e),js(t)),r=e+t;return n>ds?r:ks(r,n)}var Fs=ys(2,53)-1;function Is(e){var t=Ss*2;return(e%t+t)%t}function Ls(e){return e>-us&&e=10&&t++,t}function Hs(e,t){var n=Vs(e),r=ys(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,ks(e,-n)}function Us(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Lc(){return[1/0,-1/0]}function Rc(e,t){Hc(t)&&(te[1]&&(e[1]=t))}function zc(e,t){Hc(t)&&te[1]&&(e[1]=t)}function Vc(e,t){Uc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Hc(e){return e!=null&&isFinite(e)}function Uc(e,t){return Hc(e)&&Hc(t)&&e<=t}function Wc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Gc(e){Uc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Kc(){var e=`__ec_once_`+qc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var qc=Ks();function Jc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Yc(e){return e.value+``}function Xc(e){return e+``}function Zc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function $c(e){return{overallReset:e}}var el=Ec(),tl=function(e,t,n,r){if(r){var i=el(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=el(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},nl=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),rl=`original`,il=`arrayRows`,al=`objectRows`,ol=`keyedColumns`,sl=`typedArray`,cl=`unknown`,ll=`column`,ul=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],dl=function(){function e(e){R(ul,function(t){this[t]=fe(e[t],e)},this)}return e}();function fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var pl=1,ml={},hl=Ec(),gl=Ec(),_l=[`emphasis`,`blur`,`select`],vl=[`normal`,`emphasis`,`blur`,`select`],yl=`highlight`,bl=`downplay`,xl=`select`,Sl=`unselect`,Cl=`toggleSelect`,wl=`selectchanged`;function Tl(e){return e!=null&&e!==`none`}function El(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Dl(e){El(e,`emphasis`,2)}function Ol(e){e.hoverState===2&&El(e,`normal`,0)}function kl(e){El(e,`blur`,1)}function Al(e){e.hoverState===1&&El(e,`normal`,0)}function jl(e){e.selected=!0}function Ml(e){e.selected=!1}function Nl(e,t,n){t(e,n)}function Pl(e,t,n){Nl(e,t,n),e.isGroup&&e.traverse(function(e){Nl(e,t,n)})}function Fl(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Il(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof jo){var o=hl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Tl(s)||Tl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Tl(l.fill)&&Tl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ri(s)):!Tl(l.stroke)&&Tl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ri(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Rl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function zl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Il(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Bl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ll(this,e,t,n);if(e===`blur`)return zl(this,e,n);if(e===`select`)return Rl(this,e,n)}return n}function Vl(e){e.stateProxy=Bl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bl),n&&(n.stateProxy=Bl)}function Hl(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Dl)}function Ul(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Ol)}function Wl(e,t){e.__highByOuter|=1<<(t||0),Pl(e,Dl)}function Gl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Pl(e,Ol)}function Kl(e){Pl(e,kl)}function ql(e){Pl(e,Al)}function Jl(e){Pl(e,jl)}function Yl(e){Pl(e,Ml)}function Xl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=gl(i),o=fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Al(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Ql(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function su(e,t,n){mu(e,!0),Pl(e,Vl),uu(e,t,n)}function cu(e){mu(e,!1)}function lu(e,t,n,r){r?cu(e):su(e,t,n)}function uu(e,t,n){var r=el(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var du=[`emphasis`,`blur`,`select`],fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function pu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Tu(m),s*=Tu(m));var h=(i===a?-1:1)*Tu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Du(d)*g-Eu(d)*_,y=(t+r)/2+Eu(d)*g+Du(d)*_,b=ju([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ju(x,S);if(Au(x,S)<=-1&&(C=Ou),Au(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ou*1e6)/1e6;C=Ou*2+w%2*Ou}u.addData(l,v,y,o,s,b,C,d,a)}var Nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fu(e){var t=new ao;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ao.CMD,c=e.match(Nu);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function od(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function sd(e,t){var n,r=td(t.r,0),i=td(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=$u(c-s),p=f>Ju&&f%Ju;if(p>rd&&(f=p),!(r>rd))e.moveTo(l,u);else if(f>Ju-rd)e.moveTo(l+r*Xu(s),u+r*Yu(s)),e.arc(l,u,r,s,c,!d),i>rd&&(e.moveTo(l+i*Xu(c),u+i*Yu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Xu(s),j=r*Yu(s),ee=i*Xu(c),M=i*Yu(c),N=f>rd;if(N){var te=t.cornerRadius;te&&(n=od(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=$u(r-i)/2;if(v=nd(P,g),y=nd(P,_),b=nd(P,m),x=nd(P,h),w=S=td(v,y),T=C=td(b,x),(S>rd||C>rd)&&(E=r*Xu(c),D=r*Yu(c),O=i*Xu(s),k=i*Yu(s),frd){var oe=nd(g,w),R=nd(_,w),z=ad(O,k,A,j,r,oe,d),se=ad(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,r,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>rd)||!N)e.lineTo(l+ee,u+M);else if(T>rd){var oe=nd(m,T),R=nd(h,T),z=ad(ee,M,E,D,i,-R,d),se=ad(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,i,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cd=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ld=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cd},t.prototype.buildPath=function(e,t){sd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(jo);ld.prototype.type=`sector`;var ud=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),dd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ud},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(jo);dd.prototype.type=`ring`;function fd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=fd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sFd[1]){if(i=!1,Id.negativeSize||n)return i;var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);jd(s,c)>Rd.len()&&(s=c||!Id.bidirectional)&&(Vt.scale(Ld,o,-c*r),Id.useDir&&Id.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Gd(e,t,n,r,i,a){Wd(`update`,e,t,n,r,i,a)}function Kd(e,t,n,r,i,a){Wd(`enter`,e,t,n,r,i,a)}function qd(e){if(!e.__zr)return!0;for(var t=0;tEd,BezierCurve:()=>wd,BoundingRect:()=>tn,Circle:()=>Wu,CompoundPath:()=>Dd,Ellipse:()=>Ku,Group:()=>Hu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Lo,IncrementalDisplayable:()=>Vd,Line:()=>bd,LinearGradient:()=>kd,OrientedBoundingRect:()=>zd,Path:()=>jo,Point:()=>Vt,Polygon:()=>hd,Polyline:()=>_d,RadialGradient:()=>Ad,Rect:()=>Go,Ring:()=>dd,Sector:()=>ld,Text:()=>Xo,WH:()=>tf,XY:()=>ef,applyTransform:()=>_f,calcZ2Range:()=>Bf,clipPointsByRect:()=>Sf,clipRectByRect:()=>Cf,createIcon:()=>wf,decomposeTransform:()=>Wf,ensureCopyRect:()=>Lf,ensureCopyTransform:()=>Rf,expandOrShrinkRect:()=>kf,extendPath:()=>af,extendShape:()=>nf,getCurrentCanvasPainter:()=>Kf,getShapeClass:()=>sf,getTransform:()=>gf,groupTransition:()=>xf,initProps:()=>Kd,isBoundingRectAxisAligned:()=>Ff,isElementRemoved:()=>qd,lineLineIntersect:()=>Ef,linePolygonIntersect:()=>Tf,makeImage:()=>lf,makePath:()=>cf,mergePath:()=>df,payloadDisableAnimation:()=>Uf,registerShape:()=>of,removeElement:()=>Jd,removeElementWithFadeOut:()=>Xd,resizePath:()=>ff,retrieveZInfo:()=>zf,setTooltipConfig:()=>Mf,subPixelOptimize:()=>hf,subPixelOptimizeLine:()=>pf,subPixelOptimizeRect:()=>mf,transformDirection:()=>vf,traverseElements:()=>Pf,traverseUpdateZ:()=>Vf,updateProps:()=>Gd}),$d={},ef=[`x`,`y`],tf=[`width`,`height`];function nf(e){return jo.extend(e)}var rf=Bu;function af(e,t){return rf(e,t)}function of(e,t){$d[e]=t}function sf(e){if($d.hasOwnProperty(e))return $d[e]}function cf(e,t,n,r){var i=zu(e,t);return n&&(r===`center`&&(n=uf(n,i.getBoundingRect())),ff(i,n)),i}function lf(e,t,n){var r=new Lo({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(uf(t,i))}}});return r}function uf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var df=Vu;function ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pf(e,t){return Bo(e,e,{lineWidth:t}),e}function mf(e,t){return Vo(e,e,t),e}var hf=Ho;function gf(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function _f(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:hs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:hs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_f(a,t,n),hs(a[0])>hs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yf(e){return!e.isGroup}function bf(e){return e.shape!=null}function xf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(yf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gd(e,r,n,el(e).dataIndex)}}})}function Sf(e,t){return z(e,function(e){var n=e[0];n=ms(n,t.x),n=ps(n,t.x+t.width);var r=e[1];return r=ms(r,t.y),r=ps(r,t.y+t.height),[n,r]})}function Cf(e,t){var n=ms(e.x,t.x),r=ps(e.x+e.width,t.x+t.width),i=ms(e.y,t.y),a=ps(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Lo(r)):cf(e.replace(`path://`,``),r,n,`center`)}function Tf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Df(p,m,u,d)/f;return!(g<0||g>1)}function Df(e,t,n,r){return e*r-n*t}function Of(e){return e<=1e-6&&e>=-1e-6}function kf(e,t,n,r,i){return t==null?e:(ge(t)?Af[0]=Af[1]=Af[2]=Af[3]=t:(Af[0]=t[0],Af[1]=t[1],Af[2]=t[2],Af[3]=t[3]),r&&(Af[0]=ms(0,Af[0]),Af[1]=ms(0,Af[1]),Af[2]=ms(0,Af[2]),Af[3]=ms(0,Af[3])),n&&(Af[0]=-Af[0],Af[1]=-Af[1],Af[2]=-Af[2],Af[3]=-Af[3]),jf(e,Af,`x`,`width`,3,1,i&&i[0]||0),jf(e,Af,`y`,`height`,0,2,i&&i[1]||0),e)}var Af=[0,0,0,0];function jf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ms(0,ps(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:hs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=el(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pf(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Vf(e,t,n){Hf(e,t,n,-1/0)}function Hf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Kp=(e={},e[il+`_`+ll]={pure:!0,appendData:i},e[il+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[al]={pure:!0,appendData:i},e[ol]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[rl]={appendData:i},e[sl]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||tc(``),this._opFn=mm[e],this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Ws(e),this._rvalFloat)},e})();var hm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Ws(e),r=ge(t)?t:Ws(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ws(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function gm(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function eee(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,nee=typeof Uint16Array>`u`?Array:Uint16Array,_m=typeof Int32Array>`u`?Array:Int32Array,vm=typeof Float64Array>`u`?Array:Float64Array,ym={float:vm,int:_m,ordinal:Array,number:Array,time:vm},bm;function xm(e){return e>65535?tee:nee}function ree(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Sm(e,t,n,r,i){var a=ym[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(xm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return pm(e[r],this._dimensions[r])}bm={arrayRows:e,objectRows:function(e,t,n,r){return pm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return pm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),wm=Ec(),Tm={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Em=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=km(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vp(this.source),n=!Am(e),r=``,i=[],a=0,o=0;a30}var jm=_e,Mm=z,Nm=typeof Int32Array>`u`?Array:Int32Array,Pm=`e\0\0`,Fm=-1,Im=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Lm=[`_approximateExtent`],Rm,zm,Bm,Vm,Hm,Um,Wm,Gm=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Dm(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():jm(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,jm(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){jm(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){tl(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Mm(this.dimensions,this._getDimInfo,this),this.hostModel),Hm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Rm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Nm(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Km(e,t){Mp(e)||(e=Pp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=qm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Am(o),c=r===e.dimensionsDefine,l=c?km(e):Om(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new _m(o),p=0;p0&&(e.name+=t-1)}),new Em({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function qm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Jm(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Ym={},Xm={},Zm=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Ym,!0),this._normalMasterList=n(Xm,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Ym[e]=t;return}Xm[e]=t},e.get=function(e){return Xm[e]||Ym[e]},e}();function Qm(e){return!!Ym[e]}var $m=Le();function eh(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=$m.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function th(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!Qm(n)&&(i=0))}return{coordSysType:n,kind:i}}function nh(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=th(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var rh=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function ih(e){var t=e.get(`coordinateSystem`),n=new rh(t),r=ah[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ah={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ac).models[0],a=e.getReferringComponents(`yAxis`,Ac).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),oh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),oh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ac).models[0];t.coordSysDims=[`single`],n.set(`single`,i),oh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ac).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),oh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),oh(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),oh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ac).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function oh(e){return e.get(`type`)===`category`}function sh(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ch(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ch(e){return!Dm(e.schema)}function lh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function uh(e,t){return lh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function dh(e,t){var n=e.get(`coordinateSystem`),r=Zm.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=um(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function fh(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function ph(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pp(e)):(i=r.getSource(),a=i.sourceFormat===rl);var o=ih(t),s=dh(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Ep,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Km(i,u),f=fh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=sh(t,{schema:d,store:p}),h=new Gm(d,t);h.setCalculationInfo(m);var g=f!=null&&mh(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function mh(e){if(e.sourceFormat===`original`)return!B(cc(hh(e.data||[])))}function hh(e){for(var t=0;t=0&&n.push(e)}),n}}function bh(e,t){return F(F({},e,!0),t,!0)}var xh=Math.log(2);function Sh(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function see(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ch(s,o):Ch(o,s))}function Dh(e){return e.nodeName.toUpperCase()===`CANVAS`}var cee=/([&<>"'])/g,lee={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Oh(e){return e==null?``:(e+``).replace(cee,function(e,t){return lee[t]})}var uee={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},dee={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},kh=`ZH`,Ah=`EN`,jh=Ah,Mh={},Nh={},Ph=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||jh).toUpperCase().indexOf(kh)>-1?kh:jh}():jh;function Fh(e,t){e=e.toUpperCase(),Nh[e]=new yp(t),Mh[e]=t}function fee(e){if(V(e)){var t=Mh[e.toUpperCase()]||{};return e===kh||e===Ah?P(t):F(P(t),P(Mh[jh]),!1)}return F(P(e),P(Mh[jh]),!1)}function Ih(e){return Nh[e]}function Lh(){return Nh[jh]}Fh(Ah,uee),Fh(kh,dee);var Rh=null;function zh(){return Rh}function Bh(e,t){var n=zh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Vh(e){var t=e.brk;return t?t.breaks:[]}function Hh(e){var t=e.brk;return t?t.hasBreaks():!1}var Uh=1e3,Wh=Uh*60,Gh=Wh*60,Kh=Gh*24,qh=Kh*365,Jh={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Yh={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},pee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,Xh=`{yyyy}-{MM}-{dd}`,Zh={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:Xh,hour:Xh+` `+Yh.hour,minute:Xh+` `+Yh.minute,second:Xh+` `+Yh.second,millisecond:pee},Qh=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],$h=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function eg(e){return!V(e)&&!me(e)?tg(e):e}function tg(e){e||={};var t={},n=!0;return R(Qh,function(t){n&&=e[t]==null}),R(Qh,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=Qh[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=Yh[r]:Jh[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function ng(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function rg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function ig(e){return e===rg(e)}function ag(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function og(e,t,n,r){var i=zs(e),a=i[lg(n)](),o=i[ug(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[dg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[fg(n)](),d=(u-1)%12+1,f=i[pg(n)](),p=i[mg(n)](),m=i[hg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof yp?r:Ih(r||Ph)||Lh()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,ng(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,ng(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,ng(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,ng(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,ng(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,ng(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,ng(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,ng(m,3)).replace(/{S}/g,m+``)}function mee(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=zh();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=sg(e.value,i);a=n[u][u][0]}}return og(new Date(e.value),a,i,r)}function sg(e,t){var n=zs(e),r=n[ug(t)]()+1,i=n[dg(t)](),a=n[fg(t)](),o=n[pg(t)](),s=n[mg(t)](),c=n[hg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function cg(e,t,n){switch(t){case`year`:e[_g(n)](0);case`month`:e[vg(n)](1);case`day`:e[yg(n)](0);case`hour`:e[bg(n)](0);case`minute`:e[xg(n)](0);case`second`:e[Sg(n)](0)}return e}function lg(e){return e?`getUTCFullYear`:`getFullYear`}function ug(e){return e?`getUTCMonth`:`getMonth`}function dg(e){return e?`getUTCDate`:`getDate`}function fg(e){return e?`getUTCHours`:`getHours`}function pg(e){return e?`getUTCMinutes`:`getMinutes`}function mg(e){return e?`getUTCSeconds`:`getSeconds`}function hg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function gg(e){return e?`setUTCFullYear`:`setFullYear`}function _g(e){return e?`setUTCMonth`:`setMonth`}function vg(e){return e?`setUTCDate`:`setDate`}function yg(e){return e?`setUTCHours`:`setHours`}function bg(e){return e?`setUTCMinutes`:`setMinutes`}function xg(e){return e?`setUTCSeconds`:`setSeconds`}function Sg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Cg(e){if(!Gs(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function wg(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var Tg=De;function Eg(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Ys(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zs(e):e;if(!isNaN(+c))return og(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Ws(e);return a(l)?Cg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var Dg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Og=function(e,t){return`{`+e+(t??``)+`}`};function kg(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function jg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Mg=R,Ng=[`left`,`right`,`top`,`bottom`,`width`,`height`],Pg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function Fg(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Ig=Fg;pe(Fg,`vertical`),pe(Fg,`horizontal`);function hee(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Lg(e,t,n){n=Tg(n||0);var r=t.width,i=t.height,a=Ts(e.left,r),o=Ts(e.top,i),s=Ts(e.right,r),c=Ts(e.bottom,i),l=Ts(e.width,r),u=Ts(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Rg={rect:1,point:2};function zg(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=eh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Rg.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Rg.point,s=u,i=o.dataToPoint(l))}return a??=Rg.rect,a===Rg.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function gee(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Lg(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Bg(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function Vg(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(Pg[0],0),a=o(Pg[1],1);c(Pg[0],e,i),c(Pg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Mg(n,function(t){c[t]=e[t]}),Mg(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return hee(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(yp);et(Ug,yp),at(Ug),vh(Ug),yh(Ug,yee);function yee(e){var t=[];return R(Ug.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var Wg=Ec(),bee=Ec(),Gg=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=ac(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return Jg(this,Wg,r,i,e,t,n)},e.prototype.clearColorPalette=function(){Yg(this,Wg)},e}();function Kg(e,t,n,r){return Jg(e,bee,ac(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function qg(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function Jg(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:qg(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function Yg(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var Xg=/\{@(.+?)\}/g,Zg=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return kg(i,s).replace(Xg,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=om(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return om(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function Qg(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function $g(e){return new e_(e)}var e_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(m_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?sl:rl,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Np(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Np(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&h_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&h_(``),a.push(t),o.push(e._getVersionSign())}),n?i=u_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;tn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Bn(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;tn.set(Vn,bn(n,o,i),xn(r,s,a),o,s),tn.intersect(t,Vn,null,Hn);var c=Hn.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=bn(c.x,c.width,i,!0),e.baseY=xn(c.y,c.height,a,!0)}}var Vn=new tn(0,0,0,0),Hn={outIntersectRect:{},clamp:!0};function Un(e){return e==null?e=``:e+=``}function Wn(e){var t=Un(e.text),n=e.font;return Gn(e,_n(dn(n),t),Sn(n),null)}function Gn(e,t,n,r){var i=new tn(bn(e.x||0,t,e.textAlign),xn(e.y||0,n,e.textBaseline),t,n),a=r??(Kn(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Kn(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var qn=vt,Jn=5e-5;function Yn(e){return e>Jn||e<-Jn}var Xn=[],Zn=[],Qn=_t(),$n=Math.abs,er=function(){function e(){}return e.prototype.getLocalTransform=function(e){return tr(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Yn(this.rotation)||Yn(this.x)||Yn(this.y)||Yn(this.scaleX-1)||Yn(this.scaleY-1)||Yn(this.skewX)||Yn(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(qn(n),this.invTransform=null);return}n||=_t(),t?this.getLocalTransform(n):qn(n),e&&(t?bt(n,e,n):yt(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||_t(),wt(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Xn);var n=Xn[0]<0?-1:1,r=Xn[1]<0?-1:1,i=((Xn[0]-n)*t+n)/Xn[0]||0,a=((Xn[1]-r)*t+r)/Xn[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||_t(),bt(Zn,e.invTransform,t),t=Zn);var n=this.originX,r=this.originY;(n||r)&&(Qn[4]=n,Qn[5]=r,bt(Zn,t,Qn),Zn[4]-=n,Zn[5]-=r,t=Zn),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Rt(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Rt(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&$n(e[0]-1)>1e-10&&$n(e[3]-1)>1e-10?Math.sqrt($n(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){rr(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&St(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),tr=er.getLocalTransform,nr=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function rr(e,t){return ne(e,t,nr)}var ir={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-ir.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?ir.bounceIn(e*2)*.5:ir.bounceOut(e*2-1)*.5+.5}},ar=Math.pow,or=Math.sqrt,sr=1e-8,cr=1e-4,lr=or(3),ur=1/3,dr=Tt(),fr=Tt(),pr=Tt();function mr(e){return e>-sr&&esr||e<-sr}function gr(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function _r(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function vr(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(mr(u)&&mr(d)){if(mr(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(mr(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=or(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-ar(-y,ur):ar(y,ur),b=b<0?-ar(-b,ur):ar(b,ur);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*or(u*u*u)),S=Math.acos(x)/3,C=or(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+lr*Math.sin(S)))/(3*o),T=(-s+C*(w-lr*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function yr(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(mr(o)){if(hr(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(mr(u))i[0]=-a/(2*o);else if(u>0){var d=or(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function br(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function xr(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;dr[0]=c,dr[1]=l;for(var v=0;v<1;v+=.05)fr[0]=gr(e,n,i,o,v),fr[1]=gr(t,r,a,s,v),g=Lt(dr,fr),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(mr(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=or(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function Er(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Dr(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function Or(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;dr[0]=o,dr[1]=s;for(var f=0;f<1;f+=.05){fr[0]=Cr(e,n,i,f),fr[1]=Cr(t,r,a,f);var p=Lt(dr,fr);p=0&&p=1?1:vr(0,r,a,1,e,s)&&gr(0,i,o,1,s[0])}}}var Mr=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ve,this.ondestroy=e.ondestroy||Ve,this.onrestart=e.onrestart||Ve,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=me(e)?e:ir[e]||jr(e)},e}(),Nr={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Pr(e){return e=Math.round(e),e<0?0:e>255?255:e}function Fr(e){return e=Math.round(e),e<0?0:e>360?360:e}function Ir(e){return e<0?0:e>1?1:e}function Lr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Pr(parseFloat(t)/100*255):Pr(parseInt(t,10))}function Rr(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Ir(parseFloat(t)/100):Ir(parseFloat(t))}function zr(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Br(e,t,n){return e+(t-e)*n}function Vr(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Hr(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Ur=new dt(20),Wr=null;function Gr(e,t){Wr&&Hr(Wr,t),Wr=Ur.put(e,Wr||t.slice())}function Kr(e,t){if(e){t||=[];var n=Ur.get(e);if(n)return Hr(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Nr)return Hr(t,Nr[r]),Gr(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Vr(t,0,0,0,1);return}return Vr(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Gr(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Vr(t,0,0,0,1);return}return Vr(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Gr(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Vr(t,+l[0],+l[1],+l[2],1):Vr(t,0,0,0,1);u=Rr(l.pop());case`rgb`:if(l.length>=3)return Vr(t,Lr(l[0]),Lr(l[1]),Lr(l[2]),l.length===3?u:Rr(l[3])),Gr(e,t),t;Vr(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Vr(t,0,0,0,1);return}return l[3]=Rr(l[3]),qr(l,t),Gr(e,t),t;case`hsl`:if(l.length!==3){Vr(t,0,0,0,1);return}return qr(l,t),Gr(e,t),t;default:return}}Vr(t,0,0,0,1)}}function qr(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Rr(e[1]),i=Rr(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Vr(t,Pr(zr(o,a,n+1/3)*255),Pr(zr(o,a,n)*255),Pr(zr(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Jr(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Yr(e,t){var n=Kr(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ei(n,n.length===4?`rgba`:`rgb`)}}function Xr(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Pr(Br(o[0],s[0],c)),n[1]=Pr(Br(o[1],s[1],c)),n[2]=Pr(Br(o[2],s[2],c)),n[3]=Ir(Br(o[3],s[3],c)),n}}function Zr(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Kr(t[i]),s=Kr(t[a]),c=r-i,l=ei([Pr(Br(o[0],s[0],c)),Pr(Br(o[1],s[1],c)),Pr(Br(o[2],s[2],c)),Ir(Br(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Qr(e,t,n,r){var i=Kr(e);if(e)return i=Jr(i),t!=null&&(i[0]=Fr(me(t)?t(i[0]):t)),n!=null&&(i[1]=Rr(me(n)?n(i[1]):n)),r!=null&&(i[2]=Rr(me(r)?r(i[2]):r)),ei(qr(i),`rgba`)}function $r(e,t){var n=Kr(e);if(n&&t!=null)return n[3]=Ir(t),ei(n,`rgba`)}function ei(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function ti(e,t){var n=Kr(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var ni=new dt(100);function ri(e){if(V(e)){var t=ni.get(e);return t||(t=Yr(e,-.1),ni.put(e,t)),t}if(xe(e)){var n=I({},e);return n.colorStops=z(e.colorStops,function(e){return{offset:e.offset,color:Yr(e.color,-.1)}}),n}return e}var ii=Math.round;function ai(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Kr(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var oi=1e-4;function si(e){return e-oi}function ci(e){return ii(e*1e3)/1e3}function li(e){return ii(e*1e4)/1e4}function ui(e){return`matrix(`+ci(e[0])+`,`+ci(e[1])+`,`+ci(e[2])+`,`+ci(e[3])+`,`+li(e[4])+`,`+li(e[5])+`)`}var di={left:`start`,right:`end`,center:`middle`,middle:`middle`};function fi(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function pi(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function mi(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function hi(e){return e&&!!e.image}function gi(e){return e&&!!e.svgElement}function _i(e){return hi(e)||gi(e)}function vi(e){return e.type===`linear`}function yi(e){return e.type===`radial`}function bi(e){return e&&(e.type===`linear`||e.type===`radial`)}function xi(e){return`url(#`+e+`)`}function Si(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function Ci(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*He,i=we(e.scaleX,1),a=we(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+ii(o*He)+`deg, `+ii(s*He)+`deg)`),c.join(` `)}var wi=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),Ti=Array.prototype.slice;function Ei(e,t,n){return(t-e)*n+e}function Di(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Hi,s=t;if(oe(t)){var c=Fi(t);o=c,(c===1&&!ge(t[0])||c===2&&!ge(t[0][0]))&&(a=!0)}else if(ge(t)&&!Se(t))o=Ii;else if(V(t)){if(!isNaN(+t))o=Ii;else{var l=Kr(t);l&&(s=l,o=zi)}}else if(xe(t)){var u=I({},s);u.colorStops=z(t.colorStops,function(e){return{offset:e.offset,color:Kr(e.color)}}),vi(t)?o=Bi:yi(t)&&(o=Vi),s=u}i===0?this.valType=o:(o!==this.valType||o===Hi)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=me(n)?n:ir[n]||jr(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Wi(r),c=Ui(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Gi:e[s];if((Wi(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Wi(i))i===Li?Di(g,f[r],p[r],h):Oi(g,f[r],p[r],h);else if(Ui(i)){var _=f[r],v=p[r],y=i===Bi;e[s]={type:y?`linear`:`radial`,x:Ei(_.x,v.x,h),y:Ei(_.y,v.y,h),colorStops:z(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:Ei(e.offset,n.offset,h),color:Pi(Di([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=Ei(_.x2,v.x2,h),e[s].y2=Ei(_.y2,v.y2,h)):e[s].r=Ei(_.r,v.r,h)}else if(c)Di(g,f[r],p[r],h),n||(e[s]=Pi(g));else{var b=Ei(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Ii?e[n]=e[n]+r:t===zi?(Kr(e[n],Gi),ki(Gi,Gi,r,1),e[n]=Pi(Gi)):t===Li?ki(e[n],e[n],r,1):t===Ri&&Ai(e[n],e[n],r,1)},e}(),qi=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){te(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ue(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Ni(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Ni(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ji=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?$i:Qi},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Kr(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ei(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},I(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(_e(e))for(var n=ue(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(ta,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===ta;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(re(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){te(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ha(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,_a(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=re(r,e),a=re(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var va=`__zr_style_`+Math.round(Math.random()*10),ya={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ba={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ya[va]=!0;var xa=[`z`,`z2`,`invisible`],Sa=[`invisible`],Ca=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ue(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Ma[0]=Aa(i)*n+e,Ma[1]=ka(i)*r+t,Na[0]=Aa(a)*n+e,Na[1]=ka(a)*r+t,l(s,Ma,Na),u(c,Ma,Na),i%=ja,i<0&&(i+=ja),a%=ja,a<0&&(a+=ja),i>a&&!o?a+=ja:ii&&(Pa[0]=Aa(p)*n+e,Pa[1]=ka(p)*r+t,l(s,Pa,s),u(c,Pa,c))}var Va={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Ha=[],Ua=[],Wa=[],Ga=[],Ka=[],qa=[],Ja=Math.min,Ya=Math.max,Xa=Math.cos,Za=Math.sin,Qa=Math.abs,$a=Math.PI,eo=$a*2,to=typeof Float32Array<`u`,no=[];function ro(e){return Math.round(e/$a*1e8)/1e8%2*$a}function io(e,t){var n=ro(e[0]);n<0&&(n+=eo);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=eo?i=n+eo:t&&n-i>=eo?i=n-eo:!t&&n>i?i=n+(eo-ro(n-i)):t&&n0&&(this._ux=Qa(n/Xi/e)||0,this._uy=Qa(n/Xi/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Va.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Qa(e-this._xi),r=Qa(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Va.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Va.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Va.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),no[0]=r,no[1]=i,io(no,a),r=no[0],i=no[1];var o=i-r;return this.addData(Va.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Xa(i)*n+e,this._yi=Za(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Va.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Va.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&to&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Wa[0]=Wa[1]=Ka[0]=Ka[1]=Number.MAX_VALUE,Ga[0]=Ga[1]=qa[0]=qa[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Qa(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Va.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=Sr(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Va.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=kr(i,a,y,b,h,g,10),i=h,a=g;break;case Va.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Xa(D)*T+C,s=Za(D)*E+w),m=Ya(T,E)*Ja(eo,Math.abs(O)),i=Xa(k)*T+C,a=Za(k)*E+w;break;case Va.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Va.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Va.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Va.L:u=n[x++],d=n[x++];var w=Qa(u-c),T=Qa(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Va.C:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++],M=n[x++],N=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;br(c,k,j,M,D,Ha),br(l,A,ee,N,D,Ua),e.bezierCurveTo(Ha[1],Ua[1],Ha[2],Ua[2],Ha[3],Ua[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,ee,M,N),c=M,l=N;break;case Va.Q:var k=n[x++],A=n[x++],j=n[x++],ee=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;Dr(c,k,j,D,Ha),Dr(l,A,ee,D,Ua),e.quadraticCurveTo(Ha[1],Ua[1],Ha[2],Ua[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,ee),c=j,l=ee;break;case Va.A:var te=n[x++],P=n[x++],F=n[x++],I=n[x++],ne=n[x++],L=n[x++],re=n[x++],ie=!n[x++],ae=F>I?F:I,oe=Qa(F-I)>.001,R=ne+L,z=!1;if(f){var E=p[g++];h+E>_&&(R=ne+L*(_-h)/E,z=!0),h+=E}if(oe&&e.ellipse?e.ellipse(te,P,F,I,re,ne,R,ie):e.arc(te,P,ae,ne,R,ie),z)break lo;C&&(o=Xa(ne)*F+te,s=Za(ne)*I+P),c=Xa(R)*F+te,l=Za(R)*I+P;break;case Va.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var se=n[x++],ce=n[x++];if(f){var E=p[g++];if(h+E>_){var le=_-h;e.moveTo(u,d),e.lineTo(u+Ja(le,se),d),le-=se,le>0&&e.lineTo(u+se,d+Ja(le,ce)),le-=ce,le>0&&e.lineTo(u+Ya(se-le,0),d+ce),le-=se,le>0&&e.lineTo(u,d+Ya(ce-le,0));break lo}h+=E}e.rect(u,d,se,ce);break;case Va.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Va,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function oo(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=fo);var f=Math.atan2(c,s);return f<0&&(f+=fo),f>=r&&f<=i||f+fo>=r&&f+fo<=i}function mo(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var ho=ao.CMD,go=Math.PI*2,_o=1e-4;function vo(e,t){return Math.abs(e-t)<_o}var yo=[-1,-1,-1],bo=[-1,-1];function xo(){var e=bo[0];bo[0]=bo[1],bo[1]=e}function So(e,t,n,r,i,a,o,s,c,l){if(l>t&&l>r&&l>a&&l>s||l1&&xo(),p=gr(t,r,a,s,bo[0]),f>1&&(m=gr(t,r,a,s,bo[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=Cr(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);yo[0]=-c,yo[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=go-1e-4){r=0,i=go;var u=a?1:-1;return o>=yo[0]+e&&o<=yo[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=go,i+=go);for(var f=0,p=0;p<2;p++){var m=yo[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=go+h),(h>=r&&h<=i||h+go>=r&&h+go<=i)&&(h>Math.PI/2&&h1&&(n||(s+=mo(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case ho.M:u=a[m++],d=a[m++],c=u,l=d;break;case ho.L:if(n){if(oo(c,l,a[m],a[m+1],t,r,i))return!0}else s+=mo(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.C:if(n){if(so(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=So(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.Q:if(n){if(co(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=Co(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case ho.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=mo(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(po(_,v,b,x,x+S,C,t,w,i))return!0}else s+=wo(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case ho.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(oo(u,d,f,d,t,r,i)||oo(f,d,f,p,t,r,i)||oo(f,p,u,p,t,r,i)||oo(u,p,u,d,t,r,i))return!0}else s+=mo(f,d,f,p,r,i),s+=mo(u,p,u,d,r,i);break;case ho.Z:if(n){if(oo(c,l,u,d,t,r,i))return!0}else s+=mo(c,l,u,d,r,i);c=u,l=d}}return!n&&!vo(l,d)&&(s+=mo(c,l,u,d,r,i)||0),s!==0}function Eo(e,t,n){return To(e,0,!1,t,n)}function Do(e,t,n,r){return To(e,t,!0,n,r)}var Oo=L({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ya),ko={style:L({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ba.style)},Ao=nr.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),jo=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Qi:t>.2?ea:$i}if(e)return $i}return Qi},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(V(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==ti(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new ao(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),Do(a,o/s,e,t)))return!0}if(this.hasFill())return Eo(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:I(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return ze(Oo,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=I({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=I({},r.shape),I(c,n.shape)):(c=I({},i?this.shape:r.shape),I(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=I({},this.shape);for(var l={},u=ue(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var zo=Math.round;function Bo(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(zo(r*2)===zo(i*2)&&(e.x1=e.x2=Ho(r,s,!0)),zo(a*2)===zo(o*2)&&(e.y1=e.y2=Ho(a,s,!0)),e):e}}function Vo(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Ho(r,s,!0),e.y=Ho(i,s,!0),e.width=Math.max(Ho(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Ho(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Ho(e,t,n){if(!t)return e;var r=zo(e*2);return(r+zo(t))%2==0?r/2:(r+(n?1:-1))/2}var Uo=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Wo={},Go=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Uo},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Vo(Wo,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Ro(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(jo);Go.prototype.type=`rect`;var Ko={fill:`#000`},qo=2,Jo={},Yo={style:L({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ba.style)},Xo=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Ko,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ls(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=ss(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(No),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=os(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=as(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=qo,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=Te(s.opacity,t.opacity,1),ts(p,s),y&&(p.lineWidth=Te(s.lineWidth,t.lineWidth,g),p.lineDash=we(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Gn(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(Go),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=we(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Lo),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=we(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=Te(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return ns(e)&&(t=[e.fontStyle,e.fontWeight,es(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&ke(t)||e.textFont||e.font},t}(Ca),Zo={left:!0,right:1,center:1},Qo={top:1,bottom:1,middle:1},$o=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function es(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function ts(e,t){for(var n=0;n<$o.length;n++){var r=$o[n],i=t[r];i!=null&&(e[r]=i)}}function ns(e){return e.fontSize!=null||e.fontFamily||e.fontWeight}function rs(e){return is(e),R(e.rich,is),e}function is(e){if(e){e.font=Xo.makeFont(e);var t=e.align;t===`middle`&&(t=`center`),e.align=t==null||Zo[t]?t:`left`;var n=e.verticalAlign;n===`center`&&(n=`middle`),e.verticalAlign=n==null||Qo[n]?n:`top`,e.padding&&=De(e.padding)}}function as(e,t){return e==null||t<=0||e===`transparent`||e===`none`?null:e.image||e.colorStops?`#000`:e}function os(e){return e==null||e===`none`?null:e.image||e.colorStops?`#000`:e}function ss(e,t,n){return t===`right`?e-n[1]:t===`center`?e+n[3]/2-n[1]/2:e+n[3]}function cs(e){var t=e.text;return t!=null&&(t+=``),t}function ls(e){return!!(e.backgroundColor||e.lineHeight||e.borderWidth&&e.borderColor)}var us=1e-4,ds=20;function fs(e){return e.replace(/^\s+|\s+$/g,``)}var ps=Math.min,ms=Math.max,hs=Math.abs,gs=Math.round,_s=Math.floor,vs=Math.ceil,ys=Math.pow,bs=Math.log,xs=Math.LN10,Ss=Math.PI,Cs=Math.random;function ws(e,t,n,r){var i=t[0],a=t[1],o=n[0],s=n[1],c=a-i,l=s-o;if(c===0)return l===0?o:(o+s)/2;if(r){if(c>0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var Ts=Es;function Es(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return Ds(e,t,n)}function Ds(e,t,n){return V(e)?Os(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Os(e){return!!fs(e).match(/%$/)}function ks(e,t,n){return isNaN(t)?n?``+e:+e:(t=ps(ms(0,t),ds),e=(+e).toFixed(t),n?e:+e)}function As(e){return e.sort(function(e,t){return e-t}),e}function js(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(gs(e*t)/t===e)return n}return Ms(e)}function Ms(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ms(0,(a<0?0:i-1-a)-r)}function Ns(e,t,n){var r=hs(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=bs(2*hs(n||1)*hs(r))/xs,a=bs(hs(t))/xs,o=ms(0,vs(-i+a));return isFinite(o)||(o=NaN),o}function Ps(e,t){var n=ms(js(e),js(t)),r=e+t;return n>ds?r:ks(r,n)}var Fs=ys(2,53)-1;function Is(e){var t=Ss*2;return(e%t+t)%t}function Ls(e){return e>-us&&e=10&&t++,t}function Hs(e,t){var n=Vs(e),r=ys(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,ks(e,-n)}function Us(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Lc(){return[1/0,-1/0]}function Rc(e,t){Hc(t)&&(te[1]&&(e[1]=t))}function zc(e,t){Hc(t)&&te[1]&&(e[1]=t)}function Vc(e,t){Uc(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Hc(e){return e!=null&&isFinite(e)}function Uc(e,t){return Hc(e)&&Hc(t)&&e<=t}function Wc(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Gc(e){Uc(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Kc(){var e=`__ec_once_`+qc++;return function(t,n){Be(t,e)||(t[e]=1,n())}}var qc=Ks();function Jc(e,t,n){var r=Le(),i=0;R(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Yc(e){return e.value+``}function Xc(e){return e+``}function Zc(e,t){return we(t,!0)?e.seriesIndex+2:0}function Qc(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function $c(e){return{overallReset:e}}var el=Ec(),tl=function(e,t,n,r){if(r){var i=el(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=el(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},nl=Le([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),rl=`original`,il=`arrayRows`,al=`objectRows`,ol=`keyedColumns`,sl=`typedArray`,cl=`unknown`,ll=`column`,ul=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],dl=function(){function e(e){R(ul,function(t){this[t]=fe(e[t],e)},this)}return e}();function fl(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var pl=1,ml={},hl=Ec(),gl=Ec(),_l=[`emphasis`,`blur`,`select`],vl=[`normal`,`emphasis`,`blur`,`select`],yl=`highlight`,bl=`downplay`,xl=`select`,Sl=`unselect`,Cl=`toggleSelect`,wl=`selectchanged`;function Tl(e){return e!=null&&e!==`none`}function El(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Dl(e){El(e,`emphasis`,2)}function Ol(e){e.hoverState===2&&El(e,`normal`,0)}function kl(e){El(e,`blur`,1)}function Al(e){e.hoverState===1&&El(e,`normal`,0)}function jl(e){e.selected=!0}function Ml(e){e.selected=!1}function Nl(e,t,n){t(e,n)}function Pl(e,t,n){Nl(e,t,n),e.isGroup&&e.traverse(function(e){Nl(e,t,n)})}function Fl(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Il(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof jo){var o=hl(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Tl(s)||Tl(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=I({},r),l=I({},l),l.fill=s):!Tl(l.fill)&&Tl(s)?(a=!0,r=I({},r),l=I({},l),l.fill=ri(s)):!Tl(l.stroke)&&Tl(c)&&(a||(r=I({},r),l=I({},l)),l.stroke=ri(c)),r.style=l}}if(r&&r.z2==null){a||(r=I({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Rl(e,t,n){if(n&&n.z2==null){n=I({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function zl(e,t,n){var r=re(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Il(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=I({},n),o=I({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Bl(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Ll(this,e,t,n);if(e===`blur`)return zl(this,e,n);if(e===`select`)return Rl(this,e,n)}return n}function Vl(e){e.stateProxy=Bl;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Bl),n&&(n.stateProxy=Bl)}function Hl(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Dl)}function Ul(e,t){!Xl(e,t)&&!e.__highByOuter&&Pl(e,Ol)}function Wl(e,t){e.__highByOuter|=1<<(t||0),Pl(e,Dl)}function Gl(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Pl(e,Ol)}function Kl(e){Pl(e,kl)}function ql(e){Pl(e,Al)}function Jl(e){Pl(e,jl)}function Yl(e){Pl(e,Ml)}function Xl(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Zl(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=gl(i),o=fl(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Al(e)}),s&&n.push(i)),a.isBlured=!1}),R(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Ql(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function su(e,t,n){mu(e,!0),Pl(e,Vl),uu(e,t,n)}function cu(e){mu(e,!1)}function lu(e,t,n,r){r?cu(e):su(e,t,n)}function uu(e,t,n){var r=el(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var du=[`emphasis`,`blur`,`select`],fu={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function pu(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Tu(m),s*=Tu(m));var h=(i===a?-1:1)*Tu((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Du(d)*g-Eu(d)*_,y=(t+r)/2+Eu(d)*g+Du(d)*_,b=ju([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=ju(x,S);if(Au(x,S)<=-1&&(C=Ou),Au(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Ou*1e6)/1e6;C=Ou*2+w%2*Ou}u.addData(l,v,y,o,s,b,C,d,a)}var Nu=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Pu=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Fu(e){var t=new ao;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=ao.CMD,c=e.match(Nu);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=re(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=re(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function od(e){var t;if(B(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function sd(e,t){var n,r=td(t.r,0),i=td(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=$u(c-s),p=f>Ju&&f%Ju;if(p>rd&&(f=p),!(r>rd))e.moveTo(l,u);else if(f>Ju-rd)e.moveTo(l+r*Xu(s),u+r*Yu(s)),e.arc(l,u,r,s,c,!d),i>rd&&(e.moveTo(l+i*Xu(c),u+i*Yu(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Xu(s),j=r*Yu(s),ee=i*Xu(c),M=i*Yu(c),N=f>rd;if(N){var te=t.cornerRadius;te&&(n=od(te),m=n[0],h=n[1],g=n[2],_=n[3]);var P=$u(r-i)/2;if(v=nd(P,g),y=nd(P,_),b=nd(P,m),x=nd(P,h),w=S=td(v,y),T=C=td(b,x),(S>rd||C>rd)&&(E=r*Xu(c),D=r*Yu(c),O=i*Xu(s),k=i*Yu(s),frd){var oe=nd(g,w),R=nd(_,w),z=ad(O,k,A,j,r,oe,d),se=ad(E,D,ee,M,r,R,d);e.moveTo(l+z.cx+z.x0,u+z.cy+z.y0),w0&&e.arc(l+z.cx,u+z.cy,oe,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,r,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),!d),R>0&&e.arc(l+se.cx,u+se.cy,R,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>rd)||!N)e.lineTo(l+ee,u+M);else if(T>rd){var oe=nd(m,T),R=nd(h,T),z=ad(ee,M,E,D,i,-R,d),se=ad(A,j,O,k,i,-oe,d);e.lineTo(l+z.cx+z.x0,u+z.cy+z.y0),T0&&e.arc(l+z.cx,u+z.cy,R,Qu(z.y0,z.x0),Qu(z.y1,z.x1),!d),e.arc(l,u,i,Qu(z.cy+z.y1,z.cx+z.x1),Qu(se.cy+se.y1,se.cx+se.x1),d),oe>0&&e.arc(l+se.cx,u+se.cy,oe,Qu(se.y1,se.x1),Qu(se.y0,se.x0),!d))}else e.lineTo(l+ee,u+M),e.arc(l,u,i,c,s,d)}e.closePath()}}}var cd=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),ld=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new cd},t.prototype.buildPath=function(e,t){sd(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(jo);ld.prototype.type=`sector`;var ud=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),dd=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ud},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(jo);dd.prototype.type=`ring`;function fd(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=fd(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sFd[1]){if(i=!1,Id.negativeSize||n)return i;var s=Nd(Fd[0]-Pd[1]),c=Nd(Pd[0]-Fd[1]);jd(s,c)>Rd.len()&&(s=c||!Id.bidirectional)&&(Vt.scale(Ld,o,-c*r),Id.useDir&&Id.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function Gd(e,t,n,r,i,a){Wd(`update`,e,t,n,r,i,a)}function Kd(e,t,n,r,i,a){Wd(`enter`,e,t,n,r,i,a)}function qd(e){if(!e.__zr)return!0;for(var t=0;tEd,BezierCurve:()=>wd,BoundingRect:()=>tn,Circle:()=>Wu,CompoundPath:()=>Dd,Ellipse:()=>Ku,Group:()=>Hu,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Lo,IncrementalDisplayable:()=>Vd,Line:()=>bd,LinearGradient:()=>kd,OrientedBoundingRect:()=>zd,Path:()=>jo,Point:()=>Vt,Polygon:()=>hd,Polyline:()=>_d,RadialGradient:()=>Ad,Rect:()=>Go,Ring:()=>dd,Sector:()=>ld,Text:()=>Xo,WH:()=>tf,XY:()=>ef,applyTransform:()=>_f,calcZ2Range:()=>Bf,clipPointsByRect:()=>Sf,clipRectByRect:()=>Cf,createIcon:()=>wf,decomposeTransform:()=>Wf,ensureCopyRect:()=>Lf,ensureCopyTransform:()=>Rf,expandOrShrinkRect:()=>kf,extendPath:()=>af,extendShape:()=>nf,getCurrentCanvasPainter:()=>Kf,getShapeClass:()=>sf,getTransform:()=>gf,groupTransition:()=>xf,initProps:()=>Kd,isBoundingRectAxisAligned:()=>Ff,isElementRemoved:()=>qd,lineLineIntersect:()=>Ef,linePolygonIntersect:()=>Tf,makeImage:()=>lf,makePath:()=>cf,mergePath:()=>df,payloadDisableAnimation:()=>Uf,registerShape:()=>of,removeElement:()=>Jd,removeElementWithFadeOut:()=>Xd,resizePath:()=>ff,retrieveZInfo:()=>zf,setTooltipConfig:()=>Mf,subPixelOptimize:()=>hf,subPixelOptimizeLine:()=>pf,subPixelOptimizeRect:()=>mf,transformDirection:()=>vf,traverseElements:()=>Pf,traverseUpdateZ:()=>Vf,updateProps:()=>Gd}),$d={},ef=[`x`,`y`],tf=[`width`,`height`];function nf(e){return jo.extend(e)}var rf=Bu;function af(e,t){return rf(e,t)}function of(e,t){$d[e]=t}function sf(e){if($d.hasOwnProperty(e))return $d[e]}function cf(e,t,n,r){var i=zu(e,t);return n&&(r===`center`&&(n=uf(n,i.getBoundingRect())),ff(i,n)),i}function lf(e,t,n){var r=new Lo({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(uf(t,i))}}});return r}function uf(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var df=Vu;function ff(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function pf(e,t){return Bo(e,e,{lineWidth:t}),e}function mf(e,t){return Vo(e,e,t),e}var hf=Ho;function gf(e,t){for(var n=vt([]);e&&e!==t;)bt(n,e.getLocalTransform(),n),e=e.parent;return n}function _f(e,t,n){return t&&!oe(t)&&(t=er.getLocalTransform(t)),n&&(t=wt([],t)),Rt([],e,t)}function vf(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:hs(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:hs(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=_f(a,t,n),hs(a[0])>hs(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function yf(e){return!e.isGroup}function bf(e){return e.shape!=null}function xf(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){yf(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return bf(e)&&(t.shape=P(e.shape)),t}var a=r(e);t.traverse(function(e){if(yf(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),Gd(e,r,n,el(e).dataIndex)}}})}function Sf(e,t){return z(e,function(e){var n=e[0];n=ms(n,t.x),n=ps(n,t.x+t.width);var r=e[1];return r=ms(r,t.y),r=ps(r,t.y+t.height),[n,r]})}function Cf(e,t){var n=ms(e.x,t.x),r=ps(e.x+e.width,t.x+t.width),i=ms(e.y,t.y),a=ps(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function wf(e,t,n){var r=I({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),L(i,n),new Lo(r)):cf(e.replace(`path://`,``),r,n,`center`)}function Tf(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=Df(p,m,u,d)/f;return!(g<0||g>1)}function Df(e,t,n,r){return e*r-n*t}function Of(e){return e<=1e-6&&e>=-1e-6}function kf(e,t,n,r,i){return t==null?e:(ge(t)?Af[0]=Af[1]=Af[2]=Af[3]=t:(Af[0]=t[0],Af[1]=t[1],Af[2]=t[2],Af[3]=t[3]),r&&(Af[0]=ms(0,Af[0]),Af[1]=ms(0,Af[1]),Af[2]=ms(0,Af[2]),Af[3]=ms(0,Af[3])),n&&(Af[0]=-Af[0],Af[1]=-Af[1],Af[2]=-Af[2],Af[3]=-Af[3]),jf(e,Af,`x`,`width`,3,1,i&&i[0]||0),jf(e,Af,`y`,`height`,0,2,i&&i[1]||0),e)}var Af=[0,0,0,0];function jf(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ms(0,ps(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:hs(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Mf(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=V(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&R(ue(c),function(e){Be(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=el(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:L({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Nf(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Pf(e,t){if(e){if(B(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Vf(e,t,n){Hf(e,t,n,-1/0)}function Hf(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Kp=(e={},e[il+`_`+ll]={pure:!0,appendData:i},e[il+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[al]={pure:!0,appendData:i},e[ol]={pure:!0,appendData:function(e){var t=this._data;R(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[rl]={appendData:i},e[sl]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){ge(t)||tc(``),this._opFn=pm[e],this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){return ge(e)?this._opFn(e,this._rvalFloat):this._opFn(Ws(e),this._rvalFloat)},e})();var mm=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=ge(e)?e:Ws(e),r=ge(t)?t:Ws(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=V(e),s=V(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ws(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ws(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function hm(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function gm(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,vm=typeof Uint16Array>`u`?Array:Uint16Array,ym=typeof Int32Array>`u`?Array:Int32Array,bm=typeof Float64Array>`u`?Array:Float64Array,xm={float:bm,int:ym,ordinal:Array,number:Array,time:bm},Sm;function Cm(e){return e>65535?_m:vm}function wm(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function Tm(e,t,n,r,i){var a=xm[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=z(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Cm(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return fm(e[r],this._dimensions[r])}Sm={arrayRows:e,objectRows:function(e,t,n,r){return fm(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return fm(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Dm=Ec(),Om={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},km=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Mm(this.source))},e.prototype.getSourceDimensionIndex=function(e){return we(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Vp(this.source),n=!Nm(e),r=``,i=[],a=0,o=0;a30}var Pm=_e,Fm=z,Im=typeof Int32Array>`u`?Array:Int32Array,Lm=`e\0\0`,Rm=-1,zm=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Bm=[`_approximateExtent`],Vm,Hm,Um,Wm,Gm,Km,qm,Jm=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Am(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),B(i)?i=i.slice():Pm(i)&&(i=I({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Pm(t)?I(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Pm(e)?I(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?I(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){tl(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){R(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Fm(this.dimensions,this._getDimInfo,this),this.hostModel),Gm(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];me(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(Ee(arguments)))})},e.internalField=function(){Vm=function(e){var t=e._invertedIndicesMap;R(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Im(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Ym(e,t){Mp(e)||(e=Pp(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=Le(),a=[],o=Xm(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Nm(o),c=r===e.dimensionsDefine,l=c?Mm(e):jm(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=Le(u),f=new ym(o),p=0;p0&&(e.name+=t-1)}),new km({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Xm(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return R(t,function(e){var t;_e(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Zm(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Qm={},$m={},eh=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Qm,!0),this._normalMasterList=n($m,!1);function n(n,r){var i=[];return R(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){R(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Qm[e]=t;return}$m[e]=t},e.get=function(e){return $m[e]||Qm[e]},e}();function th(e){return!!Qm[e]}var nh=Le();function rh(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=nh.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function ih(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!th(n)&&(i=0))}return{coordSysType:n,kind:i}}function ah(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=ih(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var oh=function(){function e(e){this.coordSysDims=[],this.axisMap=Le(),this.categoryAxisMap=Le(),this.coordSysName=e}return e}();function sh(e){var t=e.get(`coordinateSystem`),n=new oh(t),r=ch[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ch={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Ac).models[0],a=e.getReferringComponents(`yAxis`,Ac).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),lh(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),lh(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Ac).models[0];t.coordSysDims=[`single`],n.set(`single`,i),lh(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Ac).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),lh(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),lh(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();R(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),lh(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Ac).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function lh(e){return e.get(`type`)===`category`}function uh(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;dh(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(R(a,function(e,t){V(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),R(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;R(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function dh(e){return!Am(e.schema)}function fh(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function ph(e,t){return fh(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function mh(e,t){var n=e.get(`coordinateSystem`),r=eh.get(n),i;return t&&t.coordSysDims&&(i=z(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=lm(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function hh(e,t,n){var r,i;return n&&R(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function gh(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=Pp(e)):(i=r.getSource(),a=i.sourceFormat===rl);var o=sh(t),s=mh(t,o),c=n.useEncodeDefaulter,l=me(c)?c:c?pe(Ep,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Ym(i,u),f=hh(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=uh(t,{schema:d,store:p}),h=new Jm(d,t);h.setCalculationInfo(m);var g=f!=null&&_h(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function _h(e){if(e.sourceFormat===`original`)return!B(cc(vh(e.data||[])))}function vh(e){for(var t=0;t=0&&n.push(e)}),n}}function Ch(e,t){return F(F({},e,!0),t,!0)}var wh=Math.log(2);function Th(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){R(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Nh(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Eh(s,o):Eh(o,s))}function Ph(e){return e.nodeName.toUpperCase()===`CANVAS`}var Fh=/([&<>"'])/g,Ih={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Lh(e){return e==null?``:(e+``).replace(Fh,function(e,t){return Ih[t]})}var Rh={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},zh={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Bh=`ZH`,Vh=`EN`,Hh=Vh,Uh={},Wh={},Gh=We.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Hh).toUpperCase().indexOf(Bh)>-1?Bh:Hh}():Hh;function Kh(e,t){e=e.toUpperCase(),Wh[e]=new yp(t),Uh[e]=t}function tee(e){if(V(e)){var t=Uh[e.toUpperCase()]||{};return e===Bh||e===Vh?P(t):F(P(t),P(Uh[Hh]),!1)}return F(P(e),P(Uh[Hh]),!1)}function nee(e){return Wh[e]}function ree(){return Wh[Hh]}Kh(Vh,Rh),Kh(Bh,zh);var iee=null;function qh(){return iee}function Jh(e,t){var n=qh(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Yh(e){var t=e.brk;return t?t.breaks:[]}function Xh(e){var t=e.brk;return t?t.hasBreaks():!1}var Zh=1e3,Qh=Zh*60,$h=Qh*60,eg=$h*24,tg=eg*365,aee={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},ng={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},oee=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,rg=`{yyyy}-{MM}-{dd}`,ig={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:rg,hour:rg+` `+ng.hour,minute:rg+` `+ng.minute,second:rg+` `+ng.second,millisecond:oee},ag=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],see=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function cee(e){return!V(e)&&!me(e)?lee(e):e}function lee(e){e||={};var t={},n=!0;return R(ag,function(t){n&&=e[t]==null}),R(ag,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=ag[s],l=_e(a)&&!B(a)?a[c]:a,u=void 0;B(l)?(u=l.slice(),o=u[0]||``):V(l)?(o=l,u=[o]):(o==null?o=ng[r]:aee[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function og(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function sg(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function uee(e){return e===sg(e)}function cg(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function lg(e,t,n,r){var i=zs(e),a=i[pg(n)](),o=i[mg(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[hg(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[gg(n)](),d=(u-1)%12+1,f=i[_g(n)](),p=i[vg(n)](),m=i[yg(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof yp?r:nee(r||Gh)||ree()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,og(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,og(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,og(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,og(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,og(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,og(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,og(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,og(m,3)).replace(/{S}/g,m+``)}function ug(e,t,n,r,i){var a=null;if(V(n))a=n;else if(me(n)){var o={time:e.time,level:e.time?e.time.level:0},s=qh();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=dg(e.value,i);a=n[u][u][0]}}return lg(new Date(e.value),a,i,r)}function dg(e,t){var n=zs(e),r=n[mg(t)]()+1,i=n[hg(t)](),a=n[gg(t)](),o=n[_g(t)](),s=n[vg(t)](),c=n[yg(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function fg(e,t,n){switch(t){case`year`:e[xg(n)](0);case`month`:e[Sg(n)](1);case`day`:e[Cg(n)](0);case`hour`:e[wg(n)](0);case`minute`:e[Tg(n)](0);case`second`:e[Eg(n)](0)}return e}function pg(e){return e?`getUTCFullYear`:`getFullYear`}function mg(e){return e?`getUTCMonth`:`getMonth`}function hg(e){return e?`getUTCDate`:`getDate`}function gg(e){return e?`getUTCHours`:`getHours`}function _g(e){return e?`getUTCMinutes`:`getMinutes`}function vg(e){return e?`getUTCSeconds`:`getSeconds`}function yg(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function bg(e){return e?`setUTCFullYear`:`setFullYear`}function xg(e){return e?`setUTCMonth`:`setMonth`}function Sg(e){return e?`setUTCDate`:`setDate`}function Cg(e){return e?`setUTCHours`:`setHours`}function wg(e){return e?`setUTCMinutes`:`setMinutes`}function Tg(e){return e?`setUTCSeconds`:`setSeconds`}function Eg(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function Dg(e){if(!Gs(e))return V(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function Og(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var kg=De;function Ag(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&ke(e)?e:`-`}function a(e){return Ys(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?zs(e):e;if(!isNaN(+c))return lg(c,r,n);if(s)return`-`}if(t===`ordinal`)return he(e)?i(e):ge(e)&&a(e)?e+``:`-`;var l=Ws(e);return a(l)?Dg(l):he(e)?i(e):typeof e==`boolean`?e+``:`-`}var jg=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],Mg=function(e,t){return`{`+e+(t??``)+`}`};function Ng(e,t,n){B(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function Fg(e,t){return t||=`transparent`,V(e)?e:_e(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var Ig=R,Lg=[`left`,`right`,`top`,`bottom`,`width`,`height`],Rg=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function zg(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var Bg=zg;pe(zg,`vertical`),pe(zg,`horizontal`);function Vg(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function Hg(e,t,n){n=kg(n||0);var r=t.width,i=t.height,a=Ts(e.left,r),o=Ts(e.top,i),s=Ts(e.right,r),c=Ts(e.bottom,i),l=Ts(e.width,r),u=Ts(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new tn((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}var Ug={rect:1,point:2};function Wg(e,t,n){var r,i,a,o=e.boxCoordinateSystem,s;if(o){var c=rh(e),l=c.coord,u=c.from;if(o.dataToLayout){a=Ug.rect,s=u;var d=o.dataToLayout(l);r=d.contentRect||d.rect}else n&&n.enableLayoutOnlyByCenter&&o.dataToPoint&&(a=Ug.point,s=u,i=o.dataToPoint(l))}return a??=Ug.rect,a===Ug.rect&&(r||={x:0,y:0,width:t.getWidth(),height:t.getHeight()},i=[r.x+r.width/2,r.y+r.height/2]),{type:a,refContainer:r,refPoint:i,boxCoordFrom:s}}function Gg(e,t,n,r,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],c=i&&i.boundingMode||`all`;if(a||=e,a.x=e.x,a.y=e.y,!o&&!s)return!1;var l;if(c===`raw`)l=e.type===`group`?new tn(0,0,+t.width||0,+t.height||0):e.getBoundingRect();else if(l=e.getBoundingRect(),e.needLocalTransform()){var u=e.getLocalTransform();l=l.clone(),l.applyTransform(u)}var d=Hg(L({width:l.width,height:l.height},t),n,r),f=o?d.x-l.x:0,p=s?d.y-l.y:0;return c===`raw`?(a.x=f,a.y=p):(a.x+=f,a.y+=p),a===e&&e.markRedraw(),!0}function Kg(e){var t=e.layoutMode||e.constructor.layoutMode;return _e(t)?t:t?{type:t}:null}function qg(e,t,n){var r=n&&n.ignoreSize;!B(r)&&(r=[r,r]);var i=o(Rg[0],0),a=o(Rg[1],1);c(Rg[0],e,i),c(Rg[1],e,a);function o(n,i){var a={},o=0,c={},l=0,u=2;if(Ig(n,function(t){c[t]=e[t]}),Ig(n,function(e){Be(t,e)&&(a[e]=c[e]=t[e]),s(a,e)&&o++,s(c,e)&&l++}),r[i])return s(t,n[1])?c[n[2]]=null:s(t,n[2])&&(c[n[1]]=null),c;if(l===u||!o)return c;if(o>=u)return a;for(var d=0;d=0;o--)a=F(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return jc(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return Vg(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(yp);et(Zg,yp),at(Zg),xh(Zg),Sh(Zg,Qg);function Qg(e){var t=[];return R(Zg.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=z(t,function(e){return Ye(e).main}),e!==`dataset`&&re(t,`dataset`)<=0&&t.unshift(`dataset`),t}var $g=Ec(),e_=Ec(),t_=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=ac(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return i_(this,$g,r,i,e,t,n)},e.prototype.clearColorPalette=function(){a_(this,$g)},e}();function n_(e,t,n,r){return i_(e,e_,ac(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function r_(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function i_(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:r_(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function a_(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var o_=/\{@(.+?)\}/g,s_=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&B(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),me(i))return s.status=t,s.dimensionIndex=r,i(s);if(V(i))return Ng(i,s).replace(o_,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=am(o,e,i);if(a&&B(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return am(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function c_(e){var t,n;return _e(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function l_(e){return new u_(e)}var u_=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(w_(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=ye(o)?sl:rl,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=we(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=we(u.sourceHeader,d.sourceHeader),m=we(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Np(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Np(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&T_(``);var i,a=[],o=[];return R(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&T_(``),a.push(t),o.push(e._getVersionSign())}),n?i=b_(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Fp(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=D_(e);n>=t&&(t=n+ +(r&&(!n||T_(e)&&!e.noHeader)))}),t}return 0}function See(e,t,n,r){var i=t.noHeader,a=wee(D_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new hm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=E_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):k_(r,o.join(``),i?n:a.html);if(i)return d;var f=Eg(t.header,`ordinal`,e.useUTC),p=S_(r,e.renderMode).nameStyle,m=x_(r);return e.renderMode===`richText`?A_(e,f,p)+a.richText+d:k_(r,`
`+Oh(f)+`
`+d,n)}function Cee(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return Eg(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||g_.color.secondary,i),f=a?``:Eg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=S_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:A_(e,f,v))+(o?``:Dee(e,m,h,g,y)):k_(r,(s?``:d)+(a?``:Tee(f,!s,v))+(o?``:Eee(m,h,g,y)),n)}}function O_(e,t,n,r,i,a){if(e)return E_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function wee(e){return{html:C_[e],richText:xee[e]}}function k_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=x_(e);return`
`+t+r+`
`}function Tee(e,t,n){var r=t?`margin-left:2px`:``;return``+Oh(e)+``}function Eee(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return Oh(e)}).join(`  `)+``}function A_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function Dee(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function Oee(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return jg(n)}function j_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var M_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ks()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Ag({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function kee(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=Oee(t,n),u,d,f,p;if(o>1||c&&!o){var m=Aee(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=om(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=bc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return w_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[w_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function Aee(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(om(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(w_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var N_=Ec();function P_(e,t){return e.getName(t)||e.getId(t)}var F_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=$g({count:Mee,reset:Nee}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(N_(this).sourceManager=new p_(this)).prepareSource();var r=this.getInitialData(e,n);L_(r,this),this.dataTask.context.data=r,N_(this).dataBeforeProcessed=r,I_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Bg(this),r=n?Hg(e):{},i=this.subType;Ug.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),oc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Vg(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Bg(this);n&&Vg(this.option,e,n);var r=N_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);L_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,N_(this).dataBeforeProcessed=i,I_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return kee({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Gg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[P_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Ug.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Ug);ae(F_,Zg),ae(F_,Gg),et(F_,Ug);function I_(e){var t=e.name;bc(e)||(e.name=jee(e)||t)}function jee(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function Mee(e){return e.model.getRawData().count()}function Nee(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Pee}function Pee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function L_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(Fee,t))})}function Fee(e,t){var n=R_(e);return n&&n.setOutputEnd((t||this).count()),t}function R_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Iee=jo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Lee={line:bd,rect:Go,roundRect:Go,square:Go,circle:Wu,diamond:jo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:jo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:jo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Iee},Ree={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},z_={};R(Lee,function(e,t){z_[t]=new e});var zee=jo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=z_[r];i||=(r=`rect`,z_[r]),Ree[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Bee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||g_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function B_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?lf(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new zee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Bee,a&&c.setColor(a),c}function Vee(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function V_(e,t){if(e!=null)return B(e)||(e=[e,e]),[Ts(e[0],t[0])||0,Ts(we(e[1],e[0]),t[1])||0]}var Hee=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return ph(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Hu,n=B_(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=B_(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=g_.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(F_);function H_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=om(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var U_=function(e){p(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=B_(e,-1,-1,2,2,null,a);o.attr({z2:we(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Wee,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Wl(this.childAt(0))},t.prototype.downplay=function(){Gl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Gd(f,p,o,n),Zd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Kd(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Zf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=V_(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Lo){var S=a.style;a.useStyle(I({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(I({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Xf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):H_(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),lu(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=el(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Vee(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Hu);function Wee(e,t){this.parent.drift(e,t)}function W_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function G_(e){return e!=null&&!_e(e)&&(e={isIgnore:e}),e||{}}function K_(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Zf(t),cursorStyle:t.get(`cursor`)}}function q_(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Gee=function(){function e(e){this.group=new Hu,this._SymbolCtor=e||U_}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=G_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=K_(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);W_(e,i,r,t)&&q_(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!W_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Gd(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Y_(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function X_(e,t){return!isFinite(e)||!isFinite(t)}var qee=typeof Float32Array<`u`?Float32Array:void 0;function Z_(e){return Q_({ctor:qee},e).arr}function Q_(e,t){var n=e.arr,r=e.ctor;if(t>Fs&&(t=Fs),!n||e.typed&&n.length=i||h<0)break;if(X_(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||X_(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=tv(O,nv(S,_)),k=tv(k,nv(C,v)),O=nv(O,tv(S,_)),k=nv(k,tv(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=tv(p,nv(l,_)),m=tv(m,nv(u,v)),p=nv(p,tv(l,_)),m=nv(m,tv(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var iv=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),av=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:g_.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new iv},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&X_(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?vr(i,u,f,m,e,s):vr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?gr(a,d,p,h,b):gr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(jo),ov=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(iv),sv=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new ov},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&X_(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Fv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Fv(r,e,t,n)},freeze:function(){}};function Fv(e,t,n,r){Uc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Iv(e){return Lv(e)||zv(e)}function Lv(e){return e.type===`interval`}function Rv(e){return e.type===`time`}function zv(e){return e.type===`log`}function Bv(e){return e.type===`ordinal`}function Vv(e){var t=Vs(e),n=ys(10,t),r=gs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ks(r*n,-t)}function Hv(e){return js(e)+2}function Uv(e,t){return bs(e)/bs(t)}function Wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Yv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new Cv({}),B(i)&&(i=new Cv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=Ev(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Ov(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=gs(e),e},t.prototype.getTicks=function(){var e=[];return Jv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ps(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ps(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ks(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ks(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?ks(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Xv(this,e,Vh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=js(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Cg(ks(e.value,n,!0))},t.type=`interval`,t}(xv);xv.registerClass(Zv);var Qv=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ry(e){var t=30*Kh;return e/=t,e>6?6:e>3?3:e>2?2:1}function iy(e){return e/=Gh,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function ay(e,t){return e/=t?Wh:Uh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function oy(e){return ms(Hs(e,!0),1)}function sy(e,t,n){var r=Math.max(0,re(Qh,t)-1);return cg(new Date(e),Qh[r],n).getTime()}function cy(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function ly(e,t,n,r,i,a){var o=$h,s=0;function c(e,t,n,i,o,c,l){for(var u=cy(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ty(rg(e),r[0],r[1],n)){s&&(i=[{value:sy(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=ey.length,l=Math.min(Qv(ey,a,0,c),c-1),u=ey[l][1],d=ey[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};xv.registerClass($v);var dy=0,fy=1,py=2,my=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Zv.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[dy]=i[fy]=a[dy]=a[fy]=NaN,Dv(r,t.mapperMethods);var s=zh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},py,l),r.powStub=new Zv({breakParsed:l.original}),r.intervalStub=new Zv({breakParsed:l.transformed}),Ov(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=zh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=Wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Vh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Xv(this,e,Vh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Uv(e,this.base))},scale:function(e){return Wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Uv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return hy.depth=n,gy.lookup=this._lookup,Wv(n===2?e:this.intervalStub.transformOut(e,hy),this.base,gy)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Uc(t,n)||t<=0||n<=0)){var r=_y,i=_y;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[dy]=t,r[fy]=n);var o=this.base;this.intervalStub.setExtent2(e,i[dy]=Uv(t,o),i[fy]=Uv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Uc(t[0],t[1])&&Ys(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(xv);xv.registerClass(my);var hy={},gy={},_y=[],vy={value:1,category:1,time:1,log:1},yy=Ec();function by(e){var t=e.get(`type`);return(t==null||!Be(vy,t)&&!xv.getClass(t))&&(t=`value`),t}function xy(e,t,n){var r=zh(),i;switch(r&&(i=My(e,t,n)),t){case`category`:return new Yv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Lc()});case`time`:return new $v({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new my({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Zv({breakOption:i});default:return new((xv.getClass(t))||Zv)({})}}function Sy(e,t,n){var r=n?Av(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Uc(i,a)?i===t||a===t?2:it?1:3:3}function Cy(e){yy(e).noOnMyZero=!0}function wy(e){return yy(e).noOnMyZero}function Ty(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=eg(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(Ey(e,n),n.value-e.scale.getExtent()[0],null)};var r=zh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Ey(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Ey(e,t){var n=e.scale;return Bv(n)?n.getLabel(t):t.value}function Dy(e){return e.get(`interval`)??`auto`}function Oy(e){return e.type===`category`&&Dy(e.getLabelModel())===0}function ky(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[uh(e,t)]=!0}),ue(n)}function Ay(e){return e===`middle`||e===`center`}function jy(e){return e.getShallow(`show`)}function My(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!zh()||!n||!Ny(t)?void 0:r}function Ny(e){return e!==`category`}function Py(e,t,n,r,i,a){var o=zv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=Kv(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Fy(e,t){return Bv(e)?e.getRawOrdinalNumber(t.value):t.value}function Iy(e,t){return Bv(e)&&!!t.get(`boundaryGap`)}function Ly(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Wy(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=z(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Uy(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;R(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new kd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function Gy(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&Ky(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(e){e.tick.offInterval||(s[Fy(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function Ky(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function qy(e){for(var t=e.length/2;t>0&&X_(e[t*2-2],e[t*2-1]);t--);return t-1}function Jy(e,t){return[e[t*2],e[t*2+1]]}function Yy(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function Xy(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],`endLabel`,`show`]))return!0;return!1}function Zy(e,t,n,r){if(yv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=Xy(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=_v(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return vv(t,n,r)}function Qy(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var $y=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Hu,t=new Gee;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=fe(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=J_(r,a,_),y=g&&Vy(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&Gy(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Wy(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,jg(E)),m.setClipPath(Zy(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,jg(E));var D=m.getClipPath();D?Kd(D,{shape:Zy(this,r,!1,e).shape},e):m.setClipPath(Zy(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Ly(this._stackedOnPoints,y)||!Ly(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Hy(y,c,r,w,x),c=Hy(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(L(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),pu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}el(f).seriesIndex=e.seriesIndex,lu(f,k,A,j);var M=By(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle(L(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=By(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),pu(p,e,`areaStyle`),el(p).seriesIndex=e.seriesIndex,lu(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var I=e.get(`triggerEvent`),ne=e.get(`triggerLineEvent`),re=ne===!0||I===!0||I===`line`,ie=ne===!0||I===!0||I===`area`;this.packEventData(e,f,re),p&&this.packEventData(e,p,ie)},t.prototype.packEventData=function(e,t,n){el(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(X_(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new U_(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else dv.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else dv.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Fl(this._polyline,e),t&&Fl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new av({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new sv({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);me(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=me(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=me(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(Xy(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Xo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=qy(o);c>=0&&(Xf(a,Zf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?H_(i,e):Uee(i,n)},enableTextSetter:!0},Qy(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=Yy(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=Jy(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Ic(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=Jy(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sp(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=ev(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Hy(u.stackedOnCurrent,u.current,n,i,o),d=Hy(u.current,null,n,i,o),m=Hy(u.stackedOnNext,u.next,n,i,o),p=Hy(u.next,null,n,i,o)),zy(d,p)>3e3||c&&zy(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Gd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gd(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=tb[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,nb))}}}}}function ib(e){e.registerChartView($y),e.registerSeriesModel(Hee),e.registerLayout(eb(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,rb(`line`))}var ab=Ec(),ob=Ec(),sb={estimate:1,determine:2};function cb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function lb(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(db(n,r),function(t,n){return{formattedLabel:Ty(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?fb(e,t):hb(e)}function ub(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:db(i,r)}:e.type===`category`?mb(e,t):{ticks:r.getTicks(n)}}function db(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Jc(r,Xc,null),As(r),z(r,function(e){return{value:e}})}function fb(e,t){var n=e.getLabelModel(),r=pb(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function pb(e,t,n){var r=_b(e),i=Dy(t),a=n.kind===sb.estimate;if(!a){var o=yb(r,i);if(o)return o}var s,c;me(i)?s=Eb(e,i,!1):(c=i===`auto`?xb(e,n):i,s=Eb(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return bb(r,i,l),!0}):bb(r,i,l),l}function mb(e,t){var n=gb(e),r=Dy(t),i=yb(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Eb(e,r,!0);else if(r===`auto`){var s=pb(e,e.getLabelModel(),cb(sb.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Eb(e,o,!0);return bb(n,r,{ticks:a,tickCategoryInterval:o})}function hb(e){var t=e.scale.getTicks(),n=Ty(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var gb=vb(`axisTick`),_b=vb(`axisLabel`);function vb(e){return function(t){return ob(t)[e]||(ob(t)[e]={list:[]})}}function yb(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===sb.estimate?(t.out.noPxChangeTryDetermine.push(fe(Cb,null,e,S,c)),S):wb(e,S,c)??S}function Cb(e,t,n){return wb(e,t,n)==null}function wb(e,t,n){var r=ab(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Tb(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Eb(e,t,n){var r=Ty(e),i=e.scale,a=[],o=me(t);return Jv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Db=Ec();function Ob(e){Db(e).prepare={}}function kb(e){Db(e).fullUpdate={}}function Ab(e){return Db(e).fullUpdate}Kc();var jb=Ec();Ec();function Mb(e,t){var n=e.model,r=jb(Ab(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Nb(e,t){return Ib(Mb(e,t))}function Pb(e,t){var n=[];return Fb(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Ys(n)&&n>0&&Ys(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Xee,e.w2=e.w*n/r)}var Hb=[0,1],$ee=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ws(e,Hb,Ub(this),t)},e.prototype.coordToData=function(e,t){var n=ws(e,Ub(this),Hb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(ub(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Fy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=ete(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Bv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=cb(sb.determine),lb(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Vb(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=cb(sb.determine),Sb(this,e)},e}();function Ub(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function ete(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Vb(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var tte=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}($ee),Wb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],nte=1,Gb=2,Kb=nte|Gb;function qb(e,t,n){n||=Kb,t?e.dirty|=n:e.dirty&=~n}function Jb(e,t){return t||=Kb,e.dirty==null||!!(e.dirty&t)}function Yb(e){if(e)return Jb(e)&&rte(e,e.label,e),e}function rte(e,t,n){var r=t.getComputedTransform();e.transform=Rf(e.transform,r);var i=e.localRect=Lf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cp.textMargin);for(var d=0;d<4;d++)Xb[d]=u===cp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cp.textMargin&&kf(i,Xb,!1,!1);var f=e.rect=Lf(e.rect,i);return r&&f.applyTransform(r),u===cp.minMargin&&kf(f,Xb,!1,!1),e.axisAligned=Ff(r),(e.label=e.label||{}).ignore=t.ignore,qb(e,!1),qb(e,!0,Gb),e}var Xb=[0,0,0,0];function ite(e,t,n){return e.transform=Rf(e.transform,n),e.localRect=Lf(e.localRect,t),e.rect=Lf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ff(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function ate(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Zb(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ax=_t(),ox=new tn(0,0,0,0),sx=function(e,t,n,r,i,a){if(Ay(e.nameLocation)){var o=a.stOccupiedRect;o&&cx(ite({},o,a.transGroup.transform),r,i)}else lx(a.labelInfoList,a.dirVec,r,i)};function cx(e,t,n){var r=new Vt;$b(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&ate(t,r)}function lx(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ls(r-tx)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),fte=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],pte={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Hh(r.axis.scale))ex().buildAxisBreakLine(r,i,a,m);else{var h=new bd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=V_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=B_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){mx(t,i,s)&&dx(e,t,n,r,i,a,o,sb.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){mx(t,i,s)&&dx(e,t,n,r,i,a,o,sb.determine);var c=_te(e,i,a,r);gte(e,t.labelLayoutList,c),vte(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(vx(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*tx/180);var b,x;Ay(u)?b=ux.innerTextLayout(e.rotation,y??e.rotation,d):(b=mte(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Xo({x:g.x,y:g.y,rotation:b.rotation,silent:ux.isLabelSilent(r),style:Qf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Mf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=ux.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,el(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Yb({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ay(u)?lte[E]:ute[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function dx(e,t,n,r,i,a,o,s){hx(t)||yte(e,t,i,s,r,o);var c=t.labelLayoutList;bte(e,r,c,a),Cte(r,e.rotation,c);var l=e.optionHideOverlap;hte(r,c,l),l&&ote(ce(c,function(e){return e&&!e.label.ignore})),dte(e,n,r,c)}function mte(e,t,n,r){var i=Is(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ls(i-tx/2)?(o=c?`bottom`:`top`,a=`center`):Ls(i-tx*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=itx/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function hte(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Oy(r))return;function a(e,a,o){var s=Yb(t[a]),c=Yb(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=nx(s.label).labelInfo.tick;if(Rv(l)&&u.notNice||Bv(l)&&u.offInterval){fx(s.label);return}}if(e===!1||s.suggestIgnore){fx(s.label);return}if(c.suggestIgnore){fx(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=Zb({marginForce:f},s),c=Zb({marginForce:f},c)}$b(s,c,null,{touchThreshold:d})&&fx(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function gte(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=Sx(e,t.get(`startValue`,!0)),x=b!=null;!Ys(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Ys(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),xx(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),xx(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function xx(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Gc(t))}function Sx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function kte(e,t){var n;if(Bv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[Cx(n[0]),Cx(n[1])]}function Cx(e){return Cn(typeof e==`boolean`?0:e,1)||0}function Tx(e){var t=Dte(e.scale);return t.extent||=Lc(),t}function Ate(e,t){Tx(e).dimIdxInCoord=t.get(e.dim)}function jte(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Mte(n,e,i,r,t)}function Mte(e,t,n,r,i){var a=Tx(t),o=a.extent,s=!1;Jee(t,function(r){if(r.boxCoordinateSystem){var i=eh(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Rc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(ky(u,n),function(e){Vc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Pte(e,t,r);Ex(e,new bx(e,r,o,s,c),i),a.extent=null}function Nte(e,t){var n=e.scale;Ex(n,new bx(n,e.model,t,!1,!1),Ote)}function Ex(e,t,n){e.rawExtentInfo=t,t.from=n}var Dx=Le();function Ox(e,t,n,r,i){e.rawExtentInfo||Nte({scale:e,model:t},i||Lc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Pte(e,t,n){var r=Iy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Lb(t,function(e){a=!!Dx.get(e)||a}),a}function Fte(e,t,n,r){if(n.ctnShp){var i;if(Lb(e,function(t){var n=Dx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],zc(i,a[0]),Bc(i,a[1]),Cy(e))}}),i){var a=t.getExtent();if(Bv(t))e.onBand||t.setExtent2(1,ps(a[0],a[0]+i[0]),ms(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ps(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ms(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var kx={left:0,right:0,top:0,bottom:0},Ax=[`25%`,`25%`],jx=`cartesian2d`,Ite=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Hg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Vg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Vg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:kx,outerBoundsContain:`all`,outerBoundsClampWidth:Ax[0],outerBoundsClampHeight:Ax[1],backgroundColor:g_.color.transparent,borderWidth:1,borderColor:g_.color.neutral30},t}(Ug),Mx=`\0__throttleOriginMethod`,Nx=`\0__throttleRate`,Px=`\0__throttleType`;function Fx(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Ix(e,t,n,r){var i=e[t];if(i){var a=i[Mx]||i,o=i[Px];if(i[Nx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Fx(a,n,r===`debounce`),i[Mx]=a,i[Px]=r,i[Nx]=n}return i}}function Lx(e,t){var n=e[t];n&&n[Mx]&&(n.clear&&n.clear(),e[t]=n[Mx])}function Rx(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Vx(e,i,t,n)}else{Vx(e,t,t,n);var a=Vte(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&zte.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Vte(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Hte(e,t,n,r){e.addEventListener(t,n,r)}function Ute(e,t,n,r){e.removeEventListener(t,n,r)}var Gx=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Wte=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=Kx(r)/Kx(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Gte(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},Jx=`silent`;function Kte(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:qte}}function qte(){Gx(this.event)}var Jte=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ji),Yx=function(){function e(e,t){this.x=e,this.y=t}return e}(),Yte=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Xx=new tn(0,0,0,0),Zx=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Yx(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Jte,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Rte(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Yte,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=$x(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Yx(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Yx(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Kte(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Yx(e,t);if(Qx(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Xx.copy(u.getBoundingRect()),u.transform&&Xx.applyTransform(u.transform),Xx.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Xte(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||Jx}return!1}function Qx(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Xte(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Jx)){t.target=o;break}}}function $x(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var eS=32,tS=7;function Zte(e){for(var t=0;e>=eS;)t|=e&1,e>>=1;return e+t}function nS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Qte(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function iS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function aS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function $te(e,t){var n=tS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=tS||m>=tS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-iS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=tS||g>=tS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),rS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var sS=!1;function cS(){sS||(sS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function lS(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var uS=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=lS}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),dS=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function fS(){return new Date().getTime()}var pS=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=fS()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(dS(t),!e._paused&&e.update())}dS(t)},t.prototype.start=function(){this._running||(this._time=fS(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=fS(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=fS()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new qi(e,t.loop);return this.addAnimator(n),n},t}(Ji),ene=300,mS=We.domSupported,hS=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),gS={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},_S=!1;function vS(e){var t=e.pointerType;return t===`pen`||t===`touch`}function yS(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function bS(e){e&&(e.zrByTouch=!0)}function xS(e,t){return Wx(e.dom,new CS(e,t),!0)}function SS(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var CS=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),wS={mousedown:function(e){e=Wx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Wx(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Wx(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Wx(this.dom,e);var t=e.toElement||e.relatedTarget;SS(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){_S=!0,e=Wx(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){_S||(e=Wx(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Wx(this.dom,e),bS(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),wS.mousemove.call(this,e),wS.mousedown.call(this,e)},touchmove:function(e){e=Wx(this.dom,e),bS(e),this.handler.processGesture(e,`change`),wS.mousemove.call(this,e)},touchend:function(e){e=Wx(this.dom,e),bS(e),this.handler.processGesture(e,`end`),wS.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!xc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[JS],e},t.prototype.setTheme=function(e){this._theme=new yp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function sC(e,t){return e.join(`,`)===t.join(`,`)}var cC=R,lC=_e,uC=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function dC(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=uC.length;n0?e[n-1].seriesModel:null)}),NC(e))})}function NC(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ps(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var PC=function(){function e(){this.group=new Hu,this.uid=_h(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(PC),at(PC);var FC=Ec(),IC={itemStyle:ot(gp,!0),lineStyle:ot(pp,!0)},LC={lineStyle:`stroke`,itemStyle:`fill`};function RC(e,t){return e.visualStyleMapper||IC[t]||(console.warn(`Unknown style type '`+t+`'.`),IC.itemStyle)}function zC(e,t){return e.visualDrawType||LC[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var BC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=RC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=zC(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},VC=new yp,HC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=RC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){VC.option=n[r];var o=i(VC);I(e.ensureUniqueItemVisual(t,`style`),o),VC.option.decal&&(e.setItemVisual(t,`decal`,VC.option.decal),VC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},UC={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();FC(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=FC(e).scope,a=zC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},WC=Math.PI;function one(e,t){t||={},L(t,{text:`loading`,textColor:g_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:g_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Hu,r=new Go({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Xo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Go({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Ed({shape:{startAngle:-WC/2,endAngle:-WC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:WC*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:WC*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var GC=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||$g({plan:dne,reset:fne,count:mne}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||$g({reset:sne});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,$g({reset:cne,onDirty:une})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:hne(e)}),e.uid=_h(`stageHandler`),t&&(e.visualType=t),e},e}();function sne(e){e.overallReset(e.ecModel,e.api,e.payload)}function cne(e){return e.dirtyOnOverallProgress&&lne}function lne(){this.agent.dirty(),this.getDownstream().dirty()}function une(){this.agent&&this.agent.dirty()}function dne(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function fne(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ac(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return KC(t)}):pne}var pne=KC(0);function KC(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),nw=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],rw=nw.concat([`symbolKeepAspect`]),iw={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&mw(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function _w(e,t,n){for(var r=t.type===`radial`?gw(e,t,n):hw(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function Sw(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&xw(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var Cw=new ao(!0);function ww(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Tw(e){return typeof e==`string`&&e!==`none`}function Ew(e){var t=e.fill;return t!=null&&t!==`none`}function Dw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Ow(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function kw(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Aw(e,t,n,r,i){var a,o=ww(n),s=Ew(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Cw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?_w(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?_w(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?kw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?kw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Sw(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Ow(e,n),s&&Dw(e,n)):(s&&Dw(e,n),o&&Ow(e,n)),T&&e.setLineDash([])}function jw(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function Mw(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Sw(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(ww(n)&&e.strokeText(i,n.x,n.y),Ew(n)&&e.fillText(i,n.x,n.y)):(Ew(n)&&e.fillText(i,n.x,n.y),ww(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Nw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Pw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function Fw(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){Hw(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ya.opacity:o}(r||t.blend!==n.blend)&&(a||=(Hw(e,i),!0),e.globalCompositeOperation=t.blend||ya.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[ST]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[ST]=!0,QT(this),!this._model||t){var o=new rC(this._api),s=this._theme,c=this._model=new XS;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},aE);var l={seriesTransition:a,optionChanged:!0};if(n)this[wT]={silent:r,updateParams:l},this[ST]=!1,this.getZr().wakeUp();else{try{PT(this),LT.update.call(this,null,l)}catch(e){throw this[wT]=null,this[ST]=!1,e}this._ssr||this._zr.flush(),this[wT]=null,this[ST]=!1,VT.call(this,r),HT.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[ST]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[wT]&&(r??=this[wT].silent,i=this[wT].updateParams,this[wT]=null),this[ST]=!0,QT(this);try{this._updateTheme(e),n.setTheme(this._theme),PT(this),LT.update.call(this,{type:`setTheme`},i)}catch(e){throw this[ST]=!1,e}this[ST]=!1,VT.call(this,r),HT.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=sE[e]),e&&(e=P(e),e&&AC(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(uE[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(lE,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=LS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Go({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Lo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return RT(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return RT(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return RT(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Oc(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Oc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?ow(i,t):aw(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(Dne,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&cw(i,function(e){var t=el(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(rE,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),Lte(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Nc(this.getDom(),fE,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete lE[e.id]},t.prototype.resize=function(e){if(!this[ST]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[wT]&&(r??=this[wT].silent,n=!0,this[wT]=null),this[ST]=!0,QT(this);try{n&&PT(this),LT.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[ST]=!1,e}this[ST]=!1,VT.call(this,r),HT.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),cE[e]){var n=cE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=nE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),tE[e.type]&&this._model){if(this[ST]){this._pendingActions.push(e);return}var n=t.silent;BT.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),VT.call(this,n),HT.call(this,n)}},t.prototype.updateLabelLayout=function(){lw.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){PT=function(e){Ob(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),FT(e,!0),FT(e,!1),t.plan()},FT=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),US.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=zf(e);t.eachRendered(function(e){return Vf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(qd(e))return;if(e instanceof jo&&yu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}JT=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Wl(t,n),XT(e)},n.prototype.leaveEmphasis=function(t,n){Gl(t,n),XT(e)},n.prototype.enterBlur=function(t){Kl(t),XT(e)},n.prototype.leaveBlur=function(t){ql(t),XT(e)},n.prototype.enterSelect=function(t){Jl(t),XT(e)},n.prototype.leaveSelect=function(t){Yl(t),XT(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[CT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(dl))(e)},YT=function(e){function t(e,t){for(var n=0;n=0)){TE.push(n);var o=GC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function DE(e,t){cE[e]=t}function OE(e,t,n){var r=_ne(`registerMap`);r&&r(e,t,n)}var kE=l_;wE(pT,BC),wE(gT,HC),wE(gT,UC),wE(pT,iw),wE(gT,gne),wE(bT,nT),gE(AC),_E(oT,jC),DE(`default`,one),xE({type:yl,event:yl,update:yl},Ve),xE({type:bl,event:bl,update:bl},Ve),xE({type:xl,event:wl,update:xl,action:Ve,refineEvent:AE,publishNonRefinedEvent:!0}),xE({type:Sl,event:wl,update:Sl,action:Ve,refineEvent:AE,publishNonRefinedEvent:!0}),xE({type:Cl,event:wl,update:Cl,action:Ve,refineEvent:AE,publishNonRefinedEvent:!0});function AE(e,t,n,r){return{eventContent:{selected:ou(n),isFromClick:t.isFromClick||!1}}}hE(`default`,{}),hE(`dark`,ew);var jE=[],ME={registerPreprocessor:gE,registerProcessor:_E,registerPostInit:vE,registerPostUpdate:yE,registerUpdateLifecycle:bE,registerAction:xE,registerCoordinateSystem:SE,registerLayout:CE,registerVisual:wE,registerTransform:kE,registerLoading:DE,registerMap:OE,registerImpl:dw,PRIORITY:xT,ComponentModel:Ug,ComponentView:PC,SeriesModel:F_,ChartView:dv,registerComponentModel:function(e){Ug.registerClass(e)},registerComponentView:function(e){PC.registerClass(e)},registerSeriesModel:function(e){F_.registerClass(e)},registerChartView:function(e){dv.registerClass(e)},registerCustomSeries:function(e,t){yne(e,t)},registerSubTypeDefaulter:function(e,t){Ug.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){RS(e,t)}};function NE(e){if(B(e)){R(e,function(e){NE(e)});return}re(jE,e)>=0||(jE.push(e),me(e)&&(e={install:e}),e.install(ME))}var PE=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),FE=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ac).models[0]},t.type=`cartesian2dAxis`,t}(Ug);ae(FE,PE);var IE={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:g_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:g_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:g_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[g_.color.backgroundTint,g_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:g_.color.neutral00,borderColor:g_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},LE=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},IE),RE=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:g_.color.axisMinorSplitLine,width:1}}},IE),zE={category:LE,value:RE,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},RE),log:L({logBase:10},RE)};function BE(e,t,n,r){R(vy,function(i,a){var o=F(F({},zE[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Bg(this),r=n?Hg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=VE(e),n&&Vg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=Cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=ex();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,VE)}function VE(e){return e.type||(e.data?`category`:`value`)}var HE=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),UE=[`x`,`y`];function WE(e){return(e.type===`interval`||e.type===`time`)&&!Hh(e)}var GE=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=jx,t.dimensions=UE,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(WE(e)&&WE(t)){var n=Av(e,null),r=Av(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(HE);function KE(e,t){var n=e.scale,r=e.model,i=Ox(n,r,r.ecModel,e,null),a=zv(n),o=zv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=hs(l[0].value-l[1].value),g=hs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=ks(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ks(vs(C[0]/E)*E,D),O=ks(_s(C[1]/E)*E,D);var e=gs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=_s(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Py(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function qE(e,t){var n=zv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Gv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?YE(r,t):JE(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Hv(d)),i[0]||(s[0]=ks(_s(s[0]/u)*u,l)),i[1]||(s[1]=ks(vs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Py(e,i,o,s,a,c)}function JE(e,t){var n=qv(t.splitNumber,5),r=Mv(e),i=t.minInterval,a=t.maxInterval,o=Hs(r/n,!0);i!=null&&oa&&(o=a);var s=Hv(o),c=e.getExtent(),l=[ks(vs(c[0]/o)*o,s),ks(_s(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function YE(e,t){var n=qv(t.splitNumber,10),r=e.getExtent(),i=Mv(e),a=ms(Bs(i),1);n/i*a<=.5&&(a*=10);var o=Hv(a),s=[ks(vs(r[0]/a)*a,o),ks(_s(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function XE(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;ZE(t,n,r,i,null)}function ZE(e,t,n,r,i){var a=Ox(e,t,r,n,i),o=Lv(e)||Rv(e);QE(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Fte(n,e,a,r)}function QE(e,t){$E[e.type](e,t)}var $E={interval:qE,log:qE,time:uy,ordinal:Ve},eD=[[3,1],[0,2]],tD=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=UE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){jte(e,1);var t=e.scale;Bv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):XE(i)}R(n,function(e){oD(e,e.__alignTo)?XE(e):KE(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){rD(n,`y`,e,i)}),R(n.y,function(e){rD(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=zg(e,t),i=this._rect=Lg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(cD(a,i),!n){var c=fD(i,o,a,s,t),l=void 0;if(s)uD?(uD(this._axesList,i),cD(a,i)):l=dD(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=mD(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=dD(d,f,p,i,a,c,r))}pD(i,a,sb.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];Iv(a.scale)&&My(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function oD(e,t){return Hh(e.scale)||Hh(t.scale)||t.scale.getTicks().length<2}function sD(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function cD(e,t){R(e.x,function(e){return lD(e,t.x,t.width)}),R(e.y,function(e){return lD(e,t.y,t.height)})}function lD(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),sD(e,t)}var uD;function dD(e,t,n,r,i,a,o){pD(r,i,sb.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return kf(r,s,!0,!0,n),cD(i,r),c;function l(e){R(i[ef[e]],function(t){if(jy(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function fD(e,t,n,r,i){var a=new ix(hD);return R(n,function(n){return R(n,function(n){if(jy(n.model)){var o=!r;n.axisBuilder=Tte(e,t,n.model,i,a,o)}})}),a}function pD(e,t,n,r,i,a){var o=n===sb.determine;R(t,function(t){return R(t,function(t){jy(t.model)&&(Ete(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ef[1-t]]=e[tf[t]]<=a.refContainer[tf[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){jy(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function mD(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Lg(e.get(`outerBounds`,!0)||kx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Ds(we(e.get(`outerBoundsClampWidth`,!0),Ax[0]),t.width),Ds(we(e.get(`outerBoundsClampHeight`,!0),Ax[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var hD=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;sx(e,t,n,r,i,a),Ay(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&lx(e.labelInfoList,e.dirVec,r,i)})};function gD(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return _D(n,e,t),n.seriesInvolved&&yD(n,e),n}function _D(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=ED(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||TD(d))){s??=d.get(`triggerTooltip`),d=r?vD(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=ED(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:TD(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=bD(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function vD(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new yp(c,n,r))}function yD(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[ED(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function bD(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function SD(e){var t=CD(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=TD(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function KD(e,t){var n=e.visual,r=[];_e(n)?BD(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),eO(e,r)}function qD(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:QD([0,1])}}function JD(e){var t=this.option.visual;return t[Math.round(ws(e,[0,1],[0,t.length-1],!0))]||{}}function YD(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function XD(e){var t=this.option.visual;return t[this.option.loop&&e!==HD?e%t.length:e]}function ZD(){return this.option.visual[0]}function QD(e){return{linear:function(t){return ws(t,e,this.option.visual,!0)},category:XD,piecewise:function(t,n){var r=$D.call(this,n);return r??=ws(t,e,this.option.visual,!0),r},fixed:ZD}}function $D(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[UD.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function eO(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var tO={linear:function(e){return ws(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=UD.findPieceIndex(e,t,!0);if(n!=null)return ws(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??HD},fixed:Ve};function nO(e,t,n){return e?t<=n:ta&&(t[1-r]=Ps(t[r],d.sign*a)),t}function iO(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function aO(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var oO=256,sO=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=g_.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function cO(e,t,n){var r=e[1]-e[0];t=z(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var uO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):bv(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(bv(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Pf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=yv(a,`cartesian2d`),s=yv(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Vb(f).w+.5,l=Vb(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Zf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new Go({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Se(ee.x))continue;D=new Go({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var M=a.dataToLayout([h.get(T[0],E)]),ee=M.contentRect||M.rect;if(Se(ee.x)||Se(ee.y))continue;D=new Go({z2:1,shape:ee,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),te=N.getModel(`emphasis`);g=te.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=te.get(`focus`),C=te.get(`blurScope`),w=te.get(`disabled`),b=Zf(N)}D.shape.r=y;var P=e.getRawValue(E),F=`-`;P&&P[2]!=null&&(F=P[2]+``),Xf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,lu(D,S,C,w),D.incremental=Zc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new sO;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?lO(v,n.option.range):cO(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Lo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(dv),dO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return ph(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=Zm.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:g_.color.primary}}},t}(F_);function fO(e){e.registerChartView(uO),e.registerSeriesModel(dO)}function pO(e){return Object.keys(e)}function mO(e){return e&&typeof e==`object`&&!Array.isArray(e)}function hO(e,t){let n={...e},r=t;return mO(e)&&mO(t)&&Object.keys(t).forEach(t=>{mO(r[t])&&t in e?n[t]=hO(n[t],r[t]):n[t]=r[t]}),n}function gO(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function _O(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function vO(e){let t=_O(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function yO(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function bO(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?yO(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?yO(n):n}}return r}return n}var U=bO(`rem`,{shouldScale:!0}),xO=bO(`em`);function SO(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function CO(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var wO=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=wO()})),W=u(TO(),1);function EO(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function DO(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function OO(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function kO(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function AO(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function jO(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(kO(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>MO(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=jO(l,c,r),d=AO(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[jO(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[AO(c.length,c,!1)]?.focus()}}}var PO={app:100,modal:200,popover:300,overlay:400,max:9999};function FO(e){return PO[e]}function IO(e,t=`size`,n=!0){if(e!==void 0)return CO(e)?n?U(e):e:`var(--${t}-${e})`}function LO(e){return IO(e,`mantine-spacing`)}function RO(e){return e===void 0?`var(--mantine-radius-default)`:IO(e,`mantine-radius`)}function zO(e){return IO(e,`mantine-font-size`)}function BO(e){return IO(e,`mantine-line-height`,!1)}function VO(e){if(e)return IO(e,`mantine-shadow`,!1)}function HO(e,t){return n=>{e?.(n),t?.(n)}}function UO(e,t){return e in t?vO(t[e]):vO(e)}function WO(e,t){let n=e.map(e=>({value:e,px:UO(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function GO(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function KO(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function qO(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function JO(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=qO(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function YO(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function XO(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:YO(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var ZO=typeof document<`u`?W.useLayoutEffect:W.useEffect;function QO(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var $O=e=>(e+1)%1e6;function ek(){let[,e]=(0,W.useReducer)($O,0);return e}function tk(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return ZO(()=>{r.current||(r.current=!0,n(KO()))},[]),typeof e==`string`?e:t}function nk(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function rk(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=nk(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():nk(e,null)}),t.clear()}}}function ik(...e){return(0,W.useCallback)(rk(...e),e)}function ak({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function ok(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var sk=`dots`;function ck({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=ak({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return ok(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=TO();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=uk()}));function fk(e){return e?.props?.ref}function pk(e){let t=W.Children.toArray(e);return t.length!==1||!EO(t[0])?null:t[0]}function mk(e){return e}function hk(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=gk(t[e],n):t[e]=n})}),t}function yk({theme:e,classNames:t,props:n,stylesCtx:r}){return vk((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||_k))}function bk({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function xk(e){return e===`auto`||e===`dark`||e===`light`}function Sk({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return xk(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&xk(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function Ck(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function wk(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function Tk(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function Ek(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Dk(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Ok(e){return wk(e)?Tk(e):e.startsWith(`rgb`)?Ek(e):e.startsWith(`hsl`)?Dk(e):{r:0,g:0,b:0,a:1}}function kk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Ak(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function jk(e){if(e.startsWith(`oklch(`))return(Ak(e)||0)/100;let{r:t,g:n,b:r}=Ok(e),i=t/255,a=n/255,o=r/255,s=kk(i),c=kk(a),l=kk(o);return .2126*s+.7152*c+.0722*l}function Mk(e,t=.179){return!e.startsWith(`var(`)&&jk(e)>t}function Nk({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Mk(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Mk(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Mk(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][Ck(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Mk(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Mk(e,t.luminanceThreshold),shade:a,variable:void 0}}function Pk(e,t){let n=Nk({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Fk(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function Ik(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Ok(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Lk(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=Pk(n.from,t),i=Pk(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Rk(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Ok(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var zk=Rk,Bk=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Nk({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Fk(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:Ik(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:Ik(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:Rk(e,.1),hover:Rk(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Rk(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Rk(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Rk(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:Rk(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:Ik(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Ik(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:Ik(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:Lk(r,t),hover:Lk(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function Vk({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Nk({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Hk(e,t,n){return Vk({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Uk(e,t){let n=e.colors[e.primaryColor];return Fk(n)?e.autoContrast?Hk(n,e,t):`var(--mantine-color-white)`:Vk({color:n[Ck(e,t)],theme:e,autoContrast:null})}function Wk(e,t){return typeof e==`boolean`?e:t.autoContrast}var Gk=(0,W.createContext)(null);function Kk(){let e=(0,W.use)(Gk);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function qk(){return Kk().cssVariablesResolver}function Jk(){return Kk().classNamesPrefix}function Yk(){return Kk().getStyleNonce}function Xk(){return Kk().withStaticClasses}function Zk(){return Kk().headless}function Qk(){return Kk().stylesTransform?.sx}function $k(){return Kk().stylesTransform?.styles}function eA(){return Kk().env||`default`}function tA(){return Kk().deduplicateInlineStyles}function nA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function rA({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(nA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),nA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),ZO(()=>{nA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return nA(r,n),()=>{};r===void 0&&nA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&nA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var iA=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),aA=s(((e,t)=>{t.exports=iA()})),oA={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},sA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,cA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:oA,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Bk,autoContrast:!1,luminanceThreshold:.3,fontFamily:sA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:sA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},lA=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,uA=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function dA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function fA(e){if(!(e.primaryColor in e.colors))throw Error(lA);if(typeof e.primaryShade==`object`&&(!dA(e.primaryShade.dark)||!dA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!dA(e.primaryShade))throw Error(uA)}function pA(e,t){if(!t)return fA(e),e;let n=hO(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),fA(n),n}var G=aA(),mA=(0,W.createContext)(null),hA=()=>(0,W.use)(mA)||cA;function gA(){let e=(0,W.use)(mA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function _A({theme:e,children:t,inherit:n=!0}){let r=hA(),i=(0,W.useMemo)(()=>pA(n?r:cA,e),[e,r,n]);return(0,G.jsx)(mA,{value:i,children:t})}_A.displayName=`@mantine/core/MantineThemeProvider`;function vA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function yA(e,t){let n=t?[t]:[`:root`,`:host`],r=vA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=vA(e.dark),o=vA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function bA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=Ck(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:zk(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=Ck(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:Ik(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:Ik(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:zk(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function xA(e,t,n){pO(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var SA=e=>{let t=Ck(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":Uk(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":Uk(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};xA(r.variables,e.breakpoints,`breakpoint`),xA(r.variables,e.spacing,`spacing`),xA(r.variables,e.fontSizes,`font-size`),xA(r.variables,e.lineHeights,`line-height`),xA(r.variables,e.shadows,`shadow`),xA(r.variables,e.radius,`radius`),xA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),pO(e.colors).forEach(t=>{let n=e.colors[t];if(Fk(n)){Object.assign(r.light,bA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,bA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=Hk(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=Hk(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,bA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,bA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return pO(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function CA(){let e=gA(),t=Yk(),n=pO(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=vO(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:xO(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:xO(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function wA({theme:e,generator:t}){let n=SA(e),r=t?.(e);return r?hO(n,r):n}var TA=SA(cA);function EA(e){let t={variables:{},light:{},dark:{}};return pO(e.variables).forEach(n=>{TA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),pO(e.light).forEach(n=>{TA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),pO(e.dark).forEach(n=>{TA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function DA(e){return yA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function OA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=gA(),r=Yk(),i=wA({theme:n,generator:qk()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=yA(a?EA(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:DA(e)}`}}):null}OA.displayName=`@mantine/CssVariables`;function kA({respectReducedMotion:e,getRootElement:t}){ZO(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function AA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=Sk(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=rA({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return kA({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(Gk,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(_A,{theme:e,children:[o&&(0,G.jsx)(OA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(CA,{}),t]})})}AA.displayName=`@mantine/core/MantineProvider`;function jA(e,t,n){let r=gA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...SO(n)}}function MA(e){return e}var NA={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function PA({theme:e,options:t,unstyled:n}){return gk(t?.focusable&&!n&&(e.focusClassName||NA[e.focusRing]),t?.active&&!n&&e.activeClassName)}function FA({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return yk({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function IA({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return yk({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function LA({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function RA({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function zA({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function BA({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function VA({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return gk(PA({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),BA({options:t,classes:s,selector:r,unstyled:c||m}),a[r],IA({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),FA({selector:r,stylesCtx:f,options:t,props:d,theme:e}),LA({rootSelector:u,selector:r,className:l}),RA({selector:r,classes:s,unstyled:c||m}),p&&!m&&zA({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function HA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...HA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function UA({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&bk({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...HA({style:n?.style,theme:e})}}function WA(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...SO(t[n])}}),e),{})}function GA({props:e,stylesCtx:t,themeName:n,theme:r}){let i=$k()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function KA({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=gA(),m=Jk(),h=Xk(),g=Zk(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=GA({props:n,stylesCtx:r,themeName:_,theme:p}),b=yk({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>yk({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:bk({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=bk({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=WA([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=HA({style:a,theme:p});return(e,a)=>({...f?.[e],className:VA({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:UA({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function qA(e){return pO(e).reduce((t,n)=>e[n]===void 0?t:`${t}${gO(n)}:${e[n]};`,``).trim()}function JA({selector:e,styles:t,media:n,container:r}){let i=t?qA(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${qA(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${qA(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function YA(e){let t=5381;for(let n=0;n>>0).toString(36)}function XA({deduplicate:e,...t}){let n=Yk(),r=JA(t);return e?(0,G.jsx)(`style`,{href:`mantine-${YA(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function ZA(e){let t=5381;for(let n=0;n>>0).toString(36)}function QA(e,t){return`__mdi__-${ZA(`${e?qA(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${qA(e.styles)}`).join(`|`):``}`)}`}function $A(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:SO({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var ej={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function tj(e,t){let n=Nk({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function nj(e,t){let n=Nk({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:tj(e,t)}function rj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${tj(i.join(` `),t)}`),a.trim()}return e}var ij={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function aj(e){return typeof e==`string`&&e in ij?ij[e]:e}var oj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function sj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&oj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function cj(e){return e}var lj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function uj(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&lj.includes(e)?`var(--mantine-${e}-line-height)`:e}function dj(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function fj(e){return typeof e==`number`?U(e):e}function pj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var mj={color:tj,textColor:nj,fontSize:sj,spacing:pj,radius:dj,identity:cj,size:fj,lineHeight:uj,fontFamily:aj,border:rj};function hj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function gj({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(hj(e))-Number(hj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function One(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function kne(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Ane(e){return typeof e==`object`&&e?pO(e).filter(e=>e!==`base`):[]}function jne(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Mne({styleProps:e,data:t,theme:n}){return gj(pO(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=kne(e[i]);if(!One(e[i]))return o.forEach(e=>{r.inlineStyles[e]=mj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Ane(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=mj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:mj[a.type](jne(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function _j(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function vj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...vj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Nne(e){return e}var yj=Nne;function bj(e){return e}function xj(e){let t=e;return t.extend=bj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Sj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=bj,t}function Cj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Pne(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Cj(n)]=e[n]),t},{})}function wj(e){return e?typeof e==`string`?{[Cj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...wj(t)}),{}):Pne(e):null}function Tj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Tj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Fne({theme:e,style:t,vars:n,styleProps:r}){let i=Tj(t,e),a=Tj(n,e);return{...i,...a,...r}}function Ej({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=gA(),g=e||`div`,{styleProps:_,rest:v}=$A(m),y=Qk()?.()?.(_.sx),b=_j(),x=Mne({styleProps:_,theme:h,data:ej}),S=tA(),C=S&&x.hasResponsiveStyles?QA(x.styles,x.media):b,w={ref:p,style:Fne({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:gk(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":CO(o)?void 0:o||void 0,size:f,...wj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(XA,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Ej.displayName=`@mantine/core/Box`;var Dj=yj(Ej),Ine=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Oj(){return(0,W.use)(Ine)}var[Lne,kj]=DO(`ScrollArea.Root component was not found in tree`);function Aj(e,t){let n=(0,W.useEffectEvent)(t);ZO(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function Rne(e){let{style:t,...n}=e,r=kj(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return Aj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Aj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function zne(e){let t=kj(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(Rne,{...e}):null}var Bne={scrollHideDelay:1e3,type:`hover`};function jj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=jA(`ScrollAreaRoot`,Bne,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=ik(a,c);return(0,G.jsx)(Lne,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Dj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}jj.displayName=`@mantine/core/ScrollAreaRoot`;function Mj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Nj(e){let t=Mj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Pj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Vne(e,[t,n]){return Math.min(n,Math.max(t,e))}function Fj(e,t,n=`ltr`){let r=Nj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Vne(e,n===`ltr`?[0,o]:[o*-1,0]);return Pj([0,o],[0,s])(c)}function Hne(e,t,n,r=`ltr`){let i=Nj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Pj([c,l],d)(e)}function Ij(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Une,zj]=DO(`ScrollAreaScrollbar was not found in tree`);function Bj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=kj(),[p,m]=(0,W.useState)(null),h=ik(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=qO(o),S=JO(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),Aj(p,S),Aj(f.content,S),(0,G.jsx)(Une,{value:{scrollbar:p,hasThumb:n,onThumbChange:qO(r),onThumbPointerUp:qO(i),onThumbPositionChange:x,onThumbPointerDown:qO(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Rj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:Rj(e.onPointerMove,C),onPointerUp:Rj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Vj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=kj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=ik(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(Bj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Nj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Ij(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:Lj(s.paddingLeft),paddingEnd:Lj(s.paddingRight)}})}})};Vj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function Hj(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=kj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=ik(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(Bj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Nj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Ij(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:Lj(s.paddingTop),paddingEnd:Lj(s.paddingBottom)}})}})}Hj.displayName=`@mantine/core/ScrollAreaScrollbarY`;function Uj(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Oj(),i=kj(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Mj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Hne(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Vj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Fj(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(Hj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Fj(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}Uj.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function Wj(e){let t=kj(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=JO(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(Wj,{"data-state":i?`visible`:`hidden`,...n}):null}Gj.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function Wne(e){let{forceMount:t,...n}=e,r=kj(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=JO(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(Uj,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:Rj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:Rj(e.onPointerLeave,()=>o(`idle`))}):null}function Kj(e){let{forceMount:t,...n}=e,r=kj(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(Gj,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(Wne,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(Wj,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(Uj,{...n}):null}Kj.displayName=`@mantine/core/ScrollAreaScrollbar`;function Gne(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function qj(e){let{style:t,ref:n,...r}=e,i=kj(),a=zj(),{onThumbPositionChange:o}=a,s=ik(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=JO(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=Gne(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:Rj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Rj(e.onPointerUp,a.onThumbPointerUp)})}qj.displayName=`@mantine/core/ScrollAreaThumb`;function Jj(e){let{forceMount:t,...n}=e,r=zj();return t||r.hasThumb?(0,G.jsx)(qj,{...n}):null}Jj.displayName=`@mantine/core/ScrollAreaThumb`;function Yj({children:e,style:t,ref:n,onWheel:r,...i}){let a=kj(),o=ik(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Dj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}Yj.displayName=`@mantine/core/ScrollAreaViewport`;var Xj={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function Zj(){return typeof window<`u`}function Qj(e){return tM(e)?(e.nodeName||``).toLowerCase():`#document`}function $j(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function eM(e){return((tM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function tM(e){return Zj()?e instanceof Node||e instanceof $j(e).Node:!1}function nM(e){return Zj()?e instanceof Element||e instanceof $j(e).Element:!1}function rM(e){return Zj()?e instanceof HTMLElement||e instanceof $j(e).HTMLElement:!1}function iM(e){return!Zj()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof $j(e).ShadowRoot}function aM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=fM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Kne(e){return/^(table|td|th)$/.test(Qj(e))}function oM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var qne=/transform|translate|scale|rotate|perspective|filter/,Jne=/paint|layout|strict|content/,sM=e=>!!e&&e!==`none`,cM;function lM(e){let t=nM(e)?fM(e):e;return sM(t.transform)||sM(t.translate)||sM(t.scale)||sM(t.rotate)||sM(t.perspective)||!uM()&&(sM(t.backdropFilter)||sM(t.filter))||qne.test(t.willChange||``)||Jne.test(t.contain||``)}function Yne(e){let t=mM(e);for(;rM(t)&&!dM(t);){if(lM(t))return t;if(oM(t))return null;t=mM(t)}return null}function uM(){return cM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),cM}function dM(e){return/^(html|body|#document)$/.test(Qj(e))}function fM(e){return $j(e).getComputedStyle(e)}function pM(e){return nM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function mM(e){if(Qj(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||iM(e)&&e.host||eM(e);return iM(t)?t.host:t}function hM(e){let t=mM(e);return dM(t)?(e.ownerDocument||e).body:rM(t)&&aM(t)?t:hM(t)}function gM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=hM(e),i=r===e.ownerDocument?.body,a=$j(r);if(i){let e=_M(a);return t.concat(a,a.visualViewport||[],aM(r)?r:[],e&&n?gM(e):[])}return t.concat(r,gM(r,[],n))}function _M(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var vM=Math.min,yM=Math.max,bM=Math.round,xM=Math.floor,SM=e=>({x:e,y:e}),Xne={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function CM(e,t,n){return yM(e,vM(t,n))}function wM(e,t){return typeof e==`function`?e(t):e}function TM(e){return e.split(`-`)[0]}function EM(e){return e.split(`-`)[1]}function DM(e){return e===`x`?`y`:`x`}function OM(e){return e===`y`?`height`:`width`}function kM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function AM(e){return DM(kM(e))}function jM(e,t,n){n===void 0&&(n=!1);let r=EM(e),i=AM(e),a=OM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=zM(o)),[o,zM(o)]}function Zne(e){let t=zM(e);return[MM(e),t,MM(t)]}function MM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var NM=[`left`,`right`],PM=[`right`,`left`],FM=[`top`,`bottom`],IM=[`bottom`,`top`];function LM(e,t,n){switch(e){case`top`:case`bottom`:return n?t?PM:NM:t?NM:PM;case`left`:case`right`:return t?FM:IM;default:return[]}}function RM(e,t,n,r){let i=EM(e),a=LM(TM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(MM)))),a}function zM(e){let t=TM(e);return Xne[t]+e.slice(t.length)}function BM(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function VM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:BM(e)}function HM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function UM(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function WM(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function GM(){return/apple/i.test(navigator.vendor)}function KM(){return UM().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function qM(){return WM().includes(`jsdom/`)}var JM=`data-floating-ui-focusable`,YM=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function XM(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function ZM(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&iM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function QM(e){return`composedPath`in e?e.composedPath()[0]:e.target}function $M(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Qne(e){return e.matches(`html,body`)}function eN(e){return e?.ownerDocument||document}function $ne(e){return rM(e)&&e.matches(YM)}function ere(e){if(!e||qM())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function tre(e){return e?e.hasAttribute(JM)?e:e.querySelector(`[`+JM+`]`)||e:null}function tN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...tN(e,t.id,n)])}function nN(e){return`nativeEvent`in e}function rN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var iN=typeof document<`u`?W.useLayoutEffect:function(){},aN={...W};function oN(e){let t=W.useRef(e);return iN(()=>{t.current=e}),t}var sN=aN.useInsertionEffect||(e=>e());function cN(e){let t=W.useRef(()=>{});return sN(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function lN(e,t,n){let{reference:r,floating:i}=e,a=kM(t),o=AM(t),s=OM(o),c=TM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=EM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function uN(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=wM(t,e),p=VM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=HM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=HM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var dN=50,fN=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=wM(e,t)||{};if(l==null)return{};let d=VM(u),f={x:n,y:r},p=AM(i),m=OM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=vM(d[_],T),D=vM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=CM(E,k,O),j=!c.arrow&&EM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===kM(t)||T.every(e=>kM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=kM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function hN(e){let t=vM(...e.map(e=>e.left)),n=vM(...e.map(e=>e.top)),r=yM(...e.map(e=>e.right)),i=yM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function gN(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>HM(hN(e)))}var _N=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=wM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=gN(u),f=HM(hN(u)),p=VM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(kM(n)===`y`){let e=d[0],t=d[d.length-1],r=TM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return HM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=TM(n)===`left`,t=yM(...d.map(e=>e.right)),r=vM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return HM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},vN=new Set([`left`,`top`]);async function yN(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=TM(n),s=EM(n),c=kM(n)===`y`,l=vN.has(o)?-1:1,u=a&&c?-1:1,d=wM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var bN=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await yN(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},xN=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=wM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=kM(i),p=DM(f),m=u[p],h=u[f],g=(e,t)=>CM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function SN(e){let t=fM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=rM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bM(n)!==a||bM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function CN(e){return nM(e)?e:e.contextElement}function wN(e){let t=CN(e);if(!rM(t))return SM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=SN(t),o=(a?bM(n.width):n.width)/r,s=(a?bM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var TN=SM(0);function EN(e){let t=$j(e);return!uM()||!t.visualViewport?TN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function DN(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===$j(e)}function ON(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=CN(e),o=SM(1);t&&(r?nM(r)&&(o=wN(r)):o=wN(e));let s=DN(a,n,r)?EN(a):SM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=$j(a),t=nM(r)?$j(r):r,n=e,i=_M(n);for(;i&&t!==n;){let e=wN(i),t=i.getBoundingClientRect(),r=fM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=$j(i),i=_M(n)}}return HM({width:u,height:d,x:c,y:l})}function kN(e,t){let n=pM(e).scrollLeft;return t?t.left+n:ON(eM(e)).left+n}function AN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-kN(e,n),y:n.top+t.scrollTop}}function jN(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=eM(r),s=t?oM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=SM(1),u=SM(0),d=rM(r);if((d||!a)&&((Qj(r)!==`body`||aM(o))&&(c=pM(r)),d)){let e=ON(r);l=wN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?AN(o,c):SM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function MN(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function NN(e){let t=pM(e),n=e.ownerDocument.body,r=yM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=yM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+kN(e),o=-t.scrollTop;return fM(n).direction===`rtl`&&(a+=yM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var PN=25;function FN(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=$j(e),a=eM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!uM()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(kN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=PN&&(s-=o)}return{width:s,height:c,x:l,y:u}}function IN(e,t){let n=ON(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=wN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function LN(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=FN(e,n,t);else if(t===`document`)r=NN(eM(e));else if(nM(t))r=IN(t,n);else{let n=EN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return HM(r)}function RN(e,t){let n=t.get(e);if(n)return n;let r=gM(e,[],!1).filter(e=>nM(e)&&Qj(e)!==`body`),i=null,a=fM(e).position===`fixed`,o=a?mM(e):e;for(;nM(o)&&!dM(o);){let e=fM(o),t=lM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=mM(o)}return t.set(e,r),r}function zN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?oM(t)?[]:RN(t,this._c):[].concat(n),r],o=LN(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=$j(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function XN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=CN(e),u=i||a?[...l?gM(l):[],...t?gM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?YN(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ON(e):null;c&&g();function g(){let t=ON(e);h&&!JN(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var ZN=bN,QN=xN,$N=mN,eP=pN,tP=_N,nP=(e,t,n)=>{let r=new Map,i=n??{},a={...qN,...i.platform,_c:r};return fN(e,t,{...i,platform:a})},rP=u(dk(),1),iP=typeof document<`u`?W.useLayoutEffect:function(){};function aP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!aP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!aP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function oP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function sP(e,t){let n=oP(e);return Math.round(t*n)/n}function cP(e){let t=W.useRef(e);return iP(()=>{t.current=e}),t}function lP(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);aP(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=cP(c),D=cP(i),O=cP(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),nP(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!aP(w.current,t)&&(w.current=t,rP.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);iP(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);iP(()=>(A.current=!0,()=>{A.current=!1}),[]),iP(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=sP(ee.floating,u.x),r=sP(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...oP(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var uP=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:eP({element:r.current,padding:i}).fn(n):r?eP({element:r,padding:i}).fn(n):{}}}},dP=(e,t)=>{let n=ZN(e);return{name:n.name,fn:n.fn,options:[e,t]}},fP=(e,t)=>{let n=QN(e);return{name:n.name,fn:n.fn,options:[e,t]}},pP=(e,t)=>{let n=$N(e);return{name:n.name,fn:n.fn,options:[e,t]}},mP=(e,t)=>{let n=tP(e);return{name:n.name,fn:n.fn,options:[e,t]}},nre=(e,t)=>{let n=uP(e);return{name:n.name,fn:n.fn,options:[e,t]}};function hP(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var rre=`data-floating-ui-focusable`,gP=`active`,_P=`selected`,ire=`ArrowLeft`,are=`ArrowRight`,ore=`ArrowUp`,sre=`ArrowDown`,cre=[ire,are],lre=[ore,sre];[...cre,...lre];var ure={...W},vP=!1,dre=0,yP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+dre++;function fre(){let[e,t]=W.useState(()=>vP?yP():void 0);return iN(()=>{e??t(yP())},[]),W.useEffect(()=>{vP=!0},[]),e}var bP=ure.useId||fre;function pre(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var mre=W.createContext(null),hre=W.createContext(null),xP=()=>W.useContext(mre)?.id||null,SP=()=>W.useContext(hre);function CP(e){return`data-floating-ui-`+e}function wP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var TP=CP(`safe-polygon`);function EP(e,t,n){if(n&&!rN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function DP(e){return typeof e==`function`?e():e}function OP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=SP(),m=xP(),h=oN(l),g=oN(c),_=oN(n),v=oN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=cN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(wP(b),wP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=eN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=EP(g.current,`close`,y.current);i&&!x.current?(wP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(wP(b),r(!1,e,n))},[g,r]),k=cN(()=>{T.current(),x.current=void 0}),A=cN(()=>{if(w.current){let e=eN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(TP),w.current=!1}}),j=cN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(wP(b),C.current=!1,u&&!rN(y.current)||DP(v.current)>0&&!EP(g.current,`open`))return;let t=EP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=eN(o.floating);if(wP(S),E.current=!1,h.current&&i.current.floatingContext){n||wP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!ZM(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){wP(b)}function l(e){j()||O(e,!1)}if(nM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),iN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(nM(o.domReference)&&e){var t;let n=eN(o.floating).body;n.setAttribute(TP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),iN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),wP(b),wP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||rN(y.current))&&(n||DP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(wP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,DP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var kP=()=>{},AP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:kP,setState:kP,isInstantPhase:!1}),jP=()=>W.useContext(AP);function MP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return iN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(AP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function NP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=jP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return iN(()=>{o&&l&&(f({delay:{open:1,close:EP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),iN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),iN(()=>{o&&u!==kP&&n&&u(s)},[o,n,u,s]),c}function PP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&iM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var IP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},LP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},RP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function zP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=SP(),g=cN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=RP(p),{escapeKey:x,outsidePress:S}=RP(m),C=W.useRef(!1),w=cN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?tN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,nN(e)?e.nativeEvent:e,`escape-key`)}),T=cN(e=>{var t;let n=()=>{var t;w(e),(t=QM(e))==null||t.removeEventListener(`keydown`,n)};(t=QM(e))==null||t.addEventListener(`keydown`,n)}),E=cN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=QM(e),s=`[`+CP(`inert`)+`]`,c=eN(i.floating).querySelectorAll(s),u=nM(o)?o:null;for(;u&&!dM(u);){let e=mM(u);if(dM(e)||!nM(e))break;u=e}if(c.length&&nM(o)&&!Qne(o)&&!ZM(o,i.floating)&&Array.from(c).every(e=>!ZM(u,e)))return;if(rM(o)&&k){let t=dM(o),n=fM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&tN(h.nodesRef.current,d).some(t=>$M(e,t.context?.elements.floating));if($M(e,i.floating)||$M(e,i.domReference)||f)return;let p=h?tN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=cN(e=>{var t;let n=()=>{var t;E(e),(t=QM(e))==null||t.removeEventListener(l,n)};(t=QM(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},uM()?5:0)}let d=eN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(nM(i.domReference)&&(p=gM(i.domReference)),nM(i.floating)&&(p=p.concat(gM(i.floating))),!nM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(gM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[IP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[LP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function BP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=bP(),a=W.useRef({}),[o]=W.useState(()=>pre()),s=xP()!=null,[c,l]=W.useState(r.reference),u=cN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function VP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=BP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=SP();iN(()=>{d&&(f.current=d)},[d]);let m=lP({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=nM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(nM(e)||e===null)&&(f.current=e,c(e)),(nM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!nM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return iN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function HP(){return KM()&&GM()}function UP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=$j(o.domReference);function t(){!n&&rM(o.domReference)&&o.domReference===XM(eN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),HP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),HP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{wP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=QM(e.nativeEvent);if(c&&nM(t)){if(HP()&&!e.relatedTarget){if(!d.current&&!$ne(t))return}else if(!ere(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=nM(t)&&t.hasAttribute(CP(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=XM(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(ZM(a.current.floatingContext?.refs.floating.current,e)||ZM(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function WP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[gP]:t,[_P]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[rre]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[gP,_P].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function GP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>WP(t,e,`reference`),t),a=W.useCallback(t=>WP(t,e,`floating`),n),o=W.useCallback(t=>WP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var KP=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function qP(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=bP(),c=r.domReference?.id||s,l=W.useMemo(()=>tre(r.floating)?.id||i,[r.floating,i]),u=KP.get(o)??o,d=xP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function JP(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...JP(e,t.id,n)])}function YP(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function XP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function ZP(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){wP(i),u()}if(wP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=FP(e),v=e.type===`mouseleave`,y=PP(c.floating,_),b=PP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=XP(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&nM(e.relatedTarget)&&PP(c.floating,e.relatedTarget)||f&&JP(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!YP([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}YP([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var QP={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},$P=mk((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),eF=xj(e=>{let t=jA(`ScrollArea`,QP,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=KA({name:`ScrollArea`,props:t,classes:Xj,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:$P}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=hP([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return Aj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),ZO(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(jj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(Yj,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(Kj,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(Jj,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(Kj,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(Jj,{...P(`thumb`)})}),(0,G.jsx)(zne,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});eF.displayName=`@mantine/core/ScrollArea`;var tF=xj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=jA(`ScrollAreaAutosize`,QP,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=hP([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return Aj(S?T:null,A),(0,G.jsx)(Dj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Dj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(eF,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});eF.classes=Xj,eF.varsResolver=$P,tF.displayName=`@mantine/core/ScrollAreaAutosize`,tF.classes=Xj,eF.Autosize=tF;var nF={root:`m_87cf2631`},rF={__staticSelector:`UnstyledButton`},iF=Sj(e=>{let t=jA(`UnstyledButton`,rF,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(Dj,{...KA({name:i,props:t,classes:nF,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});iF.classes=nF,iF.displayName=`@mantine/core/UnstyledButton`;var aF={root:`m_1b7284a3`},oF=mk((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:RO(t),"--paper-shadow":VO(n)}})),sF=Sj(e=>{let t=jA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=KA({name:`Paper`,props:t,classes:aF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:oF});return(0,G.jsx)(Dj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});sF.classes=aF,sF.varsResolver=oF,sF.displayName=`@mantine/core/Paper`;function cF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function lF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var uF={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function dF({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function fF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=dF({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[uF[c]]:r},d=-t/2;return c===`left`?{...u,...cF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...cF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...lF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...lF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function pF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function mF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Oj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...fF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}mF.displayName=`@mantine/core/FloatingArrow`;function hF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function gF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function _F({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||gF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=gF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return gF(n)}var vF={reuseTargetNode:!0},yF=xj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=jA(`Portal`,vF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return ZO(()=>(s(!0),c.current=_F({target:n,reuseTargetNode:r,...a}),nk(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,rP.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});yF.displayName=`@mantine/core/Portal`;var bF=xj(({withinPortal:e=!0,children:t,...n})=>eA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(yF,{...n,children:t}));bF.displayName=`@mantine/core/OptionalPortal`;var xF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),SF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...xF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...xF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...xF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...xF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...xF(`top`),common:{transformOrigin:`top right`}}},CF={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function wF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in SF?{transitionProperty:SF[e].transitionProperty,...i,...SF[e].common,...SF[e][CF[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[CF[t]]}}function TF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=gA(),d=lk(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{rP.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return QO(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function EF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=eA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=TF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:wF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(wF({transition:n,duration:h,state:g,timingFunction:_}))})}EF.displayName=`@mantine/core/Transition`;var DF={duration:100,transition:`fade`};function OF(e,t){return{...DF,...t,...e}}var kF={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},AF=({className:e,...t})=>(0,G.jsxs)(Dj,{component:`span`,className:gk(kF.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:kF.bar}),(0,G.jsx)(`span`,{className:kF.bar}),(0,G.jsx)(`span`,{className:kF.bar})]});AF.displayName=`@mantine/core/Bars`;var jF=({className:e,...t})=>(0,G.jsxs)(Dj,{component:`span`,className:gk(kF.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:kF.dot}),(0,G.jsx)(`span`,{className:kF.dot}),(0,G.jsx)(`span`,{className:kF.dot})]});jF.displayName=`@mantine/core/Dots`;var MF=({className:e,...t})=>(0,G.jsx)(Dj,{component:`span`,className:gk(kF.ovalLoader,e),...t});MF.displayName=`@mantine/core/Oval`;var NF={bars:AF,oval:MF,dots:jF},PF={loaders:NF,type:`oval`},FF=mk((e,{size:t,color:n})=>({root:{"--loader-size":IO(t,`loader-size`),"--loader-color":n?Pk(n,e):void 0}})),IF=xj(e=>{let t=jA(`Loader`,PF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=KA({name:`Loader`,props:t,classes:kF,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:FF});return p?(0,G.jsx)(Dj,{...g(`root`),...h,children:p}):(0,G.jsx)(Dj,{...g(`root`),component:d[i],variant:f,size:n,...h})});IF.defaultLoaders=NF,IF.classes=kF,IF.varsResolver=FF,IF.displayName=`@mantine/core/Loader`;var LF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},RF={orientation:`horizontal`},zF=mk((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),BF=xj(e=>{let t=jA(`ActionIconGroup`,RF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(Dj,{...KA({name:`ActionIconGroup`,props:t,classes:LF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:zF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});BF.classes=LF,BF.varsResolver=zF,BF.displayName=`@mantine/core/ActionIconGroup`;var VF=mk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":IO(o,`section-height`),"--section-padding-x":IO(o,`section-padding-x`),"--section-fz":zO(o),"--section-radius":t===void 0?void 0:RO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),HF=xj(e=>{let t=jA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(Dj,{...KA({name:`ActionIconGroupSection`,props:t,classes:LF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:VF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});HF.classes=LF,HF.varsResolver=VF,HF.displayName=`@mantine/core/ActionIconGroupSection`;var UF=mk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":IO(t,`ai-size`),"--ai-radius":n===void 0?void 0:RO(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),WF=Sj(e=>{let t=jA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=KA({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:LF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:UF});return(0,G.jsxs)(iF,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(EF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Dj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(IF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Dj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});WF.classes=LF,WF.varsResolver=UF,WF.displayName=`@mantine/core/ActionIcon`,WF.Group=BF,WF.GroupSection=HF;function GF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}GF.displayName=`@mantine/core/CloseIcon`;var KF={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},qF={variant:`subtle`},JF=mk((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":IO(t,`cb-size`),"--cb-radius":n===void 0?void 0:RO(n),"--cb-icon-size":U(r)}})),YF=Sj(e=>{let t=jA(`CloseButton`,qF,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=KA({name:_||`CloseButton`,props:t,className:o,style:c,classes:KF,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:JF});return(0,G.jsxs)(iF,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(GF,{}),r]})});YF.classes=KF,YF.varsResolver=JF,YF.displayName=`@mantine/core/CloseButton`;function XF(e){return W.Children.toArray(e).filter(Boolean)}var ZF={root:`m_4081bf90`},QF={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},$F=mk((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":LO(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),eI=xj(e=>{let t=jA(`Group`,QF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=XF(s),x=b.length,S=LO(c??`md`);return(0,G.jsx)(Dj,{...KA({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:ZF,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:$F})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});eI.classes=ZF,eI.varsResolver=$F,eI.displayName=`@mantine/core/Group`;var tI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},nI=mk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:RO(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),rI=xj(e=>{let t=jA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=KA({name:`Alert`,classes:tI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:nI}),C=tk(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Dj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(YF,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});rI.classes=tI,rI.varsResolver=nI,rI.displayName=`@mantine/core/Alert`;var iI={root:`m_b6d8b162`};function aI(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var oI={inherit:!1},sI=mk((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":zO(i),"--text-lh":BO(i),"--text-gradient":t===`gradient`?Lk(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),cI=Sj(e=>{let t=jA(`Text`,oI,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(Dj,{...KA({name:[`Text`,l],props:t,classes:iI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:sI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":aI(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});cI.classes=iI,cI.varsResolver=sI,cI.displayName=`@mantine/core/Text`;var lI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},uI=mk((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":IO(a,`badge-height`),"--badge-padding-x":IO(a,`badge-padding-x`),"--badge-fz":IO(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:RO(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?Pk(n,e):void 0}}}),dI=Sj(e=>{let t=jA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=KA({name:`Badge`,props:t,classes:lI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:uI});return(0,G.jsxs)(Dj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});dI.classes=lI,dI.varsResolver=uI,dI.displayName=`@mantine/core/Badge`;var fI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},pI={orientation:`horizontal`},mI=mk((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),hI=xj(e=>{let t=jA(`ButtonGroup`,pI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=jA(`ButtonGroup`,pI,e);return(0,G.jsx)(Dj,{...KA({name:`ButtonGroup`,props:t,classes:fI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:mI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});hI.classes=fI,hI.varsResolver=mI,hI.displayName=`@mantine/core/ButtonGroup`;var gI=mk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":IO(o,`section-height`),"--section-padding-x":IO(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?zO(o.replace(`compact-`,``)):zO(o),"--section-radius":t===void 0?void 0:RO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),_I=xj(e=>{let t=jA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(Dj,{...KA({name:`ButtonGroupSection`,props:t,classes:fI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:gI,rootSelector:`groupSection`})(`groupSection`),...f})});_I.classes=fI,_I.varsResolver=gI,_I.displayName=`@mantine/core/ButtonGroupSection`;var vI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},yI=mk((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":IO(a,`button-height`),"--button-padding-x":IO(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?zO(a.replace(`compact-`,``)):zO(a),"--button-radius":t===void 0?void 0:RO(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),bI=Sj(e=>{let t=jA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=KA({name:`Button`,props:t,classes:fI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:yI}),T=!!c,E=!!l;return(0,G.jsxs)(iF,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(EF,{mounted:p,transition:vI,duration:150,children:e=>(0,G.jsx)(Dj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(IF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Dj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Dj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Dj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});bI.classes=fI,bI.varsResolver=yI,bI.displayName=`@mantine/core/Button`,bI.Group=hI,bI.GroupSection=_I;var xI={root:`m_4451eb3a`},SI=Sj(e=>{let t=jA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=KA({name:`Center`,props:t,classes:xI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Dj,{mod:[{inline:c},l],...f(`root`),...d})});SI.classes=xI,SI.displayName=`@mantine/core/Center`;var[CI,wI]=DO(`Pagination.Root component was not found in tree`),TI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},EI={withPadding:!0},DI=xj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=jA(`PaginationControl`,EI,e),d=wI(),f=s||d.disabled;return(0,G.jsx)(iF,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});DI.classes=TI,DI.displayName=`@mantine/core/PaginationControl`;function OI({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var kI=e=>(0,G.jsx)(OI,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),AI=e=>(0,G.jsx)(OI,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),jI=e=>(0,G.jsx)(OI,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),MI=e=>(0,G.jsx)(OI,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),NI={icon:e=>(0,G.jsx)(OI,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},PI=xj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=jA(`PaginationDots`,NI,e);return(0,G.jsx)(Dj,{...wI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});PI.classes=TI,PI.displayName=`@mantine/core/PaginationDots`;function FI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=jA(t,i,e),s=wI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(DI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,yj(a)}var II=FI({icon:kI,name:`PaginationNext`,action:`onNext`,type:`next`}),LI=FI({icon:AI,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),RI=FI({icon:jI,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),zI=FI({icon:MI,name:`PaginationLast`,action:`onLast`,type:`next`});function BI({dotsIcon:e}){let t=wI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(PI,{icon:e},r):(0,G.jsx)(DI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}BI.displayName=`@mantine/core/PaginationItems`;var gre={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},VI=xj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=jA(`PaginationLabel`,gre,e),c=wI();return(0,G.jsx)(Dj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});VI.classes=TI,VI.displayName=`@mantine/core/PaginationLabel`;var _re={siblings:1,boundaries:1},HI=mk((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:RO(n),"--pagination-control-size":IO(t,`pagination-control-size`),"--pagination-control-fz":zO(t),"--pagination-active-bg":r?Pk(r,e):void 0,"--pagination-active-color":Wk(i,e)?Vk({color:r,theme:e,autoContrast:i}):void 0}})),UI=xj(e=>{let t=jA(`PaginationRoot`,_re,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=KA({name:`Pagination`,classes:TI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:HI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=ck({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(CI,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:HO(_,j),onPrevious:HO(v,ee),onFirst:HO(y,N),onLast:HO(b,te),getStyles:O},children:(0,G.jsx)(Dj,{...O(`root`),mod:[{layout:w},T],...D})})});UI.classes=TI,UI.varsResolver=HI,UI.displayName=`@mantine/core/PaginationRoot`;var vre={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function yre({children:e}){return(0,G.jsx)(Dj,{...wI().getStyles(`items`),children:e})}var WI=xj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=jA(`Pagination`,vre,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(yre,{children:(0,G.jsx)(BI,{dotsIcon:c})}),(0,G.jsx)(VI,{formatLabel:m})]}):(0,G.jsx)(BI,{dotsIcon:c}):null;return(0,G.jsx)(UI,{total:l,layout:p,...h,children:(0,G.jsxs)(eI,{gap:u,children:[t&&(0,G.jsx)(RI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(LI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(II,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(zI,{icon:o,...r?.(`last`)})]})})});WI.classes=TI,WI.displayName=`@mantine/core/Pagination`,WI.Root=UI,WI.Control=DI,WI.Dots=PI,WI.First=RI,WI.Last=zI,WI.Next=II,WI.Previous=LI,WI.Items=BI,WI.Label=VI;function bre({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=VP({placement:t,middleware:[fP({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=gM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var GI={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},xre={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:FO(`popover`)},KI=mk((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:RO(t),"--tooltip-bg":n?Pk(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),qI=xj(e=>{let t=jA(`TooltipFloating`,xre,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=gA(),E=KA({name:`TooltipFloating`,props:t,classes:GI,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:KI}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=bre({offset:p,position:m,defaultOpened:v}),N=pk(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=ik(j,fk(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(bF,{...x,withinPortal:i,children:(0,G.jsx)(Dj,{...w,...E(`tooltip`,{style:{...vj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});qI.classes=GI,qI.varsResolver=KI,qI.displayName=`@mantine/core/TooltipFloating`;var JI=(0,W.createContext)({withinGroup:!1}),Sre={openDelay:0,closeDelay:0};function YI(e){let{openDelay:t,closeDelay:n,children:r}=jA(`TooltipGroup`,Sre,e);return(0,G.jsx)(JI,{value:{withinGroup:!0},children:(0,G.jsx)(MP,{delay:{open:t,close:n},children:r})})}YI.displayName=`@mantine/core/TooltipGroup`,YI.extend=e=>e;function Cre(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function wre(e){let t=Cre(e.middlewares),n=[dP(e.offset)];return t.shift&&n.push(fP(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?pP():pP(t.flip)),n.push(nre({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?mP():mP(t.inline)):e.inline&&n.push(mP()),n}function Tre(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(JI).withinGroup,a=tk(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=VP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:wre(e),whileElementsMounted:XN}),{delay:m,currentId:h,setCurrentId:g}=NP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=GP([OP(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?ZP():null}),UP(l,{enabled:e.events?.focus,visibleOnly:!0}),qP(l,{role:`tooltip`}),zP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);ZO(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var Ere={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:FO(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},XI=mk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:RO(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),ZI=xj(e=>{let t=jA(`Tooltip`,Ere,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=Oj(),ce=(0,W.useRef)(null),le=Tre({position:hF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=KA({name:`Tooltip`,props:t,classes:GI,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:XI}),de=pk(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?pF({position:le.placement,dir:se}):void 0;if(oe){let e=OF(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(bF,{...I,withinPortal:d,children:(0,G.jsx)(EF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Dj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(mF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=ik(le.reference,fk(de),R),he=OF(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(bF,{...I,withinPortal:d,children:(0,G.jsx)(EF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(Dj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(mF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:gk(v,me.className),[i]:V}))]})});ZI.classes=GI,ZI.varsResolver=XI,ZI.displayName=`@mantine/core/Tooltip`,ZI.Floating=qI,ZI.Group=YI;function QI(e){if(e!==void 0)return typeof e==`number`?U(e):e}function Dre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=gA(),s=t===void 0?e:t,c=r!==void 0,l=SO({"--sg-spacing-x":LO(GO(e)),"--sg-spacing-y":LO(GO(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":QI(r)}:{"--sg-cols":GO(n)?.toString()}}),u=pO(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=LO(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=LO(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(XA,{styles:l,media:WO(pO(u),o.breakpoints).filter(e=>pO(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function $I(e){return typeof e==`object`&&e?pO(e):[]}function Ore(e){return e.sort((e,t)=>vO(e)-vO(t))}function kre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return Ore(Array.from(new Set([...$I(e),...$I(t),...r===void 0?$I(n):[]])))}function Are({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=SO({"--sg-spacing-x":LO(GO(e)),"--sg-spacing-y":LO(GO(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":QI(r)}:{"--sg-cols":GO(n)?.toString()}}),l=kre({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=LO(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=LO(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(XA,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var eL={container:`m_925c2d2c`,root:`m_2415a157`},jre={cols:1,spacing:`md`,type:`media`},tL=xj(e=>{let t=jA(`SimpleGrid`,jre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=KA({name:`SimpleGrid`,classes:eL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=_j(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Are,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(Dj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(Dre,{...t,selector:`.${v}`}),(0,G.jsx)(Dj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});tL.classes=eL,tL.displayName=`@mantine/core/SimpleGrid`;var nL={root:`m_6d731127`},Mre={gap:`md`,align:`stretch`,justify:`flex-start`},rL=mk((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":LO(t),"--stack-align":n,"--stack-justify":r}})),iL=xj(e=>{let t=jA(`Stack`,Mre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(Dj,{...KA({name:`Stack`,props:t,classes:nL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:rL})(`root`),variant:d,...p})});iL.classes=nL,iL.varsResolver=rL,iL.displayName=`@mantine/core/Stack`;var[Nre,Pre]=DO(`Table component was not found in the tree`),aL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function Fre(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function oL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=xj(r=>{let i=jA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=Pre();return(0,G.jsx)(Dj,{component:e,...Fre(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=aL,r}var sL=oL(`th`,{columnBorder:!0}),cL=oL(`td`,{columnBorder:!0}),lL=oL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),uL=oL(`thead`,{stickyHeader:!0}),dL=oL(`tbody`),fL=oL(`tfoot`),pL=oL(`caption`,{captionSide:!0}),Ire={type:`scrollarea`},mL=mk((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),hL=xj(e=>{let t=jA(`TableScrollContainer`,Ire,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=KA({name:`TableScrollContainer`,classes:aL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:mL,rootSelector:`scrollContainer`});return(0,G.jsx)(Dj,{component:d===`scrollarea`?eF:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});hL.classes=aL,hL.varsResolver=mL,hL.displayName=`@mantine/core/TableScrollContainer`;function gL({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(pL,{children:e.caption}),e.head&&(0,G.jsx)(uL,{children:(0,G.jsx)(lL,{children:e.head.map((e,t)=>(0,G.jsx)(sL,{children:e},t))})}),e.body&&(0,G.jsx)(dL,{children:e.body.map((e,t)=>(0,G.jsx)(lL,{children:e.map((e,t)=>(0,G.jsx)(cL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(fL,{children:(0,G.jsx)(lL,{children:e.foot.map((e,t)=>(0,G.jsx)(sL,{children:e},t))})})]})}gL.displayName=`@mantine/core/TableDataRenderer`;var Lre={withRowBorders:!0,verticalSpacing:7},_L=mk((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":LO(r),"--table-vertical-spacing":LO(i),"--table-border-color":a?Pk(a,e):void 0,"--table-striped-color":c&&o?Pk(o,e):void 0,"--table-highlight-on-hover-color":l&&s?Pk(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),vL=xj(e=>{let t=jA(`Table`,Lre,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=KA({name:`Table`,props:t,className:r,style:i,classes:aL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:_L});return(0,G.jsx)(Nre,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(Dj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(gL,{data:b})})})});vL.classes=aL,vL.varsResolver=_L,vL.displayName=`@mantine/core/Table`,vL.Td=cL,vL.Th=sL,vL.Tr=lL,vL.Thead=uL,vL.Tbody=dL,vL.Tfoot=fL,vL.Caption=pL,vL.ScrollContainer=hL,vL.DataRenderer=gL;var[Rre,yL]=DO(`Tabs component was not found in the tree`),bL={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},xL=xj(e=>{let t=jA(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=yL();return(0,G.jsx)(Dj,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});xL.classes=bL,xL.displayName=`@mantine/core/TabsList`;var SL=xj(e=>{let t=jA(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=eA(),f=yL();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Dj,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});SL.classes=bL,SL.displayName=`@mantine/core/TabsPanel`;var CL=xj(e=>{let t=jA(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=gA(),{dir:y}=Oj(),b=yL(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(iF,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?Pk(u,v):void 0},onKeyDown:NO({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});CL.classes=bL,CL.displayName=`@mantine/core/TabsTab`;var wL=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,TL={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},EL=mk((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":RO(t),"--tabs-color":Pk(n,e),"--tabs-text-color":Wk(r,e)?Vk({color:n,theme:e,autoContrast:r}):void 0}})),DL=xj(e=>{let t=jA(`Tabs`,TL,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=tk(c),k=(0,W.useRef)(new Set),A=ek(),j=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[ee,M]=ak({value:r,defaultValue:n,finalValue:null,onChange:i}),N=KA({name:`Tabs`,props:t,classes:bL,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:EL});return(0,G.jsx)(Rre,{value:{placement:h,value:ee,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:OO(`${O}-tab`,wL),getPanelId:OO(`${O}-panel`,wL),onChange:M,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:N,mountedPanels:k,setMountedPanel:j},children:(0,G.jsx)(Dj,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...N(`root`),...D,children:o})})});DL.classes=bL,DL.varsResolver=EL,DL.displayName=`@mantine/core/Tabs`,DL.Tab=CL,DL.Panel=SL,DL.List=xL;var OL={root:`m_7341320d`},kL=mk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":IO(t,`ti-size`),"--ti-radius":n===void 0?void 0:RO(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),AL=xj(e=>{let t=jA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(Dj,{...KA({name:`ThemeIcon`,classes:OL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:kL})(`root`),...u})});AL.classes=OL,AL.varsResolver=kL,AL.displayName=`@mantine/core/ThemeIcon`;var jL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],ML=[`xs`,`sm`,`md`,`lg`,`xl`];function NL(e,t){let n=t===void 0?`h${e}`:t;return jL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:ML.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var PL={root:`m_8a5d1357`},FL={order:1},IL=mk((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=NL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),LL=xj(e=>{let t=jA(`Title`,FL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=KA({name:`Title`,props:t,classes:PL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:IL});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Dj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});LL.classes=PL,LL.varsResolver=IL,LL.displayName=`@mantine/core/Title`;var RL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),zL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),BL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,80v96H48V80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z`}))]]),VL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z`}))]]),HL=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M96,40l33.52,88H56Zm104,88H129.52L160,208Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z`}))]]),UL=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),WL=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(UL);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});WL.displayName=`IconBase`;var GL=W.forwardRef((e,t)=>W.createElement(WL,{ref:t,...e,weights:RL}));GL.displayName=`ArrowClockwiseIcon`;var KL=GL,qL=W.forwardRef((e,t)=>W.createElement(WL,{ref:t,...e,weights:zL}));qL.displayName=`ArrowUpRightIcon`;var JL=qL,YL=W.forwardRef((e,t)=>W.createElement(WL,{ref:t,...e,weights:BL}));YL.displayName=`ArrowsLeftRightIcon`;var XL=YL,ZL=W.forwardRef((e,t)=>W.createElement(WL,{ref:t,...e,weights:VL}));ZL.displayName=`GridFourIcon`;var QL=ZL,$L=W.forwardRef((e,t)=>W.createElement(WL,{ref:t,...e,weights:HL}));$L.displayName=`PulseIcon`;var eR=$L,tR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),nR=s(((e,t)=>{t.exports=tR()})),rR=s((e=>{var t=nR(),n=TO(),r=dk();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-11||n>0&&!e.noHeader;return R(e.blocks,function(e){var n=F_(e);n>=t&&(t=n+ +(r&&(!n||N_(e)&&!e.noHeader)))}),t}return 0}function mee(e,t,n,r){var i=t.noHeader,a=gee(F_(t)),o=[],s=t.blocks||[];Oe(!s||B(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Be(l,c)){var u=new mm(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}R(s,function(n,i){var s=t.valueFormatter,c=P_(n)(s?I(I({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):L_(r,o.join(``),i?n:a.html);if(i)return d;var f=Ag(t.header,`ordinal`,e.useUTC),p=j_(r,e.renderMode).nameStyle,m=A_(r);return e.renderMode===`richText`?R_(e,f,p)+a.richText+d:L_(r,`
`+Lh(f)+`
`+d,n)}function hee(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=B(e)?e:[e],z(e,function(e,t){return Ag(e,B(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||E_.color.secondary,i),f=a?``:Ag(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=j_(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:R_(e,f,v))+(o?``:yee(e,m,h,g,y)):L_(r,(s?``:d)+(a?``:_ee(f,!s,v))+(o?``:vee(m,h,g,y)),n)}}function I_(e,t,n,r,i,a){if(e)return P_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function gee(e){return{html:fee[e],richText:pee[e]}}function L_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=A_(e);return`
`+t+r+`
`}function _ee(e,t,n){var r=t?`margin-left:2px`:``;return``+Lh(e)+``}function vee(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=B(e)?e:[e],``+z(e,function(e){return Lh(e)}).join(`  `)+``}function R_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function yee(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(B(t)?t.join(` `):t,a)}function bee(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return Fg(n)}function z_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var B_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Ks()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=Pg({color:t,type:e,renderMode:n,markerId:r});return V(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};B(t)?R(t,function(e){return I(n,e)}):I(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function xee(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=B(s),l=bee(t,n),u,d,f,p;if(o>1||c&&!o){var m=See(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=am(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=bc(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return M_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[M_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!ke(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function See(e,t,n,r,i){var a=t.getData(),o=se(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?R(r,function(e){u(am(a,n,e),e)}):R(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(M_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var V_=Ec();function H_(e,t){return e.getName(t)||e.getId(t)}var U_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=l_({count:wee,reset:Tee}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(V_(this).sourceManager=new C_(this)).prepareSource();var r=this.getInitialData(e,n);G_(r,this),this.dataTask.context.data=r,V_(this).dataBeforeProcessed=r,W_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Kg(this),r=n?Jg(e):{},i=this.subType;Zg.hasClass(i)&&(i+=`Series`),F(e,t.getTheme().get(this.subType)),F(e,this.getDefaultOption()),oc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&qg(e,r,n)},t.prototype.mergeOption=function(e,t){e=F(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Kg(this);n&&qg(this.option,e,n);var r=V_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);G_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,V_(this).dataBeforeProcessed=i,W_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!ye(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return xee({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(We.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=t_.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[H_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){_e(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Zg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Zg);ae(U_,s_),ae(U_,t_),et(U_,Zg);function W_(e){var t=e.name;bc(e)||(e.name=Cee(e)||t)}function Cee(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return R(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function wee(e){return e.model.getRawData().count()}function Tee(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Eee}function Eee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function G_(e,t){R(Re(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,pe(Dee,t))})}function Dee(e,t){var n=K_(e);return n&&n.setOutputEnd((t||this).count()),t}function K_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Oee=jo.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),kee={line:bd,rect:Go,roundRect:Go,square:Go,circle:Wu,diamond:jo.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:jo.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:jo.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Oee},Aee={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},q_={};R(kee,function(e,t){q_[t]=new e});var jee=jo.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=wn(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=q_[r];i||=(r=`rect`,q_[r]),Aee[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Mee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||E_.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function J_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?lf(e.slice(8),new tn(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?cf(e.slice(7),{},new tn(t,n,r,i),o?`center`:`cover`):new jee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Mee,a&&c.setColor(a),c}function Nee(e){return B(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Y_(e,t){if(e!=null)return B(e)||(e=[e,e]),[Ts(e[0],t[0])||0,Ts(we(e[1],e[0]),t[1])||0]}var Pee=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return gh(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Hu,n=J_(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=J_(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=E_.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(U_);function X_(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=am(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Z_=function(e){p(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=J_(e,-1,-1,2,2,null,a);o.attr({z2:we(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Iee,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Wl(this.childAt(0))},t.prototype.downplay=function(){Gl(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):Gd(f,p,o,n),Zd(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Kd(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Zf(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Y_(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Lo){var S=a.style;a.useStyle(I({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(I({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Xf(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):X_(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),lu(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=el(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&Jd(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();Jd(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Nee(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Hu);function Iee(e,t){this.parent.drift(e,t)}function Q_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function $_(e){return e!=null&&!_e(e)&&(e={isIgnore:e}),e||{}}function ev(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Zf(t),cursorStyle:t.get(`cursor`)}}function tv(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Lee=function(){function e(e){this.group=new Hu,this._SymbolCtor=e||Z_}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=$_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=ev(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Q_(e,i,r,t)&&tv(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Q_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):Gd(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function rv(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function iv(e,t){return!isFinite(e)||!isFinite(t)}var zee=typeof Float32Array<`u`?Float32Array:void 0;function av(e){return ov({ctor:zee},e).arr}function ov(e,t){var n=e.arr,r=e.ctor;if(t>Fs&&(t=Fs),!n||e.typed&&n.length=i||h<0)break;if(iv(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||iv(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,ee=v-u,M=C-v,N=void 0,te=void 0;if(s===`x`){N=Math.abs(A),te=Math.abs(j);var P=E>0?1:-1;p=_-P*N*o,m=v,O=_+P*te*o,k=v}else if(s===`y`){N=Math.abs(ee),te=Math.abs(M);var F=D>0?1:-1;p=_,m=v-F*N*o,O=_,k=v+F*te*o}else N=Math.sqrt(A*A+ee*ee),te=Math.sqrt(j*j+M*M),T=te/(te+N),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=lv(O,uv(S,_)),k=lv(k,uv(C,v)),O=uv(O,lv(S,_)),k=uv(k,lv(C,v)),E=O-_,D=k-v,p=_-E*N/te,m=v-D*N/te,p=lv(p,uv(l,_)),m=lv(m,uv(u,v)),p=uv(p,lv(l,_)),m=uv(m,lv(u,v)),E=_-p,D=v-m,O=_+E*te/N,k=v+D*te/N}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var fv=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),pv=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:E_.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new fv},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&iv(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?vr(i,u,f,m,e,s):vr(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?gr(a,d,p,h,b):gr(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(jo),mv=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(fv),hv=function(e){p(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new mv},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&iv(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){Uv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),Uv(r,e,t,n)},freeze:function(){}};function Uv(e,t,n,r){Uc(n,r)&&(e[t][0]=n,e[t][1]=r)}function Wv(e){return Gv(e)||qv(e)}function Gv(e){return e.type===`interval`}function Kv(e){return e.type===`time`}function qv(e){return e.type===`log`}function Jv(e){return e.type===`ordinal`}function Yv(e){var t=Vs(e),n=ys(10,t),r=gs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,ks(r*n,-t)}function Xv(e){return js(e)+2}function Zv(e,t){return bs(e)/bs(t)}function Qv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var ry=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,Fv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new jv({}),B(i)&&(i=new jv({categories:z(i,function(e){return _e(e)?e.value:e})})),r._ordinalMeta=i;var a=Pv(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,Iv(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:V(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=gs(e),e},t.prototype.getTicks=function(){var e=[];return ny(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ps(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ps(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=ks(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=ks(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?ks(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return iy(this,e,Yh(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=js(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),Dg(ks(e.value,n,!0))},t.type=`interval`,t}(kv);kv.registerClass(ay);var oy=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function dy(e){var t=30*eg;return e/=t,e>6?6:e>3?3:e>2?2:1}function fy(e){return e/=$h,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function py(e,t){return e/=t?Qh:Zh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function my(e){return ms(Hs(e,!0),1)}function hy(e,t,n){var r=Math.max(0,re(ag,t)-1);return fg(new Date(e),ag[r],n).getTime()}function gy(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function _y(e,t,n,r,i,a){var o=see,s=0;function c(e,t,n,i,o,c,l){for(var u=gy(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!ly(sg(e),r[0],r[1],n)){s&&(i=[{value:hy(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=ce(z(u,function(e){return ce(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=cy.length,l=Math.min(oy(cy,a,0,c),c-1),u=cy[l][1],d=cy[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};kv.registerClass(sy);var yy=0,by=1,xy=2,Sy=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=ay.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[yy]=i[by]=a[yy]=a[by]=NaN,Fv(r,t.mapperMethods);var s=qh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},xy,l),r.powStub=new ay({breakParsed:l.original}),r.intervalStub=new ay({breakParsed:l.transformed}),Iv(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=qh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return z(i.getTicks(e||{}),function(e){var i=e.value,o=Qv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Yh(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return iy(this,e,Yh(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Zv(e,this.base))},scale:function(e){return Qv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Zv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Cy.depth=n,wy.lookup=this._lookup,Qv(n===2?e:this.intervalStub.transformOut(e,Cy),this.base,wy)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Uc(t,n)||t<=0||n<=0)){var r=Ty,i=Ty;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[yy]=t,r[by]=n);var o=this.base;this.intervalStub.setExtent2(e,i[yy]=Zv(t,o),i[by]=Zv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Uc(t[0],t[1])&&Ys(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(kv);kv.registerClass(Sy);var Cy={},wy={},Ty=[],Ey={value:1,category:1,time:1,log:1},Dy=Ec();function Oy(e){var t=e.get(`type`);return(t==null||!Be(Ey,t)&&!kv.getClass(t))&&(t=`value`),t}function ky(e,t,n){var r=qh(),i;switch(r&&(i=By(e,t,n)),t){case`category`:return new ry({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Lc()});case`time`:return new sy({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Sy({logBase:e.get(`logBase`),breakOption:i});case`value`:return new ay({breakOption:i});default:return new((kv.getClass(t))||ay)({})}}function Ay(e,t,n){var r=n?Rv(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Uc(i,a)?i===t||a===t?2:it?1:3:3}function jy(e){Dy(e).noOnMyZero=!0}function My(e){return Dy(e).noOnMyZero}function Ny(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=cee(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(V(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(me(t)){if(e.type===`category`)return function(n,r){return t(Py(e,n),n.value-e.scale.getExtent()[0],null)};var r=qh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Py(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Py(e,t){var n=e.scale;return Jv(n)?n.getLabel(t):t.value}function Fy(e){return e.get(`interval`)??`auto`}function Iy(e){return e.type===`category`&&Fy(e.getLabelModel())===0}function Ly(e,t){var n={};return R(e.mapDimensionsAll(t),function(t){n[ph(e,t)]=!0}),ue(n)}function Ry(e){return e===`middle`||e===`center`}function zy(e){return e.getShallow(`show`)}function By(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!qh()||!n||!Vy(t)?void 0:r}function Vy(e){return e!==`category`}function Hy(e,t,n,r,i,a){var o=qv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=ey(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Uy(e,t){return Jv(e)?e.getRawOrdinalNumber(t.value):t.value}function Wy(e,t){return Jv(e)&&!!t.get(`boundaryGap`)}function Gy(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function Qy(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=z(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=Zy(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;R(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new kd(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function $y(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&eb(a,t))){var o=t.mapDimension(a.dim),s={};return R(a.getViewLabels(),function(e){e.tick.offInterval||(s[Uy(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function eb(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function tb(e){for(var t=e.length/2;t>0&&iv(e[t*2-2],e[t*2-1]);t--);return t-1}function nb(e,t){return[e[t*2],e[t*2+1]]}function rb(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function ib(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t<_l.length;t++)if(e.get([_l[t],`endLabel`,`show`]))return!0;return!1}function ab(e,t,n,r){if(Dv(t,`cartesian2d`)){var i=r.getModel(`endLabel`),a=i.get(`valueAnimation`),o=r.getData(),s={lastFrameIndex:0},c=ib(r)?function(n,r){e._endLabelOnDuring(n,r,o,s,a,i,t)}:null,l=t.getBaseAxis().isHorizontal(),u=Tv(t,n,r,function(){var t=e._endLabel;t&&n&&s.originalX!=null&&t.attr({x:s.originalX,y:s.originalY})},c);if(!r.get(`clip`,!0)){var d=u.shape,f=Math.max(d.width,d.height);l?(d.y-=f,d.height+=f*2):(d.x-=f,d.width+=f*2)}return c&&c(1,u),u}return Ev(t,n,r)}function ob(e,t){var n=t.getBaseAxis(),r=n.isHorizontal(),i=n.inverse,a=r?i?`right`:`left`:`center`,o=r?`middle`:i?`top`:`bottom`;return{normal:{align:e.get(`align`)||a,verticalAlign:e.get(`verticalAlign`)||o}}}var sb=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(){var e=new Hu,t=new Lee;this.group.add(t.group),this._symbolDraw=t,this._lineGroup=e,this._changePolyState=fe(this._changePolyState,this)},t.prototype.render=function(e,t,n){var r=e.coordinateSystem,i=this.group,a=e.getData(),o=e.getModel(`lineStyle`),s=e.getModel(`areaStyle`),c=a.getLayout(`points`)||[],l=r.type===`polar`,u=this._coordSys,d=this._symbolDraw,f=this._polyline,p=this._polygon,m=this._lineGroup,h=!t.ssr&&e.get(`animation`),g=!s.isEmpty(),_=s.get(`origin`),v=nv(r,a,_),y=g&&Yy(r,a,v),b=e.get(`showSymbol`),x=e.get(`connectNulls`),S=b&&!l&&$y(e,a,r),C=this._data;C&&C.eachItemGraphicEl(function(e,t){e.__temp&&(i.remove(e),C.setItemGraphicEl(t,null))}),b||d.remove(),i.add(m);var w=!l&&e.get(`step`),T;r&&r.getArea&&e.get(`clip`,!0)&&(T=r.getArea(),T.width==null?T.r0&&(T.r0-=.5,T.r+=.5):(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2)),this._clipShapeForSymbol=T;var E=Qy(a,r,n)||a.getVisual(`style`)[a.getVisual(`drawType`)];if(!(f&&u.type===r.type&&w===this._step))b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),h&&this._initSymbolLabelAnimation(a,r,T),w&&(y&&=Xy(y,c,r,w,x),c=Xy(c,null,r,w,x)),f=this._newPolyline(c),g?p=this._newPolygon(c,y):p&&=(m.remove(p),this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Fg(E)),m.setClipPath(ab(this,r,!0,e));else{g&&!p?p=this._newPolygon(c,y):p&&!g&&(m.remove(p),p=this._polygon=null),l||this._initOrUpdateEndLabel(e,r,Fg(E));var D=m.getClipPath();D?Kd(D,{shape:ab(this,r,!1,e).shape},e):m.setClipPath(ab(this,r,!0,e)),b&&d.updateData(a,{isIgnore:S,clipShape:T,disableAnimation:!0,getSymbolPoint:function(e){return[c[e*2],c[e*2+1]]}}),(!Gy(this._stackedOnPoints,y)||!Gy(this._points,c))&&(h?this._doUpdateAnimation(a,y,r,n,w,_,x):(w&&(y&&=Xy(y,c,r,w,x),c=Xy(c,null,r,w,x)),f.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:y})))}var O=e.getModel(`emphasis`),k=O.get(`focus`),A=O.get(`blurScope`),j=O.get(`disabled`);if(f.useStyle(L(o.getLineStyle(),{fill:`none`,stroke:E,lineJoin:`bevel`})),pu(f,e,`lineStyle`),f.style.lineWidth>0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var ee=f.getState(`emphasis`).style;ee.lineWidth=+f.style.lineWidth+1}el(f).seriesIndex=e.seriesIndex,lu(f,k,A,j);var M=Jy(e.get(`smooth`)),N=e.get(`smoothMonotone`);if(f.setShape({smooth:M,smoothMonotone:N,connectNulls:x}),p){var te=a.getCalculationInfo(`stackedOnSeries`),P=0;p.useStyle(L(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),te&&(P=Jy(te.get(`smooth`))),p.setShape({smooth:M,stackedOnSmooth:P,smoothMonotone:N,connectNulls:x}),pu(p,e,`areaStyle`),el(p).seriesIndex=e.seriesIndex,lu(p,k,A,j)}var F=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=F)}),this._polyline.onHoverStateChange=F,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var I=e.get(`triggerEvent`),ne=e.get(`triggerLineEvent`),re=ne===!0||I===!0||I===`line`,ie=ne===!0||I===!0||I===`area`;this.packEventData(e,f,re),p&&this.packEventData(e,p,ie)},t.prototype.packEventData=function(e,t,n){el(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(iv(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Z_(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else yv.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=Tc(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else yv.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Fl(this._polyline,e),t&&Fl(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new pv({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new hv({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);me(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=me(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=me(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(ib(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Xo({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=tb(o);c>=0&&(Xf(a,Zf(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?X_(i,e):Fee(i,n)},enableTextSetter:!0},ob(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=rb(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=nb(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Ic(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=nb(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=sp(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=cv(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=Xy(u.stackedOnCurrent,u.current,n,i,o),d=Xy(u.current,null,n,i,o),m=Xy(u.stackedOnNext,u.next,n,i,o),p=Xy(u.next,null,n,i,o)),qy(d,p)>3e3||c&&qy(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),Gd(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),Gd(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;V(i)?p=lb[i]:me(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,ub))}}}}}function fb(e){e.registerChartView(sb),e.registerSeriesModel(Pee),e.registerLayout(cb(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,db(`line`))}var pb=Ec(),mb=Ec(),hb={estimate:1,determine:2};function gb(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function _b(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:z(yb(n,r),function(t,n){return{formattedLabel:Ny(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?bb(e,t):Cb(e)}function vb(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:yb(i,r)}:e.type===`category`?Sb(e,t):{ticks:r.getTicks(n)}}function yb(e,t){var n=t.getExtent(),r=[];return R(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Jc(r,Xc,null),As(r),z(r,function(e){return{value:e}})}function bb(e,t){var n=e.getLabelModel(),r=xb(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function xb(e,t,n){var r=Tb(e),i=Fy(t),a=n.kind===hb.estimate;if(!a){var o=Db(r,i);if(o)return o}var s,c;me(i)?s=Pb(e,i,!1):(c=i===`auto`?kb(e,n):i,s=Pb(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return Ob(r,i,l),!0}):Ob(r,i,l),l}function Sb(e,t){var n=wb(e),r=Fy(t),i=Db(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),me(r))a=Pb(e,r,!0);else if(r===`auto`){var s=xb(e,e.getLabelModel(),gb(hb.determine));o=s.labelCategoryInterval,a=z(s.labels,function(e){return e.tick})}else o=r,a=Pb(e,o,!0);return Ob(n,r,{ticks:a,tickCategoryInterval:o})}function Cb(e){var t=e.scale.getTicks(),n=Ny(e);return{labels:z(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var wb=Eb(`axisTick`),Tb=Eb(`axisLabel`);function Eb(e){return function(t){return mb(t)[e]||(mb(t)[e]={list:[]})}}function Db(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=yn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===hb.estimate?(t.out.noPxChangeTryDetermine.push(fe(jb,null,e,S,c)),S):Mb(e,S,c)??S}function jb(e,t,n){return Mb(e,t,n)==null}function Mb(e,t,n){var r=pb(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function Nb(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function Pb(e,t,n){var r=Ny(e),i=e.scale,a=[],o=me(t);return ny(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var Fb=Ec();function Ib(e){Fb(e).prepare={}}function Lb(e){Fb(e).fullUpdate={}}function Rb(e){return Fb(e).fullUpdate}Kc();var zb=Ec();Ec();function Bb(e,t){var n=e.model,r=zb(Rb(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Vb(e,t){return Wb(Bb(e,t))}function Hb(e,t){var n=[];return Ub(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Ys(n)&&n>0&&Ys(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Hee,e.w2=e.w*n/r)}var Xb=[0,1],Gee=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),ws(e,Xb,Zb(this),t)},e.prototype.coordToData=function(e,t){var n=ws(e,Zb(this),Xb,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=z(vb(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Uy(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Kee(this,n,r);return z(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(Jv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),z(this.scale.getMinorTicks(e),function(e){return z(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=gb(hb.determine),_b(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Yb(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=gb(hb.determine),Ab(this,e)},e}();function Zb(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Kee(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Yb(e).w;if(!i)return!1;R(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var qee=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Gee),Qb=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Jee=1,$b=2,ex=Jee|$b;function tx(e,t,n){n||=ex,t?e.dirty|=n:e.dirty&=~n}function nx(e,t){return t||=ex,e.dirty==null||!!(e.dirty&t)}function rx(e){if(e)return nx(e)&&Yee(e,e.label,e),e}function Yee(e,t,n){var r=t.getComputedTransform();e.transform=Rf(e.transform,r);var i=e.localRect=Lf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=cp.textMargin);for(var d=0;d<4;d++)ix[d]=u===cp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===cp.textMargin&&kf(i,ix,!1,!1);var f=e.rect=Lf(e.rect,i);return r&&f.applyTransform(r),u===cp.minMargin&&kf(f,ix,!1,!1),e.axisAligned=Ff(r),(e.label=e.label||{}).ignore=t.ignore,tx(e,!1),tx(e,!0,$b),e}var ix=[0,0,0,0];function Xee(e,t,n){return e.transform=Rf(e.transform,n),e.localRect=Lf(e.localRect,t),e.rect=Lf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Ff(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Zee(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function ax(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new tn(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var px=_t(),mx=new tn(0,0,0,0),hx=function(e,t,n,r,i,a){if(Ry(e.nameLocation)){var o=a.stOccupiedRect;o&&gx(Xee({},o,a.transGroup.transform),r,i)}else _x(a.labelInfoList,a.dirVec,r,i)};function gx(e,t,n){var r=new Vt;sx(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Zee(t,r)}function _x(e,t,n,r){for(var i=Vt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ls(r-lx)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),ite=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],ate={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Rt(u,u,l),Rt(d,d,l));var p=I({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Xh(r.axis.scale))cx().buildAxisBreakLine(r,i,a,m);else{var h=new bd(I({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));pf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);V(g)&&(g=[g,g]),(V(_)||ge(_))&&(_=[_,_]);var v=Y_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];R([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=J_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){Sx(t,i,s)&&yx(e,t,n,r,i,a,o,hb.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){Sx(t,i,s)&&yx(e,t,n,r,i,a,o,hb.determine);var c=lte(e,i,a,r);cte(e,t.labelLayoutList,c),ute(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(Dx(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Vt(0,0),_=new Vt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=_t();_.transform(St(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*lx/180);var b,x;Ry(u)?b=vx.innerTextLayout(e.rotation,y??e.rotation,d):(b=ote(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=Ce(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Xo({x:g.x,y:g.y,rotation:b.rotation,silent:vx.isLabelSilent(r),style:Qf(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Mf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=vx.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,el(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=rx({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Ry(u)?tte[E]:nte[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function yx(e,t,n,r,i,a,o,s){Cx(t)||dte(e,t,i,s,r,o);var c=t.labelLayoutList;fte(e,r,c,a),hte(r,e.rotation,c);var l=e.optionHideOverlap;ste(r,c,l),l&&Qee(ce(c,function(e){return e&&!e.label.ignore})),rte(e,n,r,c)}function ote(e,t,n,r){var i=Is(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ls(i-lx/2)?(o=c?`bottom`:`top`,a=`center`):Ls(i-lx*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=ilx/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function ste(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(Iy(r))return;function a(e,a,o){var s=rx(t[a]),c=rx(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=ux(s.label).labelInfo.tick;if(Kv(l)&&u.notNice||Jv(l)&&u.offInterval){bx(s.label);return}}if(e===!1||s.suggestIgnore){bx(s.label);return}if(c.suggestIgnore){bx(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=ax({marginForce:f},s),c=ax({marginForce:f},c)}sx(s,c,null,{touchThreshold:d})&&bx(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function cte(e,t,n){e.showMinorTicks||R(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=jx(e,t.get(`startValue`,!0)),x=b!=null;!Ys(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Ys(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),Ax(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),Ax(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function Ax(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Gc(t))}function jx(e,t){return t==null?null:Se(t)?NaN:e.parse(t)}function xte(e,t){var n;if(Jv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=B(r)?r:[r,r]}return[Mx(n[0]),Mx(n[1])]}function Mx(e){return Cn(typeof e==`boolean`?0:e,1)||0}function Nx(e){var t=yte(e.scale);return t.extent||=Lc(),t}function Ste(e,t){Nx(e).dimIdxInCoord=t.get(e.dim)}function Cte(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||wte(n,e,i,r,t)}function wte(e,t,n,r,i){var a=Nx(t),o=a.extent,s=!1;Bee(t,function(r){if(r.boxCoordinateSystem){var i=rh(r).coord,c=a.dimIdxInCoord;if(c>=0&&B(i)){var l=i[c];l!=null&&!B(l)&&Rc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;R(Ly(u,n),function(e){Vc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Ete(e,t,r);Px(e,new kx(e,r,o,s,c),i),a.extent=null}function Tte(e,t){var n=e.scale;Px(n,new kx(n,e.model,t,!1,!1),bte)}function Px(e,t,n){e.rawExtentInfo=t,t.from=n}var Fx=Le();function Ix(e,t,n,r,i){e.rawExtentInfo||Tte({scale:e,model:t},i||Lc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Ete(e,t,n){var r=Wy(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Gb(t,function(e){a=!!Fx.get(e)||a}),a}function Dte(e,t,n,r){if(n.ctnShp){var i;if(Gb(e,function(t){var n=Fx.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],zc(i,a[0]),Bc(i,a[1]),jy(e))}}),i){var a=t.getExtent();if(Jv(t))e.onBand||t.setExtent2(1,ps(a[0],a[0]+i[0]),ms(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ps(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ms(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var Lx={left:0,right:0,top:0,bottom:0},Rx=[`25%`,`25%`],zx=`cartesian2d`,Ote=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Jg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&qg(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&qg(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Lx,outerBoundsContain:`all`,outerBoundsClampWidth:Rx[0],outerBoundsClampHeight:Rx[1],backgroundColor:E_.color.transparent,borderWidth:1,borderColor:E_.color.neutral30},t}(Zg),Bx=`\0__throttleOriginMethod`,Vx=`\0__throttleRate`,Hx=`\0__throttleType`;function Ux(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Wx(e,t,n,r){var i=e[t];if(i){var a=i[Bx]||i,o=i[Hx];if(i[Vx]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Ux(a,n,r===`debounce`),i[Bx]=a,i[Hx]=r,i[Vx]=n}return i}}function Gx(e,t){var n=e[t];n&&n[Bx]&&(n.clear&&n.clear(),e[t]=n[Bx])}function Kx(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&Yx(e,i,t,n)}else{Yx(e,t,t,n);var a=Nte(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&jte.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function Nte(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function Pte(e,t,n,r){e.addEventListener(t,n,r)}function Fte(e,t,n,r){e.removeEventListener(t,n,r)}var $x=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Ite=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=eS(r)/eS(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=Lte(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},nS=`silent`;function Rte(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:zte}}function zte(){$x(this.event)}var Bte=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ji),rS=function(){function e(e,t){this.x=e,this.y=t}return e}(),Vte=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],iS=new tn(0,0,0,0),aS=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new rS(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Bte,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new Ate(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(R(Vte,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=sS(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new rS(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new rS(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=Rte(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new rS(e,t);if(oS(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new tn(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(iS.copy(u.getBoundingRect()),u.transform&&iS.applyTransform(u.transform),iS.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Hte(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||nS}return!1}function oS(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Hte(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==nS)){t.target=o;break}}}function sS(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var cS=32,lS=7;function Ute(e){for(var t=0;e>=cS;)t|=e&1,e>>=1;return e+t}function uS(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Wte(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function fS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function pS(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function mS(e,t){var n=lS,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=lS||m>=lS);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-fS(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=lS||g>=lS);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),dS(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var gS=!1;function _S(){gS||(gS=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function vS(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var yS=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=vS}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),bS=We.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function xS(){return new Date().getTime()}var SS=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=xS()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(bS(t),!e._paused&&e.update())}bS(t)},t.prototype.start=function(){this._running||(this._time=xS(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xS(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xS()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new qi(e,t.loop);return this.addAnimator(n),n},t}(Ji),CS=300,wS=We.domSupported,TS=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:z(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),ES={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},DS=!1;function OS(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Gte(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function kS(e){e&&(e.zrByTouch=!0)}function AS(e,t){return Qx(e.dom,new MS(e,t),!0)}function jS(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var MS=function(){function e(e,t){this.stopPropagation=Ve,this.stopImmediatePropagation=Ve,this.preventDefault=Ve,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),NS={mousedown:function(e){e=Qx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=Qx(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=Qx(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=Qx(this.dom,e);var t=e.toElement||e.relatedTarget;jS(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){DS=!0,e=Qx(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){DS||(e=Qx(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=Qx(this.dom,e),kS(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),NS.mousemove.call(this,e),NS.mousedown.call(this,e)},touchmove:function(e){e=Qx(this.dom,e),kS(e),this.handler.processGesture(e,`change`),NS.mousemove.call(this,e)},touchend:function(e){e=Qx(this.dom,e),kS(e),this.handler.processGesture(e,`end`),NS.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!xc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[iC],e},t.prototype.setTheme=function(e){this._theme=new yp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function hC(e,t){return e.join(`,`)===t.join(`,`)}var gC=R,_C=_e,vC=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function yC(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=vC.length;n0?e[n-1].seriesModel:null)}),$te(e))})}function $te(e){R(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ps(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var BC=function(){function e(){this.group=new Hu,this.uid=bh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Qe(BC),at(BC);var VC=Ec(),HC={itemStyle:ot(gp,!0),lineStyle:ot(pp,!0)},ene={lineStyle:`stroke`,itemStyle:`fill`};function UC(e,t){return e.visualStyleMapper||HC[t]||(console.warn(`Unknown style type '`+t+`'.`),HC.itemStyle)}function WC(e,t){return e.visualDrawType||ene[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var tne={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=UC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=WC(e,r),c=a[s],l=me(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||me(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||me(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=I({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},GC=new yp,nne={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=UC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){GC.option=n[r];var o=i(GC);I(e.ensureUniqueItemVisual(t,`style`),o),GC.option.decal&&(e.setItemVisual(t,`decal`,GC.option.decal),GC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},KC={performRawSeries:!0,overallReset:function(e){var t=Le();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();VC(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=VC(e).scope,a=WC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},qC=Math.PI;function JC(e,t){t||={},L(t,{text:`loading`,textColor:E_.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:E_.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Hu,r=new Go({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Xo({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Go({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Ed({shape:{startAngle:-qC/2,endAngle:-qC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:qC*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:qC*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var YC=function(){function e(e,t,n,r){this._stageTaskMap=Le(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Qc(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Le();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;R(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});Oe(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;R(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Le(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||l_({plan:ew,reset:tw,count:iw}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||l_({reset:XC});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Le(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;Oe(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):R(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,l_({reset:ZC,onDirty:$C})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return me(e)&&(e={overallReset:e,seriesType:aw(e)}),e.uid=bh(`stageHandler`),t&&(e.visualType=t),e},e}();function XC(e){e.overallReset(e.ecModel,e.api,e.payload)}function ZC(e){return e.dirtyOnOverallProgress&&QC}function QC(){this.agent.dirty(),this.getDownstream().dirty()}function $C(){this.agent&&this.agent.dirty()}function ew(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function tw(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=ac(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?z(t,function(e,t){return rw(t)}):nw}var nw=rw(0);function rw(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),hw=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],gw=hw.concat([`symbolKeepAspect`]),_w={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&Mw(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function Fw(e,t,n){for(var r=t.type===`radial`?Pw(e,t,n):Nw(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:ge(e)?[e]:B(e)?e:null}function Bw(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&zw(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=z(n,function(e){return e/i}),r/=i)}return[n,r]}var Vw=new ao(!0);function Hw(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function Uw(e){return typeof e==`string`&&e!==`none`}function Ww(e){var t=e.fill;return t!=null&&t!==`none`}function Gw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function Kw(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function qw(e,t,n){var r=mt(t.image,t.__image,n);if(gt(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*He),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function Jw(e,t,n,r,i){var a,o=Hw(n),s=Ww(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||Vw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?Fw(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?Fw(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?qw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?qw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=Bw(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&Kw(e,n),s&&Gw(e,n)):(s&&Gw(e,n),o&&Kw(e,n)),T&&e.setLineDash([])}function Yw(e,t,n){var r=t.__image=mt(n.image,t.__image,t,t.onload);if(r&>(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function Xw(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=Bw(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(Hw(n)&&e.strokeText(i,n.x,n.y),Ww(n)&&e.fillText(i,n.x,n.y)):(Ww(n)&&e.fillText(i,n.x,n.y),Hw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var Zw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],Qw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function $w(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){oT(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ya.opacity:o}(r||t.blend!==n.blend)&&(a||=(oT(e,i),!0),e.globalCompositeOperation=t.blend||ya.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[RT]){if(this._disposed){this.id;return}var r,i,a;if(_e(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[RT]=!0,gE(this),!this._model||t){var o=new dC(this._api),s=this._theme,c=this._model=new oC;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},wE);var l={seriesTransition:a,optionChanged:!0};if(n)this[BT]={silent:r,updateParams:l},this[RT]=!1,this.getZr().wakeUp();else{try{QT(this),tE.update.call(this,null,l)}catch(e){throw this[BT]=null,this[RT]=!1,e}this._ssr||this._zr.flush(),this[BT]=null,this[RT]=!1,aE.call(this,r),oE.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[RT]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[BT]&&(r??=this[BT].silent,i=this[BT].updateParams,this[BT]=null),this[RT]=!0,gE(this);try{this._updateTheme(e),n.setTheme(this._theme),QT(this),tE.update.call(this,{type:`setTheme`},i)}catch(e){throw this[RT]=!1,e}this[RT]=!1,aE.call(this,r),oE.call(this,r)}}},t.prototype._updateTheme=function(e){V(e)&&(e=EE[e]),e&&(e=P(e),e&&zC(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||We.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return R(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;R(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return R(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(kE[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();R(OE,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(P(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=WS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return R(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Go({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),R(u,function(e){var t=new Lo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return nE(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return nE(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return nE(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return R(Oc(n,e),function(e,n){n.indexOf(`Models`)>=0&&R(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Oc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?bw(i,t):yw(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;R(yE,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&Sw(i,function(e){var t=el(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=I({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;R(SE,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),kte(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Nc(this.getDom(),jE,``);var e=this,t=e._api,n=e._model;R(e._componentsViews,function(e){e.dispose(n,t)}),R(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete OE[e.id]},t.prototype.resize=function(e){if(!this[RT]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[BT]&&(r??=this[BT].silent,n=!0,this[BT]=null),this[RT]=!0,gE(this);try{n&&QT(this),tE.update.call(this,{type:`resize`,animation:I({duration:0},e&&e.animation)})}catch(e){throw this[RT]=!1,e}this[RT]=!1,aE.call(this,r),oE.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(_e(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),DE[e]){var n=DE[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=I({},e);return t.type=xE[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(_e(t)||(t={silent:!!t}),bE[e.type]&&this._model){if(this[RT]){this._pendingActions.push(e);return}var n=t.silent;iE.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&We.browser.weChat&&this._throttledZrFlush(),aE.call(this,n),oE.call(this,n)}},t.prototype.updateLabelLayout=function(){Cw.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){QT=function(e){Ib(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),$T(e,!0),$T(e,!1),t.plan()},$T=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cwe(t.get(`hoverLayerThreshold`),QS.hoverLayerThreshold)&&!We.node&&!We.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=zf(e);t.eachRendered(function(e){return Vf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!qd(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(qd(e))return;if(e instanceof jo&&yu(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}fE=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Wl(t,n),mE(e)},n.prototype.leaveEmphasis=function(t,n){Gl(t,n),mE(e)},n.prototype.enterBlur=function(t){Kl(t),mE(e)},n.prototype.leaveBlur=function(t){ql(t),mE(e)},n.prototype.enterSelect=function(t){Jl(t),mE(e)},n.prototype.leaveSelect=function(t){Yl(t),mE(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[zT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(dl))(e)},pE=function(e){function t(e,t){for(var n=0;n=0)){WE.push(n);var o=YC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function KE(e,t){DE[e]=t}function qE(e,t,n){var r=Ew(`registerMap`);r&&r(e,t,n)}var JE=y_;UE(kT,tne),UE(MT,nne),UE(MT,KC),UE(kT,_w),UE(MT,vw),UE(IT,vT),FE(zC),IE(ST,Zte),KE(`default`,JC),BE({type:yl,event:yl,update:yl},Ve),BE({type:bl,event:bl,update:bl},Ve),BE({type:xl,event:wl,update:xl,action:Ve,refineEvent:YE,publishNonRefinedEvent:!0}),BE({type:Sl,event:wl,update:Sl,action:Ve,refineEvent:YE,publishNonRefinedEvent:!0}),BE({type:Cl,event:wl,update:Cl,action:Ve,refineEvent:YE,publishNonRefinedEvent:!0});function YE(e,t,n,r){return{eventContent:{selected:ou(n),isFromClick:t.isFromClick||!1}}}PE(`default`,{}),PE(`dark`,pw);var XE=[],ZE={registerPreprocessor:FE,registerProcessor:IE,registerPostInit:LE,registerPostUpdate:RE,registerUpdateLifecycle:zE,registerAction:BE,registerCoordinateSystem:VE,registerLayout:HE,registerVisual:UE,registerTransform:JE,registerLoading:KE,registerMap:qE,registerImpl:Tw,PRIORITY:LT,ComponentModel:Zg,ComponentView:BC,SeriesModel:U_,ChartView:yv,registerComponentModel:function(e){Zg.registerClass(e)},registerComponentView:function(e){BC.registerClass(e)},registerSeriesModel:function(e){U_.registerClass(e)},registerChartView:function(e){yv.registerClass(e)},registerCustomSeries:function(e,t){Ow(e,t)},registerSubTypeDefaulter:function(e,t){Zg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Jte(e,t)}};function QE(e){if(B(e)){R(e,function(e){QE(e)});return}re(XE,e)>=0||(XE.push(e),me(e)&&(e={install:e}),e.install(ZE))}var $E=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),eD=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ac).models[0]},t.type=`cartesian2dAxis`,t}(Zg);ae(eD,$E);var tD={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:E_.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:E_.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:E_.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[E_.color.backgroundTint,E_.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:E_.color.neutral00,borderColor:E_.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},nD=F({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},tD),rD=F({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:E_.color.axisMinorSplitLine,width:1}}},tD),iD={category:nD,value:rD,time:F({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},rD),log:L({logBase:10},rD)};function aD(e,t,n,r){R(Ey,function(i,a){var o=F(F({},iD[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Kg(this),r=n?Jg(e):{};F(e,t.getTheme().get(a+`Axis`)),F(e,this.getDefaultOption()),e.type=oD(e),n&&qg(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=jv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=cx();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,oD)}function oD(e){return e.type||(e.data?`category`:`value`)}var sD=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return z(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),ce(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),cD=[`x`,`y`];function lD(e){return(e.type===`interval`||e.type===`time`)&&!Xh(e)}var uD=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=zx,t.dimensions=cD,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(lD(e)&&lD(t)){var n=Rv(e,null),r=Rv(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=wt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new tn(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Rt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Rt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new tn(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(sD);function dD(e,t){var n=e.scale,r=e.model,i=Ix(n,r,r.ecModel,e,null),a=qv(n),o=qv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=hs(l[0].value-l[1].value),g=hs(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(N(),k=ks(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=ks(vs(C[0]/E)*E,D),O=ks(_s(C[1]/E)*E,D);var e=gs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=_s(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Hy(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function fD(e,t){var n=qv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=$v(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?mD(r,t):pD(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Xv(d)),i[0]||(s[0]=ks(_s(s[0]/u)*u,l)),i[1]||(s[1]=ks(vs(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Hy(e,i,o,s,a,c)}function pD(e,t){var n=ty(t.splitNumber,5),r=Bv(e),i=t.minInterval,a=t.maxInterval,o=Hs(r/n,!0);i!=null&&oa&&(o=a);var s=Xv(o),c=e.getExtent(),l=[ks(vs(c[0]/o)*o,s),ks(_s(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function mD(e,t){var n=ty(t.splitNumber,10),r=e.getExtent(),i=Bv(e),a=ms(Bs(i),1);n/i*a<=.5&&(a*=10);var o=Xv(a),s=[ks(vs(r[0]/a)*a,o),ks(_s(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function hD(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;lne(t,n,r,i,null)}function lne(e,t,n,r,i){var a=Ix(e,t,r,n,i),o=Gv(e)||Kv(e);une(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Dte(n,e,a,r)}function une(e,t){dne[e.type](e,t)}var dne={interval:fD,log:fD,time:vy,ordinal:Ve},gD=[[3,1],[0,2]],fne=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=cD,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;R(this._axesList,function(e){Cte(e,1);var t=e.scale;Jv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ue(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):hD(i)}R(n,function(e){mne(e,e.__alignTo)?hD(e):dD(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};R(n.x,function(e){_D(n,`y`,e,i)}),R(n.y,function(e){_D(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Wg(e,t),i=this._rect=Hg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(bD(a,i),!n){var c=gne(i,o,a,s,t),l=void 0;if(s)SD?(SD(this._axesList,i),bD(a,i)):l=CD(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=_ne(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=CD(d,f,p,i,a,c,r))}wD(i,a,hb.determine,null,l,r),R(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}_e(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];Wv(a.scale)&&By(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&R(r,function(e){e.__alignTo=n})}function mne(e,t){return Xh(e.scale)||Xh(t.scale)||t.scale.getTicks().length<2}function hne(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function bD(e,t){R(e.x,function(e){return xD(e,t.x,t.width)}),R(e.y,function(e){return xD(e,t.y,t.height)})}function xD(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),hne(e,t)}var SD;function CD(e,t,n,r,i,a,o){wD(r,i,hb.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=le(s,function(e){return e>0})==null;return kf(r,s,!0,!0,n),bD(i,r),c;function l(e){R(i[ef[e]],function(t){if(zy(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Se(t)&&t>1e-4&&(e/=t),e}}function gne(e,t,n,r,i){var a=new fx(vne);return R(n,function(n){return R(n,function(n){if(zy(n.model)){var o=!r;n.axisBuilder=_te(e,t,n.model,i,a,o)}})}),a}function wD(e,t,n,r,i,a){var o=n===hb.determine;R(t,function(t){return R(t,function(t){zy(t.model)&&(vte(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[ef[1-t]]=e[tf[t]]<=a.refContainer[tf[t]]*.5?0:1-t==1?2:1}R(t,function(e,t){return R(e,function(e){zy(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function _ne(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Hg(e.get(`outerBounds`,!0)||Lx,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||re([`all`,`axisLabel`],a)<0?`all`:a,s=[Ds(we(e.get(`outerBoundsClampWidth`,!0),Rx[0]),t.width),Ds(we(e.get(`outerBoundsClampHeight`,!0),Rx[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var vne=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;hx(e,t,n,r,i,a),Ry(e.nameLocation)||R(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&_x(e.labelInfoList,e.dirVec,r,i)})};function yne(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return bne(n,e,t),n.seriesInvolved&&Sne(n,e),n}function bne(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];R(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=OD(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(R(n.getAxes(),pe(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&R(f.baseAxes,pe(p,!d||`cross`,u)),d&&R(f.otherAxes,pe(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||DD(d))){s??=d.get(`triggerTooltip`),d=r?xne(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=OD(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:DD(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=Cne(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function xne(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};R(s,function(e){c[e]=P(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&L(l,u.textStyle)}return e.model.getModel(`axisPointer`,new yp(c,n,r))}function Sne(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&R(e.coordSysAxesInfo[OD(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function Cne(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function wne(e){var t=ED(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=DD(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o=0;a--)r[a]??(delete n[t[a]],t.pop())}function VD(e,t){var n=e.visual,r=[];_e(n)?FD(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),YD(e,r)}function HD(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:qD([0,1])}}function UD(e){var t=this.option.visual;return t[Math.round(ws(e,[0,1],[0,t.length-1],!0))]||{}}function WD(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function GD(e){var t=this.option.visual;return t[this.option.loop&&e!==LD?e%t.length:e]}function KD(){return this.option.visual[0]}function qD(e){return{linear:function(t){return ws(t,e,this.option.visual,!0)},category:GD,piecewise:function(t,n){var r=JD.call(this,n);return r??=ws(t,e,this.option.visual,!0),r},fixed:KD}}function JD(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[RD.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function YD(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=z(t,function(e){return Kr(e)||[0,0,0,1]})),t}var XD={linear:function(e){return ws(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=RD.findPieceIndex(e,t,!0);if(n!=null)return ws(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??LD},fixed:Ve};function ZD(e,t,n){return e?t<=n:ta&&(t[1-r]=Ps(t[r],d.sign*a)),t}function $D(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function eO(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var tO=256,nO=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=E_.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function rO(e,t,n){var r=e[1]-e[0];t=z(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var aO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):Ov(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(Ov(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Pf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=Dv(a,`cartesian2d`),s=Dv(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Yb(f).w+.5,l=Yb(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=Zf(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var j=a.dataToPoint([k,A]);D=new Go({shape:{x:j[0]-c/2,y:j[1]-l/2,width:c,height:l},style:O})}else if(s){var ee=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Se(ee.x))continue;D=new Go({z2:1,shape:ee,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var M=a.dataToLayout([h.get(T[0],E)]),ee=M.contentRect||M.rect;if(Se(ee.x)||Se(ee.y))continue;D=new Go({z2:1,shape:ee,style:O})}if(h.hasItemOption){var N=h.getItemModel(E),te=N.getModel(`emphasis`);g=te.getModel(`itemStyle`).getItemStyle(),_=N.getModel([`blur`,`itemStyle`]).getItemStyle(),v=N.getModel([`select`,`itemStyle`]).getItemStyle(),y=N.get([`itemStyle`,`borderRadius`]),S=te.get(`focus`),C=te.get(`blurScope`),w=te.get(`disabled`),b=Zf(N)}D.shape.r=y;var P=e.getRawValue(E),F=`-`;P&&P[2]!=null&&(F=P[2]+``),Xf(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:F}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,lu(D,S,C,w),D.incremental=Zc(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new nO;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?iO(v,n.option.range):rO(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Lo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(yv),oO=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return gh(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=eh.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:E_.color.primary}}},t}(U_);function sO(e){e.registerChartView(aO),e.registerSeriesModel(oO)}function cO(e){return Object.keys(e)}function lO(e){return e&&typeof e==`object`&&!Array.isArray(e)}function uO(e,t){let n={...e},r=t;return lO(e)&&lO(t)&&Object.keys(t).forEach(t=>{lO(r[t])&&t in e?n[t]=uO(n[t],r[t]):n[t]=r[t]}),n}function dO(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function fO(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function pO(e){let t=fO(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function mO(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function hO(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?mO(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?mO(n):n}}return r}return n}var U=hO(`rem`,{shouldScale:!0}),gO=hO(`em`);function _O(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function vO(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var yO=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function ee(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function M(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,M(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),M(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=yO()})),W=u(bO(),1);function xO(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function SO(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function CO(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function wO(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function TO(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function EO(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(wO(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>DO(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=EO(l,c,r),d=TO(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[EO(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[TO(c.length,c,!1)]?.focus()}}}var kO={app:100,modal:200,popover:300,overlay:400,max:9999};function AO(e){return kO[e]}function jO(e,t=`size`,n=!0){if(e!==void 0)return vO(e)?n?U(e):e:`var(--${t}-${e})`}function MO(e){return jO(e,`mantine-spacing`)}function NO(e){return e===void 0?`var(--mantine-radius-default)`:jO(e,`mantine-radius`)}function PO(e){return jO(e,`mantine-font-size`)}function FO(e){return jO(e,`mantine-line-height`,!1)}function IO(e){if(e)return jO(e,`mantine-shadow`,!1)}function LO(e,t){return n=>{e?.(n),t?.(n)}}function RO(e,t){return e in t?pO(t[e]):pO(e)}function zO(e,t){let n=e.map(e=>({value:e,px:RO(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function BO(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function VO(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function HO(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function UO(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=HO(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function WO(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function GO(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:WO(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var KO=typeof document<`u`?W.useLayoutEffect:W.useEffect;function qO(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var JO=e=>(e+1)%1e6;function YO(){let[,e]=(0,W.useReducer)(JO,0);return e}function XO(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return KO(()=>{r.current||(r.current=!0,n(VO()))},[]),typeof e==`string`?e:t}function ZO(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function QO(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=ZO(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():ZO(e,null)}),t.clear()}}}function $O(...e){return(0,W.useCallback)(QO(...e),e)}function ek({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function tk(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var nk=`dots`;function rk({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=ek({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return tk(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=bO();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ak()}));function sk(e){return e?.props?.ref}function ck(e){let t=W.Children.toArray(e);return t.length!==1||!xO(t[0])?null:t[0]}function lk(e){return e}function uk(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=dk(t[e],n):t[e]=n})}),t}function mk({theme:e,classNames:t,props:n,stylesCtx:r}){return pk((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||fk))}function hk({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function gk(e){return e===`auto`||e===`dark`||e===`light`}function _k({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return gk(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&gk(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function vk(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function yk(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function bk(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function xk(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function Sk(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function Ck(e){return yk(e)?bk(e):e.startsWith(`rgb`)?xk(e):e.startsWith(`hsl`)?Sk(e):{r:0,g:0,b:0,a:1}}function wk(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function Tk(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function Ek(e){if(e.startsWith(`oklch(`))return(Tk(e)||0)/100;let{r:t,g:n,b:r}=Ck(e),i=t/255,a=n/255,o=r/255,s=wk(i),c=wk(a),l=wk(o);return .2126*s+.7152*c+.0722*l}function Dk(e,t=.179){return!e.startsWith(`var(`)&&Ek(e)>t}function Ok({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Dk(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:Dk(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:Dk(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][vk(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:Dk(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:Dk(e,t.luminanceThreshold),shade:a,variable:void 0}}function kk(e,t){let n=Ok({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function Ak(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function jk(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=Ck(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function Mk(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=kk(n.from,t),i=kk(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function Nk(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=Ck(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var Pk=Nk,Fk=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=Ok({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&Ak(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:jk(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:jk(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:Nk(e,.1),hover:Nk(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:Nk(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:Nk(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:Nk(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:Nk(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:jk(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:jk(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:jk(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:Mk(r,t),hover:Mk(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function Ik({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&Ok({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Lk(e,t,n){return Ik({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Rk(e,t){let n=e.colors[e.primaryColor];return Ak(n)?e.autoContrast?Lk(n,e,t):`var(--mantine-color-white)`:Ik({color:n[vk(e,t)],theme:e,autoContrast:null})}function zk(e,t){return typeof e==`boolean`?e:t.autoContrast}var Bk=(0,W.createContext)(null);function Vk(){let e=(0,W.use)(Bk);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function Hk(){return Vk().cssVariablesResolver}function Uk(){return Vk().classNamesPrefix}function Wk(){return Vk().getStyleNonce}function Gk(){return Vk().withStaticClasses}function Kk(){return Vk().headless}function qk(){return Vk().stylesTransform?.sx}function Jk(){return Vk().stylesTransform?.styles}function Yk(){return Vk().env||`default`}function Xk(){return Vk().deduplicateInlineStyles}function Zk(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function Qk({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(Zk(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),Zk(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),KO(()=>{Zk(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return Zk(r,n),()=>{};r===void 0&&Zk(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&Zk(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var $k=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),eA=s(((e,t)=>{t.exports=$k()})),tA={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},nA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,rA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:tA,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:Fk,autoContrast:!1,luminanceThreshold:.3,fontFamily:nA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:nA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},iA=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,aA=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function oA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function sA(e){if(!(e.primaryColor in e.colors))throw Error(iA);if(typeof e.primaryShade==`object`&&(!oA(e.primaryShade.dark)||!oA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!oA(e.primaryShade))throw Error(aA)}function cA(e,t){if(!t)return sA(e),e;let n=uO(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),sA(n),n}var G=eA(),lA=(0,W.createContext)(null),uA=()=>(0,W.use)(lA)||rA;function dA(){let e=(0,W.use)(lA);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function fA({theme:e,children:t,inherit:n=!0}){let r=uA(),i=(0,W.useMemo)(()=>cA(n?r:rA,e),[e,r,n]);return(0,G.jsx)(lA,{value:i,children:t})}fA.displayName=`@mantine/core/MantineThemeProvider`;function pA(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function mA(e,t){let n=t?[t]:[`:root`,`:host`],r=pA(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=pA(e.dark),o=pA(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function hA({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=vk(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:Pk(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=vk(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:jk(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:jk(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:Pk(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function gA(e,t,n){cO(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var _A=e=>{let t=vk(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":Rk(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":Rk(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};gA(r.variables,e.breakpoints,`breakpoint`),gA(r.variables,e.spacing,`spacing`),gA(r.variables,e.fontSizes,`font-size`),gA(r.variables,e.lineHeights,`line-height`),gA(r.variables,e.shadows,`shadow`),gA(r.variables,e.radius,`radius`),gA(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),cO(e.colors).forEach(t=>{let n=e.colors[t];if(Ak(n)){Object.assign(r.light,hA({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,hA({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=Lk(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=Lk(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,hA({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,hA({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return cO(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function vA(){let e=dA(),t=Wk(),n=cO(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=pO(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:gO(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:gO(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function yA({theme:e,generator:t}){let n=_A(e),r=t?.(e);return r?uO(n,r):n}var bA=_A(rA);function xA(e){let t={variables:{},light:{},dark:{}};return cO(e.variables).forEach(n=>{bA.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),cO(e.light).forEach(n=>{bA.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),cO(e.dark).forEach(n=>{bA.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function SA(e){return mA({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function CA({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=dA(),r=Wk(),i=yA({theme:n,generator:Hk()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=mA(a?xA(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:SA(e)}`}}):null}CA.displayName=`@mantine/CssVariables`;function wA({respectReducedMotion:e,getRootElement:t}){KO(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function TA({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=_k(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=Qk({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return wA({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(Bk,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(fA,{theme:e,children:[o&&(0,G.jsx)(CA,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(vA,{}),t]})})}TA.displayName=`@mantine/core/MantineProvider`;function EA(e,t,n){let r=dA(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,..._O(n)}}function DA(e){return e}var OA={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function kA({theme:e,options:t,unstyled:n}){return dk(t?.focusable&&!n&&(e.focusClassName||OA[e.focusRing]),t?.active&&!n&&e.activeClassName)}function AA({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return mk({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function jA({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return mk({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function MA({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function NA({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function PA({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function FA({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function IA({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return dk(kA({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),FA({options:t,classes:s,selector:r,unstyled:c||m}),a[r],jA({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),AA({selector:r,stylesCtx:f,options:t,props:d,theme:e}),MA({rootSelector:u,selector:r,className:l}),NA({selector:r,classes:s,unstyled:c||m}),p&&!m&&PA({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function LA({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...LA({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function RA({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&hk({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...LA({style:n?.style,theme:e})}}function zA(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],..._O(t[n])}}),e),{})}function BA({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Jk()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function VA({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=dA(),m=Uk(),h=Gk(),g=Kk(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=BA({props:n,stylesCtx:r,themeName:_,theme:p}),b=mk({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>mk({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:hk({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=hk({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=zA([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=LA({style:a,theme:p});return(e,a)=>({...f?.[e],className:IA({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:RA({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function HA(e){return cO(e).reduce((t,n)=>e[n]===void 0?t:`${t}${dO(n)}:${e[n]};`,``).trim()}function UA({selector:e,styles:t,media:n,container:r}){let i=t?HA(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${HA(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${HA(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function WA(e){let t=5381;for(let n=0;n>>0).toString(36)}function GA({deduplicate:e,...t}){let n=Wk(),r=UA(t);return e?(0,G.jsx)(`style`,{href:`mantine-${WA(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function KA(e){let t=5381;for(let n=0;n>>0).toString(36)}function qA(e,t){return`__mdi__-${KA(`${e?HA(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${HA(e.styles)}`).join(`|`):``}`)}`}function JA(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e,...ve}=e;return{styleProps:_O({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:j,ta:ee,lh:M,fs:N,tt:te,td:P,w:F,miw:I,maw:ne,h:L,mih:re,mah:ie,bgsz:ae,bgp:oe,bgr:R,bga:z,pos:se,top:ce,left:le,bottom:ue,right:de,inset:fe,display:pe,flex:B,bdrs:w,hiddenFrom:me,visibleFrom:V,lightHidden:he,darkHidden:ge,sx:_e}),rest:ve}}var YA={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function XA(e,t){let n=Ok({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function ZA(e,t){let n=Ok({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:XA(e,t)}function QA(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${XA(i.join(` `),t)}`),a.trim()}return e}var $A={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function ej(e){return typeof e==`string`&&e in $A?$A[e]:e}var tj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function nj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&tj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function rj(e){return e}var ij=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function aj(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&ij.includes(e)?`var(--mantine-${e}-line-height)`:e}function oj(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function sj(e){return typeof e==`number`?U(e):e}function cj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var lj={color:XA,textColor:ZA,fontSize:nj,spacing:cj,radius:oj,identity:rj,size:sj,lineHeight:aj,fontFamily:ej,border:QA};function uj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function dj({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(uj(e))-Number(uj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function fj(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function pj(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function mj(e){return typeof e==`object`&&e?cO(e).filter(e=>e!==`base`):[]}function hj(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function gj({styleProps:e,data:t,theme:n}){return dj(cO(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=pj(e[i]);if(!fj(e[i]))return o.forEach(e=>{r.inlineStyles[e]=lj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=mj(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=lj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:lj[a.type](hj(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function _j(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function vj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...vj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function yj(e){return e}var bj=yj;function xj(e){return e}function Sj(e){let t=e;return t.extend=xj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Cj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=xj,t}function wj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Tj(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[wj(n)]=e[n]),t},{})}function Ej(e){return e?typeof e==`string`?{[wj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Ej(t)}),{}):Tj(e):null}function Dj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Dj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Oj({theme:e,style:t,vars:n,styleProps:r}){let i=Dj(t,e),a=Dj(n,e);return{...i,...a,...r}}function kj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=dA(),g=e||`div`,{styleProps:_,rest:v}=JA(m),y=qk()?.()?.(_.sx),b=_j(),x=gj({styleProps:_,theme:h,data:YA}),S=Xk(),C=S&&x.hasResponsiveStyles?qA(x.styles,x.media):b,w={ref:p,style:Oj({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:dk(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":vO(o)?void 0:o||void 0,size:f,...Ej(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(GA,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}kj.displayName=`@mantine/core/Box`;var Aj=bj(kj),jj=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function Mj(){return(0,W.use)(jj)}var[Nj,Pj]=SO(`ScrollArea.Root component was not found in tree`);function Fj(e,t){let n=(0,W.useEffectEvent)(t);KO(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function Ij(e){let{style:t,...n}=e,r=Pj(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return Fj(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),Fj(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function Lj(e){let t=Pj(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(Ij,{...e}):null}var Rj={scrollHideDelay:1e3,type:`hover`};function zj(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=EA(`ScrollAreaRoot`,Rj,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=$O(a,c);return(0,G.jsx)(Nj,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Aj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}zj.displayName=`@mantine/core/ScrollAreaRoot`;function Bj(e,t){let n=e/t;return Number.isNaN(n)?0:n}function Vj(e){let t=Bj(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function Hj(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function Uj(e,[t,n]){return Math.min(n,Math.max(t,e))}function Wj(e,t,n=`ltr`){let r=Vj(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=Uj(e,n===`ltr`?[0,o]:[o*-1,0]);return Hj([0,o],[0,s])(c)}function Gj(e,t,n,r=`ltr`){let i=Vj(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return Hj([c,l],d)(e)}function Kj(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[Yj,Xj]=SO(`ScrollAreaScrollbar was not found in tree`);function Zj(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=Pj(),[p,m]=(0,W.useState)(null),h=$O(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=HO(o),S=UO(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),Fj(p,S),Fj(f.content,S),(0,G.jsx)(Yj,{value:{scrollbar:p,hasThumb:n,onThumbChange:HO(r),onThumbPointerUp:HO(i),onThumbPositionChange:x,onThumbPointerDown:HO(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:Jj(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:Jj(e.onPointerMove,C),onPointerUp:Jj(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var Qj=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Pj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=$O(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(Zj,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${Vj(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),Kj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:qj(s.paddingLeft),paddingEnd:qj(s.paddingRight)}})}})};Qj.displayName=`@mantine/core/ScrollAreaScrollbarX`;function $j(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=Pj(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=$O(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(Zj,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${Vj(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),Kj(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:qj(s.paddingTop),paddingEnd:qj(s.paddingBottom)}})}})}$j.displayName=`@mantine/core/ScrollAreaScrollbarY`;function eM(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=Mj(),i=Pj(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=Bj(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>Gj(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(Qj,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=Wj(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)($j,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=Wj(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}eM.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function tM(e){let t=Pj(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=UO(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(tM,{"data-state":i?`visible`:`hidden`,...n}):null}nM.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function rM(e){let{forceMount:t,...n}=e,r=Pj(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=UO(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(eM,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:Jj(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:Jj(e.onPointerLeave,()=>o(`idle`))}):null}function iM(e){let{forceMount:t,...n}=e,r=Pj(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(nM,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(rM,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(tM,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(eM,{...n}):null}iM.displayName=`@mantine/core/ScrollAreaScrollbar`;function aM(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function oM(e){let{style:t,ref:n,...r}=e,i=Pj(),a=Xj(),{onThumbPositionChange:o}=a,s=$O(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=UO(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=aM(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:Jj(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:Jj(e.onPointerUp,a.onThumbPointerUp)})}oM.displayName=`@mantine/core/ScrollAreaThumb`;function sM(e){let{forceMount:t,...n}=e,r=Xj();return t||r.hasThumb?(0,G.jsx)(oM,{...n}):null}sM.displayName=`@mantine/core/ScrollAreaThumb`;function cM({children:e,style:t,ref:n,onWheel:r,...i}){let a=Pj(),o=$O(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Aj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}cM.displayName=`@mantine/core/ScrollAreaViewport`;var lM={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function uM(){return typeof window<`u`}function dM(e){return mM(e)?(e.nodeName||``).toLowerCase():`#document`}function fM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function pM(e){return((mM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function mM(e){return uM()?e instanceof Node||e instanceof fM(e).Node:!1}function hM(e){return uM()?e instanceof Element||e instanceof fM(e).Element:!1}function gM(e){return uM()?e instanceof HTMLElement||e instanceof fM(e).HTMLElement:!1}function _M(e){return!uM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof fM(e).ShadowRoot}function vM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=TM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function Nne(e){return/^(table|td|th)$/.test(dM(e))}function yM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Pne=/transform|translate|scale|rotate|perspective|filter/,Fne=/paint|layout|strict|content/,bM=e=>!!e&&e!==`none`,xM;function SM(e){let t=hM(e)?TM(e):e;return bM(t.transform)||bM(t.translate)||bM(t.scale)||bM(t.rotate)||bM(t.perspective)||!CM()&&(bM(t.backdropFilter)||bM(t.filter))||Pne.test(t.willChange||``)||Fne.test(t.contain||``)}function Ine(e){let t=DM(e);for(;gM(t)&&!wM(t);){if(SM(t))return t;if(yM(t))return null;t=DM(t)}return null}function CM(){return xM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),xM}function wM(e){return/^(html|body|#document)$/.test(dM(e))}function TM(e){return fM(e).getComputedStyle(e)}function EM(e){return hM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function DM(e){if(dM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||_M(e)&&e.host||pM(e);return _M(t)?t.host:t}function OM(e){let t=DM(e);return wM(t)?(e.ownerDocument||e).body:gM(t)&&vM(t)?t:OM(t)}function kM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=OM(e),i=r===e.ownerDocument?.body,a=fM(r);if(i){let e=AM(a);return t.concat(a,a.visualViewport||[],vM(r)?r:[],e&&n?kM(e):[])}return t.concat(r,kM(r,[],n))}function AM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var jM=Math.min,MM=Math.max,NM=Math.round,PM=Math.floor,FM=e=>({x:e,y:e}),Lne={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function IM(e,t,n){return MM(e,jM(t,n))}function LM(e,t){return typeof e==`function`?e(t):e}function RM(e){return e.split(`-`)[0]}function zM(e){return e.split(`-`)[1]}function BM(e){return e===`x`?`y`:`x`}function VM(e){return e===`y`?`height`:`width`}function HM(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function UM(e){return BM(HM(e))}function Rne(e,t,n){n===void 0&&(n=!1);let r=zM(e),i=UM(e),a=VM(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=qM(o)),[o,qM(o)]}function zne(e){let t=qM(e);return[WM(e),t,WM(t)]}function WM(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var GM=[`left`,`right`],KM=[`right`,`left`],Bne=[`top`,`bottom`],Vne=[`bottom`,`top`];function Hne(e,t,n){switch(e){case`top`:case`bottom`:return n?t?KM:GM:t?GM:KM;case`left`:case`right`:return t?Bne:Vne;default:return[]}}function Une(e,t,n,r){let i=zM(e),a=Hne(RM(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(WM)))),a}function qM(e){let t=RM(e);return Lne[t]+e.slice(t.length)}function Wne(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function JM(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Wne(e)}function YM(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Gne(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function Kne(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function qne(){return/apple/i.test(navigator.vendor)}function Jne(){return Gne().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function Yne(){return Kne().includes(`jsdom/`)}var XM=`data-floating-ui-focusable`,Xne=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function ZM(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function QM(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_M(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function $M(e){return`composedPath`in e?e.composedPath()[0]:e.target}function eN(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function Zne(e){return e.matches(`html,body`)}function tN(e){return e?.ownerDocument||document}function Qne(e){return gM(e)&&e.matches(Xne)}function $ne(e){if(!e||Yne())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function ere(e){return e?e.hasAttribute(XM)?e:e.querySelector(`[`+XM+`]`)||e:null}function nN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...nN(e,t.id,n)])}function tre(e){return`nativeEvent`in e}function rN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var iN=typeof document<`u`?W.useLayoutEffect:function(){},nre={...W};function aN(e){let t=W.useRef(e);return iN(()=>{t.current=e}),t}var rre=nre.useInsertionEffect||(e=>e());function oN(e){let t=W.useRef(()=>{});return rre(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function sN(e,t,n){let{reference:r,floating:i}=e,a=HM(t),o=UM(t),s=VM(o),c=RM(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=zM(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ire(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=LM(t,e),p=JM(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=YM(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=YM(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var are=50,ore=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ire},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=sN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=LM(e,t)||{};if(l==null)return{};let d=JM(u),f={x:n,y:r},p=UM(i),m=VM(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=jM(d[_],T),D=jM(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=IM(E,k,O),j=!c.arrow&&zM(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===HM(t)||T.every(e=>HM(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=HM(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function cN(e){let t=jM(...e.map(e=>e.left)),n=jM(...e.map(e=>e.top)),r=MM(...e.map(e=>e.right)),i=MM(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function lre(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>YM(cN(e)))}var ure=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=LM(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=lre(u),f=YM(cN(u)),p=JM(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(HM(n)===`y`){let e=d[0],t=d[d.length-1],r=RM(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return YM({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=RM(n)===`left`,t=MM(...d.map(e=>e.right)),r=jM(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return YM({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},dre=new Set([`left`,`top`]);async function fre(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=RM(n),s=zM(n),c=HM(n)===`y`,l=dre.has(o)?-1:1,u=a&&c?-1:1,d=LM(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var pre=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await fre(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},mre=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=LM(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=HM(i),p=BM(f),m=u[p],h=u[f],g=(e,t)=>IM(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function lN(e){let t=TM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=gM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=NM(n)!==a||NM(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function uN(e){return hM(e)?e:e.contextElement}function dN(e){let t=uN(e);if(!gM(t))return FM(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lN(t),o=(a?NM(n.width):n.width)/r,s=(a?NM(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var hre=FM(0);function fN(e){let t=fM(e);return!CM()||!t.visualViewport?hre:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function gre(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===fM(e)}function pN(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=uN(e),o=FM(1);t&&(r?hM(r)&&(o=dN(r)):o=dN(e));let s=gre(a,n,r)?fN(a):FM(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=fM(a),t=hM(r)?fM(r):r,n=e,i=AM(n);for(;i&&t!==n;){let e=dN(i),t=i.getBoundingClientRect(),r=TM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=fM(i),i=AM(n)}}return YM({width:u,height:d,x:c,y:l})}function mN(e,t){let n=EM(e).scrollLeft;return t?t.left+n:pN(pM(e)).left+n}function hN(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-mN(e,n),y:n.top+t.scrollTop}}function _re(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=pM(r),s=t?yM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=FM(1),u=FM(0),d=gM(r);if((d||!a)&&((dM(r)!==`body`||vM(o))&&(c=EM(r)),d)){let e=pN(r);l=dN(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?hN(o,c):FM(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function vre(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function yre(e){let t=EM(e),n=e.ownerDocument.body,r=MM(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=MM(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+mN(e),o=-t.scrollTop;return TM(n).direction===`rtl`&&(a+=MM(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var bre=25;function xre(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=fM(e),a=pM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!CM()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(mN(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=bre&&(s-=o)}return{width:s,height:c,x:l,y:u}}function gN(e,t){let n=pN(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=dN(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function _N(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=xre(e,n,t);else if(t===`document`)r=yre(pM(e));else if(hM(t))r=gN(t,n);else{let n=fN(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return YM(r)}function vN(e,t){let n=t.get(e);if(n)return n;let r=kM(e,[],!1).filter(e=>hM(e)&&dM(e)!==`body`),i=null,a=TM(e).position===`fixed`,o=a?DM(e):e;for(;hM(o)&&!wM(o);){let e=TM(o),t=SM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=DM(o)}return t.set(e,r),r}function yN(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?yM(t)?[]:vN(t,this._c):[].concat(n),r],o=_N(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=fM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function AN(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=uN(e),u=i||a?[...l?kM(l):[],...t?kM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?kN(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?pN(e):null;c&&g();function g(){let t=pN(e);h&&!ON(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var jN=pre,MN=mre,NN=cre,PN=sre,FN=ure,IN=(e,t,n)=>{let r=new Map,i=n??{},a={...DN,...i.platform,_c:r};return ore(e,t,{...i,platform:a})},LN=u(ok(),1),RN=typeof document<`u`?W.useLayoutEffect:function(){};function zN(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!zN(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!zN(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function BN(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function VN(e,t){let n=BN(e);return Math.round(t*n)/n}function HN(e){let t=W.useRef(e);return RN(()=>{t.current=e}),t}function UN(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);zN(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=HN(c),D=HN(i),O=HN(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),IN(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!zN(w.current,t)&&(w.current=t,LN.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);RN(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);RN(()=>(A.current=!0,()=>{A.current=!1}),[]),RN(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),ee=W.useMemo(()=>({reference:b,floating:x}),[b,x]),M=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!ee.floating)return e;let t=VN(ee.floating,u.x),r=VN(ee.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...BN(ee.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,ee.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:j,elements:ee,floatingStyles:M}),[u,k,j,ee,M])}var WN=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:PN({element:r.current,padding:i}).fn(n):r?PN({element:r,padding:i}).fn(n):{}}}},GN=(e,t)=>{let n=jN(e);return{name:n.name,fn:n.fn,options:[e,t]}},KN=(e,t)=>{let n=MN(e);return{name:n.name,fn:n.fn,options:[e,t]}},qN=(e,t)=>{let n=NN(e);return{name:n.name,fn:n.fn,options:[e,t]}},JN=(e,t)=>{let n=FN(e);return{name:n.name,fn:n.fn,options:[e,t]}},YN=(e,t)=>{let n=WN(e);return{name:n.name,fn:n.fn,options:[e,t]}};function XN(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var ZN=`data-floating-ui-focusable`,QN=`active`,$N=`selected`,eP=`ArrowLeft`,tP=`ArrowRight`,nP=`ArrowUp`,rP=`ArrowDown`,iP=[eP,tP],aP=[nP,rP];[...iP,...aP];var oP={...W},sP=!1,cP=0,lP=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+cP++;function uP(){let[e,t]=W.useState(()=>sP?lP():void 0);return iN(()=>{e??t(lP())},[]),W.useEffect(()=>{sP=!0},[]),e}var dP=oP.useId||uP;function fP(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var pP=W.createContext(null),mP=W.createContext(null),hP=()=>W.useContext(pP)?.id||null,gP=()=>W.useContext(mP);function _P(e){return`data-floating-ui-`+e}function vP(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var yP=_P(`safe-polygon`);function bP(e,t,n){if(n&&!rN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function xP(e){return typeof e==`function`?e():e}function SP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=gP(),m=hP(),h=aN(l),g=aN(c),_=aN(n),v=aN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=oN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(vP(b),vP(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=tN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=bP(g.current,`close`,y.current);i&&!x.current?(vP(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(vP(b),r(!1,e,n))},[g,r]),k=oN(()=>{T.current(),x.current=void 0}),A=oN(()=>{if(w.current){let e=tN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(yP),w.current=!1}}),j=oN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(vP(b),C.current=!1,u&&!rN(y.current)||xP(v.current)>0&&!bP(g.current,`open`))return;let t=bP(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(j()){A();return}T.current();let t=tN(o.floating);if(vP(S),E.current=!1,h.current&&i.current.floatingContext){n||vP(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!QM(o.floating,e.relatedTarget))&&O(e)}function a(e){j()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),j()||O(e)}})(e))}function c(){vP(b)}function l(e){j()||O(e,!1)}if(hM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,j,v]),iN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(hM(o.domReference)&&e){var t;let n=tN(o.floating).body;n.setAttribute(yP,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),iN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),vP(b),vP(S),A()},[s,o.domReference,k,A]);let ee=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||rN(y.current))&&(n||xP(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(vP(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,xP(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:ee}:{},[s,ee])}var CP=()=>{},wP=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:CP,setState:CP,isInstantPhase:!1}),TP=()=>W.useContext(wP);function EP(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return iN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(wP.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function DP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=TP(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return iN(()=>{o&&l&&(f({delay:{open:1,close:bP(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),iN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),iN(()=>{o&&u!==CP&&n&&u(s)},[o,n,u,s]),c}function OP(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&_M(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function kP(e){return`composedPath`in e?e.composedPath()[0]:e.target}var AP={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},jP={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},MP=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function NP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=gP(),g=oN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=MP(p),{escapeKey:x,outsidePress:S}=MP(m),C=W.useRef(!1),w=oN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?nN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,tre(e)?e.nativeEvent:e,`escape-key`)}),T=oN(e=>{var t;let n=()=>{var t;w(e),(t=$M(e))==null||t.removeEventListener(`keydown`,n)};(t=$M(e))==null||t.addEventListener(`keydown`,n)}),E=oN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=$M(e),s=`[`+_P(`inert`)+`]`,c=tN(i.floating).querySelectorAll(s),u=hM(o)?o:null;for(;u&&!wM(u);){let e=DM(u);if(wM(e)||!hM(e))break;u=e}if(c.length&&hM(o)&&!Zne(o)&&!QM(o,i.floating)&&Array.from(c).every(e=>!QM(u,e)))return;if(gM(o)&&k){let t=wM(o),n=TM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&nN(h.nodesRef.current,d).some(t=>eN(e,t.context?.elements.floating));if(eN(e,i.floating)||eN(e,i.domReference)||f)return;let p=h?nN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=oN(e=>{var t;let n=()=>{var t;E(e),(t=$M(e))==null||t.removeEventListener(l,n)};(t=$M(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},CM()?5:0)}let d=tN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(hM(i.domReference)&&(p=kM(i.domReference)),hM(i.floating)&&(p=p.concat(kM(i.floating))),!hM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(kM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[AP[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[jP[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function PP(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=dP(),a=W.useRef({}),[o]=W.useState(()=>fP()),s=hP()!=null,[c,l]=W.useState(r.reference),u=oN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function FP(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=PP({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=gP();iN(()=>{d&&(f.current=d)},[d]);let m=UN({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=hM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(hM(e)||e===null)&&(f.current=e,c(e)),(hM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!hM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return iN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function IP(){return Jne()&&qne()}function LP(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=fM(o.domReference);function t(){!n&&gM(o.domReference)&&o.domReference===ZM(tN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),IP()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),IP()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{vP(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=$M(e.nativeEvent);if(c&&hM(t)){if(IP()&&!e.relatedTarget){if(!d.current&&!Qne(t))return}else if(!$ne(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=hM(t)&&t.hasAttribute(_P(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=ZM(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(QM(a.current.floatingContext?.refs.floating.current,e)||QM(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function RP(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[QN]:t,[$N]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[ZN]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[QN,$N].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function zP(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>RP(t,e,`reference`),t),a=W.useCallback(t=>RP(t,e,`floating`),n),o=W.useCallback(t=>RP(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var BP=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function VP(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=dP(),c=r.domReference?.id||s,l=W.useMemo(()=>ere(r.floating)?.id||i,[r.floating,i]),u=BP.get(o)??o,d=hP()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function HP(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...HP(e,t.id,n)])}function UP(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function WP(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function GP(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){vP(i),u()}if(vP(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=kP(e),v=e.type===`mouseleave`,y=OP(c.floating,_),b=OP(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=WP(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,j=(O?x:S).top,ee=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&hM(e.relatedTarget)&&OP(c.floating,e.relatedTarget)||f&&HP(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let M=[];switch(C){case`top`:M=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:M=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:M=[[S.right-1,ee],[S.right-1,j],[x.left+1,j],[x.left+1,ee]];break;case`right`:M=[[x.right-1,ee],[x.right-1,j],[S.left+1,j],[S.left+1,ee]]}function N(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!UP([m,h],M)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}UP([m,h],N([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var KP={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},qP=lk((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),JP=Sj(e=>{let t=EA(`ScrollArea`,KP,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,j]=(0,W.useState)(!1),ee=(0,W.useRef)(!0),M=(0,W.useRef)(!1),N=(0,W.useRef)(!0),te=(0,W.useRef)(!1),P=VA({name:`ScrollArea`,props:t,classes:lM,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:qP}),F=(0,W.useRef)(null),[I,ne]=(0,W.useState)(null),L=XN([f,F,(0,W.useCallback)(e=>{ne(t=>t===e?t:e)},[])]);return Fj(h===`present`?I:null,()=>{let e=F.current;e&&(k(e.scrollHeight>e.clientHeight),j(e.scrollWidth>e.clientWidth))}),KO(()=>{S&&F.current&&F.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(zj,{getStyles:P,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...P(`root`),...T,children:[(0,G.jsx)(cM,{...d,...P(`viewport`,{style:d?.style}),ref:L,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!M.current&&_?.(),c&&!ee.current&&v?.(),M.current=s,ee.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!te.current&&b?.(),u&&!N.current&&y?.(),te.current=l,N.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(iM,{...P(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(sM,{...P(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(iM,{...P(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(sM,{...P(`thumb`)})}),(0,G.jsx)(Lj,{...P(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});JP.displayName=`@mantine/core/ScrollArea`;var YP=Sj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=EA(`ScrollAreaAutosize`,KP,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=XN([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return Fj(S?T:null,A),(0,G.jsx)(Aj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Aj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(JP,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});JP.classes=lM,JP.varsResolver=qP,YP.displayName=`@mantine/core/ScrollAreaAutosize`,YP.classes=lM,JP.Autosize=YP;var XP={root:`m_87cf2631`},ZP={__staticSelector:`UnstyledButton`},QP=Cj(e=>{let t=EA(`UnstyledButton`,ZP,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(Aj,{...VA({name:i,props:t,classes:XP,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});QP.classes=XP,QP.displayName=`@mantine/core/UnstyledButton`;var $P={root:`m_1b7284a3`},eF=lk((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:NO(t),"--paper-shadow":IO(n)}})),tF=Cj(e=>{let t=EA(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=VA({name:`Paper`,props:t,classes:$P,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:eF});return(0,G.jsx)(Aj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});tF.classes=$P,tF.varsResolver=eF,tF.displayName=`@mantine/core/Paper`;function nF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function rF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var iF={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function aF({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function oF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=aF({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[iF[c]]:r},d=-t/2;return c===`left`?{...u,...nF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...nF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...rF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...rF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function sF({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function cF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=Mj();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...oF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}cF.displayName=`@mantine/core/FloatingArrow`;function lF(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function uF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function dF({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||uF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=uF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return uF(n)}var fF={reuseTargetNode:!0},pF=Sj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=EA(`Portal`,fF,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return KO(()=>(s(!0),c.current=dF({target:n,reuseTargetNode:r,...a}),ZO(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,LN.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});pF.displayName=`@mantine/core/Portal`;var mF=Sj(({withinPortal:e=!0,children:t,...n})=>Yk()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(pF,{...n,children:t}));mF.displayName=`@mantine/core/OptionalPortal`;var hF=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),gF={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...hF(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...hF(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...hF(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...hF(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...hF(`top`),common:{transformOrigin:`top right`}}},_F={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function vF({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in gF?{transitionProperty:gF[e].transitionProperty,...i,...gF[e].common,...gF[e][_F[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[_F[t]]}}function yF({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=dA(),d=ik(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{LN.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return qO(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function bF({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=Yk(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=yF({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:vF({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(vF({transition:n,duration:h,state:g,timingFunction:_}))})}bF.displayName=`@mantine/core/Transition`;var xF={duration:100,transition:`fade`};function SF(e,t){return{...xF,...t,...e}}var CF={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},wF=({className:e,...t})=>(0,G.jsxs)(Aj,{component:`span`,className:dk(CF.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:CF.bar}),(0,G.jsx)(`span`,{className:CF.bar}),(0,G.jsx)(`span`,{className:CF.bar})]});wF.displayName=`@mantine/core/Bars`;var TF=({className:e,...t})=>(0,G.jsxs)(Aj,{component:`span`,className:dk(CF.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:CF.dot}),(0,G.jsx)(`span`,{className:CF.dot}),(0,G.jsx)(`span`,{className:CF.dot})]});TF.displayName=`@mantine/core/Dots`;var EF=({className:e,...t})=>(0,G.jsx)(Aj,{component:`span`,className:dk(CF.ovalLoader,e),...t});EF.displayName=`@mantine/core/Oval`;var DF={bars:wF,oval:EF,dots:TF},OF={loaders:DF,type:`oval`},kF=lk((e,{size:t,color:n})=>({root:{"--loader-size":jO(t,`loader-size`),"--loader-color":n?kk(n,e):void 0}})),AF=Sj(e=>{let t=EA(`Loader`,OF,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=VA({name:`Loader`,props:t,classes:CF,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:kF});return p?(0,G.jsx)(Aj,{...g(`root`),...h,children:p}):(0,G.jsx)(Aj,{...g(`root`),component:d[i],variant:f,size:n,...h})});AF.defaultLoaders=DF,AF.classes=CF,AF.varsResolver=kF,AF.displayName=`@mantine/core/Loader`;var jF={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},MF={orientation:`horizontal`},NF=lk((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),PF=Sj(e=>{let t=EA(`ActionIconGroup`,MF,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(Aj,{...VA({name:`ActionIconGroup`,props:t,classes:jF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:NF,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});PF.classes=jF,PF.varsResolver=NF,PF.displayName=`@mantine/core/ActionIconGroup`;var FF=lk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":jO(o,`section-height`),"--section-padding-x":jO(o,`section-padding-x`),"--section-fz":PO(o),"--section-radius":t===void 0?void 0:NO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),IF=Sj(e=>{let t=EA(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(Aj,{...VA({name:`ActionIconGroupSection`,props:t,classes:jF,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:FF,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});IF.classes=jF,IF.varsResolver=FF,IF.displayName=`@mantine/core/ActionIconGroupSection`;var LF=lk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":jO(t,`ai-size`),"--ai-radius":n===void 0?void 0:NO(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),RF=Cj(e=>{let t=EA(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=VA({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:jF,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:LF});return(0,G.jsxs)(QP,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(bF,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Aj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(AF,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Aj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});RF.classes=jF,RF.varsResolver=LF,RF.displayName=`@mantine/core/ActionIcon`,RF.Group=PF,RF.GroupSection=IF;function zF({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}zF.displayName=`@mantine/core/CloseIcon`;var BF={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},VF={variant:`subtle`},HF=lk((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":jO(t,`cb-size`),"--cb-radius":n===void 0?void 0:NO(n),"--cb-icon-size":U(r)}})),UF=Cj(e=>{let t=EA(`CloseButton`,VF,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=VA({name:_||`CloseButton`,props:t,className:o,style:c,classes:BF,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:HF});return(0,G.jsxs)(QP,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(zF,{}),r]})});UF.classes=BF,UF.varsResolver=HF,UF.displayName=`@mantine/core/CloseButton`;function WF(e){return W.Children.toArray(e).filter(Boolean)}var GF={root:`m_4081bf90`},KF={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},qF=lk((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":MO(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),JF=Sj(e=>{let t=EA(`Group`,KF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=WF(s),x=b.length,S=MO(c??`md`);return(0,G.jsx)(Aj,{...VA({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:GF,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:qF})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});JF.classes=GF,JF.varsResolver=qF,JF.displayName=`@mantine/core/Group`;var YF={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},XF=lk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:NO(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),ZF=Sj(e=>{let t=EA(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=VA({name:`Alert`,classes:YF,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:XF}),C=XO(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Aj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(UF,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});ZF.classes=YF,ZF.varsResolver=XF,ZF.displayName=`@mantine/core/Alert`;var QF={root:`m_b6d8b162`};function $F(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var eI={inherit:!1},tI=lk((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":PO(i),"--text-lh":FO(i),"--text-gradient":t===`gradient`?Mk(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),nI=Cj(e=>{let t=EA(`Text`,eI,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(Aj,{...VA({name:[`Text`,l],props:t,classes:QF,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:tI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":$F(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});nI.classes=QF,nI.varsResolver=tI,nI.displayName=`@mantine/core/Text`;var rI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},iI=lk((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":jO(a,`badge-height`),"--badge-padding-x":jO(a,`badge-padding-x`),"--badge-fz":jO(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:NO(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?kk(n,e):void 0}}}),aI=Cj(e=>{let t=EA(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=VA({name:`Badge`,props:t,classes:rI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:iI});return(0,G.jsxs)(Aj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});aI.classes=rI,aI.varsResolver=iI,aI.displayName=`@mantine/core/Badge`;var oI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},sI={orientation:`horizontal`},cI=lk((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),lI=Sj(e=>{let t=EA(`ButtonGroup`,sI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=EA(`ButtonGroup`,sI,e);return(0,G.jsx)(Aj,{...VA({name:`ButtonGroup`,props:t,classes:oI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:cI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});lI.classes=oI,lI.varsResolver=cI,lI.displayName=`@mantine/core/ButtonGroup`;var uI=lk((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":jO(o,`section-height`),"--section-padding-x":jO(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?PO(o.replace(`compact-`,``)):PO(o),"--section-radius":t===void 0?void 0:NO(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),dI=Sj(e=>{let t=EA(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(Aj,{...VA({name:`ButtonGroupSection`,props:t,classes:oI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:uI,rootSelector:`groupSection`})(`groupSection`),...f})});dI.classes=oI,dI.varsResolver=uI,dI.displayName=`@mantine/core/ButtonGroupSection`;var fI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},pI=lk((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":jO(a,`button-height`),"--button-padding-x":jO(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?PO(a.replace(`compact-`,``)):PO(a),"--button-radius":t===void 0?void 0:NO(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),mI=Cj(e=>{let t=EA(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=VA({name:`Button`,props:t,classes:oI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:pI}),T=!!c,E=!!l;return(0,G.jsxs)(QP,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(bF,{mounted:p,transition:fI,duration:150,children:e=>(0,G.jsx)(Aj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(AF,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Aj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Aj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Aj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});mI.classes=oI,mI.varsResolver=pI,mI.displayName=`@mantine/core/Button`,mI.Group=lI,mI.GroupSection=dI;var hI={root:`m_4451eb3a`},gI=Cj(e=>{let t=EA(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=VA({name:`Center`,props:t,classes:hI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Aj,{mod:[{inline:c},l],...f(`root`),...d})});gI.classes=hI,gI.displayName=`@mantine/core/Center`;var[_I,vI]=SO(`Pagination.Root component was not found in tree`),yI={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},bI={withPadding:!0},xI=Sj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=EA(`PaginationControl`,bI,e),d=vI(),f=s||d.disabled;return(0,G.jsx)(QP,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});xI.classes=yI,xI.displayName=`@mantine/core/PaginationControl`;function SI({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var CI=e=>(0,G.jsx)(SI,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),wI=e=>(0,G.jsx)(SI,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),TI=e=>(0,G.jsx)(SI,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),EI=e=>(0,G.jsx)(SI,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),DI={icon:e=>(0,G.jsx)(SI,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},OI=Sj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=EA(`PaginationDots`,DI,e);return(0,G.jsx)(Aj,{...vI().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});OI.classes=yI,OI.displayName=`@mantine/core/PaginationDots`;function kI({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=EA(t,i,e),s=vI(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(xI,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,bj(a)}var AI=kI({icon:CI,name:`PaginationNext`,action:`onNext`,type:`next`}),jI=kI({icon:wI,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),MI=kI({icon:TI,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),NI=kI({icon:EI,name:`PaginationLast`,action:`onLast`,type:`next`});function PI({dotsIcon:e}){let t=vI();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(OI,{icon:e},r):(0,G.jsx)(xI,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}PI.displayName=`@mantine/core/PaginationItems`;var FI={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},II=Sj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=EA(`PaginationLabel`,FI,e),c=vI();return(0,G.jsx)(Aj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});II.classes=yI,II.displayName=`@mantine/core/PaginationLabel`;var LI={siblings:1,boundaries:1},RI=lk((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:NO(n),"--pagination-control-size":jO(t,`pagination-control-size`),"--pagination-control-fz":PO(t),"--pagination-active-bg":r?kk(r,e):void 0,"--pagination-active-color":zk(i,e)?Ik({color:r,theme:e,autoContrast:i}):void 0}})),zI=Sj(e=>{let t=EA(`PaginationRoot`,LI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=VA({name:`Pagination`,classes:yI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:RI}),{range:k,setPage:A,next:j,previous:ee,active:M,first:N,last:te}=rk({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(_I,{value:{total:c,range:k,active:M,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:LO(_,j),onPrevious:LO(v,ee),onFirst:LO(y,N),onLast:LO(b,te),getStyles:O},children:(0,G.jsx)(Aj,{...O(`root`),mod:[{layout:w},T],...D})})});zI.classes=yI,zI.varsResolver=RI,zI.displayName=`@mantine/core/PaginationRoot`;var BI={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function VI({children:e}){return(0,G.jsx)(Aj,{...vI().getStyles(`items`),children:e})}var HI=Sj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=EA(`Pagination`,BI,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(VI,{children:(0,G.jsx)(PI,{dotsIcon:c})}),(0,G.jsx)(II,{formatLabel:m})]}):(0,G.jsx)(PI,{dotsIcon:c}):null;return(0,G.jsx)(zI,{total:l,layout:p,...h,children:(0,G.jsxs)(JF,{gap:u,children:[t&&(0,G.jsx)(MI,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(jI,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(AI,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(NI,{icon:o,...r?.(`last`)})]})})});HI.classes=yI,HI.displayName=`@mantine/core/Pagination`,HI.Root=zI,HI.Control=xI,HI.Dots=OI,HI.First=MI,HI.Last=NI,HI.Next=AI,HI.Previous=jI,HI.Items=PI,HI.Label=II;function UI({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=FP({placement:t,middleware:[KN({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=kM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var WI={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},GI={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:AO(`popover`)},KI=lk((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:NO(t),"--tooltip-bg":n?kk(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),qI=Sj(e=>{let t=EA(`TooltipFloating`,GI,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=dA(),E=VA({name:`TooltipFloating`,props:t,classes:WI,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:KI}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:j,floating:ee,setOpened:M}=UI({offset:p,position:m,defaultOpened:v}),N=ck(n);if(!N)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let te=$O(j,sk(N),C),P=N.props,F=e=>{P.onMouseEnter?.(e),D(e),M(!0)},I=e=>{P.onMouseLeave?.(e),M(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(mF,{...x,withinPortal:i,children:(0,G.jsx)(Aj,{...w,...E(`tooltip`,{style:{...vj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:ee,mod:{multiline:h},children:f})}),(0,W.cloneElement)(N,{...P,[r]:te,onMouseEnter:F,onMouseLeave:I})]})});qI.classes=WI,qI.varsResolver=KI,qI.displayName=`@mantine/core/TooltipFloating`;var JI=(0,W.createContext)({withinGroup:!1}),YI={openDelay:0,closeDelay:0};function XI(e){let{openDelay:t,closeDelay:n,children:r}=EA(`TooltipGroup`,YI,e);return(0,G.jsx)(JI,{value:{withinGroup:!0},children:(0,G.jsx)(EP,{delay:{open:t,close:n},children:r})})}XI.displayName=`@mantine/core/TooltipGroup`,XI.extend=e=>e;function ZI(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function QI(e){let t=ZI(e.middlewares),n=[GN(e.offset)];return t.shift&&n.push(KN(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?qN():qN(t.flip)),n.push(YN({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?JN():JN(t.inline)):e.inline&&n.push(JN()),n}function $I(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(JI).withinGroup,a=XO(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=FP({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:QI(e),whileElementsMounted:AN}),{delay:m,currentId:h,setCurrentId:g}=DP(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=zP([SP(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?GP():null}),LP(l,{enabled:e.events?.focus,visibleOnly:!0}),VP(l,{role:`tooltip`}),NP(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);KO(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var eL={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:AO(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},tL=lk((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:NO(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),nL=Sj(e=>{let t=EA(`Tooltip`,eL,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:j,onMouseEnter:ee,onMouseLeave:M,inline:N,variant:te,keepMounted:P,vars:F,portalProps:I,mod:ne,floatingStrategy:L,middlewares:re,autoContrast:ie,attributes:ae,target:oe,ref:R,...z}=t,{dir:se}=Mj(),ce=(0,W.useRef)(null),le=$I({position:lF(se,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:ce,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:N,strategy:L,middlewares:re});(0,W.useEffect)(()=>{let e=oe instanceof HTMLElement?oe:typeof oe==`string`?document.querySelector(oe):oe?.current||null;e&&le.reference(e)},[oe,le]);let ue=VA({name:`Tooltip`,props:t,classes:WI,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:ae,rootSelector:`tooltip`,vars:F,varsResolver:tL}),de=ck(n);if(!oe&&!de)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let fe=ue(`tooltip`),pe=O&&!A&&!!le.opened,B=C===`merge`&&y?sF({position:le.placement,dir:se}):void 0;if(oe){let e=SF(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(mF,{...I,withinPortal:d,children:(0,G.jsx)(bF,{...e,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Aj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...fe,...le.getFloatingProps({ref:le.floating,className:fe.className,style:{...fe.style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(cF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})})})}let me=de.props,V=$O(le.reference,sk(de),R),he=SF(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(mF,{...I,withinPortal:d,children:(0,G.jsx)(bF,{...he,keepMounted:P,mounted:!A&&!!le.opened,duration:le.isGroupPhase?10:he.duration,children:e=>(0,G.jsxs)(Aj,{...z,"data-fixed":L===`fixed`||void 0,variant:te,mod:[{multiline:E,interactive:pe},ne],...le.getFloatingProps({ref:le.floating,className:ue(`tooltip`).className,style:{...ue(`tooltip`).style,...e,...B,zIndex:k,top:le.y??0,left:le.x??0}}),children:[a,(0,G.jsx)(cF,{ref:ce,arrowX:le.arrowX,arrowY:le.arrowY,visible:y,position:le.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...ue(`arrow`)})]})})}),(0,W.cloneElement)(de,le.getReferenceProps({onClick:j,onMouseEnter:ee,onMouseLeave:M,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...me,className:dk(v,me.className),[i]:V}))]})});nL.classes=WI,nL.varsResolver=tL,nL.displayName=`@mantine/core/Tooltip`,nL.Floating=qI,nL.Group=XI;function rL(e){if(e!==void 0)return typeof e==`number`?U(e):e}function iL({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=dA(),s=t===void 0?e:t,c=r!==void 0,l=_O({"--sg-spacing-x":MO(BO(e)),"--sg-spacing-y":MO(BO(s)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":rL(r)}:{"--sg-cols":BO(n)?.toString()}}),u=cO(o.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=MO(e[r])),typeof s==`object`&&s[r]!==void 0&&(t[r][`--sg-spacing-y`]=MO(s[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(GA,{styles:l,media:zO(cO(u),o.breakpoints).filter(e=>cO(u[e.value]).length>0).map(e=>({query:`(min-width: ${o.breakpoints[e.value]})`,styles:u[e.value]})),selector:a})}function aL(e){return typeof e==`object`&&e?cO(e):[]}function oL(e){return e.sort((e,t)=>pO(e)-pO(t))}function sL({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return oL(Array.from(new Set([...aL(e),...aL(t),...r===void 0?aL(n):[]])))}function cL({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,s=r!==void 0,c=_O({"--sg-spacing-x":MO(BO(e)),"--sg-spacing-y":MO(BO(o)),"--sg-auto-rows":i,...s?{"--sg-min-col-width":rL(r)}:{"--sg-cols":BO(n)?.toString()}}),l=sL({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),u=l.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=MO(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=MO(o[r])),!s&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,G.jsx)(GA,{styles:c,container:l.map(e=>({query:`simple-grid (min-width: ${e})`,styles:u[e]})),selector:a})}var lL={container:`m_925c2d2c`,root:`m_2415a157`},uL={cols:1,spacing:`md`,type:`media`},dL=Sj(e=>{let t=EA(`SimpleGrid`,uL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:d,minColWidth:f,autoFlow:p,autoRows:m,attributes:h,...g}=t,_=VA({name:`SimpleGrid`,classes:lL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:h,vars:s}),v=_j(),y=f===void 0?void 0:p||`auto-fill`;return d===`container`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(cL,{...t,selector:`.${v}`}),(0,G.jsx)(`div`,{..._(`container`),children:(0,G.jsx)(Aj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})})]}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(iL,{...t,selector:`.${v}`}),(0,G.jsx)(Aj,{..._(`root`,{className:v}),...g,"data-auto-cols":y})]})});dL.classes=lL,dL.displayName=`@mantine/core/SimpleGrid`;var fL={root:`m_6d731127`},pL={gap:`md`,align:`stretch`,justify:`flex-start`},mL=lk((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":MO(t),"--stack-align":n,"--stack-justify":r}})),hL=Sj(e=>{let t=EA(`Stack`,pL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(Aj,{...VA({name:`Stack`,props:t,classes:fL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:mL})(`root`),variant:d,...p})});hL.classes=fL,hL.varsResolver=mL,hL.displayName=`@mantine/core/Stack`;var[gL,_L]=SO(`Table component was not found in the tree`),vL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function yL(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function bL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Sj(r=>{let i=EA(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=_L();return(0,G.jsx)(Aj,{component:e,...yL(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=vL,r}var xL=bL(`th`,{columnBorder:!0}),SL=bL(`td`,{columnBorder:!0}),CL=bL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),wL=bL(`thead`,{stickyHeader:!0}),TL=bL(`tbody`),EL=bL(`tfoot`),DL=bL(`caption`,{captionSide:!0}),OL={type:`scrollarea`},kL=lk((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),AL=Sj(e=>{let t=EA(`TableScrollContainer`,OL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=VA({name:`TableScrollContainer`,classes:vL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:kL,rootSelector:`scrollContainer`});return(0,G.jsx)(Aj,{component:d===`scrollarea`?JP:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});AL.classes=vL,AL.varsResolver=kL,AL.displayName=`@mantine/core/TableScrollContainer`;function jL({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(DL,{children:e.caption}),e.head&&(0,G.jsx)(wL,{children:(0,G.jsx)(CL,{children:e.head.map((e,t)=>(0,G.jsx)(xL,{children:e},t))})}),e.body&&(0,G.jsx)(TL,{children:e.body.map((e,t)=>(0,G.jsx)(CL,{children:e.map((e,t)=>(0,G.jsx)(SL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(EL,{children:(0,G.jsx)(CL,{children:e.foot.map((e,t)=>(0,G.jsx)(xL,{children:e},t))})})]})}jL.displayName=`@mantine/core/TableDataRenderer`;var ML={withRowBorders:!0,verticalSpacing:7},NL=lk((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":MO(r),"--table-vertical-spacing":MO(i),"--table-border-color":a?kk(a,e):void 0,"--table-striped-color":c&&o?kk(o,e):void 0,"--table-highlight-on-hover-color":l&&s?kk(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),PL=Sj(e=>{let t=EA(`Table`,ML,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=VA({name:`Table`,props:t,className:r,style:i,classes:vL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:NL});return(0,G.jsx)(gL,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(Aj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(jL,{data:b})})})});PL.classes=vL,PL.varsResolver=NL,PL.displayName=`@mantine/core/Table`,PL.Td=SL,PL.Th=xL,PL.Tr=CL,PL.Thead=wL,PL.Tbody=TL,PL.Tfoot=EL,PL.Caption=DL,PL.ScrollContainer=AL,PL.DataRenderer=jL;var[FL,IL]=SO(`Tabs component was not found in the tree`),LL={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},RL=Sj(e=>{let t=EA(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=IL();return(0,G.jsx)(Aj,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});RL.classes=LL,RL.displayName=`@mantine/core/TabsList`;var zL=Sj(e=>{let t=EA(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=Yk(),f=IL();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Aj,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});zL.classes=LL,zL.displayName=`@mantine/core/TabsPanel`;var BL=Sj(e=>{let t=EA(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=dA(),{dir:y}=Mj(),b=IL(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(QP,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?kk(u,v):void 0},onKeyDown:OO({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});BL.classes=LL,BL.displayName=`@mantine/core/TabsTab`;var VL=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,HL={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},UL=lk((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":NO(t),"--tabs-color":kk(n,e),"--tabs-text-color":zk(r,e)?Ik({color:n,theme:e,autoContrast:r}):void 0}})),WL=Sj(e=>{let t=EA(`Tabs`,HL,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=XO(c),k=(0,W.useRef)(new Set),A=YO(),j=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[ee,M]=ek({value:r,defaultValue:n,finalValue:null,onChange:i}),N=VA({name:`Tabs`,props:t,classes:LL,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:UL});return(0,G.jsx)(FL,{value:{placement:h,value:ee,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:CO(`${O}-tab`,VL),getPanelId:CO(`${O}-panel`,VL),onChange:M,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:N,mountedPanels:k,setMountedPanel:j},children:(0,G.jsx)(Aj,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...N(`root`),...D,children:o})})});WL.classes=LL,WL.varsResolver=UL,WL.displayName=`@mantine/core/Tabs`,WL.Tab=BL,WL.Panel=zL,WL.List=RL;var GL={root:`m_7341320d`},KL=lk((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":jO(t,`ti-size`),"--ti-radius":n===void 0?void 0:NO(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),qL=Sj(e=>{let t=EA(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(Aj,{...VA({name:`ThemeIcon`,classes:GL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:KL})(`root`),...u})});qL.classes=GL,qL.varsResolver=KL,qL.displayName=`@mantine/core/ThemeIcon`;var JL=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],YL=[`xs`,`sm`,`md`,`lg`,`xl`];function XL(e,t){let n=t===void 0?`h${e}`:t;return JL.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:YL.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var ZL={root:`m_8a5d1357`},QL={order:1},$L=lk((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=XL(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),eR=Sj(e=>{let t=EA(`Title`,QL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=VA({name:`Title`,props:t,classes:ZL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:$L});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Aj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});eR.classes=ZL,eR.varsResolver=$L,eR.displayName=`@mantine/core/Title`;var tR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),nR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),rR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216.49,184.49l-32,32a12,12,0,0,1-17-17L179,188H48a12,12,0,0,1,0-24H179l-11.52-11.51a12,12,0,0,1,17-17l32,32A12,12,0,0,1,216.49,184.49Zm-145-64a12,12,0,0,0,17-17L77,92H208a12,12,0,0,0,0-24H77L88.49,56.49a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,80v96H48V80Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M42.34,85.66a8,8,0,0,1,0-11.32l32-32A8,8,0,0,1,88,48V72H208a8,8,0,0,1,0,16H88v24a8,8,0,0,1-13.66,5.66Zm171.32,84.68-32-32A8,8,0,0,0,168,144v24H48a8,8,0,0,0,0,16H168v24a8,8,0,0,0,13.66,5.66l32-32A8,8,0,0,0,213.66,170.34Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212.24,171.76a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L193.51,182H48a6,6,0,0,1,0-12H193.51l-21.75-21.76a6,6,0,0,1,8.48-8.48ZM75.76,116.24a6,6,0,0,0,8.48-8.48L62.49,86H208a6,6,0,0,0,0-12H62.49L84.24,52.24a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M213.66,181.66l-32,32a8,8,0,0,1-11.32-11.32L188.69,184H48a8,8,0,0,1,0-16H188.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,213.66,181.66Zm-139.32-64a8,8,0,0,0,11.32-11.32L67.31,88H208a8,8,0,0,0,0-16H67.31L85.66,53.66A8,8,0,0,0,74.34,42.34l-32,32a8,8,0,0,0,0,11.32Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M210.83,173.17a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L198.34,180H48a4,4,0,0,1,0-8H198.34l-25.17-25.17a4,4,0,0,1,5.66-5.66ZM77.17,114.83a4,4,0,0,0,5.66-5.66L57.66,84H208a4,4,0,0,0,0-8H57.66L82.83,50.83a4,4,0,0,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66Z`}))]]),iR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,80H140V60h56ZM116,60v56H60V60ZM60,140h56v56H60Zm80,56V140h56v56Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,56v60a4,4,0,0,1-4,4H136V44a4,4,0,0,1,4-4h60A16,16,0,0,1,216,56ZM116,40H56A16,16,0,0,0,40,56v60a4,4,0,0,0,4,4h76V44A4,4,0,0,0,116,40Zm96,96H136v76a4,4,0,0,0,4,4h60a16,16,0,0,0,16-16V140A4,4,0,0,0,212,136ZM40,140v60a16,16,0,0,0,16,16h60a4,4,0,0,0,4-4V136H44A4,4,0,0,0,40,140Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,14v66H134V54h66A2,2,0,0,1,202,56ZM56,54h66v68H54V56A2,2,0,0,1,56,54ZM54,200V134h68v68H56A2,2,0,0,1,54,200Zm146,2H134V134h68v66A2,2,0,0,1,200,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,80H136V56h64ZM120,56v64H56V56ZM56,136h64v64H56Zm144,64H136V136h64v64Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,12v68H132V52h68A4,4,0,0,1,204,56ZM56,52h68v72H52V56A4,4,0,0,1,56,52ZM52,200V132h72v72H56A4,4,0,0,1,52,200Zm148,4H132V132h72v68A4,4,0,0,1,200,204Z`}))]]),aR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,128a12,12,0,0,1-12,12H207.42l-36.69,73.37A12,12,0,0,1,160,220h-.6a12,12,0,0,1-10.61-7.72L95,71.15,66.92,133A12,12,0,0,1,56,140H24a12,12,0,0,1,0-24H48.27L85.08,35a12,12,0,0,1,22.13.7l54.28,142.46,27.78-55.56A12,12,0,0,1,200,116h32A12,12,0,0,1,244,128Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M96,40l33.52,88H56Zm104,88H129.52L160,208Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40Zm-8,96H188.64L159,188a8,8,0,0,1-6.95,4h-.46a8,8,0,0,1-6.89-4.84L103,89.92,79,132a8,8,0,0,1-7,4H48a8,8,0,0,1,0-16H67.36L97.05,68a8,8,0,0,1,14.3.82L153,166.08l24-42.05a8,8,0,0,1,6.95-4h24a8,8,0,0,1,0,16Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,128a6,6,0,0,1-6,6H203.71l-38.34,76.68A6,6,0,0,1,160,214h-.3a6,6,0,0,1-5.31-3.85L95.51,55.57,61.46,130.48A6,6,0,0,1,56,134H24a6,6,0,0,1,0-12H52.14l38.4-84.48a6,6,0,0,1,11.07.34L160.74,193.1l33.89-67.78A6,6,0,0,1,200,122h32A6,6,0,0,1,238,128Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,128a8,8,0,0,1-8,8H204.94l-37.78,75.58A8,8,0,0,1,160,216h-.4a8,8,0,0,1-7.08-5.14L95.35,60.76,63.28,131.31A8,8,0,0,1,56,136H24a8,8,0,0,1,0-16H50.85L88.72,36.69a8,8,0,0,1,14.76.46l57.51,151,31.85-63.71A8,8,0,0,1,200,120h32A8,8,0,0,1,240,128Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,128a4,4,0,0,1-4,4H202.47l-38.89,77.79A4,4,0,0,1,160,212h-.2a4,4,0,0,1-3.54-2.58l-60.59-159-36,79.28A4,4,0,0,1,56,132H24a4,4,0,0,1,0-8H53.42L92.36,38.35a4,4,0,0,1,7.38.23L160.5,198.06l35.92-71.85A4,4,0,0,1,200,124h32A4,4,0,0,1,236,128Z`}))]]),oR=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),sR=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(oR);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});sR.displayName=`IconBase`;var cR=W.forwardRef((e,t)=>W.createElement(sR,{ref:t,...e,weights:tR}));cR.displayName=`ArrowClockwiseIcon`;var lR=cR,uR=W.forwardRef((e,t)=>W.createElement(sR,{ref:t,...e,weights:nR}));uR.displayName=`ArrowUpRightIcon`;var dR=uR,fR=W.forwardRef((e,t)=>W.createElement(sR,{ref:t,...e,weights:rR}));fR.displayName=`ArrowsLeftRightIcon`;var pR=fR,mR=W.forwardRef((e,t)=>W.createElement(sR,{ref:t,...e,weights:iR}));mR.displayName=`GridFourIcon`;var hR=mR,gR=W.forwardRef((e,t)=>W.createElement(sR,{ref:t,...e,weights:aR}));gR.displayName=`PulseIcon`;var _R=gR,vR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),yR=s(((e,t)=>{t.exports=vR()})),bR=s((e=>{var t=yR(),n=bO(),r=ok();function i(e){var t=`https://react.dev/errors/`+e;if(1F||(e.current=P[F],P[F]=null,F--)}function L(e,t){F++,P[F]=e.current,e.current=t}var re=I(null),ie=I(null),ae=I(null),oe=I(null);function R(e,t){switch(L(ae,t),L(ie,e),L(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xd(t),e=Zd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ne(re),L(re,e)}function z(){ne(re),ne(ie),ne(ae)}function se(e){e.memoizedState!==null&&L(oe,e);var t=re.current,n=Zd(t,e.type);t!==n&&(L(ie,e),L(re,n))}function ce(e){ie.current===e&&(ne(re),ne(ie)),oe.current===e&&(ne(oe),sp._currentValue=te)}var le,ue;function de(e){if(le===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);le=t&&t[1]||``,ue=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{fe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?de(n):``}function B(e,t){switch(e.tag){case 26:case 27:case 5:return de(e.type);case 16:return de(`Lazy`);case 13:return e.child!==t&&t!==null?de(`Suspense Fallback`):de(`Suspense`);case 19:return de(`SuspenseList`);case 0:case 15:return pe(e.type,!1);case 11:return pe(e.type.render,!1);case 1:return pe(e.type,!0);case 31:return de(`Activity`);default:return``}}function me(e){try{var t=``,n=null;do t+=B(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var V=Object.prototype.hasOwnProperty,he=t.unstable_scheduleCallback,ge=t.unstable_cancelCallback,_e=t.unstable_shouldYield,ve=t.unstable_requestPaint,ye=t.unstable_now,be=t.unstable_getCurrentPriorityLevel,xe=t.unstable_ImmediatePriority,Se=t.unstable_UserBlockingPriority,Ce=t.unstable_NormalPriority,we=t.unstable_LowPriority,Te=t.unstable_IdlePriority,Ee=t.log,De=t.unstable_setDisableYieldValue,Oe=null,ke=null;function Ae(e){if(typeof Ee==`function`&&De(e),ke&&typeof ke.setStrictMode==`function`)try{ke.setStrictMode(Oe,e)}catch{}}var je=Math.clz32?Math.clz32:Pe,Me=Math.log,Ne=Math.LN2;function Pe(e){return e>>>=0,e===0?32:31-(Me(e)/Ne|0)|0}var Fe=256,Ie=262144,Le=4194304;function Re(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Re(n))):i=Re(o):i=Re(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Re(n))):i=Re(o)):i=Re(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Be(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ve(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function He(){var e=Le;return Le<<=1,!(Le&62914560)&&(Le=4194304),e}function Ue(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function We(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ge(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),rn=!1;if(nn)try{var an={};Object.defineProperty(an,"passive",{get:function(){rn=!0}}),window.addEventListener(`test`,an,an),window.removeEventListener(`test`,an,an)}catch{rn=!1}var on=null,sn=null,cn=null;function ln(){if(cn)return cn;var e,t=sn,n=t.length,r,i=`value`in on?on.value:on.textContent,a=i.length;for(e=0;e=Vn),Wn=` `,Gn=!1;function Kn(e,t){switch(e){case`keyup`:return zn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function qn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Jn=!1;function Yn(e,t){switch(e){case`compositionend`:return qn(t);case`keypress`:return t.which===32?(Gn=!0,Wn):null;case`textInput`:return e=t.data,e===Wn&&Gn?null:e;default:return null}}function Xn(e,t){if(Jn)return e===`compositionend`||!Bn&&Kn(e,t)?(e=ln(),cn=sn=on=null,Jn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=vr(n)}}function br(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?br(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function xr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=At(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=At(e.document)}return t}function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Cr=nn&&`documentMode`in document&&11>=document.documentMode,wr=null,Tr=null,Er=null,Dr=!1;function Or(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Dr||wr==null||wr!==At(r)||(r=wr,`selectionStart`in r&&Sr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Er&&_r(Er,r)||(Er=r,r=Pd(Tr,`onSelect`),0>=o,i-=o,bi=1<<32-je(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),ki&&Si(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),ki&&Si(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return ki&&Si(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),ki&&Si(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&Ca(l)===r.type){n(e,r.sibling),c=a(r,o.props),Aa(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=si(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=oi(o.type,o.key,o.props,null,e.mode,c),Aa(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ui(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=Ca(o),x(e,r,o,c)}if(ee(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,ka(o),c);if(o.$$typeof===b)return x(e,r,Zi(e,o),c);ja(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=ci(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Oa=0;var i=x(e,t,n,r);return Da=null,i}catch(t){if(t===_a||t===ya)throw t;var a=ni(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Na=Ma(!0),Pa=Ma(!1),Fa=!1;function Ia(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Ra(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function za(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Bl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=$r(e),Qr(e,null,n),t}return Yr(e,r,t,n),$r(e)}function Ba(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}function Va(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ha=!1;function Ua(){if(Ha){var e=ca;if(e!==null)throw e}}function Wa(e,t,n,r){Ha=!1;var i=e.updateQueue;Fa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Ul&p)===p:(r&p)===p){p!==0&&p===sa&&(Ha=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Fa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Zl|=o,e.lanes=o,e.memoizedState=d}}function Ga(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function Ka(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=M.T,s={};M.T=s,Ns(e,!1,t,n);try{var c=i(),l=M.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ms(e,t,da(c,r),yu(e)):Ms(e,t,r,yu(e))}catch(n){Ms(e,t,{then:function(){},status:`rejected`,reason:n},yu())}finally{N.p=a,o!==null&&s.types!==null&&(o.types=s.types),M.T=o}}function Ss(){}function Cs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=ws(e).queue;xs(e,a,t,te,n===null?Ss:function(){return Ts(e),n(r)})}function ws(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:te,baseState:te,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:te},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Po,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ts(e){var t=ws(e);t.next===null&&(t=e.alternate.memoizedState),Ms(e,t.next.queue,{},yu())}function Es(){return Xi(sp)}function Ds(){return ko().memoizedState}function Os(){return ko().memoizedState}function ks(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=yu();e=Ra(n);var r=za(t,e,n);r!==null&&(xu(r,t,n),Ba(r,t,n)),t={cache:ra()},e.payload=t;return}t=t.return}}function As(e,t,n){var r=yu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ps(e)?Fs(t,n):(n=Xr(e,t,n,r),n!==null&&(xu(n,e,r),Is(n,t,r)))}function js(e,t,n){Ms(e,t,n,yu())}function Ms(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ps(e))Fs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,gr(s,o))return Yr(e,t,i,0),Vl===null&&Jr(),!1}catch{}if(n=Xr(e,t,i,r),n!==null)return xu(n,e,r),Is(n,t,r),!0}return!1}function Ns(e,t,n,r){if(r={lane:2,revertLane:vd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ps(e)){if(t)throw Error(i(479))}else t=Xr(e,n,r,2),t!==null&&xu(t,e,2)}function Ps(e){var t=e.alternate;return e===co||t!==null&&t===co}function Fs(e,t){po=fo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Is(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,qe(e,n)}}var Ls={readContext:Xi,use:Mo,useCallback:yo,useContext:yo,useEffect:yo,useImperativeHandle:yo,useLayoutEffect:yo,useInsertionEffect:yo,useMemo:yo,useReducer:yo,useRef:yo,useState:yo,useDebugValue:yo,useDeferredValue:yo,useTransition:yo,useSyncExternalStore:yo,useId:yo,useHostTransitionStatus:yo,useFormState:yo,useActionState:yo,useOptimistic:yo,useMemoCache:yo,useCacheRefresh:yo};Ls.useEffectEvent=yo;var Rs={readContext:Xi,use:Mo,useCallback:function(e,t){return Oo().memoizedState=[e,t===void 0?null:t],e},useContext:Xi,useEffect:cs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),os(4194308,4,ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return os(4194308,4,e,t)},useInsertionEffect:function(e,t){os(4,2,e,t)},useMemo:function(e,t){var n=Oo();t=t===void 0?null:t;var r=e();if(mo){Ae(!0);try{e()}finally{Ae(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Oo();if(n!==void 0){var i=n(t);if(mo){Ae(!0);try{n(t)}finally{Ae(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=As.bind(null,co,e),[r.memoizedState,e]},useRef:function(e){var t=Oo();return e={current:e},t.memoizedState=e},useState:function(e){e=Wo(e);var t=e.queue,n=js.bind(null,co,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:gs,useDeferredValue:function(e,t){return ys(Oo(),e,t)},useTransition:function(){var e=Wo(!1);return e=xs.bind(null,co,e.queue,!0,!1),Oo().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=co,a=Oo();if(ki){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Vl===null)throw Error(i(349));Ul&127||zo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,cs(Vo.bind(null,r,o,e),[e]),r.flags|=2048,is(9,{destroy:void 0},Bo.bind(null,r,o,n,t),null),n},useId:function(){var e=Oo(),t=Vl.identifierPrefix;if(ki){var n=xi,r=bi;n=(r&~(1<<32-je(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=ho++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[et]=t,o[tt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Ud(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Mc(t)}}return Lc(t),Nc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Mc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=ae.current,Ii(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Di,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[et]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Bd(e.nodeValue,n)),e||Ni(t,!0)}else e=Yd(e).createTextNode(r),e[et]=t,t.stateNode=e}return Lc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Ii(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),e=!1}else n=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(io(t),t):(io(t),null);if(t.flags&128)throw Error(i(558))}return Lc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ii(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[et]=t}else Li(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Lc(t),a=!1}else a=Ri(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(io(t),t):(io(t),null)}return io(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Fc(t,t.updateQueue),Lc(t),null);case 4:return z(),e===null&&Ad(t.stateNode.containerInfo),Lc(t),null;case 10:return Wi(t.type),Lc(t),null;case 19:if(ne(ao),r=t.memoizedState,r===null)return Lc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Ic(r,!1);else{if(Xl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=oo(e),o!==null){for(t.flags|=128,Ic(r,!1),e=o.updateQueue,t.updateQueue=e,Fc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ai(n,e),n=n.sibling;return L(ao,ao.current&1|2),ki&&Si(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ye()>su&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}}else{if(!a){if(e=oo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Fc(t,e),Ic(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!ki)return Lc(t),null}else 2*ye()-r.renderingStartTime>su&&n!==536870912&&(t.flags|=128,a=!0,Ic(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Lc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ye(),e.sibling=null,n=ao.current,L(ao,a?n&1|2:n&1),ki&&Si(t,r.treeForkCount),e);case 22:case 23:return io(t),Za(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Lc(t),t.subtreeFlags&6&&(t.flags|=8192)):Lc(t),n=t.updateQueue,n!==null&&Fc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ne(pa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Wi(na),Lc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function zc(e,t){switch(Ti(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Wi(na),z(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ce(t),null;case 31:if(t.memoizedState!==null){if(io(t),t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(io(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Li()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ne(ao),null;case 4:return z(),null;case 10:return Wi(t.type),null;case 22:case 23:return io(t),Za(),e!==null&&ne(pa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Wi(na),null;case 25:return null;default:return null}}function Bc(e,t){switch(Ti(t),t.tag){case 3:Wi(na),z();break;case 26:case 27:case 5:ce(t);break;case 4:z();break;case 31:t.memoizedState!==null&&io(t);break;case 13:io(t);break;case 19:ne(ao);break;case 10:Wi(t.type);break;case 22:case 23:io(t),Za(),e!==null&&ne(pa);break;case 24:Wi(na)}}function Vc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Zu(t,t.return,e)}}function Hc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Zu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Zu(t,t.return,e)}}function Uc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Ka(t,n)}catch(t){Zu(e,e.return,t)}}}function Wc(e,t,n){n.props=Gs(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Zu(e,t,n)}}function Gc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Zu(e,t,n)}}function Kc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Zu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Zu(e,t,n)}else n.current=null}}function qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Zu(e,e.return,t)}}function Jc(e,t,n){try{var r=e.stateNode;Wd(r,e.type,n,t),r[tt]=t}catch(t){Zu(e,e.return,t)}}function Yc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&sf(e.type)||e.tag===4}function Xc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Yc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&sf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Zc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qt));else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Zc(e,t,n),e=e.sibling;e!==null;)Zc(e,t,n),e=e.sibling}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&sf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ud(t,r,n),t[et]=e,t[tt]=n}catch(t){Zu(e,e.return,t)}}var el=!1,tl=!1,nl=!1,rl=typeof WeakSet==`function`?WeakSet:Set,il=null;function al(e,t){if(e=e.containerInfo,qd=gp,e=xr(e),Sr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Jd={focusedElem:e,selectionRange:n},gp=!1,il=t;il!==null;)if(t=il,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,il=e;else for(;il!==null;){switch(t=il,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Ud(o,r,n),o[et]=e,pt(o),r=o;break a;case`link`:var s=Xf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=yr(s,h),v=yr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,M.T=null,n=hu,hu=null;var o=du,s=pu;if(uu=0,fu=du=null,pu=0,Bl&6)throw Error(i(331));var c=Bl;if(Bl|=4,Fl(o.current),Dl(o,o.current,s,n),Bl=c,dd(0,!1),ke&&typeof ke.onPostCommitFiberRoot==`function`)try{ke.onPostCommitFiberRoot(Oe,o)}catch{}return!0}finally{N.p=a,M.T=r,qu(e,t)}}function Xu(e,t,n){t=fi(n,t),t=Zs(e.stateNode,t,2),e=za(e,t,2),e!==null&&(We(e,2),ud(e))}function Zu(e,t,n){if(e.tag===3)Xu(e,e,n);else for(;t!==null;){if(t.tag===3){Xu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(lu===null||!lu.has(r))){e=fi(n,e),n=Qs(2),r=za(t,n,2),r!==null&&($s(n,r,t,e),We(r,2),ud(r));break}}t=t.return}}function Qu(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new zl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Jl=!0,i.add(n),e=$u.bind(null,e,t,n),t.then(e,e))}function $u(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Vl===e&&(Ul&n)===n&&(Xl===4||Xl===3&&(Ul&62914560)===Ul&&300>ye()-au?!(Bl&2)&&Ou(e,0):$l|=n,tu===Ul&&(tu=0)),ud(e)}function ed(e,t){t===0&&(t=He()),e=Zr(e,t),e!==null&&(We(e,t),ud(e))}function td(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ed(e,n)}function nd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ed(e,n)}function rd(e,t){return he(e,t)}var id=null,ad=null,od=!1,sd=!1,cd=!1,ld=0;function ud(e){e!==ad&&e.next===null&&(ad===null?id=ad=e:ad=ad.next=e),sd=!0,od||(od=!0,_d())}function dd(e,t){if(!cd&&sd){cd=!0;do for(var n=!1,r=id;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-je(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,gd(r,a))}else a=Ul,a=ze(r,r===Vl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Be(r,a)||(n=!0,gd(r,a))}r=r.next}while(n);cd=!1}}function fd(){pd()}function pd(){sd=od=!1;var e=0;ld!==0&&ef()&&(e=ld);for(var t=ye(),n=null,r=id;r!==null;){var i=r.next,a=md(r,t);a===0?(r.next=null,n===null?id=i:n.next=i,i===null&&(ad=n)):(n=r,(e!==0||a&3)&&(sd=!0)),r=i}uu!==0&&uu!==5||dd(e,!1),ld!==0&&(ld=0)}function md(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=rR()}))(),aR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],oR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],sR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],cR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],lR=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],uR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],dR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},fR={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},pR={micro:11,small:12,body:14,title:16,section:22,page:32},mR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},hR={brand:oR,ok:sR,warn:cR,bad:lR,info:uR},gR={light:7,dark:5};function _R(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function vR(e){let t=_R(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function yR(e){return Object.fromEntries(Object.entries(hR).map(([t,n])=>[`--fanout-color-${t}-contrast`,vR(n[gR[e]])]))}function bR(e){return t=>{let n=t.color??CR.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(hR,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var xR=.25,SR={xs:9,sm:10,md:11,lg:13,xl:16},CR={primaryColor:`brand`,primaryShade:gR,autoContrast:!0,luminanceThreshold:xR,colors:{dark:aR,brand:oR,ok:sR,warn:cR,bad:lR,info:uR},defaultRadius:`md`,fontFamily:mR.body,fontFamilyMonospace:mR.display,headings:{fontFamily:mR.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:ER(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:ER(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:TR(t.size)})}}},wR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":dR.light.muted,...yR(`light`)},dark:yR(`dark`)});function TR(e){let t=SR[e??`md`];return t===void 0||t>=pR.micro?{}:{"--badge-fz":`${pR.micro/16}rem`}}function ER(e,t){return!e||e===CR.primaryColor?{[t]:`var(--fanout-color-${CR.primaryColor}-contrast)`}:{}}var DR=MA({...CR,variantColorResolver:bR(Bk)});function OR({dark:e,children:t}){return(0,G.jsx)(AA,{theme:DR,cssVariablesResolver:wR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(sF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function kR({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(eI,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(Dj,{miw:0,children:[(0,G.jsx)(LL,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(cI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(ZI,{label:`Refresh this view`,children:(0,G.jsx)(WF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(KL,{size:15,weight:`bold`})})})]})}function AR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(rI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(eI,{justify:`space-between`,children:[(0,G.jsx)(cI,{size:`sm`,children:e}),n&&(0,G.jsx)(bI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(SI,{mih:160,p:`xl`,children:[(0,G.jsx)(IF,{size:`sm`}),(0,G.jsx)(cI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function jR({active:e,items:t,onChange:n}){return(0,G.jsx)(eF,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(DL,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(DL.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(DL.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(dI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function MR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(SI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(eI,{wrap:`nowrap`,children:[(0,G.jsx)(AL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(Dj,{children:[(0,G.jsx)(cI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function NR({left:e,right:t}){return(0,G.jsxs)(eI,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function PR({label:e,value:t,color:n}){return(0,G.jsxs)(sF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(cI,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function FR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function IR({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(eI,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(cI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(WI,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function LR(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function RR(e){return dR[e?`dark`:`light`]}function zR(e){let t=e?5:7;return{ok:sR[t],warn:cR[t],bad:lR[t],info:uR[t]}}function BR(e,t){let n=fR[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}var VR=Ec(),HR=P,UR=fe,WR=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Hu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(GR,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}YR(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Vb(r).w>o)return!0;if(a){var s=CD(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=VR(e).pointerEl=new Qd[i.type](HR(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=VR(e).labelEl=new Xo(HR(t.label));e.add(i),qR(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=VR(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=VR(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),qR(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=wf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){Gx(e.event)},onmousedown:UR(this._onHandleDragMove,this,0,0),drift:UR(this._onHandleDragMove,this),ondragend:UR(this._onHandleDragEnd,this)}),n.add(r)),YR(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Ix(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){GR(this._axisPointerModel,!t&&this._moveAnimation,this._handle,JR(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(JR(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(JR(r)),VR(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Lx(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function GR(e,t,n,r){KR(VR(n).lastProp,r)||(VR(n).lastProp=r,t?Gd(n,r,e):(n.stopAnimation(),n.attr(r)))}function KR(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=KR(e[r],t)}),!!n}return e===t}function qR(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function JR(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function YR(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function XR(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function ZR(e,t,n,r,i){var a=$R(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=Tg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),QR(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Qf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function QR(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function $R(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Ey(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function ez(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),_f([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function tz(e,t,n,r,i,a){var o=ux.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),ZR(t,r,i,a,{position:ez(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function nz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function rz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function iz(e,t,n){return Vb(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function az(e,t,n){return[ms(ps(t[0],t[1]),e-n/2),ps(e+n/2,ms(t[0],t[1]))]}var oz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=sz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=XR(r),f=cz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}tz(t,e,yx(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=yx(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=ez(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=sz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ps(o[1],l[c]),l[c]=ms(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(WR);function sz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var cz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:nz([t,r[0]],[t,r[1]],lz(e))}},shadow:function(e,t,n,r,i,a){var o=iz(e,i,a),s=r[1]-r[0],c=az(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:rz([l,r[0]],[u-l,s],lz(e))}}};function lz(e){return e.dim===`x`?0:1}var uz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:g_.color.border,width:1,type:`dashed`},shadowStyle:{color:g_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:g_.color.neutral00,padding:[5,7,5,7],backgroundColor:g_.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:g_.color.accent40,throttle:40}},t}(Ug),dz=Ec(),fz=R;function pz(e,t,n){if(!We.node){var r=t.getZr();dz(r).records||(dz(r).records={}),mz(r,t);var i=dz(r).records[e]||(dz(r).records[e]={});i.handler=n}}function mz(e,t){if(dz(e).initialized)return;dz(e).initialized=!0,n(`click`,pe(_z,`click`)),n(`mousemove`,pe(_z,`mousemove`)),n(`mousewheel`,pe(_z,`mousewheel`)),n(`globalout`,gz);function n(n,r){e.on(n,function(n){var i=vz(t);fz(dz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),hz(i.pendings,t)})}}function hz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function gz(e,t,n){e.handler(`leave`,null,n)}function _z(e,t,n,r){t.handler(e,n,r)}function vz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function yz(e,t){if(!We.node){var n=t.getZr();(dz(n).records||{})[e]&&(dz(n).records[e]=null)}}var bz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;pz(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){yz(`axisPointer`,t)},t.prototype.dispose=function(e,t){yz(`axisPointer`,t)},t.type=`axisPointer`,t}(PC);function xz(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Tc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var Sz=Ec();function Cz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Nz(i)&&(i=xz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Nz(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Nz(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(Ez,p),showTooltip:pe(Dz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=jz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&wz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Mz(t),Mz(e)))),g[e.key]=a}})}),R(g,function(e,t){wz(u[t],e,h,!0,f)}),Oz(p,u,f),kz(m,i,e,o),Az(u,o,n),f}}function wz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=Tz(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Tz(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Ys(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function Ez(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Dz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=ED(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Oz(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function kz(e,t,n,r){if(Nz(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Az(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Sz(r)[i]||{},o=Sz(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function jz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Mz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function Nz(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Pz(e){OD.registerAxisPointerClass(`CartesianAxisPointer`,oz),e.registerComponentModel(uz),e.registerComponentView(bz),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=gD(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},Cz)}function Fz(e){NE(zD),NE(Pz)}function Iz(e,t){var n=Tg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Go({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var Lz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:g_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:g_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:g_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:g_.color.tertiary,fontSize:14}},t}(Ug);function Rz(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function zz(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function Yz(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+Gz+i:`,left`+i+`,top`+i)),Wz+`:`+a}function Xz(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+Gz+`:`+o+`;`:[[`top`,0],[`left`,0],[Bz,o]]}function Zz(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function Qz(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=j_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(Yz(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=wg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(Zz(d)),f!=null&&i.push(`padding:`+Tg(f).join(`px `)+`px`),i.join(`;`)+`;`}function $z(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&iee(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var eB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));$z(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;Wx(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=Uz(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=Kz+Qz(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+Xz(i[0],i[1],!0)+(`border-color:`+jg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!Rz(n)&&(o=Jz(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=cB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=pB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=aB;c.x=r.x,c.y=r.y,c.update(),el(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=xz(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(cB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&sB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(el(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;cw(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(el(e).dataIndex==null?el(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=sB([t.tooltipOption],r),o=this._renderMode,s=[],c=w_(`section`,{blocks:[],noHeader:!0}),l=[],u=new M_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=$R(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=w_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Ey(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,jg(m.color),o);var h=Qg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=sB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=O_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` - -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=el(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=sB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new M_;h.marker=g.makeTooltipMarker(`item`,jg(h.color),d);var _=Qg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?O_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=el(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Oh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=sB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new M_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=og(m.axisValue,d,p)),d=kg(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=Ts(t[0],s),r=Ts(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Lg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=dB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=lB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=fB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=fB(d)?l[1]/2:d===`bottom`?l[1]:0),Rz(e)){var h=uB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&(Lx(this,`_updatePosition`),this._tooltipContent.dispose(),yz(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(PC);function sB(e,t,n){var r=t.ecModel,i;n?(i=new yp(n,r,r),i=new yp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof yp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new yp(o,i,r)))}return i}function cB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function lB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function uB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function dB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function fB(e){return e===`center`||e===`middle`}function pB(e,t,n){var r=kc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=jc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=el(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function mB(e){NE(Pz),e.registerComponentModel(Lz),e.registerComponentView(oB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var hB=R;function gB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function _B(e,t,n){var r={};return hB(t,function(t){var a=r[t]=i();hB(e[t],function(e,r){if(UD.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new UD(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new UD(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function vB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&gB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&gB(t[n])?e[n]=P(t[n]):delete e[n]})}function yB(e,t,n,r){var i={};return R(e,function(e){i[e]=UD.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return aw(a,l,e)}function c(e,t){sw(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var bB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},xB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,bB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:g_.size.m,align:`auto`,backgroundColor:g_.color.transparent,borderColor:g_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:g_.color.disabled,inactiveBorderColor:g_.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:g_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:g_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:g_.color.tertiary,borderWidth:1,borderColor:g_.color.border},emphasis:{selectorLabel:{show:!0,color:g_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Ug),SB=pe,CB=R,wB=Hu,TB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new wB),this.group.add(this._selectorGroup=new wB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=zg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Lg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Lg(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Iz(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),CB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new wB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,SB(OB,f,null,r,d)).on(`mouseover`,SB(kB,m.name,null,r,d)).on(`mouseout`,SB(AB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=el(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,SB(OB,null,f,r,d)).on(`mouseover`,SB(kB,null,f,r,d)).on(`mouseout`,SB(AB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=el(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};el(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();CB(e,function(e){var r=e.type,i=new Xo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Xf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),su(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=EB(c,r,o,s,d,m,u),y=new wB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(DB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Xo({style:Qf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Go({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Mf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),su(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Ig(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Ig(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(PC);function EB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),CB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Xw(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function DB(e){var t=e.icon||`roundRect`,n=B_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=g_.color.neutral00,n.style.lineWidth=2),n}function OB(e,t,n,r){AB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),kB(e,t,n,r)}function kB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function AB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function jB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),MB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),MB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function MB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function NB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(jB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(jB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(jB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(jB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(jB,`unSelect`))}var PB=$c(FB);function FB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Go({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Gd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=BB[i],o=VB[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(TB);function UB(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function WB(e){NE(IB),e.registerComponentModel(LB),e.registerComponentView(HB),UB(e)}function GB(e){NE(IB),NE(WB)}var KB={get:function(e,t,n){var r=P((qB[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},qB={color:{active:[`#006edd`,`#e0ffff`],inactive:[g_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},JB=UD.mapVisual,YB=UD.eachVisual,XB=B,ZB=R,QB=As,$B=ws,eV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&vB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=_B(this.option.controller,t,e),this.targetVisuals=_B(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return ZB(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=QB([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){XB(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},ZB(r,function(e,t){if(UD.isValidType(t)){var n=KB.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;ZB(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=JB(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;YB(l,function(e){e>u&&(u=e)}),c.symbolSize=JB(l,function(e){return $B(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:g_.color.transparent,borderColor:g_.color.borderTint,contentColor:g_.color.theme[0],inactiveColor:g_.color.disabled,borderWidth:0,padding:g_.size.m,textGap:10,precision:0,textStyle:{color:g_.color.secondary}},t}(Ug),tV=[20,140],nV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=tV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=tV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=As((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=rV(this,`outOfRange`,this.getExtent()),n=rV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Hu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);lV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=cV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=_f(n.handleLabelPoints[l],gf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=cV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=_f(c.indicatorLabelPoint,gf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||_V(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=wc(u,d);this._dispatchHighDown(`downplay`,sV(f[0],n)),this._dispatchHighDown(`highlight`,sV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(cw(e.target,function(e){var n=el(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function SV(e,t,n,r){for(var i=t.targetVisuals[r],a=UD.prepareVisualTypes(i),o={color:ow(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(yV,bV),R(xV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(wV))}function OV(e){e.registerComponentModel(nV),e.registerComponentView(mV),DV(e)}var kV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],AV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=UD.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=KB.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=UD.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){UD.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=bh(eV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(eV),AV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function jV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var MV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Hu;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xo({style:Qf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Ig(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:sV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return oV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Hu,o=this.visualMapModel.textStyleModel;a.add(new Xo({style:Qf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=B_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(iV);function NV(e){e.registerComponentModel(kV),e.registerComponentView(MV),DV(e)}function PV(e){NE(OV),NE(NV)}var FV={label:{enabled:!0},decal:{show:!1}},IV=Ec(),LV=Ec(),RV=$c(zV);function zV(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=LV(e).scope||(LV(e).scope={}),i=P(FV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||(IV(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Kg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=IV(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Kg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=GV:-c>=GV),f=c>0?c%GV:c%GV+GV,p=!1;p=d?!0:!si(u)&&f>=WV==!!l;var m=e+n*UV(a),h=t+r*HV(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*KV);if(d){var _=1/this._p,v=(l?1:-1)*(GV-_);this._add(`A`,n,r,g,1,+l,e+n*UV(a+v),t+r*HV(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*UV(o),b=t+r*HV(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function lH(e){return``}function uH(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return cH(i,a)+(i===`style`?o||``:Oh(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+lH(i)}return r(e)}function dH(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function fH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function pH(e,t,n,r){return sH(`svg`,`root`,{width:e,height:t,xmlns:tH,"xmlns:xlink":nH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var mH=0;function hH(){return mH++}var gH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},_H=`transform-origin`;function vH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new qV;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function yH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[_H]=n+`px `+r+`px`)}var bH={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function xH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function SH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=fH(n.zrId);t.animation=!0,wH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=xH(i,n);return a.replace(o,s)}}function CH(e){return V(e)?gH[e]?`cubic-bezier(`+gH[e]+`)`:jr(e)?e:``:``}function wH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Dd){var s=SH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return xH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+hH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function TH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};EH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ri(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),EH(r,t,n,!0)}}}function EH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+hH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var DH=Math.round;function OH(e){return e&&V(e.src)}function kH(e){return e&&me(e.toDataURL)}function AH(e,t,n,r){eH(function(i,a){var o=i===`fill`||i===`stroke`;o&&bi(a)?GH(t,e,i,r):o&&_i(a)?KH(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),WH(n,e,r)}function jH(e,t){var n=tne(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[aH+`silent`]=`true`))}function MH(e){return si(e[0]-1)&&si(e[1])&&si(e[2])&&si(e[3]-1)}function NH(e){return si(e[4])&&si(e[5])}function PH(e,t,n){if(t&&!(NH(t)&&MH(t))){var r=n?10:1e4;e.transform=MH(t)?`translate(`+DH(t[4]*r)/r+` `+DH(t[5]*r)/r+`)`:ui(t)}}function FH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=sH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Ci(i);x&&(o.patternTransform=x);var S=sH(`pattern`,``,o,[d]),C=uH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=sH(`pattern`,T,o,[d])),t[n]=xi(T)}}function qH(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=sH(`clipPath`,a,o,[BH(e,n)])}t[`clip-path`]=xi(a)}function JH(e){return document.createTextNode(e)}function YH(e,t,n){e.insertBefore(t,n)}function XH(e,t){e.removeChild(t)}function ZH(e,t){e.appendChild(t)}function QH(e){return e.parentNode}function $H(e){return e.nextSibling}function eU(e,t){e.textContent=t}var tU=58,nU=120,rU=sH(``,``);function iU(e){return e===void 0}function aU(e){return e!==void 0}function oU(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function sU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function cU(e){var t,n=e.children,r=e.tag;if(aU(r)){var i=e.elm=oH(r);if(dU(rU,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,lU(e,m,n,i,c)):uU(e,t,r,a))}function pU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(dU(e,t),iU(t.text)?aU(r)&&aU(i)?r!==i&&fU(n,r,i):aU(i)?(aU(e.text)&&eU(n,``),lU(n,null,i,0,i.length-1)):aU(r)?uU(n,r,0,r.length-1):aU(e.text)&&eU(n,``):e.text!==t.text&&(aU(r)&&uU(n,r,0,r.length-1),eU(n,t.text)))}function mU(e,t){if(sU(e,t))pU(e,t);else{var n=e.elm,r=QH(n);cU(t),r!==null&&(YH(r,t.elm,$H(n)),uU(r,[e],0,0))}return t}var hU=0,gU=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=_U(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+hU++,this._oldVNode=pH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=oH(`svg`);dU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,mU(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return UH(e,fH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=fH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=vU(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=sH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(sH(`defs`,`defs`,{},c)),e.animation){var l=dH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=sH(`style`,`stl`,{},[],l);a.push(u)}}return pH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},uH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=pE(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var xU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function SU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function CU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${CU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function zre(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function wU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}var TU=c({BIGINT_FORMAT_RANGES:()=>wW,CONSTANT_CATCH:()=>AW,Class:()=>EW,NUMBER_FORMAT_RANGES:()=>CW,aborted:()=>QU,allowsEval:()=>yW,assert:()=>Wre,assertEqual:()=>Bre,assertIs:()=>Hre,assertNever:()=>Ure,assertNotEqual:()=>Vre,assignProp:()=>PU,attachSchema:()=>nW,base64ToUint8Array:()=>lW,base64urlToUint8Array:()=>$re,cached:()=>kU,captureStackTrace:()=>vW,cleanEnum:()=>Qre,cleanRegex:()=>jU,clone:()=>HU,cloneDef:()=>Kre,codePointLength:()=>aW,constantCatch:()=>gW,createTransparentProxy:()=>Zre,defineLazy:()=>NU,defineLazyInternal:()=>mW,esc:()=>IU,escapeRegex:()=>VU,explicitlyAborted:()=>$U,extend:()=>qU,finalizeIssue:()=>rW,floatSafeRemainder:()=>MU,getElementAtPath:()=>qre,getEnumValues:()=>DU,getLengthableOrigin:()=>oW,getParsedType:()=>bW,getSizableOrigin:()=>iW,hexToUint8Array:()=>tie,hide:()=>pW,installLazyProp:()=>hW,isObject:()=>RU,isPlainObject:()=>zU,issue:()=>cW,joinValues:()=>K,jsonStringifyReplacer:()=>OU,members:()=>dW,merge:()=>YU,mergeDefs:()=>FU,normalizeParams:()=>q,nullish:()=>AU,numKeys:()=>Xre,objectClone:()=>Gre,omit:()=>KU,optionalKeys:()=>WU,own:()=>fW,parsedType:()=>sW,partial:()=>XU,pick:()=>GU,prefixIssues:()=>eW,primitiveTypes:()=>SW,promiseAllObject:()=>Jre,propertyKeyTypes:()=>xW,randomString:()=>Yre,required:()=>ZU,safeExtend:()=>JU,shallowClone:()=>BU,slugify:()=>LU,stringifyPrimitive:()=>UU,toZod:()=>EU,uint8ArrayToBase64:()=>uW,uint8ArrayToBase64url:()=>eie,uint8ArrayToHex:()=>nie,unwrapMessage:()=>tW});function Bre(e){return e}function Vre(e){return e}function EU(){return e=>e}function Hre(e){}function Ure(e){throw Error(`Unexpected value in exhaustive check`)}function Wre(e){}function DU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>UU(e)).join(t)}function OU(e,t){return typeof t==`bigint`?t.toString():t}function kU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function AU(e){return e==null}function jU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function MU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Jre(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Zre(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function UU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function WU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function GU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return HU(e,FU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&PU(e,r,n.shape[r])}return PU(this,`shape`,e),e},checks:[]}))}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return HU(e,FU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return PU(this,`shape`,r),r},checks:[]}))}function qU(e,t){if(!zU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return PU(this,`shape`,n),n}}))}function JU(e,t){if(!zU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return PU(this,`shape`,n),n}}))}function YU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return PU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function XU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return HU(t,FU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return PU(this,`shape`,i),i},checks:[]}))}function ZU(e,t,n){return HU(t,FU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return PU(this,`shape`,i),i}}))}function QU(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tW(e){return typeof e==`string`?e:e?.message}function nW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function lW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function dW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):rie(e,n,r.value)}}function fW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function pW(e,t,n){return fW(e,t,n,!1)}function rie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:fW(this,t,n.bind(this))},set(e){fW(this,t,e)}})}function iie(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function mW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&DW!==e._zod){DW=void 0;return}DW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,kW);let e=OW;OW=!1;try{let r=n(this);return OW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),OW||=e,r}catch(n){throw delete this[t],OW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function hW(e,t,n,r){let i=iie(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function gW(e){let t=()=>e;return t[AW]=!0,t}var _W,vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,J=o((()=>{BW(),_W=Symbol(`evaluating`),vW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},yW=kU(()=>{if(zW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),bW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},xW=new Set([`string`,`number`,`symbol`]),SW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),CW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},TW=/[\uD800-\uDBFF]/,EW=class{constructor(...e){}},OW=!1,kW={configurable:!0,get(){OW=!0}},AW=`~constantCatch`}));function aie(e){let t=FW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return FW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){PW.value=new a(r);try{Object.defineProperty(n,"_zod",PW)}finally{PW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),dW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?aie(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function jW(e){return e&&Object.assign(zW,e),zW}var MW,NW,PW,FW,IW,LW,RW,zW,BW=o((()=>{J(),NW=Object.freeze({status:`aborted`}),PW={value:void 0,enumerable:!1},FW=`captureStackTrace`in Error?Error:null,IW=Symbol(`zod_brand`),LW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},RW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(MW=globalThis).__zod_globalConfig??(MW.__zod_globalConfig={}),zW=globalThis.__zod_globalConfig}));function oie(){let e=this._zod;return e.message??=JSON.stringify(e.def,OU,2),e.message}function sie(e){this._zod.message=e}function cie(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function VW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?cie(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function HW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function GW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${WW(e.path)}`);return t.join(` -`)}var KW,qW,JW,YW,XW,ZW,QW,$W=o((()=>{BW(),J(),KW={get:oie,set:sie,enumerable:!0,configurable:!0},qW={value:void 0,enumerable:!1},JW={value:void 0,enumerable:!1},YW=new WeakSet([Object.prototype,Error.prototype]),XW=(e,t)=>{e.name=`$ZodError`,qW.value=e._zod,Object.defineProperty(e,"_zod",qW),JW.value=t,Object.defineProperty(e,"issues",JW),qW.value=void 0,JW.value=void 0,Object.defineProperty(e,"message",KW);let n=Object.getPrototypeOf(e);YW.has(n)||(YW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},ZW=Y(`$ZodError`,XW),QW=Y(`$ZodError`,XW,void 0,{Parent:Error})}));function eG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function lie(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[uG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new LW;return a.issues.length===0}var tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG=o((()=>{BW(),$W(),J(),tG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new LW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rW(e,o,jW())));throw vW(n,a?.callee??t),n}return s.value};return t},nG=tG(QW),rG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rW(e,o,jW())));throw vW(n,a?.callee??t),n}return s.value};return t},iG=rG(QW),aG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new LW;return a.issues.length?{success:!1,error:new(e??ZW)(a.issues.map(e=>rW(e,i,jW())))}:{success:!0,data:a.value}},oG=aG(QW),sG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>rW(e,i,jW())))}:{success:!0,data:a.value}},cG=sG(QW),lG=Symbol.for(`zod.compile.invalid`),uG=Symbol.for(`zod.compile.fallback`),dG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==lG||lie(e,t,n)}),fG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},pG=e=>{let t=tG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,eG(n,a))};return n},mG=pG(QW),hG=e=>{let t=tG(e),n=(e,r,i,a)=>t(e,r,i,eG(n,a));return n},gG=hG(QW),_G=e=>{let t=rG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,eG(n,a))};return n},vG=_G(QW),yG=e=>{let t=rG(e),n=async(e,r,i,a)=>await t(e,r,i,eG(n,a));return n},bG=yG(QW),xG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return aG(e)(t,n,i)},SG=xG(QW),CG=e=>(t,n,r)=>aG(e)(t,n,r),wG=CG(QW),TG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sG(e)(t,n,i)},EG=TG(QW),DG=e=>async(t,n,r)=>sG(e)(t,n,r),OG=DG(QW)})),AG=c({base64:()=>uK,base64url:()=>dK,bigint:()=>bK,boolean:()=>CK,browserEmail:()=>rK,cidrv4:()=>cK,cidrv6:()=>lK,creditCard:()=>gK,cuid:()=>zG,cuid2:()=>BG,date:()=>vK,datetime:()=>IG,domain:()=>pK,duration:()=>GG,e164:()=>hK,email:()=>QG,emoji:()=>MG,extendedDuration:()=>KG,guid:()=>qG,hex:()=>OK,hostname:()=>fK,html5Email:()=>$G,httpProtocol:()=>mK,idnEmail:()=>nK,integer:()=>xK,ipv4:()=>aK,ipv6:()=>oK,ksuid:()=>UG,lowercase:()=>EK,mac:()=>sK,md5_base64:()=>AK,md5_base64url:()=>jK,md5_hex:()=>kK,nanoid:()=>WG,nanoidOfLength:()=>jG,null:()=>wK,number:()=>SK,rfc5322Email:()=>eK,sha1_base64:()=>NK,sha1_base64url:()=>PK,sha1_hex:()=>MK,sha256_base64:()=>IK,sha256_base64url:()=>LK,sha256_hex:()=>FK,sha384_base64:()=>zK,sha384_base64url:()=>BK,sha384_hex:()=>RK,sha512_base64:()=>HK,sha512_base64url:()=>UK,sha512_hex:()=>VK,string:()=>yK,time:()=>FG,ulid:()=>VG,undefined:()=>TK,unicodeEmail:()=>tK,uppercase:()=>DK,uuid:()=>JG,uuid4:()=>YG,uuid6:()=>XG,uuid7:()=>ZG,xid:()=>HG});function jG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function MG(){return new RegExp(iK,`u`)}function NG(e){return RegExp(`^${e}$`)}function PG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function FG(e){return RegExp(`^${PG(e)}$`)}function IG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${PG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${PG({precision:e.precision})}`:n;return RegExp(`^${_K}T(?:${r})$`)}function LG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function RG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK=o((()=>{J(),zG=/^[cC][0-9a-z]{6,}$/,BG=/^[0-9a-z]+$/,VG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,HG=/^[0-9a-vA-V]{20}$/,UG=/^[A-Za-z0-9]{27}$/,WG=/^[a-zA-Z0-9_-]{21}$/,GG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,KG=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qG=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,JG=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,YG=JG(4),XG=JG(6),ZG=JG(7),QG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$G=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,tK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nK=tK,rK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,iK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,aK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sK=e=>{let t=VU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},cK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dK=/^[A-Za-z0-9_-]*$/,fK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,pK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,mK=/^https?$/,hK=/^\+[1-9]\d{6,14}$/,gK=/^\d(?:[ -]?\d){11,18}$/,_K=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,vK=NG(_K),yK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},bK=/^-?\d+n?$/,xK=/^-?\d+$/,SK=/^-?\d+(?:\.\d+)?$/,CK=/^(?:true|false)$/i,wK=/^null$/i,TK=/^undefined$/i,EK=/^[^A-Z]*$/,DK=/^[^a-z]*$/,OK=/^[0-9a-fA-F]*$/,kK=/^[0-9a-fA-F]{32}$/,AK=LG(22,`==`),jK=RG(22),MK=/^[0-9a-fA-F]{40}$/,NK=LG(27,`=`),PK=RG(27),FK=/^[0-9a-fA-F]{64}$/,IK=LG(43,`=`),LK=RG(43),RK=/^[0-9a-fA-F]{96}$/,zK=LG(64,``),BK=RG(64),VK=/^[0-9a-fA-F]{128}$/,HK=LG(86,`==`),UK=RG(86)}));function GK(e,t,n){e.issues.length&&t.issues.push(...eW(n,e.issues))}var KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q=o((()=>{BW(),WK(),J(),KK=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qK=e=>{let t=e.value;return!AU(t)&&t.size!==void 0},JK=e=>{let t=e.value;return!AU(t)&&t.length!==void 0},YK={number:`number`,bigint:`bigint`,object:`date`},XK=Y(`$ZodCheckLessThan`,(e,t)=>{KK.init(e,t);let n=YK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{KK.init(e,t);let n=YK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:YK[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),QK=Y(`$ZodCheckMultipleOf`,(e,t)=>{KK.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):MU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$K=Y(`$ZodCheckNumberFormat`,(e,t)=>{KK.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=CW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=xK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),eq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{KK.init(e,t);let[n,r]=wW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),tq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:iW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:iW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:iW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),iq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?aW(r):i)<=t.maximum)return;let a=oW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=oW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?aW(r):i;if(a===t.length)return;let o=oW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;KK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cq=Y(`$ZodCheckRegex`,(e,t)=>{sq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=EK,sq.init(e,t)}),uq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=DK,sq.init(e,t)}),dq=Y(`$ZodCheckIncludes`,(e,t)=>{KK.init(e,t);let n=VU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fq=Y(`$ZodCheckStartsWith`,(e,t)=>{KK.init(e,t);let n=RegExp(`^${VU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckEndsWith`,(e,t)=>{KK.init(e,t);let n=RegExp(`.*${VU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckProperty`,(e,t)=>{KK.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>GK(n,e,t.property));GK(n,e,t.property)}}),hq=Y(`$ZodCheckMimeType`,(e,t)=>{KK.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckOverwrite`,(e,t)=>{KK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),vq,yq=o((()=>{vq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`).replace(Rd,``)}function Bd(e,t){return t=zd(t),zd(e)===t}function Vd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||zt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&zt(e,``+r);break;case`className`:Ct(e,`class`,r);break;case`tabIndex`:Ct(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ct(e,n,r);break;case`style`:Ht(e,r,o);break;case`data`:if(t!==`object`){Ct(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Vd(e,t,`name`,a.name,a,null),Vd(e,t,`formEncType`,a.formEncType,a,null),Vd(e,t,`formMethod`,a.formMethod,a,null),Vd(e,t,`formTarget`,a.formTarget,a,null)):(Vd(e,t,`encType`,a.encType,a,null),Vd(e,t,`method`,a.method,a,null),Vd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=Kt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=qt);break;case`onScroll`:r!=null&&Dd(`scroll`,e);break;case`onScrollEnd`:r!=null&&Dd(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=Kt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Dd(`beforetoggle`,e),Dd(`toggle`,e),St(e,`popover`,r);break;case`xlinkActuate`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:wt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:wt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:St(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Gd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Af(e,t,n){var r=kf;if(r&&typeof t==`string`&&t){var i=Mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),wf.has(i)||(wf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function jf(e){Ef.D(e),Af(`dns-prefetch`,e,null)}function Mf(e,t){Ef.C(e,t),Af(`preconnect`,e,t)}function Nf(e,t,n){Ef.L(e,t,n);var r=kf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Mt(n.imageSizes)+`"]`)):i+=`[href="`+Mt(e)+`"]`;var a=i;switch(t){case`style`:a=zf(e);break;case`script`:a=Uf(e)}Cf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Cf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Bf(a))||t===`script`&&r.querySelector(Wf(a))||(t=r.createElement(`link`),Ud(t,`link`,e),pt(t),r.head.appendChild(t)))}}function Pf(e,t){Ef.m(e,t);var n=kf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Mt(r)+`"][href="`+Mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Uf(e)}if(!Cf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Cf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Wf(a)))return}r=n.createElement(`link`),Ud(r,`link`,e),pt(r),n.head.appendChild(r)}}}function Ff(e,t,n){Ef.S(e,t,n);var r=kf;if(r&&e){var i=ft(r).hoistableStyles,a=zf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Bf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Cf.get(a))&&qf(e,n);var c=o=r.createElement(`link`);pt(c),Ud(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Kf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function If(e,t){Ef.X(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Lf(e,t){Ef.M(e,t);var n=kf;if(n&&e){var r=ft(n).hoistableScripts,i=Uf(e),a=r.get(i);a||(a=n.querySelector(Wf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Cf.get(i))&&Jf(e,t),a=n.createElement(`script`),pt(a),Ud(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t,n,r){var a=(a=ae.current)?Tf(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=zf(n.href),n=ft(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=zf(n.href);var o=ft(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Bf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Cf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Cf.set(e,n),o||Hf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Uf(n),n=ft(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function zf(e){return`href="`+Mt(e)+`"`}function Bf(e){return`link[rel="stylesheet"][`+e+`]`}function Vf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Hf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Ud(t,`link`,n),pt(t),e.head.appendChild(t))}function Uf(e){return`[src="`+Mt(e)+`"]`}function Wf(e){return`script[async]`+e}function Gf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Mt(n.href)+`"]`);if(r)return t.instance=r,pt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),pt(r),Ud(r,`style`,a),Kf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=zf(n.href);var o=e.querySelector(Bf(a));if(o)return t.state.loading|=4,t.instance=o,pt(o),o;r=Vf(n),(a=Cf.get(a))&&qf(r,a),o=(e.ownerDocument||e).createElement(`link`),pt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Ud(o,`link`,r),t.state.loading|=4,Kf(o,n.precedence,e),t.instance=o;case`script`:return o=Uf(n.src),(a=e.querySelector(Wf(o)))?(t.instance=a,pt(a),a):(r=n,(a=Cf.get(o))&&(r=f({},n),Jf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),pt(a),Ud(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Kf(r,n.precedence,e));return t.instance}function Kf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function Qf(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function $f(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function ep(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=zf(r.href),a=t.querySelector(Bf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,pt(a);return}a=t.ownerDocument||t,r=Vf(r),(i=Cf.get(i))&&qf(r,i),a=a.createElement(`link`),pt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Ud(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var tp=0;function np(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0tp?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=bR()}))(),SR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],CR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],wR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],TR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],ER=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],DR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],OR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},kR={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},AR={micro:11,small:12,body:14,title:16,section:22,page:32},jR={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},MR={brand:CR,ok:wR,warn:TR,bad:ER,info:DR},NR={light:7,dark:5};function PR(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function FR(e){let t=PR(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function IR(e){return Object.fromEntries(Object.entries(MR).map(([t,n])=>[`--fanout-color-${t}-contrast`,FR(n[NR[e]])]))}function LR(e){return t=>{let n=t.color??BR.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(MR,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var RR=.25,zR={xs:9,sm:10,md:11,lg:13,xl:16},BR={primaryColor:`brand`,primaryShade:NR,autoContrast:!0,luminanceThreshold:RR,colors:{dark:SR,brand:CR,ok:wR,warn:TR,bad:ER,info:DR},defaultRadius:`md`,fontFamily:jR.body,fontFamilyMonospace:jR.display,headings:{fontFamily:jR.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:UR(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:UR(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:HR(t.size)})}}},VR=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":OR.light.muted,...IR(`light`)},dark:IR(`dark`)});function HR(e){let t=zR[e??`md`];return t===void 0||t>=AR.micro?{}:{"--badge-fz":`${AR.micro/16}rem`}}function UR(e,t){return!e||e===BR.primaryColor?{[t]:`var(--fanout-color-${BR.primaryColor}-contrast)`}:{}}var WR=DA({...BR,variantColorResolver:LR(Fk)});function GR({dark:e,children:t}){return(0,G.jsx)(TA,{theme:WR,cssVariablesResolver:VR,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(tF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function KR({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(JF,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(Aj,{miw:0,children:[(0,G.jsx)(eR,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(nI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(nL,{label:`Refresh this view`,children:(0,G.jsx)(RF,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(lR,{size:15,weight:`bold`})})})]})}function qR({error:e,loading:t,retry:n}){return e?(0,G.jsx)(ZF,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(JF,{justify:`space-between`,children:[(0,G.jsx)(nI,{size:`sm`,children:e}),n&&(0,G.jsx)(mI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(gI,{mih:160,p:`xl`,children:[(0,G.jsx)(AF,{size:`sm`}),(0,G.jsx)(nI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function JR({active:e,items:t,onChange:n}){return(0,G.jsx)(JP,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(WL,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(WL.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(WL.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(aI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function YR({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(gI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(JF,{wrap:`nowrap`,children:[(0,G.jsx)(qL,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(Aj,{children:[(0,G.jsx)(nI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function XR({left:e,right:t}){return(0,G.jsxs)(JF,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function ZR({label:e,value:t,color:n}){return(0,G.jsxs)(tF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(nI,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function QR(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}var $R={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`};function ez({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(JF,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(nI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(HI,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`,getItemProps:e=>({"aria-label":`Page ${e}`}),getControlProps:e=>({"aria-label":$R[e]})})]})}function tz(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function nz(e){return OR[e?`dark`:`light`]}function rz(e){let t=e?5:7;return{ok:wR[t],warn:TR[t],bad:ER[t],info:DR[t]}}function iz(e,t){let n=kR[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}var az=Ec(),oz=P,sz=fe,cz=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Hu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=pe(lz,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}pz(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Yb(r).w>o)return!0;if(a){var s=ED(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=az(e).pointerEl=new Qd[i.type](oz(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=az(e).labelEl=new Xo(oz(t.label));e.add(i),dz(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=az(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=az(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),dz(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=wf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){$x(e.event)},onmousedown:sz(this._onHandleDragMove,this,0,0),drift:sz(this._onHandleDragMove,this),ondragend:sz(this._onHandleDragEnd,this)}),n.add(r)),pz(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);B(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Wx(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){lz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,fz(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(fz(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(fz(r)),az(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Gx(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function lz(e,t,n,r){uz(az(n).lastProp,r)||(az(n).lastProp=r,t?Gd(n,r,e):(n.stopAnimation(),n.attr(r)))}function uz(e,t){if(_e(e)&&_e(t)){var n=!0;return R(t,function(t,r){n&&=uz(e[r],t)}),!!n}return e===t}function dz(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function fz(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function pz(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function mz(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function hz(e,t,n,r,i){var a=_z(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=kg(o.get(`padding`)||0),c=o.getFont(),l=yn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),gz(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Qf(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function gz(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function _z(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Py(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};R(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),V(o)?a=o.replace(`{value}`,a):me(o)&&(a=o(s))}return a}function vz(e,t,n){var r=_t();return St(r,r,n.rotation),xt(r,r,n.position),_f([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function yz(e,t,n,r,i,a){var o=vx.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),hz(t,r,i,a,{position:vz(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function bz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function xz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function Sz(e,t,n){return Yb(e,{fromStat:{sers:z(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function Cz(e,t,n){return[ms(ps(t[0],t[1]),e-n/2),ps(e+n/2,ms(t[0],t[1]))]}var wz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=Tz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=mz(r),f=Ez[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}yz(t,e,Ox(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=Ox(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=vz(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=Tz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ps(o[1],l[c]),l[c]=ms(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(cz);function Tz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var Ez={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:bz([t,r[0]],[t,r[1]],Dz(e))}},shadow:function(e,t,n,r,i,a){var o=Sz(e,i,a),s=r[1]-r[0],c=Cz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:xz([l,r[0]],[u-l,s],Dz(e))}}};function Dz(e){return e.dim===`x`?0:1}var Oz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:E_.color.border,width:1,type:`dashed`},shadowStyle:{color:E_.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:E_.color.neutral00,padding:[5,7,5,7],backgroundColor:E_.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:E_.color.accent40,throttle:40}},t}(Zg),kz=Ec(),Az=R;function jz(e,t,n){if(!We.node){var r=t.getZr();kz(r).records||(kz(r).records={}),Mz(r,t);var i=kz(r).records[e]||(kz(r).records[e]={});i.handler=n}}function Mz(e,t){if(kz(e).initialized)return;kz(e).initialized=!0,n(`click`,pe(Fz,`click`)),n(`mousemove`,pe(Fz,`mousemove`)),n(`mousewheel`,pe(Fz,`mousewheel`)),n(`globalout`,Pz);function n(n,r){e.on(n,function(n){var i=Iz(t);Az(kz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),Nz(i.pendings,t)})}}function Nz(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function Pz(e,t,n){e.handler(`leave`,null,n)}function Fz(e,t,n,r){t.handler(e,n,r)}function Iz(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function Lz(e,t){if(!We.node){var n=t.getZr();(kz(n).records||{})[e]&&(kz(n).records[e]=null)}}var Rz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;jz(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){Lz(`axisPointer`,t)},t.prototype.dispose=function(e,t){Lz(`axisPointer`,t)},t.type=`axisPointer`,t}(BC);function zz(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=Tc(a,e);if(o==null||o<0||B(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(z(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var Bz=Ec();function Vz(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||fe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){Zz(i)&&(i=zz({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=Zz(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||Zz(i),f={},p={},m={list:[],map:{}},h={showPointer:pe(Wz,p),showTooltip:pe(Gz,m)};R(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);R(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=Yz(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&Hz(e,o,h,!1,f)}})});var g={};return R(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&R(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,Xz(t),Xz(e)))),g[e.key]=a}})}),R(g,function(e,t){Hz(u[t],e,h,!0,f)}),Kz(p,u,f),qz(m,i,e,o),Jz(u,o,n),f}}function Hz(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=Uz(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&I(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function Uz(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return R(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Ys(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),R(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function Wz(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function Gz(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=OD(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function Kz(e,t,n){var r=n.axesInfo=[];R(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function qz(e,t,n,r){if(Zz(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function Jz(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=Bz(r)[i]||{},o=Bz(r)[i]={};R(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&R(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}R(a,function(e,t){!o[t]&&c.push(l(e))}),R(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function Yz(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function Xz(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function Zz(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function Qz(e){AD.registerAxisPointerClass(`CartesianAxisPointer`,wz),e.registerComponentModel(Oz),e.registerComponentView(Rz),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!B(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=yne(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},Vz)}function $z(e){QE(Mne),QE(Qz)}function eB(e,t){var n=kg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Go({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var tB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:E_.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:E_.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:E_.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:E_.color.tertiary,fontSize:14}},t}(Zg);function nB(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function rB(e){if(We.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function pB(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(We.transformSupported?``+lB+i:`,left`+i+`,top`+i)),cB+`:`+a}function mB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!We.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=We.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+lB+`:`+o+`;`:[[`top`,0],[`left`,0],[iB,o]]}function hB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=we(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),R([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function gB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=z_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(pB(a,n,r)),o&&i.push(`background-color:`+o),R([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=Og(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(hB(d)),f!=null&&i.push(`padding:`+kg(f).join(`px `)+`px`),i.join(`;`)+`;`}function _B(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&kh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var vB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,We.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(V(i)?document.querySelector(i):be(i)?i:me(i)&&i(e.getDom()));_B(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;Qx(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=sB(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=uB+gB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+mB(i[0],i[1],!0)+(`border-color:`+Fg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(V(i)&&n.get(`trigger`)===`item`&&!nB(n)&&(o=fB(n,r,i)),V(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,B(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!We.node&&n.getDom()){var i=EB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=jB(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=CB;c.x=r.x,c.y=r.y,c.update(),el(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=zz(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(EB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&TB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(el(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;Sw(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(el(e).dataIndex==null?el(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=fe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=TB([t.tooltipOption],r),o=this._renderMode,s=[],c=M_(`section`,{blocks:[],noHeader:!0}),l=[],u=new B_;R(e,function(e){R(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=_z(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=M_(`section`,{header:f,noHeader:!ke(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),R(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Py(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,Fg(m.color),o);var h=c_(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=TB([a],r).get(`valueFormatter`);p.blocks.push(_?I({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=I_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=el(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=TB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new B_;h.marker=g.makeTooltipMarker(`item`,Fg(h.color),d);var _=c_(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?I_(y?I({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=el(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(V(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=P(a),a.content=Lh(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=TB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new B_;this._showOrMove(d,function(){var n=P(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(V(u)){var p=e.ecModel.get(`useUTC`),m=B(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=lg(m.axisValue,d,p)),d=Ng(d,n,!0)}else if(me(u)){var g=fe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||B(t))return{color:r||i};if(!B(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),me(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),B(t))n=Ts(t[0],s),r=Ts(t[1],c);else if(_e(t)){var p=t;p.width=l[0],p.height=l[1];var m=Hg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(V(t)&&o){var h=kB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=DB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=AB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=AB(d)?l[1]/2:d===`bottom`?l[1]:0),nB(e)){var h=OB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&R(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&R(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&R(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&R(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!We.node&&t.getDom()&&(Gx(this,`_updatePosition`),this._tooltipContent.dispose(),Lz(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(BC);function TB(e,t,n){var r=t.ecModel,i;n?(i=new yp(n,r,r),i=new yp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof yp&&(o=o.get(`tooltip`,!0)),V(o)&&(o={formatter:o}),o&&(i=new yp(o,i,r)))}return i}function EB(e,t){return e.dispatchAction||fe(t.dispatchAction,t)}function DB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function OB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function kB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function AB(e){return e===`center`||e===`middle`}function jB(e,t,n){var r=kc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=jc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=el(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function MB(e){QE(Qz),e.registerComponentModel(tB),e.registerComponentView(wB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ve),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ve)}var NB=R;function PB(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function FB(e,t,n){var r={};return NB(t,function(t){var a=r[t]=i();NB(e[t],function(e,r){if(RD.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new RD(i),r===`opacity`&&(i=P(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new RD(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function IB(e,t,n){var r;R(n,function(e){t.hasOwnProperty(e)&&PB(t[e])&&(r=!0)}),r&&R(n,function(n){t.hasOwnProperty(n)&&PB(t[n])?e[n]=P(t[n]):delete e[n]})}function LB(e,t,n,r){var i={};return R(e,function(e){i[e]=RD.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return yw(a,l,e)}function c(e,t){xw(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var RB=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},zB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),B(t)&&R(t,function(e,r){V(e)&&(e={type:e}),t[r]=F(e,RB(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:E_.size.m,align:`auto`,backgroundColor:E_.color.transparent,borderColor:E_.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:E_.color.disabled,inactiveBorderColor:E_.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:E_.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:E_.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:E_.color.tertiary,borderWidth:1,borderColor:E_.color.border},emphasis:{selectorLabel:{show:!0,color:E_.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Zg),BB=pe,VB=R,HB=Hu,UB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new HB),this.group.add(this._selectorGroup=new HB),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Wg(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Hg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Hg(L({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=eB(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Le(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),VB(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new HB;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,BB(KB,f,null,r,d)).on(`mouseover`,BB(qB,m.name,null,r,d)).on(`mouseout`,BB(JB,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=el(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Kr(h.fill);_&&_[3]===0&&(_[3]=.2,h=I(I({},h),{fill:ei(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,BB(KB,null,f,r,d)).on(`mouseover`,BB(qB,null,f,r,d)).on(`mouseout`,BB(JB,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=el(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};el(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();VB(e,function(e){var r=e.type,i=new Xo({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Xf(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),su(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=WB(c,r,o,s,d,m,u),y=new HB,b=r.getModel(`textStyle`);if(me(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(GB({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;V(w)&&w?T=w.replace(`{name}`,t??``):me(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Xo({style:Qf(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Go({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Mf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),su(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Bg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Bg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(BC);function WB(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),VB(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:fT(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function GB(e){var t=e.icon||`roundRect`,n=J_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=E_.color.neutral00,n.style.lineWidth=2),n}function KB(e,t,n,r){JB(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),qB(e,t,n,r)}function qB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function JB(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function YB(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),XB(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){R(i,function(t,n){e[t?`select`:`unSelect`](n)}),XB(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function XB(e,t){var n=t||{};return R(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=Be(n,r)?n[r]&&i:i}}),n}function ZB(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,pe(YB,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,pe(YB,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,pe(YB,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,pe(YB,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,pe(YB,`unSelect`))}var Sre=$c(QB);function QB(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=we(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Go({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Gd(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;R([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,V(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=rV[i],o=iV[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(UB);function oV(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function sV(e){QE($B),e.registerComponentModel(eV),e.registerComponentView(aV),oV(e)}function cV(e){QE($B),QE(sV)}var lV={get:function(e,t,n){var r=P((uV[e]||{})[t]);return n&&B(r)?r[r.length-1]:r}},uV={color:{active:[`#006edd`,`#e0ffff`],inactive:[E_.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},dV=RD.mapVisual,fV=RD.eachVisual,pV=B,mV=R,hV=As,gV=ws,_V=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&IB(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=fe(e,this),this.controllerVisuals=FB(this.option.controller,t,e),this.targetVisuals=FB(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return mV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=jc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return z(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){R(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],B(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(V(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(me(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=hV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=le(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};F(r,n),F(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){pV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},mV(r,function(e,t){if(RD.isValidType(t)){var n=lV.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;mV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&P(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&P(n)||(a?s[0]:[s[0],s[0]])),c.symbol=dV(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;fV(l,function(e){e>u&&(u=e)}),c.symbolSize=dV(l,function(e){return gV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:E_.color.transparent,borderColor:E_.color.borderTint,contentColor:E_.color.theme[0],inactiveColor:E_.color.disabled,borderWidth:0,padding:E_.size.m,textGap:10,precision:0,textStyle:{color:E_.color.secondary}},t}(Zg),vV=[20,140],yV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=vV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=vV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):B(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),R(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=As((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=bV(this,`outOfRange`,this.getExtent()),n=bV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Hu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);EV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=TV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=_f(n.handleLabelPoints[l],gf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=TV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=_f(c.indicatorLabelPoint,gf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||PV(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=wc(u,d);this._dispatchHighDown(`downplay`,wV(f[0],n)),this._dispatchHighDown(`highlight`,wV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(Sw(e.target,function(e){var n=el(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function zV(e,t,n,r){for(var i=t.targetVisuals[r],a=RD.prepareVisualTypes(i),o={color:bw(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(IV,LV),R(RV,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(VV))}function GV(e){e.registerComponentModel(yV),e.registerComponentView(jV),WV(e)}var KV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],qV[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=P(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=z(this._pieceList,function(e){return e=P(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=RD.listVisualTypes(),i=this.isCategory();R(t.pieces,function(e){R(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),R(n,function(e,n){var r=!1;R(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&R(this.stateList,function(e){(t[e]||(t[e]={}))[n]=lV.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,R(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;R(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=P(e)},t.prototype.getValueState=function(e){var t=RD.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){RD.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return R(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Ch(_V.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(_V),qV={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function JV(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var YV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=Ce(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),R(o.viewPieceList,function(o){var s=o.piece,u=new Hu;u.onclick=fe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Xo({style:Qf(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:we(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Bg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:wV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return CV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Hu,o=this.visualMapModel.textStyleModel;a.add(new Xo({style:Qf(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=z(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=J_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=P(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,R(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(xV);function XV(e){e.registerComponentModel(KV),e.registerComponentView(YV),WV(e)}function ZV(e){QE(GV),QE(XV)}var QV={label:{enabled:!0},decal:{show:!1}},$V=Ec(),eH=Ec(),tH=$c(nH);function nH(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=eH(e).scope||(eH(e).scope={}),i=P(QV);F(i.label,e.getLocaleModel().get(`aria`),!1),F(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Le();e.eachSeries(function(e){e.isColorBySeries()||($V(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(me(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=n_(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=$V(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=n_(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?I(I({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=L(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=cH:-c>=cH),f=c>0?c%cH:c%cH+cH,p=!1;p=d?!0:!si(u)&&f>=sH==!!l;var m=e+n*oH(a),h=t+r*aH(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*lH);if(d){var _=1/this._p,v=(l?1:-1)*(cH-_);this._add(`A`,n,r,g,1,+l,e+n*oH(a+v),t+r*aH(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*oH(o),b=t+r*aH(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function EH(e){return``}function DH(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return TH(i,a)+(i===`style`?o||``:Lh(o))+(t?``+n+z(t,function(e){return r(e)}).join(n)+n:``)+EH(i)}return r(e)}function OH(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=z(ue(e),function(t){return t+i+z(ue(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=z(ue(t),function(e){return`@keyframes `+e+i+z(ue(t[e]),function(n){return n+i+z(ue(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function kH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function AH(e,t,n,r){return wH(`svg`,`root`,{width:e,height:t,xmlns:vH,"xmlns:xlink":yH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var jH=0;function MH(){return jH++}var NH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},PH=`transform-origin`;function FH(e,t,n){var r=I({},e.shape);I(r,t),e.buildPath(n,r);var i=new uH;return i.reset(Si(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function IH(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[PH]=n+`px `+r+`px`)}var LH={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function RH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function zH(e,t,n){var r=e.shape.paths,i={},a,o;if(R(r,function(e){var t=kH(n.zrId);t.animation=!0,VH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ue(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=RH(i,n);return a.replace(o,s)}}function BH(e){return V(e)?NH[e]?`cubic-bezier(`+NH[e]+`)`:jr(e)?e:``:``}function VH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Dd){var s=zH(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return RH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+MH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function HH(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};UH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ri(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),UH(r,t,n,!0)}}}function UH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+MH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var WH=Math.round;function GH(e){return e&&V(e.src)}function KH(e){return e&&me(e.toDataURL)}function qH(e,t,n,r){_H(function(i,a){var o=i===`fill`||i===`stroke`;o&&bi(a)?tU(t,e,i,r):o&&_i(a)?nU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),kre(n,e,r)}function JH(e,t){var n=KS(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[SH+`silent`]=`true`))}function YH(e){return si(e[0]-1)&&si(e[1])&&si(e[2])&&si(e[3]-1)}function Cre(e){return si(e[4])&&si(e[5])}function XH(e,t,n){if(t&&!(Cre(t)&&YH(t))){var r=n?10:1e4;e.transform=YH(t)?`translate(`+WH(t[4]*r)/r+` `+WH(t[5]*r)/r+`)`:ui(t)}}function ZH(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;Oe(f,g),Oe(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=mt(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=wH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=P(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=Ci(i);x&&(o.patternTransform=x);var S=wH(`pattern`,``,o,[d]),C=DH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=wH(`pattern`,T,o,[d])),t[n]=xi(T)}}function Are(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=wH(`clipPath`,a,o,[$H(e,n)])}t[`clip-path`]=xi(a)}function rU(e){return document.createTextNode(e)}function iU(e,t,n){e.insertBefore(t,n)}function aU(e,t){e.removeChild(t)}function oU(e,t){e.appendChild(t)}function sU(e){return e.parentNode}function cU(e){return e.nextSibling}function lU(e,t){e.textContent=t}var uU=58,jre=120,Mre=wH(``,``);function dU(e){return e===void 0}function fU(e){return e!==void 0}function Nre(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function pU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function mU(e){var t,n=e.children,r=e.tag;if(fU(r)){var i=e.elm=CH(r);if(_U(Mre,e),B(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,hU(e,m,n,i,c)):gU(e,t,r,a))}function vU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(_U(e,t),dU(t.text)?fU(r)&&fU(i)?r!==i&&Pre(n,r,i):fU(i)?(fU(e.text)&&lU(n,``),hU(n,null,i,0,i.length-1)):fU(r)?gU(n,r,0,r.length-1):fU(e.text)&&lU(n,``):e.text!==t.text&&(fU(r)&&gU(n,r,0,r.length-1),lU(n,t.text)))}function Fre(e,t){if(pU(e,t))vU(e,t);else{var n=e.elm,r=sU(n);mU(t),r!==null&&(iU(r,t.elm,cU(n)),gU(r,[e],0,0))}return t}var Ire=0,Lre=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=Rre(`configLayer`),this.storage=t,this._opts=n=I({},n),this.root=e,this._id=`zr`+Ire++,this._oldVNode=AH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=CH(`svg`);_U(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,Fre(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return eU(e,kH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=kH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=zre(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=wH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=z(ue(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(wH(`defs`,`defs`,{},c)),e.animation){var l=OH(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=wH(`style`,`stl`,{},[],l);a.push(u)}}return AH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},DH(this.renderToVNode({animation:we(e.cssAnimation,!0),emphasis:we(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:we(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=ME(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var bU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function xU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function SU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${SU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function Vre(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function CU(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function wU(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?wU(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}var TU=c({BIGINT_FORMAT_RANGES:()=>wW,CONSTANT_CATCH:()=>AW,Class:()=>EW,NUMBER_FORMAT_RANGES:()=>CW,aborted:()=>QU,allowsEval:()=>yW,assert:()=>Kre,assertEqual:()=>Hre,assertIs:()=>Wre,assertNever:()=>Gre,assertNotEqual:()=>Ure,assignProp:()=>PU,attachSchema:()=>nW,base64ToUint8Array:()=>lW,base64urlToUint8Array:()=>tie,cached:()=>kU,captureStackTrace:()=>vW,cleanEnum:()=>eie,cleanRegex:()=>jU,clone:()=>HU,cloneDef:()=>Jre,codePointLength:()=>aW,constantCatch:()=>gW,createTransparentProxy:()=>$re,defineLazy:()=>NU,defineLazyInternal:()=>mW,esc:()=>IU,escapeRegex:()=>VU,explicitlyAborted:()=>$U,extend:()=>qU,finalizeIssue:()=>rW,floatSafeRemainder:()=>MU,getElementAtPath:()=>Yre,getEnumValues:()=>DU,getLengthableOrigin:()=>oW,getParsedType:()=>bW,getSizableOrigin:()=>iW,hexToUint8Array:()=>rie,hide:()=>pW,installLazyProp:()=>hW,isObject:()=>RU,isPlainObject:()=>zU,issue:()=>cW,joinValues:()=>K,jsonStringifyReplacer:()=>OU,members:()=>dW,merge:()=>YU,mergeDefs:()=>FU,normalizeParams:()=>q,nullish:()=>AU,numKeys:()=>Qre,objectClone:()=>qre,omit:()=>KU,optionalKeys:()=>WU,own:()=>fW,parsedType:()=>sW,partial:()=>XU,pick:()=>GU,prefixIssues:()=>eW,primitiveTypes:()=>SW,promiseAllObject:()=>Xre,propertyKeyTypes:()=>xW,randomString:()=>Zre,required:()=>ZU,safeExtend:()=>JU,shallowClone:()=>BU,slugify:()=>LU,stringifyPrimitive:()=>UU,toZod:()=>EU,uint8ArrayToBase64:()=>uW,uint8ArrayToBase64url:()=>nie,uint8ArrayToHex:()=>iie,unwrapMessage:()=>tW});function Hre(e){return e}function Ure(e){return e}function EU(){return e=>e}function Wre(e){}function Gre(e){throw Error(`Unexpected value in exhaustive check`)}function Kre(e){}function DU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>UU(e)).join(t)}function OU(e,t){return typeof t==`bigint`?t.toString():t}function kU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function AU(e){return e==null}function jU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function MU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Xre(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function $re(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function UU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function WU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function GU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return HU(e,FU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&PU(e,r,n.shape[r])}return PU(this,`shape`,e),e},checks:[]}))}function KU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return HU(e,FU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return PU(this,`shape`,r),r},checks:[]}))}function qU(e,t){if(!zU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return PU(this,`shape`,n),n}}))}function JU(e,t){if(!zU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return PU(this,`shape`,n),n}}))}function YU(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return HU(e,FU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return PU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function XU(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return HU(t,FU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return PU(this,`shape`,i),i},checks:[]}))}function ZU(e,t,n){return HU(t,FU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return PU(this,`shape`,i),i}}))}function QU(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tW(e){return typeof e==`string`?e:e?.message}function nW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function lW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function dW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):aie(e,n,r.value)}}function fW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function pW(e,t,n){return fW(e,t,n,!1)}function aie(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:fW(this,t,n.bind(this))},set(e){fW(this,t,e)}})}function oie(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function mW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&DW!==e._zod){DW=void 0;return}DW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,kW);let e=OW;OW=!1;try{let r=n(this);return OW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),OW||=e,r}catch(n){throw delete this[t],OW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function hW(e,t,n,r){let i=oie(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function gW(e){let t=()=>e;return t[AW]=!0,t}var _W,vW,yW,bW,xW,SW,CW,wW,TW,EW,DW,OW,kW,AW,J=o((()=>{BW(),_W=Symbol(`evaluating`),vW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},yW=kU(()=>{if(zW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),bW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},xW=new Set([`string`,`number`,`symbol`]),SW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),CW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},wW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},TW=/[\uD800-\uDBFF]/,EW=class{constructor(...e){}},OW=!1,kW={configurable:!0,get(){OW=!0}},AW=`~constantCatch`}));function sie(e){let t=FW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return FW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){PW.value=new a(r);try{Object.defineProperty(n,"_zod",PW)}finally{PW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),dW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?sie(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function jW(e){return e&&Object.assign(zW,e),zW}var MW,NW,PW,FW,IW,LW,RW,zW,BW=o((()=>{J(),NW=Object.freeze({status:`aborted`}),PW={value:void 0,enumerable:!1},FW=`captureStackTrace`in Error?Error:null,IW=Symbol(`zod_brand`),LW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},RW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(MW=globalThis).__zod_globalConfig??(MW.__zod_globalConfig={}),zW=globalThis.__zod_globalConfig}));function cie(){let e=this._zod;return e.message??=JSON.stringify(e.def,OU,2),e.message}function lie(e){this._zod.message=e}function uie(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function VW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?uie(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function HW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function GW(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${WW(e.path)}`);return t.join(` +`)}var KW,qW,JW,YW,XW,ZW,QW,$W=o((()=>{BW(),J(),KW={get:cie,set:lie,enumerable:!0,configurable:!0},qW={value:void 0,enumerable:!1},JW={value:void 0,enumerable:!1},YW=new WeakSet([Object.prototype,Error.prototype]),XW=(e,t)=>{e.name=`$ZodError`,qW.value=e._zod,Object.defineProperty(e,"_zod",qW),JW.value=t,Object.defineProperty(e,"issues",JW),qW.value=void 0,JW.value=void 0,Object.defineProperty(e,"message",KW);let n=Object.getPrototypeOf(e);YW.has(n)||(YW.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},ZW=Y(`$ZodError`,XW),QW=Y(`$ZodError`,XW,void 0,{Parent:Error})}));function eG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function die(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[uG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new LW;return a.issues.length===0}var tG,nG,rG,iG,aG,oG,sG,cG,lG,uG,dG,fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG=o((()=>{BW(),$W(),J(),tG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new LW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rW(e,o,jW())));throw vW(n,a?.callee??t),n}return s.value};return t},nG=tG(QW),rG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rW(e,o,jW())));throw vW(n,a?.callee??t),n}return s.value};return t},iG=rG(QW),aG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new LW;return a.issues.length?{success:!1,error:new(e??ZW)(a.issues.map(e=>rW(e,i,jW())))}:{success:!0,data:a.value}},oG=aG(QW),sG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>rW(e,i,jW())))}:{success:!0,data:a.value}},cG=sG(QW),lG=Symbol.for(`zod.compile.invalid`),uG=Symbol.for(`zod.compile.fallback`),dG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==lG||die(e,t,n)}),fG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},pG=e=>{let t=tG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,eG(n,a))};return n},mG=pG(QW),hG=e=>{let t=tG(e),n=(e,r,i,a)=>t(e,r,i,eG(n,a));return n},gG=hG(QW),_G=e=>{let t=rG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,eG(n,a))};return n},vG=_G(QW),yG=e=>{let t=rG(e),n=async(e,r,i,a)=>await t(e,r,i,eG(n,a));return n},bG=yG(QW),xG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return aG(e)(t,n,i)},SG=xG(QW),CG=e=>(t,n,r)=>aG(e)(t,n,r),wG=CG(QW),TG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return sG(e)(t,n,i)},EG=TG(QW),DG=e=>async(t,n,r)=>sG(e)(t,n,r),OG=DG(QW)})),AG=c({base64:()=>uK,base64url:()=>dK,bigint:()=>bK,boolean:()=>CK,browserEmail:()=>rK,cidrv4:()=>cK,cidrv6:()=>lK,creditCard:()=>gK,cuid:()=>zG,cuid2:()=>BG,date:()=>vK,datetime:()=>IG,domain:()=>pK,duration:()=>GG,e164:()=>hK,email:()=>QG,emoji:()=>MG,extendedDuration:()=>KG,guid:()=>qG,hex:()=>OK,hostname:()=>fK,html5Email:()=>$G,httpProtocol:()=>mK,idnEmail:()=>nK,integer:()=>xK,ipv4:()=>aK,ipv6:()=>oK,ksuid:()=>UG,lowercase:()=>EK,mac:()=>sK,md5_base64:()=>AK,md5_base64url:()=>jK,md5_hex:()=>kK,nanoid:()=>WG,nanoidOfLength:()=>jG,null:()=>wK,number:()=>SK,rfc5322Email:()=>eK,sha1_base64:()=>NK,sha1_base64url:()=>PK,sha1_hex:()=>MK,sha256_base64:()=>IK,sha256_base64url:()=>LK,sha256_hex:()=>FK,sha384_base64:()=>zK,sha384_base64url:()=>BK,sha384_hex:()=>RK,sha512_base64:()=>HK,sha512_base64url:()=>UK,sha512_hex:()=>VK,string:()=>yK,time:()=>FG,ulid:()=>VG,undefined:()=>TK,unicodeEmail:()=>tK,uppercase:()=>DK,uuid:()=>JG,uuid4:()=>YG,uuid6:()=>XG,uuid7:()=>ZG,xid:()=>HG});function jG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function MG(){return new RegExp(iK,`u`)}function NG(e){return RegExp(`^${e}$`)}function PG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function FG(e){return RegExp(`^${PG(e)}$`)}function IG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${PG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${PG({precision:e.precision})}`:n;return RegExp(`^${_K}T(?:${r})$`)}function LG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function RG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var zG,BG,VG,HG,UG,WG,GG,KG,qG,JG,YG,XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK=o((()=>{J(),zG=/^[cC][0-9a-z]{6,}$/,BG=/^[0-9a-z]+$/,VG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,HG=/^[0-9a-vA-V]{20}$/,UG=/^[A-Za-z0-9]{27}$/,WG=/^[a-zA-Z0-9_-]{21}$/,GG=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,KG=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,qG=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,JG=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,YG=JG(4),XG=JG(6),ZG=JG(7),QG=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,$G=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,eK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,tK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nK=tK,rK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,iK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,aK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,oK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,sK=e=>{let t=VU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},cK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,lK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,uK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,dK=/^[A-Za-z0-9_-]*$/,fK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,pK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,mK=/^https?$/,hK=/^\+[1-9]\d{6,14}$/,gK=/^\d(?:[ -]?\d){11,18}$/,_K=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,vK=NG(_K),yK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},bK=/^-?\d+n?$/,xK=/^-?\d+$/,SK=/^-?\d+(?:\.\d+)?$/,CK=/^(?:true|false)$/i,wK=/^null$/i,TK=/^undefined$/i,EK=/^[^A-Z]*$/,DK=/^[^a-z]*$/,OK=/^[0-9a-fA-F]*$/,kK=/^[0-9a-fA-F]{32}$/,AK=LG(22,`==`),jK=RG(22),MK=/^[0-9a-fA-F]{40}$/,NK=LG(27,`=`),PK=RG(27),FK=/^[0-9a-fA-F]{64}$/,IK=LG(43,`=`),LK=RG(43),RK=/^[0-9a-fA-F]{96}$/,zK=LG(64,``),BK=RG(64),VK=/^[0-9a-fA-F]{128}$/,HK=LG(86,`==`),UK=RG(86)}));function GK(e,t,n){e.issues.length&&t.issues.push(...eW(n,e.issues))}var KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq,rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q=o((()=>{BW(),WK(),J(),KK=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),qK=e=>{let t=e.value;return!AU(t)&&t.size!==void 0},JK=e=>{let t=e.value;return!AU(t)&&t.length!==void 0},YK={number:`number`,bigint:`bigint`,object:`date`},XK=Y(`$ZodCheckLessThan`,(e,t)=>{KK.init(e,t);let n=YK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{KK.init(e,t);let n=YK[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:YK[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),QK=Y(`$ZodCheckMultipleOf`,(e,t)=>{KK.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):MU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),$K=Y(`$ZodCheckNumberFormat`,(e,t)=>{KK.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=CW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=xK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),eq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{KK.init(e,t);let[n,r]=wW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),tq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:iW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),nq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:iW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),rq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=qK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:iW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),iq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?aW(r):i)<=t.maximum)return;let a=oW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),aq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=oW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),oq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;KK.init(e,t),(n=e._zod.def).when??(n.when=JK),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?aW(r):i;if(a===t.length)return;let o=oW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),sq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;KK.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),cq=Y(`$ZodCheckRegex`,(e,t)=>{sq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=EK,sq.init(e,t)}),uq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=DK,sq.init(e,t)}),dq=Y(`$ZodCheckIncludes`,(e,t)=>{KK.init(e,t);let n=VU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),fq=Y(`$ZodCheckStartsWith`,(e,t)=>{KK.init(e,t);let n=RegExp(`^${VU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckEndsWith`,(e,t)=>{KK.init(e,t);let n=RegExp(`.*${VU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckProperty`,(e,t)=>{KK.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>GK(n,e,t.property));GK(n,e,t.property)}}),hq=Y(`$ZodCheckMimeType`,(e,t)=>{KK.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckOverwrite`,(e,t)=>{KK.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),vq,yq=o((()=>{vq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` `)}\n};`)(...Object.values(this.closed))}}})),bq,xq=o((()=>{bq={major:4,minor:5,patch:4}}));function Sq(e){return{validate:t=>{try{return iJ(oG(e,t))}catch{return cG(e,t).then(iJ)}},vendor:`zod`,version:1}}function Cq(e,t){if(!t.normalize&&t.protocol?.source===mK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function wq(e){return e.replace(uJ,``)}function Tq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Eq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Dq(e){if(!wJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Oq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Dq(n)}function kq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Aq(e){if(!dK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return kq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function jq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Mq(e){return gK.test(e)?jq(e.replace(MJ,``)):!1}function Nq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Pq(e,t,n){e.issues.length&&t.issues.push(...eW(n,e.issues)),t.value[n]=e.value}function Fq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...eW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Iq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:XJ,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=WU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Lq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Fq(e,n,i,t,u,d))):Fq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Rq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!QU(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>rW(e,r,jW())))}),t)}function zq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>rW(e,r,jW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Bq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Vq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(zU(e)&&zU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Vq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Vq(t.value,n.value);if(!c.valid){if(QU(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function Uq(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function Wq(e,t,n){e.issues.length&&t.issues.push(...eW(n,e.issues)),t.value[n]=e.value}function Gq(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...eW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function Kq(e,t,n,r,i,a,o){e.issues.length&&(xW.has(typeof r)?n.issues.push(...eW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>rW(e,o,jW()))})),t.issues.length&&(xW.has(typeof r)?n.issues.push(...eW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>rW(e,o,jW()))})),n.value.set(e.value,t.value)}function qq(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function Jq(e,t){return e.value=t.issues.length?void 0:t.value,e}function Yq(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function Xq(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Zq(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>rW(e,r,jW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function Qq(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function $q(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>eJ(e,r,t.out,n)):eJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>eJ(e,r,t.in,n)):eJ(e,r,t.in,n)}}function eJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function tJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function nJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(cW(e))}}var rJ,iJ,aJ,oJ,sJ,cJ,lJ,uJ,dJ,fJ,pJ,mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY=o((()=>{_q(),BW(),yq(),kG(),WK(),J(),xq(),rJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=bq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=QU(t),a;for(let o of n){if(o._zod.def.when){if($U(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new LW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(nW(t.issues,n,e),i||=QU(t,n))});else{if(t.issues.length===n)continue;nW(t.issues,n,e),i||=QU(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(QU(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new LW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new LW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return pW(this,`~standard`,Sq(this))},set"~standard"(e){fW(this,`~standard`,e)}}),iJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},aJ=Y(`$ZodString`,(e,t)=>{rJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??yK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),oJ=Y(`$ZodStringFormat`,(e,t)=>{sq.init(e,t),aJ.init(e,t)}),sJ=Y(`$ZodGUID`,(e,t)=>{t.pattern??=qG,oJ.init(e,t)}),cJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=JG(e)}else t.pattern??=JG();oJ.init(e,t)}),lJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=QG,oJ.init(e,t)}),uJ=/[\t\n\r]/g,dJ=Y(`$ZodURL`,(e,t)=>{oJ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Cq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Tq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Eq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:wq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),fJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=MG(),oJ.init(e,t)}),pJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?WG:jG(t.length),oJ.init(e,t)}),mJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=zG,oJ.init(e,t)}),hJ=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=BG,oJ.init(e,t)}),gJ=Y(`$ZodULID`,(e,t)=>{t.pattern??=VG,oJ.init(e,t)}),_J=Y(`$ZodXID`,(e,t)=>{t.pattern??=HG,oJ.init(e,t)}),vJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=UG,oJ.init(e,t)}),yJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=IG(t),oJ.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),bJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=vK,oJ.init(e,t)}),xJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=FG(t),oJ.init(e,t)}),SJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=GG,oJ.init(e,t)}),CJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=aK,oJ.init(e,t),e._zod.bag.format=`ipv4`}),wJ=/^[0-9a-fA-F:.]+$/,TJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=oK,oJ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Dq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),EJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=sK(t.delimiter),oJ.init(e,t),e._zod.bag.format=`mac`}),DJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=cK,oJ.init(e,t)}),OJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=lK,oJ.init(e,t),e._zod.check=n=>{Oq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),kJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=uK,oJ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{kq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),AJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=dK,oJ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Aq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),jJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=hK,oJ.init(e,t)}),MJ=/[- ]/g,NJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=gK,oJ.init(e,t),e._zod.check=n=>{Mq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),PJ=Y(`$ZodJWT`,(e,t)=>{oJ.init(e,t),e._zod.check=n=>{Nq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),FJ=Y(`$ZodCustomStringFormat`,(e,t)=>{oJ.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),IJ=Y(`$ZodNumber`,(e,t)=>{rJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??SK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),LJ=Y(`$ZodNumberFormat`,(e,t)=>{$K.init(e,t),IJ.init(e,t)}),RJ=Y(`$ZodBoolean`,(e,t)=>{rJ.init(e,t),e._zod.pattern=CK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),zJ=Y(`$ZodBigInt`,(e,t)=>{rJ.init(e,t),e._zod.pattern=bK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),BJ=Y(`$ZodBigIntFormat`,(e,t)=>{eq.init(e,t),zJ.init(e,t)}),VJ=Y(`$ZodSymbol`,(e,t)=>{rJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),HJ=Y(`$ZodUndefined`,(e,t)=>{rJ.init(e,t),e._zod.pattern=TK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),UJ=Y(`$ZodNull`,(e,t)=>{rJ.init(e,t),e._zod.pattern=wK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),WJ=Y(`$ZodAny`,(e,t)=>{rJ.init(e,t),e._zod.parse=e=>e}),GJ=Y(`$ZodUnknown`,(e,t)=>{rJ.init(e,t),e._zod.parse=e=>e}),KJ=Y(`$ZodNever`,(e,t)=>{rJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),qJ=Y(`$ZodVoid`,(e,t)=>{rJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),JJ=Y(`$ZodDate`,(e,t)=>{rJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),YJ=Y(`$ZodArray`,(e,t)=>{rJ.init(e,t);let n=zW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;ePq(t,r,e))):Pq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),XJ=[],ZJ=new WeakMap,QJ=Y(`$ZodObject`,(e,t)=>{if(rJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;ZJ.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),ZJ.set(t,n),n}})}let n=kU(()=>Iq(t));mW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||PU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=RU,i=t.catchall,a,o=zW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Fq(n,t,e,c,r,i))):Fq(a,t,e,c,r,i)}return i?Lq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),$J=Y(`$ZodObjectJIT`,(e,t)=>{QJ.init(e,t);let n=e._zod.parse,r=kU(()=>Iq(t)),i=zW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new vq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { @@ -76,7 +76,7 @@ `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=RU,c=!zW.jitless,l=c&&yW.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Lq([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),eY=Y(`$ZodUnion`,(e,t)=>{rJ.init(e,t),mW(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),mW(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),mW(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),mW(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>jU(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Rq(t,r,e,i)):Rq(o,r,e,i)}}),tY=Y(`$ZodXor`,(e,t)=>{eY.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>zq(t,r,e,i)):zq(o,r,e,i)}}),nY=Y(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,eY.init(e,t);let n=e._zod.parse;mW(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||PU(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=ZJ.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=kU(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!RU(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),rY=Y(`$ZodIntersection`,(e,t)=>{rJ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>Hq(e,t,n)):Hq(e,i,a)}}),iY=Y(`$ZodTuple`,(e,t)=>{rJ.init(e,t);let n=t.items,r=zW.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=Uq(n,`optin`),l=Uq(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>Wq(t,i,e))):Wq(r,i,e)}}return s.length?Promise.all(s).then(()=>Gq(u,i,n,o,l)):Gq(u,i,n,o,l)}}),aY=Y(`$ZodRecord`,(e,t)=>{rJ.init(e,t);let n=zW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!zU(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>rW(e,i,jW())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...eW(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...eW(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&SK.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>rW(e,i,jW())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...eW(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...eW(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),oY=Y(`$ZodMap`,(e,t)=>{rJ.init(e,t);let n=zW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{Kq(t,o,r,n,a,e,i)})):Kq(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),sY=Y(`$ZodSet`,(e,t)=>{rJ.init(e,t);let n=zW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>qq(e,r))):qq(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),cY=Y(`$ZodEnum`,(e,t)=>{rJ.init(e,t);let n=DU(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>xW.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>VU(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),lY=Y(`$ZodLiteral`,(e,t)=>{rJ.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?VU(e):e?VU(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),uY=Y(`$ZodFile`,(e,t)=>{rJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),dY=Y(`$ZodTransform`,(e,t)=>{rJ.init(e,t),e._zod.optin=`optional`,zW.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new RW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new LW;return n.value=i,n}}),fY=Y(`$ZodOptional`,(e,t)=>{rJ.init(e,t),mW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,mW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),mW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${jU(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Jq(e,t)):Jq(e,r)}return t.innerType._zod.run(e,n)}}),pY=Y(`$ZodExactOptional`,(e,t)=>{fY.init(e,t),mW(e,`values`,e=>e.def.innerType._zod.values),mW(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),mY=Y(`$ZodNullable`,(e,t)=>{rJ.init(e,t),mW(e,`optin`,e=>e.def.innerType._zod.optin),mW(e,`optout`,e=>e.def.innerType._zod.optout),mW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${jU(t.source)}|null)$`):void 0}),mW(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),hY=Y(`$ZodDefault`,(e,t)=>{rJ.init(e,t),e._zod.optin=`defaulted`,mW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>Yq(e,t)):Yq(r,t)}}),gY=Y(`$ZodPrefault`,(e,t)=>{rJ.init(e,t),e._zod.optin=`defaulted`,mW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),_Y=Y(`$ZodNonOptional`,(e,t)=>{rJ.init(e,t),mW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>Xq(t,e)):Xq(i,e)}}),vY=Y(`$ZodSuccess`,(e,t)=>{rJ.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new RW(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),yY=Y(`$ZodCatch`,(e,t)=>{rJ.init(e,t),mW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),mW(e,`optout`,e=>e.def.innerType._zod.optout),mW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Zq(e,r,t,n)):Zq(e,r,t,n)}}),bY=Y(`$ZodNaN`,(e,t)=>{rJ.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),xY=Y(`$ZodPipe`,(e,t)=>{rJ.init(e,t),mW(e,`values`,e=>e.def.in._zod.values),mW(e,`optin`,e=>e.def.in._zod.optin),mW(e,`optout`,e=>e.def.out._zod.optout),mW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Qq(e,t.in,n)):Qq(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Qq(e,t.out,n)):Qq(r,t.out,n)}}),SY=Y(`$ZodCodec`,(e,t)=>{rJ.init(e,t),mW(e,`values`,e=>e.def.in._zod.values),mW(e,`optin`,e=>e.def.in._zod.optin),mW(e,`optout`,e=>e.def.out._zod.optout),mW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>$q(e,t,n)):$q(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>$q(e,t,n)):$q(r,t,n)}}}),CY=Y(`$ZodPreprocess`,(e,t)=>{xY.init(e,t)}),wY=Y(`$ZodReadonly`,(e,t)=>{rJ.init(e,t),mW(e,`propValues`,e=>e.def.innerType._zod.propValues),mW(e,`values`,e=>e.def.innerType._zod.values),mW(e,`optin`,e=>e.def.innerType?._zod?.optin),mW(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(tJ):tJ(r)}}),TY=Y(`$ZodTemplateLiteral`,(e,t)=>{rJ.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||SW.has(typeof e))n.push(VU(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),EY=Y(`$ZodFunction`,(e,t)=>(rJ.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?nG(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?nG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await iG(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await iG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new iY({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),DY=Y(`$ZodPromise`,(e,t)=>{rJ.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),OY=Y(`$ZodLazy`,(e,t)=>{rJ.init(e,t),NU(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),mW(e,`pattern`,e=>e.innerType?._zod?.pattern),mW(e,`propValues`,e=>e.innerType?._zod?.propValues),mW(e,`optin`,e=>e.innerType?._zod?.optin??void 0),mW(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),kY=Y(`$ZodCustom`,(e,t)=>{KK.init(e,t),rJ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>nJ(t,n,r,e));nJ(i,n,r,e)}})}));function jY(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function MY(e,t){let n=BY.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&MY(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),BY.set(e,r),r}function NY(e){return MY(e,new Set)}function PY(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function FY(){return UY}function IY(e,t){let n=e[RY]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var LY,RY,zY,BY,VY,HY,UY,WY=o((()=>{LY=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},RY=`~memo`,zY=[],BY=new WeakMap,HY=[],UY={alloc(e,t,n){let r=VY;if(!r)return n;VY=void 0;let i={value:n,issues:null};return r.set(t.value,i),HY.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&IY(n,e.value))throw new LY;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=MY(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[RY];l||(l={buckets:new Map,backEdges:void 0},s[RY]=l);let u;r===s?u=i:(u=PY(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...jY(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;VY=u;let f=HY.length,p=t(o,s);VY=void 0;let m=HY.length>f?HY.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?jY(e.issues):zY),e)):(m&&(m.issues=p.issues.length?jY(p.issues):zY),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function GY(){return{localeError:KY()}}var KY,qY=o((()=>{J(),KY=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${UU(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function JY(){return{localeError:YY()}}var YY,XY=o((()=>{J(),YY=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${UU(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function ZY(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function QY(){return{localeError:$Y()}}var $Y,eX=o((()=>{J(),$Y=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${UU(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=ZY(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=ZY(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function tX(){return{localeError:nX()}}var nX,rX=o((()=>{J(),nX=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${UU(e.values[0])}`:`Невалидна опция: очаквано едно от ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function iX(){return{localeError:aX()}}var aX,oX=o((()=>{J(),aX=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${UU(e.values[0])}`:`অবৈধ অপশন: ${K(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function sX(){return{localeError:cX()}}var cX,lX=o((()=>{J(),cX=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${UU(e.values[0])}`:`Opció invàlida: s'esperava una de ${K(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function uX(){return{localeError:dX()}}var dX,fX=o((()=>{J(),dX=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${UU(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${K(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function pX(){return{localeError:mX()}}var mX,hX=o((()=>{J(),mX=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${UU(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function gX(){return{localeError:_X()}}var _X,vX=o((()=>{J(),_X=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${UU(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function yX(){return{localeError:bX()}}var bX,xX=o((()=>{J(),bX=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${UU(e.values[0])}`:`Ungültige Option: erwartet eine von ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function SX(){return{localeError:CX()}}var CX,wX=o((()=>{J(),CX=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${UU(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function TX(){return{localeError:EX()}}var EX,DX=o((()=>{J(),EX=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(sW(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${UU(e.values[0])}`:`Invalid option: expected one of ${K(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function OX(){return{localeError:kX()}}var kX,AX=o((()=>{J(),kX=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${UU(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function jX(){return{localeError:MX()}}var MX,NX=o((()=>{J(),MX=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${UU(e.values[0])}`:`Opción inválida: se esperaba una de ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function PX(){return{localeError:FX()}}var FX,IX=o((()=>{J(),FX=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${UU(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${K(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function LX(){return{localeError:RX()}}var RX,zX=o((()=>{J(),RX=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${UU(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function BX(){return{localeError:VX()}}var VX,HX=o((()=>{J(),VX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${UU(e.values[0])} attendu`:`Option invalide : une valeur parmi ${K(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function UX(){return{localeError:WX()}}var WX,GX=o((()=>{J(),WX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${UU(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function KX(){return{localeError:qX()}}var qX,JX=o((()=>{J(),qX=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${UU(e.values[0])}`:`અમાન્ય વિકલ્પ: ${K(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function YX(){return{localeError:XX()}}var XX,ZX=o((()=>{J(),XX=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=sW(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${UU(t.values[0])}`;let e=t.values.map(e=>UU(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${K(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function QX(){return{localeError:$X()}}var $X,eZ=o((()=>{J(),$X=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${UU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function tZ(){return{localeError:nZ()}}var nZ,rZ=o((()=>{J(),nZ=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${UU(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function iZ(){return{localeError:aZ()}}var aZ,oZ=o((()=>{J(),aZ=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${UU(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function sZ(e,t,n){return Math.abs(e)===1?t:n}function cZ(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function lZ(){return{localeError:uZ()}}var uZ,dZ=o((()=>{J(),uZ=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${UU(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=sZ(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${cZ(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${cZ(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=sZ(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${cZ(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${cZ(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${K(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${cZ(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${cZ(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function fZ(){return{localeError:pZ()}}var pZ,mZ=o((()=>{J(),pZ=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${UU(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function hZ(){return{localeError:gZ()}}var gZ,_Z=o((()=>{J(),gZ=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${UU(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function vZ(){return{localeError:yZ()}}var yZ,bZ=o((()=>{J(),yZ=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${UU(e.values[0])}`:`Opzione non valida: atteso uno tra ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function xZ(){return{localeError:SZ()}}var SZ,CZ=o((()=>{J(),SZ=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${UU(e.values[0])}が期待されました`:`無効な選択: ${K(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function wZ(){return{localeError:TZ()}}var TZ,EZ=o((()=>{J(),TZ=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${UU(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${K(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function DZ(){return{localeError:OZ()}}var OZ,kZ=o((()=>{J(),OZ=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${UU(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${K(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function AZ(){return DZ()}var jZ=o((()=>{kZ()}));function MZ(){return{localeError:NZ()}}var NZ,PZ=o((()=>{J(),NZ=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${UU(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function FZ(){return{localeError:IZ()}}var IZ,LZ=o((()=>{J(),IZ=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${UU(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${K(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${K(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function RZ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function zZ(){return{localeError:VZ()}}var BZ,VZ,HZ=o((()=>{J(),BZ=e=>e.charAt(0).toUpperCase()+e.slice(1),VZ=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${UU(e.values[0])}`:`Privalo būti vienas iš ${K(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,RZ(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${BZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${BZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,RZ(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${BZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${BZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${BZ(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function UZ(){return{localeError:WZ()}}var WZ,GZ=o((()=>{J(),WZ=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${UU(e.values[0])}`:`Грешана опција: се очекува една ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function KZ(){return{localeError:qZ()}}var qZ,JZ=o((()=>{J(),qZ=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${UU(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function YZ(){return{localeError:XZ()}}var XZ,ZZ=o((()=>{J(),XZ=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${UU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function QZ(){return{localeError:$Z()}}var $Z,eQ=o((()=>{J(),$Z=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${UU(e.values[0])}`:`Ongeldige optie: verwacht één van ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function tQ(){return{localeError:nQ()}}var nQ,rQ=o((()=>{J(),nQ=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${UU(e.values[0])}`:`Ugyldig val: forventa eitt av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function iQ(){return{localeError:aQ()}}var aQ,oQ=o((()=>{J(),aQ=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${UU(e.values[0])}`:`Ugyldig valg: forventet en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function sQ(){return{localeError:cQ()}}var cQ,lQ=o((()=>{J(),cQ=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${UU(e.values[0])}`:`Fâsit tercih: mûteberler ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function uQ(){return{localeError:dQ()}}var dQ,fQ=o((()=>{J(),dQ=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${UU(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${K(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function pQ(){return{localeError:mQ()}}var mQ,hQ=o((()=>{J(),mQ=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${UU(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function gQ(){return{localeError:_Q()}}var _Q,vQ=o((()=>{J(),_Q=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(sW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${UU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function yQ(){return{localeError:bQ()}}var bQ,xQ=o((()=>{J(),bQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(sW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${UU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function SQ(){return{localeError:CQ()}}var CQ,wQ=o((()=>{J(),CQ=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${UU(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${K(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function TQ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function EQ(){return{localeError:DQ()}}var DQ,OQ=o((()=>{J(),DQ=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${UU(e.values[0])}`:`Неверный вариант: ожидалось одно из ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=TQ(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=TQ(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function kQ(){return{localeError:AQ()}}var AQ,jQ=o((()=>{J(),AQ=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${UU(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function MQ(){return{localeError:NQ()}}var NQ,PQ=o((()=>{J(),NQ=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${UU(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function FQ(){return{localeError:IQ()}}var IQ,LQ=o((()=>{J(),IQ=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${UU(e.values[0])}`:`Ogiltigt val: förväntade en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function RQ(){return{localeError:zQ()}}var zQ,BQ=o((()=>{J(),zQ=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${UU(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${K(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function VQ(){return{localeError:HQ()}}var HQ,UQ=o((()=>{J(),HQ=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${UU(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${K(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function WQ(){return{localeError:GQ()}}var GQ,KQ=o((()=>{J(),GQ=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${UU(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function qQ(){return{localeError:JQ()}}var JQ,YQ=o((()=>{J(),JQ=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${UU(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function XQ(){return{localeError:ZQ()}}var ZQ,QQ=o((()=>{J(),ZQ=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${UU(e.values[0])}`:`Неправильна опція: очікується одне з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function $Q(){return XQ()}var e$=o((()=>{QQ()}));function t$(){return{localeError:n$()}}var n$,r$=o((()=>{J(),n$=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${UU(e.values[0])} متوقع تھا`:`غلط آپشن: ${K(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function i$(){return{localeError:a$()}}var a$,o$=o((()=>{J(),a$=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${UU(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function s$(){return{localeError:c$()}}var c$,l$=o((()=>{J(),c$=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${UU(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${K(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function u$(){return{localeError:d$()}}var d$,f$=o((()=>{J(),d$=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${UU(e.values[0])}`:`无效选项:期望以下之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function p$(){return{localeError:m$()}}var m$,h$=o((()=>{J(),m$=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${UU(e.values[0])}`:`無效的選項:預期為以下其中之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function g$(){return{localeError:_$()}}var _$,v$=o((()=>{J(),_$=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=sW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${UU(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${K(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),y$=c({ar:()=>GY,az:()=>JY,be:()=>QY,bg:()=>tX,bn:()=>iX,ca:()=>sX,ckb:()=>uX,cs:()=>pX,da:()=>gX,de:()=>yX,el:()=>SX,en:()=>TX,eo:()=>OX,es:()=>jX,fa:()=>PX,fi:()=>LX,fr:()=>BX,frCA:()=>UX,gu:()=>KX,he:()=>YX,hi:()=>QX,hr:()=>tZ,hu:()=>iZ,hy:()=>lZ,id:()=>fZ,is:()=>hZ,it:()=>vZ,ja:()=>xZ,ka:()=>wZ,kh:()=>AZ,km:()=>DZ,kn:()=>MZ,ko:()=>FZ,lt:()=>zZ,mk:()=>UZ,ms:()=>KZ,ne:()=>YZ,nl:()=>QZ,nn:()=>tQ,no:()=>iQ,ota:()=>sQ,pl:()=>pQ,ps:()=>uQ,pt:()=>gQ,ptBR:()=>yQ,ro:()=>SQ,ru:()=>EQ,sk:()=>kQ,sl:()=>MQ,sv:()=>FQ,ta:()=>RQ,th:()=>VQ,tk:()=>WQ,tr:()=>qQ,ua:()=>$Q,uk:()=>XQ,ur:()=>t$,uz:()=>i$,vi:()=>s$,yo:()=>g$,zhCN:()=>u$,zhTW:()=>p$}),b$=o((()=>{qY(),XY(),eX(),rX(),oX(),lX(),fX(),hX(),vX(),xX(),wX(),DX(),AX(),NX(),IX(),zX(),HX(),GX(),JX(),ZX(),eZ(),rZ(),oZ(),dZ(),mZ(),_Z(),bZ(),CZ(),EZ(),jZ(),kZ(),PZ(),LZ(),HZ(),GZ(),JZ(),ZZ(),eQ(),rQ(),oQ(),lQ(),fQ(),hQ(),vQ(),xQ(),wQ(),OQ(),jQ(),PQ(),LQ(),BQ(),UQ(),KQ(),YQ(),e$(),QQ(),r$(),o$(),l$(),f$(),h$(),v$()}));function x$(){return new T$}var S$,C$,w$,T$,E$,D$=o((()=>{C$=Symbol(`ZodOutput`),w$=Symbol(`ZodInput`),T$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(S$=globalThis).__zod_globalRegistry??(S$.__zod_globalRegistry=x$()),E$=globalThis.__zod_globalRegistry}));function O$(e,t){try{return j$(e,{assertOnly:!0})}catch{return t}}function k$(e,t){try{let t=j$(e),n=HU(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[W1]||n&&IY(n,e.value))return i(e,n);let r=t(e.value);return r===U1?(n&&(n[W1]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=O$(e,t),n._zod.run=a,r.__originalRun||A$(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function A$(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===U1?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===U1?e(t,r):i}}}function j$(e,t){let n=!0;try{n=NY(e)}catch{}if(n)throw new K1(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new vq([`input`]),a=$$(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[U1,...r.constants.values()],c=i.content.join(` `),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new K1(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function M$(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function N$(e){return`v${e.varCounter++}`}function P$(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return U1;let r=n;return r.issues.length===0?r.value:U1}function F$(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return $$(e,t,n,r,i)}catch(i){if(!(i instanceof K1)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,I$(e,t,n,r)}}function I$(e,t,n,r){let i=M$(t,n),a=M$(t,P$),o=N$(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function L$(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!q1.has(r.check))throw new K1(`check with a custom "when" condition`);switch(r.check){case`greater_than`:V$(e,t,r,a);break;case`less_than`:H$(e,t,r,a);break;case`multiple_of`:U$(e,t,r,a);break;case`number_format`:W$(e,r,a);break;case`min_length`:{let n=z$(r.minimum,`min_length`),i=R$(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=z$(r.maximum,`max_length`),i=R$(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=z$(r.length,`length_equals`),i=R$(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${z$(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${z$(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${z$(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=Q$(e,t,r,a);break;case`custom`:a=Z$(e,t,n,a);break;case`bigint_format`:G$(e,r,a);break;case`mime_type`:K$(e,t,r,a);break;case`property`:q$(e,t,r,a);break;case`overwrite`:{let r=N$(t);J$(e,t,n,a,r),a=r;break}default:throw new K1(`check type ${r.check}`)}}return a}function R$(e,t,n,r){let i=M$(t,aW),a=N$(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function z$(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new K1(`${t} bound of type ${typeof e}`);return`${e}`}function B$(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new K1(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new K1(`comparison check with Invalid Date bound`);return M$(e,t)}throw new K1(`comparison check bound of type ${typeof t}`)}function V$(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${B$(t,n.value)}) return INVALID;`)}function H$(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${B$(t,n.value)}) return INVALID;`)}function U$(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new K1(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=M$(t,MU);e.write(`if (${i}(${r}, ${z$(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function W$(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new K1(`number format ${r}`)}}function G$(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new K1(`bigint format ${r}`)}}function K$(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=M$(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function q$(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;$$(e,t,n.schema,i)}function J$(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new K1(`overwrite check without a transform function`);if(R1(a))throw new G1(`z.compile: async overwrite transforms are not supported`);let o=M$(t,a);e.write(`const ${i} = ${o}(${r});`)}function Y$(){throw new LW}function X$(e){this.issues.push(e)}function Z$(e,t,n,r){let i=n._zod.def;if(i.fn){if(R1(i.fn))throw new G1(`z.compile: async .refine() predicates are not supported`);let n=M$(t,i.fn),a=M$(t,Y$),o=N$(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(R1(n._zod.check))throw new G1(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=M$(t,e=>{let t={value:e,issues:[],addIssue:X$};return i(t)instanceof Promise&&Y$(),t.issues.length===0?t.value:U1}),o=N$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new K1(`custom check without a predicate or check function`)}function Q$(e,t,n,r){let i=n.format;if(i===`base64`){let n=M$(t,kq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=M$(t,Aq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=M$(t,Nq),a=M$(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=M$(t,Dq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=M$(t,Oq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=M$(t,Mq);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=M$(t,Cq),o=M$(t,n),s=N$(t),c=N$(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=M$(t,Tq);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=M$(t,Eq);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=N$(t),u=a.normalize?`${c}.href`:`${M$(t,wq)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(R1(o))throw new K1(`async string format ${i}`);let n=M$(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(J1.has(i)&&n.pattern){let i=M$(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new K1(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${IU(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${IU(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${IU(t)}) return INVALID;`);break}default:throw new K1(`string format ${s}`)}return r}function $$(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new K1(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=e1(e,t,n,r);break;case`number`:c=t1(e,n,r);break;case`boolean`:c=n1(e,r);break;case`bigint`:c=r1(e,n,r);break;case`symbol`:c=i1(e,r);break;case`undefined`:c=a1(e,r);break;case`null`:c=o1(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=s1(e,r);break;case`nan`:c=c1(e,r);break;case`date`:c=l1(e,r);break;case`object`:c=u1(e,t,n,r,s);break;case`optional`:c=d1(e,t,n,r,s);break;case`nullable`:c=_1(e,t,n,r,s);break;case`array`:c=v1(e,t,n,r,s);break;case`literal`:c=y1(e,t,n,r);break;case`enum`:c=b1(e,t,n,r);break;case`readonly`:{let i=x1(e,t,n,r),a=N$(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:x1(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=S1(e,t,n,r);break;case`nonoptional`:c=C1(e,t,n,r);break;case`tuple`:c=w1(e,t,n,r);break;case`union`:c=E1(e,t,n,r);break;case`intersection`:c=k1(e,t,n,r);break;case`record`:c=A1(e,t,n,r);break;case`map`:c=M1(e,t,n,r);break;case`set`:c=N1(e,t,n,r);break;case`file`:c=P1(e,r);break;case`template_literal`:c=F1(e,t,n,r);break;case`lazy`:c=I1(e,t,n,r);break;case`pipe`:c=L1(e,t,n,r);break;case`custom`:c=z1(e,t,n,r);break;case`transform`:c=H1(e,t,n,r);break;case`catch`:c=V1(e,t,n,r);break;default:throw new K1(`schema type ${o}`)}return c===null?null:L$(e,t,n,c)}function e1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:Q$(e,t,i,r)}function t1(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&W$(e,{format:r.format},n),n}function n1(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function r1(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function i1(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function a1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function o1(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function s1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function c1(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function l1(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function u1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?M$(t,e):IU(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:IU(e),f=o;if(s.includes(`__proto__`))throw new K1(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=N$(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=N$(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=F$(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{p1(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=F$(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${IU(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=N$(t),_=l.some(e=>g1(f[e])||h1(f[e]));if(!i){if(h===`schema`){let n=s.length>0?M$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=N$(t);e.write(`const ${i} = ${r}[k];`),F$(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);h1(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):g1(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?M$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=N$(t);e.write(`const ${n} = ${r}[k];`);let i=F$(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function d1(e,t,n,r,i=!0){let a=n._zod.def;if(f1(n))return $$(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=N$(t),i=N$(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=$$(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=$$(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?N$(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=$$(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function f1(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function p1(e){return e._zod.optin===void 0&&m1(e)}function m1(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?m1(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||m1(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(m1);case`intersection`:return!t.left||!t.right||m1(t.left)&&m1(t.right);case`pipe`:return!t.in||m1(t.in);default:return!0}}function h1(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function g1(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||g1(t.innerType);case`union`:return!t.options||t.options.some(g1);case`intersection`:return!t.left||!t.right||g1(t.left)||g1(t.right);case`pipe`:return!t.out||g1(t.out);default:return!0}}function _1(e,t,n,r,i=!0){let a=n._zod.def,o=i?N$(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=$$(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function v1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?N$(t):null,s=N$(t),c=N$(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=F$(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function y1(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=M$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=M$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${IU(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new K1(`literal type ${typeof a}`);return r}function b1(e,t,n,r){let i=n._zod.values;if(!i)throw new K1(`enum schema without enumerated values`);let a=M$(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function x1(e,t,n,r){let i=n._zod.def;return $$(e,t,i.innerType,r)}function S1(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return $$(e,t,i.innerType,r);let n=M$(t,a),o=N$(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),$$(e,t,i.innerType,o)}let o=N$(t);if(a){let n=M$(t,a),s=M$(t,BU);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=$$(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=$$(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function C1(e,t,n,r){let i=n._zod.def,a=$$(e,t,i.innerType,r),o=N$(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function w1(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=T1(a,`optin`),c=T1(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=N$(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=N$(t);e.write(`const ${a} = ${r}[${n}];`);let o=F$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(h1(i)){e.write(`${l}.length = ${n};`);return}let r=N$(t),a=N$(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=F$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=N$(t);e.write(`const ${a} = ${r}[${n}];`);let o=F$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=N$(t),i=N$(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=F$(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function T1(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function E1(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return D1(e,t,i,r);if(i.inclusive===!1)throw new K1(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return $$(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=M$(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=N$(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=$$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function D1(e,t,n,r){if(n.unionFallback)throw new K1(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=N$(t),a=N$(t);e.write(`const ${i} = ${r}?.[${IU(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new K1(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new K1(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>O1(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=$$(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function O1(e,t,n){if(typeof n==`string`)return`${t} === ${IU(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${M$(e,n)}`;throw new K1(`literal discriminator value ${String(n)}`)}function k1(e,t,n,r){let i=n._zod.def,a=F$(e,t,i.left,r),o=F$(e,t,i.right,r),s=M$(t,Vq),c=N$(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function A1(e,t,n,r){let i=n._zod.def,a=M$(t,zU);e.write(`if (!${a}(${r})) return INVALID;`);let o=N$(t),s=N$(t),c=N$(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new K1(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new K1(`record key "__proto__"`);n.push(s);let c=M$(t,a),l=$$(e,t,i.keyType,c),u=N$(t);e.write(`const ${u} = ${r}[${j1(t,s)}];`);let d=F$(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=M$(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=M$(t,j$(i.keyType)),c=M$(t,SK),l=M$(t,Object.prototype.propertyIsEnumerable),u=N$(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=N$(t);e.write(`const ${d} = ${r}[${s}];`);let f=F$(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=M$(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=F$(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function j1(e,t){return typeof t==`string`?IU(t):M$(e,t)}function M1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=N$(t),o=N$(t),s=N$(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=$$(e,t,i.keyType,o),r=$$(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function N1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=N$(t),o=N$(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=$$(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function P1(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function F1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=M$(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function I1(e,t,n,r){let i=n._zod.def,a=M$(t,i.getter),o=M$(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=N$(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function L1(e,t,n,r){let i=n._zod.def,a=$$(e,t,i.in,r);if(i.transform){if(R1(i.transform))throw new G1(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=M$(t,e=>{let t={value:e,issues:[],addIssue:X$},r=n(e,t);return r instanceof Promise?U1:t.issues.length===0?r:U1}),o=N$(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),$$(e,t,i.out,o)}return $$(e,t,i.out,a)}function R1(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function z1(e,t,n,r){let i=n._zod.def;if(i.fn){if(R1(i.fn))throw new G1(`z.compile: async custom predicates are not supported`);let n=M$(t,i.fn),a=M$(t,Y$),o=N$(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new K1(`custom schema without a predicate function`);return r}function B1(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return U1;let i=r;return i.issues.length===0?i.value:t()}function V1(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new K1(`catch with a callback (only a constant catch value compiles)`,!1);let a=N$(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=F$(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=M$(t,i.innerType),s=M$(t,i.catchValue),c=M$(t,B1);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function H1(e,t,n,r){let i=n._zod.def;if(i.transform){if(R1(i.transform))throw new G1(`z.compile: async transforms are not supported`);let n=i.transform,a=M$(t,e=>{let t={value:e,issues:[],addIssue:X$},r=n(e,t);return r instanceof Promise?U1:t.issues.length===0?r:U1}),o=N$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var U1,W1,G1,K1,q1,J1,Y1=o((()=>{BW(),yq(),WY(),WK(),AY(),J(),U1=Symbol.for(`zod.compile.invalid`),W1=Symbol.for(`zod.compile.fallback`),G1=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},K1=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},q1=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),J1=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function X1(e,t){return new e({type:`string`,...q(t)})}function Z1(e,t){return new e({type:`string`,coerce:!0,...q(t)})}function Q1(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function $1(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function e0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function t0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function n0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function r0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function i0(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function a0(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function o0(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function s0(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function c0(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function l0(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function u0(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function d0(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function f0(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function p0(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function m0(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...q(t)})}function h0(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function g0(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function _0(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function v0(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function y0(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function b0(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...q(t)})}function x0(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function S0(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function C0(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function w0(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function T0(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function E0(e,t){return new e({type:`number`,checks:[],...q(t)})}function D0(e,t){return new e({type:`number`,coerce:!0,checks:[],...q(t)})}function O0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function k0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...q(t)})}function A0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...q(t)})}function j0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...q(t)})}function M0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...q(t)})}function N0(e,t){return new e({type:`boolean`,...q(t)})}function P0(e,t){return new e({type:`boolean`,coerce:!0,...q(t)})}function F0(e,t){return new e({type:`bigint`,...q(t)})}function I0(e,t){return new e({type:`bigint`,coerce:!0,...q(t)})}function L0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...q(t)})}function R0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...q(t)})}function z0(e,t){return new e({type:`symbol`,...q(t)})}function B0(e,t){return new e({type:`undefined`,...q(t)})}function V0(e,t){return new e({type:`null`,...q(t)})}function H0(e){return new e({type:`any`})}function U0(e){return new e({type:`unknown`})}function W0(e,t){return new e({type:`never`,...q(t)})}function G0(e,t){return new e({type:`void`,...q(t)})}function K0(e,t){return new e({type:`date`,...q(t)})}function q0(e,t){return new e({type:`date`,coerce:!0,...q(t)})}function J0(e,t){return new e({type:`nan`,...q(t)})}function Y0(e,t){return new XK({check:`less_than`,...q(t),value:e,inclusive:!1})}function X0(e,t){return new XK({check:`less_than`,...q(t),value:e,inclusive:!0})}function Z0(e,t){return new ZK({check:`greater_than`,...q(t),value:e,inclusive:!1})}function Q0(e,t){return new ZK({check:`greater_than`,...q(t),value:e,inclusive:!0})}function $0(e){return Z0(0,e)}function e2(e){return Y0(0,e)}function t2(e){return X0(0,e)}function n2(e){return Q0(0,e)}function r2(e,t){return new QK({check:`multiple_of`,...q(t),value:e})}function i2(e,t){return new tq({check:`max_size`,...q(t),maximum:e})}function a2(e,t){return new nq({check:`min_size`,...q(t),minimum:e})}function o2(e,t){return new rq({check:`size_equals`,...q(t),size:e})}function s2(e,t){return new iq({check:`max_length`,...q(t),maximum:e})}function c2(e,t){return new aq({check:`min_length`,...q(t),minimum:e})}function l2(e,t){return new oq({check:`length_equals`,...q(t),length:e})}function u2(e,t){return new cq({check:`string_format`,format:`regex`,...q(t),pattern:e})}function d2(e){return new lq({check:`string_format`,format:`lowercase`,...q(e)})}function f2(e){return new uq({check:`string_format`,format:`uppercase`,...q(e)})}function p2(e,t){return new dq({check:`string_format`,format:`includes`,...q(t),includes:e})}function m2(e,t){return new fq({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function h2(e,t){return new pq({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function g2(e,t,n){return new mq({check:`property`,property:e,schema:t,...q(n)})}function _2(e){return Object.entries(e).map(([e,t])=>new mq({check:`property`,property:e,schema:t}))}function v2(e,t){return new hq({check:`mime_type`,mime:e,...q(t)})}function y2(e){return new gq({check:`overwrite`,tx:e})}function b2(e){return y2(t=>t.normalize(e))}function x2(){return y2(e=>e.trim())}function S2(){return y2(e=>e.toLowerCase())}function C2(){return y2(e=>e.toUpperCase())}function w2(){return y2(e=>LU(e))}function T2(e,t,n){return new e({type:`array`,element:t,...q(n)})}function E2(e,t,n){return new e({type:`union`,options:t,...q(n)})}function D2(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...q(n)})}function O2(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...q(r)})}function k2(e,t,n){return new e({type:`intersection`,left:t,right:n})}function A2(e,t,n,r){let i=n instanceof rJ;return new e({type:`tuple`,items:t,rest:i?n:null,...q(i?r:n)})}function j2(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...q(r)})}function M2(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...q(r)})}function N2(e,t,n){return new e({type:`set`,valueType:t,...q(n)})}function P2(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...q(n)})}function F2(e,t,n){return new e({type:`enum`,entries:t,...q(n)})}function I2(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...q(n)})}function L2(e,t){return new e({type:`file`,...q(t)})}function R2(e,t){return new e({type:`transform`,transform:t})}function z2(e,t){return new e({type:`optional`,innerType:t})}function B2(e,t){return new e({type:`nullable`,innerType:t})}function V2(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():BU(n)}})}function H2(e,t,n){return new e({type:`nonoptional`,innerType:t,...q(n)})}function U2(e,t){return new e({type:`success`,innerType:t})}function W2(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:gW(n)})}function G2(e,t,n){return new e({type:`pipe`,in:t,out:n})}function K2(e,t){return new e({type:`readonly`,innerType:t})}function q2(e,t,n){return new e({type:`template_literal`,parts:t,...q(n)})}function J2(e,t){return new e({type:`lazy`,getter:t})}function Y2(e,t){return new e({type:`promise`,innerType:t})}function X2(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function Z2(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function Q2(e,t){let n=$2(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(cW(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(cW(r))}},e(t.value,t)),t);return n}function $2(e,t){let n=new KK({check:`custom`,...q(t)});return n._zod.check=e,n}function e4(e){let t=new KK({check:`describe`});return t._zod.onattach=[t=>{let n=E$.get(t)??{};E$.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function t4(e){let t=new KK({check:`meta`});return t._zod.onattach=[t=>{let n=E$.get(t)??{};E$.add(t,{...n,...e})}],t._zod.check=()=>{},t}function n4(e,t){let n=q(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??SY,c=e.Boolean??RJ,l=new s({type:`pipe`,in:new(e.String??aJ)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function r4(e,t,n,r={}){let i=q(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var i4,a4=o((()=>{_q(),D$(),AY(),J(),i4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function o4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&PU(e,t,n[t]);return e}function s4(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??E$,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function c4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function l4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,l4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&o4(o.schema,c),t.io===`input`&&_4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function u4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function d4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${u4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+u4(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function f4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;f4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function p4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function m4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!v4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??p4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}PU(n,r,e.length===1?e[0]:m4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=p4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function h4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of v4)if(t in e)return;let n=t.filter(e=>y4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=m4(t);else{let e=n[0],i=y4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>m4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,o4(e,r))}function g4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):o4(i,s),o4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())f4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])h4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}o4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,PU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:x4(t,`input`,e.processors),output:x4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function _4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return _4(r.element,n);if(r.type===`set`)return _4(r.valueType,n);if(r.type===`lazy`)return _4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return _4(r.innerType,n);if(r.type===`intersection`)return _4(r.left,n)||_4(r.right,n);if(r.type===`record`||r.type===`map`)return _4(r.keyType,n)||_4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:_4(r.in,n)||_4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(_4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(_4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(_4(e,n))return!0;return!!(r.rest&&_4(r.rest,n))}return!1}var v4,y4,b4,x4,S4=o((()=>{D$(),J(),v4=new Set([`type`,`properties`,`required`,`additionalProperties`]),y4=[`oneOf`,`anyOf`],b4=(e,t={})=>n=>{let r=s4({...n,processors:t});return l4(e,r),d4(r,e),g4(r,e)},x4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=s4({...i??{},target:a,io:t,processors:n});return l4(e,o),d4(o,e),g4(o,e)}}));function C4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?C4(t.out):t.type===`catch`?C4(t.innerType):e._zod.optin}function w4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=w4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>w4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?SK:xK).source),p):p}function T4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of r3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=w4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function E4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(c4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),s3):JSON.parse(o)}function D4(e,t){if(`_idmap`in e){let n=e,r=s4({...t,processors:g3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;l4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;d4(r,n),PU(a,t,g4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=s4({...t,processors:g3});return l4(e,n),d4(n,e),g4(n,e)}var O4,k4,A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3=o((()=>{WK(),S4(),J(),O4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},k4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=O4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},A4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):c4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},j4=(e,t,n,r)=>{n.type=`boolean`},M4=(e,t,n,r)=>{c4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},N4=(e,t,n,r)=>{c4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},P4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},F4=(e,t,n,r)=>{c4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},I4=(e,t,n,r)=>{c4(e,t,n,r,`Void cannot be represented in JSON Schema`)},L4=(e,t,n,r)=>{n.not={}},R4=(e,t,n,r)=>{},z4=(e,t,n,r)=>{},B4=(e,t,n,r)=>{c4(e,t,n,r,`Date cannot be represented in JSON Schema`)},V4=(e,t,n,r)=>{let i=e._zod.def,a=DU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},H4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(c4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(c4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},U4=(e,t,n,r)=>{c4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},W4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},G4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},K4=(e,t,n,r)=>{n.type=`boolean`},q4=(e,t,n,r)=>{c4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},J4=(e,t,n,r)=>{c4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Y4=(e,t,n,r)=>{c4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{c4(e,t,n,r,`Map cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{c4(e,t,n,r,`Set cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=l4(a.element,t,{...r,path:[...r.path,`items`]})},$4=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&c4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)PU(i.properties,e,l4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?C4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=l4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},e3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>l4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},t3=(e,t,n,r)=>{let i=e._zod.def,a=l4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=l4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},n3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>l4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?l4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?C4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},r3=new WeakMap,i3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=l4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)PU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=l4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=r3.get(t);n||(n=[],r3.set(t,n),t.deferred.push(()=>T4(t))),n.push(e)}i.additionalProperties=l4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&C4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},a3=(e,t,n,r)=>{let i=e._zod.def,a=l4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},o3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},s3=Symbol(),c3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=E4(i.defaultValue,e,t,n,r);o!==s3&&(n.default=o)},l3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=E4(i.defaultValue,e,t,n,r);o!==s3&&(n._prefault=o)},u3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{c4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},d3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;l4(o,t,r);let s=t.seen.get(e);s.ref=o},f3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},p3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},m3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},h3=(e,t,n,r)=>{let i=e._zod.innerType;l4(i,t,r);let a=t.seen.get(e);a.ref=i},g3={string:k4,number:A4,boolean:j4,bigint:M4,symbol:N4,null:P4,undefined:F4,void:I4,never:L4,any:R4,unknown:z4,date:B4,enum:V4,literal:H4,nan:U4,template_literal:W4,file:G4,success:K4,custom:q4,function:J4,transform:Y4,map:X4,set:Z4,array:Q4,object:$4,union:e3,intersection:t3,tuple:n3,record:i3,nullable:a3,nonoptional:o3,default:c3,prefault:l3,catch:u3,pipe:d3,readonly:f3,promise:p3,optional:m3,lazy:h3}})),v3,y3=o((()=>{_3(),S4(),v3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=s4({processors:g3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return l4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,d4(this.ctx,e);let{"~standard":n,...r}=g4(this.ctx,e);return r}}})),b3=c({}),x3=o((()=>{})),S3=c({$ZodAny:()=>WJ,$ZodArray:()=>YJ,$ZodAsyncError:()=>LW,$ZodBase64:()=>kJ,$ZodBase64URL:()=>AJ,$ZodBigInt:()=>zJ,$ZodBigIntFormat:()=>BJ,$ZodBoolean:()=>RJ,$ZodCIDRv4:()=>DJ,$ZodCIDRv6:()=>OJ,$ZodCUID:()=>mJ,$ZodCUID2:()=>hJ,$ZodCatch:()=>yY,$ZodCheck:()=>KK,$ZodCheckBigIntFormat:()=>eq,$ZodCheckEndsWith:()=>pq,$ZodCheckGreaterThan:()=>ZK,$ZodCheckIncludes:()=>dq,$ZodCheckLengthEquals:()=>oq,$ZodCheckLessThan:()=>XK,$ZodCheckLowerCase:()=>lq,$ZodCheckMaxLength:()=>iq,$ZodCheckMaxSize:()=>tq,$ZodCheckMimeType:()=>hq,$ZodCheckMinLength:()=>aq,$ZodCheckMinSize:()=>nq,$ZodCheckMultipleOf:()=>QK,$ZodCheckNumberFormat:()=>$K,$ZodCheckOverwrite:()=>gq,$ZodCheckProperty:()=>mq,$ZodCheckRegex:()=>cq,$ZodCheckSizeEquals:()=>rq,$ZodCheckStartsWith:()=>fq,$ZodCheckStringFormat:()=>sq,$ZodCheckUpperCase:()=>uq,$ZodCodec:()=>SY,$ZodCreditCard:()=>NJ,$ZodCustom:()=>kY,$ZodCustomStringFormat:()=>FJ,$ZodCyclicError:()=>LY,$ZodDate:()=>JJ,$ZodDefault:()=>hY,$ZodDiscriminatedUnion:()=>nY,$ZodE164:()=>jJ,$ZodEmail:()=>lJ,$ZodEmoji:()=>fJ,$ZodEncodeError:()=>RW,$ZodEnum:()=>cY,$ZodError:()=>ZW,$ZodExactOptional:()=>pY,$ZodFile:()=>uY,$ZodFunction:()=>EY,$ZodGUID:()=>sJ,$ZodIPv4:()=>CJ,$ZodIPv6:()=>TJ,$ZodISODate:()=>bJ,$ZodISODateTime:()=>yJ,$ZodISODuration:()=>SJ,$ZodISOTime:()=>xJ,$ZodIntersection:()=>rY,$ZodJWT:()=>PJ,$ZodKSUID:()=>vJ,$ZodLazy:()=>OY,$ZodLiteral:()=>lY,$ZodMAC:()=>EJ,$ZodMap:()=>oY,$ZodNaN:()=>bY,$ZodNanoID:()=>pJ,$ZodNever:()=>KJ,$ZodNonOptional:()=>_Y,$ZodNull:()=>UJ,$ZodNullable:()=>mY,$ZodNumber:()=>IJ,$ZodNumberFormat:()=>LJ,$ZodObject:()=>QJ,$ZodObjectJIT:()=>$J,$ZodOptional:()=>fY,$ZodPipe:()=>xY,$ZodPrefault:()=>gY,$ZodPreprocess:()=>CY,$ZodPromise:()=>DY,$ZodReadonly:()=>wY,$ZodRealError:()=>QW,$ZodRecord:()=>aY,$ZodRegistry:()=>T$,$ZodSet:()=>sY,$ZodString:()=>aJ,$ZodStringFormat:()=>oJ,$ZodSuccess:()=>vY,$ZodSymbol:()=>VJ,$ZodTemplateLiteral:()=>TY,$ZodTransform:()=>dY,$ZodTuple:()=>iY,$ZodType:()=>rJ,$ZodULID:()=>gJ,$ZodURL:()=>dJ,$ZodUUID:()=>cJ,$ZodUndefined:()=>HJ,$ZodUnion:()=>eY,$ZodUnknown:()=>GJ,$ZodVoid:()=>qJ,$ZodXID:()=>_J,$ZodXor:()=>tY,$brand:()=>IW,$constructor:()=>Y,$input:()=>w$,$output:()=>C$,Doc:()=>vq,INVALID:()=>U1,JSONSchema:()=>b3,JSONSchemaGenerator:()=>v3,NEVER:()=>NW,TimePrecision:()=>i4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,_any:()=>H0,_array:()=>T2,_base64:()=>_0,_base64url:()=>v0,_bigint:()=>F0,_boolean:()=>N0,_catch:()=>W2,_check:()=>$2,_cidrv4:()=>h0,_cidrv6:()=>g0,_coercedBigint:()=>I0,_coercedBoolean:()=>P0,_coercedDate:()=>q0,_coercedNumber:()=>D0,_coercedString:()=>Z1,_creditCard:()=>b0,_cuid:()=>s0,_cuid2:()=>c0,_custom:()=>X2,_date:()=>K0,_decode:()=>hG,_decodeAsync:()=>yG,_default:()=>V2,_discriminatedUnion:()=>O2,_e164:()=>y0,_email:()=>Q1,_emoji:()=>a0,_encode:()=>pG,_encodeAsync:()=>_G,_endsWith:()=>h2,_enum:()=>P2,_file:()=>L2,_float32:()=>k0,_float64:()=>A0,_gt:()=>Z0,_gte:()=>Q0,_guid:()=>$1,_includes:()=>p2,_int:()=>O0,_int32:()=>j0,_int64:()=>L0,_intersection:()=>k2,_ipv4:()=>f0,_ipv6:()=>p0,_isoDate:()=>C0,_isoDateTime:()=>S0,_isoDuration:()=>T0,_isoTime:()=>w0,_jwt:()=>x0,_ksuid:()=>d0,_lazy:()=>J2,_length:()=>l2,_literal:()=>I2,_lowercase:()=>d2,_lt:()=>Y0,_lte:()=>X0,_mac:()=>m0,_map:()=>M2,_max:()=>X0,_maxLength:()=>s2,_maxSize:()=>i2,_mime:()=>v2,_min:()=>Q0,_minLength:()=>c2,_minSize:()=>a2,_multipleOf:()=>r2,_nan:()=>J0,_nanoid:()=>o0,_nativeEnum:()=>F2,_negative:()=>e2,_never:()=>W0,_nonnegative:()=>n2,_nonoptional:()=>H2,_nonpositive:()=>t2,_normalize:()=>b2,_null:()=>V0,_nullable:()=>B2,_number:()=>E0,_optional:()=>z2,_overwrite:()=>y2,_parse:()=>tG,_parseAsync:()=>rG,_pipe:()=>G2,_positive:()=>$0,_promise:()=>Y2,_properties:()=>_2,_property:()=>g2,_readonly:()=>K2,_record:()=>j2,_refine:()=>Z2,_regex:()=>u2,_safeDecode:()=>CG,_safeDecodeAsync:()=>DG,_safeEncode:()=>xG,_safeEncodeAsync:()=>TG,_safeParse:()=>aG,_safeParseAsync:()=>sG,_set:()=>N2,_size:()=>o2,_slugify:()=>w2,_startsWith:()=>m2,_string:()=>X1,_stringFormat:()=>r4,_stringbool:()=>n4,_success:()=>U2,_superRefine:()=>Q2,_symbol:()=>z0,_templateLiteral:()=>q2,_toLowerCase:()=>S2,_toUpperCase:()=>C2,_transform:()=>R2,_trim:()=>x2,_tuple:()=>A2,_uint32:()=>M0,_uint64:()=>R0,_ulid:()=>l0,_undefined:()=>B0,_union:()=>E2,_unknown:()=>U0,_uppercase:()=>f2,_url:()=>i0,_uuid:()=>e0,_uuidv4:()=>t0,_uuidv6:()=>n0,_uuidv7:()=>r0,_void:()=>G0,_xid:()=>u0,_xor:()=>D2,clone:()=>HU,compile:()=>k$,compileFn:()=>j$,config:()=>jW,createStandardJSONSchemaMethod:()=>x4,createToJSONSchemaMethod:()=>b4,decode:()=>gG,decodeAsync:()=>bG,describe:()=>e4,encode:()=>mG,encodeAsync:()=>vG,extractDefs:()=>d4,finalize:()=>g4,flattenError:()=>VW,formatError:()=>HW,getDiscriminatedOption:()=>Bq,globalConfig:()=>zW,globalRegistry:()=>E$,handleUnrepresentable:()=>c4,initializeContext:()=>s4,isBackEdge:()=>IY,isRecursiveSchema:()=>NY,isValidBase64:()=>kq,isValidBase64URL:()=>Aq,isValidCIDRv6:()=>Oq,isValidCreditCard:()=>Mq,isValidIPv6:()=>Dq,isValidJWT:()=>Nq,locales:()=>y$,memoizer:()=>FY,mergeValues:()=>Vq,meta:()=>t4,parse:()=>nG,parseAsync:()=>iG,parseURLObject:()=>Cq,prettifyError:()=>GW,process:()=>l4,regexes:()=>AG,registry:()=>x$,safeDecode:()=>wG,safeDecodeAsync:()=>OG,safeEncode:()=>SG,safeEncodeAsync:()=>EG,safeParse:()=>oG,safeParseAsync:()=>cG,standardProps:()=>Sq,stripTabAndNewline:()=>wq,toDotPath:()=>WW,toJSONSchema:()=>D4,toZod:()=>EU,treeifyError:()=>UW,urlHostnameOk:()=>Tq,urlProtocolOk:()=>Eq,util:()=>TU,validate:()=>dG,validateAsync:()=>fG,version:()=>bq}),C3=o((()=>{BW(),kG(),$W(),AY(),WY(),_q(),xq(),J(),WK(),b$(),D$(),yq(),Y1(),a4(),S4(),_3(),y3(),x3()}));function w3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===T3)return new OY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,T3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?HU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:HU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?HU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:HU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:HU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?HU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:HU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:HU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:HU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:HU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return HU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var T3,E3=o((()=>{AY(),J(),T3=Symbol(`z.visit/resolving`)}));kG();function D3(e){return!!e._zod}function O3(e,t){return D3(e)?oG(e,t):e.safeParse(t)}function k3(e){if(!e)return;let t;if(t=D3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function A3(e){if(D3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var j3=c({endsWith:()=>h2,gt:()=>Z0,gte:()=>Q0,includes:()=>p2,length:()=>l2,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,maxLength:()=>s2,maxSize:()=>i2,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,negative:()=>e2,nonnegative:()=>n2,nonpositive:()=>t2,normalize:()=>b2,overwrite:()=>y2,positive:()=>$0,properties:()=>_2,property:()=>g2,regex:()=>u2,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,toLowerCase:()=>S2,toUpperCase:()=>C2,trim:()=>x2,uppercase:()=>f2}),M3=o((()=>{C3()}));function N3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var P3,F3,I3,L3,R3=o((()=>{C3(),J(),P3=new WeakSet([Object.prototype,Error.prototype]),F3=(e,t)=>{ZW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);P3.has(n)||(P3.add(n),N3(n,`format`,e=>t=>HW(e,t)),N3(n,`flatten`,e=>t=>VW(e,t)),N3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,OU,2)}),N3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,OU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},I3=Y(`ZodError`,F3),L3=Y(`ZodError`,F3,void 0,{Parent:Error})})),z3,B3,V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3=o((()=>{C3(),R3(),z3=tG(L3),B3=rG(L3),V3=aG(L3),H3=sG(L3),U3=pG(L3),W3=hG(L3),G3=_G(L3),K3=yG(L3),q3=xG(L3),J3=CG(L3),Y3=TG(L3),X3=DG(L3)})),Q3=c({ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,codec:()=>C8,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,float32:()=>M6,float64:()=>N6,function:()=>k8,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,literal:()=>Q,looseObject:()=>Z6,looseRecord:()=>a8,mac:()=>_6,map:()=>o8,meta:()=>a7,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,never:()=>G6,nonoptional:()=>v8,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,partialRecord:()=>i8,pipe:()=>S8,prefault:()=>_8,preprocess:()=>I8,promise:()=>O8,readonly:()=>T8,record:()=>r8,refine:()=>M8,set:()=>s8,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,transform:()=>d8,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,url:()=>s6,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,void:()=>K6,xid:()=>m6,xor:()=>$6});function $3(){zW.localeError||jW(TX())}function e6(){zW.memoizer||jW({memoizer:FY()})}function X(e){return X1(z8,e)}function t6(e){return Q1(G8,e)}function n6(e){return $1(K8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(q8,e)}function a6(e){return n0(q8,e)}function o6(e){return r0(q8,e)}function s6(e){return i0(J8,e)}function c6(e){return i0(J8,{protocol:mK,hostname:pK,...q(e)})}function l6(e){return a0(Y8,e)}function u6(e){return o0(X8,e)}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return m0(r5,e)}function v6(e){return p0(i5,e)}function y6(e){return h0(a5,e)}function b6(e){return g0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e,t,n={}){return r4(f5,e,t,n)}function D6(e){return r4(f5,`hostname`,fK,e)}function O6(e){return r4(f5,`hex`,OK,e)}function k6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=AG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return r4(f5,n,r,t)}function A6(e){return E0(p5,e)}function j6(e){return O0(m5,e)}function M6(e){return k0(m5,e)}function N6(e){return A0(m5,e)}function P6(e){return j0(m5,e)}function F6(e){return M0(m5,e)}function I6(e){return N0(h5,e)}function L6(e){return F0(g5,e)}function R6(e){return L0(_5,e)}function z6(e){return R0(_5,e)}function B6(e){return z0(v5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(){return H0(x5)}function W6(){return U0(S5)}function G6(e){return W0(C5,e)}function K6(e){return G0(w5,e)}function q6(e){return K0(T5,e)}function J6(e,t){return T2(E5,e,t)}function Y6(e){let t=e._zod.def.shape;return c8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new D5(n)}function X6(e,t){return new D5({type:`object`,shape:e,catchall:G6(),...q(t)})}function Z6(e,t){return new D5({type:`object`,shape:e,catchall:W6(),...q(t)})}function Q6(e,t){return new O5({type:`union`,options:e,...q(t)})}function $6(e,t){return new k5({type:`union`,options:e,inclusive:!1,...q(t)})}function e8(e,t,n){return new A5({type:`union`,options:t,discriminator:e,...q(n)})}function t8(e,t){return new j5({type:`intersection`,left:e,right:t})}function n8(e,t,n){let r=t instanceof rJ;return new M5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function r8(e,t,n){return!t||!t._zod?new N5({type:`record`,keyType:X(),valueType:e,...q(t)}):new N5({type:`record`,keyType:e,valueType:t,...q(n)})}function i8(e,t,n){return new N5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function a8(e,t,n){return new N5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function o8(e,t,n){return new P5({type:`map`,keyType:e,valueType:t,...q(n)})}function s8(e,t){return new F5({type:`set`,valueType:e,...q(t)})}function c8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new I5({type:`enum`,entries:n,...q(t)})}function l8(e,t){return new I5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new L5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function u8(e){return L2(R5,e)}function d8(e){return new z5({type:`transform`,transform:e})}function f8(e){return new B5({type:`optional`,innerType:e})}function p8(e){return new V5({type:`optional`,innerType:e})}function m8(e){return new H5({type:`nullable`,innerType:e})}function h8(e){return f8(m8(e))}function g8(e,t){return new U5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():BU(t)}})}function _8(e,t){return new W5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():BU(t)}})}function v8(e,t){return new G5({type:`nonoptional`,innerType:e,...q(t)})}function y8(e){return new K5({type:`success`,innerType:e})}function b8(e,t){return new q5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:gW(t)})}function x8(e){return J0(J5,e)}function S8(e,t){return new Y5({type:`pipe`,in:e,out:t})}function C8(e,t,n){return new X5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function w8(e){let t=e._zod.def;return new X5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function T8(e){return new Q5({type:`readonly`,innerType:e})}function E8(e,t){return new $5({type:`template_literal`,parts:e,...q(t)})}function D8(e){return new e7({type:`lazy`,getter:e})}function O8(e){return new t7({type:`promise`,innerType:e})}function k8(e){return new n7({type:`function`,input:Array.isArray(e?.input)?n8(e?.input):e?.input??J6(W6()),output:e?.output??W6()})}function A8(e){let t=new KK({check:`custom`});return t._zod.check=e,t}function j8(e,t){return X2(r7,e??(()=>!0),t)}function M8(e,t={}){return Z2(r7,e,t)}function N8(e,t){return Q2(e,t)}function P8(e,t={}){let n=new r7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function F8(e){let t=D8(()=>Q6([X(e),A6(),I6(),H6(),J6(t),r8(X(),t)]));return t}function I8(e,t){return new Z5({type:`pipe`,in:d8(e),out:t})}var L8,R8,z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7=o((()=>{C3(),_3(),S4(),DX(),M3(),Z3(),L8=Y(`ZodType`,(e,t)=>($3(),rJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(FU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return HU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(M8(e,t))},superRefine(e,t){return this.check(N8(e,t))},overwrite(e){return this.check(y2(e))},optional(){return f8(this)},exactOptional(){return p8(this)},nullable(){return m8(this)},nullish(){return f8(m8(this))},nonoptional(e){return v8(this,e)},array(){return J6(this)},or(e){return Q6([this,e])},and(e){return t8(this,e)},transform(e){return S8(this,d8(e))},default(e){return g8(this,e)},prefault(e){return _8(this,e)},catch(e){return b8(this,e)},pipe(e){return S8(this,e)},readonly(){return T8(this)},describe(e){let t=this.clone();return E$.add(t,{description:e}),t},meta(...e){if(e.length===0)return E$.get(this);let t=this.clone();return E$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return pW(this,`~standard`,{...Sq(this),jsonSchema:{input:x4(this,`input`),output:x4(this,`output`)}})},set"~standard"(e){fW(this,`~standard`,e)},parse:function e(t,n){return z3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await B3(this,t,n,{callee:e})},safeParse(e,t){return V3(this,e,t)},async safeParseAsync(e,t){return H3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){fW(this,`spa`,e)},encode:function e(t,n){return U3(this,t,n,{callee:e})},decode:function e(t,n){return W3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await G3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await K3(this,t,n,{callee:e})},safeEncode(e,t){return q3(this,e,t)},safeDecode(e,t){return J3(this,e,t)},async safeEncodeAsync(e,t){return Y3(this,e,t)},async safeDecodeAsync(e,t){return X3(this,e,t)},toJSONSchema(e){return b4(this,{})(e)},get description(){return E$.get(this)?.description},get _def(){return this._zod.def}}),R8=Y(`_ZodString`,(e,t)=>{aJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(u2(...e))},includes(...e){return this.check(p2(...e))},startsWith(...e){return this.check(m2(...e))},endsWith(...e){return this.check(h2(...e))},min(...e){return this.check(c2(...e))},max(...e){return this.check(s2(...e))},length(...e){return this.check(l2(...e))},nonempty(...e){return this.check(c2(1,...e))},lowercase(e){return this.check(d2(e))},uppercase(e){return this.check(f2(e))},trim(){return this.check(x2())},normalize(...e){return this.check(b2(...e))},toLowerCase(){return this.check(S2())},toUpperCase(){return this.check(C2())},slugify(){return this.check(w2())}}),z8=Y(`ZodString`,(e,t)=>{aJ.init(e,t),R8.init(e,t)},{email(e){return this.check(Q1(G8,e))},url(e){return this.check(i0(J8,e))},jwt(e){return this.check(x0(d5,e))},emoji(e){return this.check(a0(Y8,e))},guid(e){return this.check($1(K8,e))},uuid(e){return this.check(e0(q8,e))},uuidv4(e){return this.check(t0(q8,e))},uuidv6(e){return this.check(n0(q8,e))},uuidv7(e){return this.check(r0(q8,e))},nanoid(e){return this.check(o0(X8,e))},cuid(e){return this.check(s0(Z8,e))},cuid2(e){return this.check(c0(Q8,e))},ulid(e){return this.check(l0($8,e))},base64(e){return this.check(_0(s5,e))},base64url(e){return this.check(v0(c5,e))},xid(e){return this.check(u0(e5,e))},ksuid(e){return this.check(d0(t5,e))},ipv4(e){return this.check(f0(n5,e))},ipv6(e){return this.check(p0(i5,e))},cidrv4(e){return this.check(h0(a5,e))},cidrv6(e){return this.check(g0(o5,e))},e164(e){return this.check(y0(l5,e))},datetime(e){return this.check(S0(V8,e))},date(e){return this.check(C0(H8,e))},time(e){return this.check(w0(U8,e))},duration(e){return this.check(T0(W8,e))}}),B8=Y(`ZodStringFormat`,(e,t)=>{oJ.init(e,t),R8.init(e,t)}),V8=Y(`ZodISODateTime`,(e,t)=>{yJ.init(e,t),B8.init(e,t)}),H8=Y(`ZodISODate`,(e,t)=>{bJ.init(e,t),B8.init(e,t)}),U8=Y(`ZodISOTime`,(e,t)=>{xJ.init(e,t),B8.init(e,t)}),W8=Y(`ZodISODuration`,(e,t)=>{SJ.init(e,t),B8.init(e,t)}),G8=Y(`ZodEmail`,(e,t)=>{lJ.init(e,t),B8.init(e,t)}),K8=Y(`ZodGUID`,(e,t)=>{sJ.init(e,t),B8.init(e,t)}),q8=Y(`ZodUUID`,(e,t)=>{cJ.init(e,t),B8.init(e,t)}),J8=Y(`ZodURL`,(e,t)=>{dJ.init(e,t),B8.init(e,t)}),Y8=Y(`ZodEmoji`,(e,t)=>{fJ.init(e,t),B8.init(e,t)}),X8=Y(`ZodNanoID`,(e,t)=>{pJ.init(e,t),B8.init(e,t)}),Z8=Y(`ZodCUID`,(e,t)=>{mJ.init(e,t),B8.init(e,t)}),Q8=Y(`ZodCUID2`,(e,t)=>{hJ.init(e,t),B8.init(e,t)}),$8=Y(`ZodULID`,(e,t)=>{gJ.init(e,t),B8.init(e,t)}),e5=Y(`ZodXID`,(e,t)=>{_J.init(e,t),B8.init(e,t)}),t5=Y(`ZodKSUID`,(e,t)=>{vJ.init(e,t),B8.init(e,t)}),n5=Y(`ZodIPv4`,(e,t)=>{CJ.init(e,t),B8.init(e,t)}),r5=Y(`ZodMAC`,(e,t)=>{EJ.init(e,t),B8.init(e,t)}),i5=Y(`ZodIPv6`,(e,t)=>{TJ.init(e,t),B8.init(e,t)}),a5=Y(`ZodCIDRv4`,(e,t)=>{DJ.init(e,t),B8.init(e,t)}),o5=Y(`ZodCIDRv6`,(e,t)=>{OJ.init(e,t),B8.init(e,t)}),s5=Y(`ZodBase64`,(e,t)=>{kJ.init(e,t),B8.init(e,t)}),c5=Y(`ZodBase64URL`,(e,t)=>{AJ.init(e,t),B8.init(e,t)}),l5=Y(`ZodE164`,(e,t)=>{jJ.init(e,t),B8.init(e,t)}),u5=Y(`ZodCreditCard`,(e,t)=>{NJ.init(e,t),B8.init(e,t)}),d5=Y(`ZodJWT`,(e,t)=>{PJ.init(e,t),B8.init(e,t)}),f5=Y(`ZodCustomStringFormat`,(e,t)=>{FJ.init(e,t),B8.init(e,t)}),p5=Y(`ZodNumber`,(e,t)=>{IJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(Z0(e,t))},gte(e,t){return this.check(Q0(e,t))},min(e,t){return this.check(Q0(e,t))},lt(e,t){return this.check(Y0(e,t))},lte(e,t){return this.check(X0(e,t))},max(e,t){return this.check(X0(e,t))},int(e){return this.check(j6(e))},safe(e){return this.check(j6(e))},positive(e){return this.check(Z0(0,e))},nonnegative(e){return this.check(Q0(0,e))},negative(e){return this.check(Y0(0,e))},nonpositive(e){return this.check(X0(0,e))},multipleOf(e,t){return this.check(r2(e,t))},step(e,t){return this.check(r2(e,t))},finite(){return this}}),m5=Y(`ZodNumberFormat`,(e,t)=>{LJ.init(e,t),p5.init(e,t)}),h5=Y(`ZodBoolean`,(e,t)=>{RJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r)}),g5=Y(`ZodBigInt`,(e,t)=>{zJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(Q0(e,t))},min(e,t){return this.check(Q0(e,t))},gt(e,t){return this.check(Z0(e,t))},lt(e,t){return this.check(Y0(e,t))},lte(e,t){return this.check(X0(e,t))},max(e,t){return this.check(X0(e,t))},positive(e){return this.check(Z0(BigInt(0),e))},negative(e){return this.check(Y0(BigInt(0),e))},nonpositive(e){return this.check(X0(BigInt(0),e))},nonnegative(e){return this.check(Q0(BigInt(0),e))},multipleOf(e,t){return this.check(r2(e,t))}}),_5=Y(`ZodBigIntFormat`,(e,t)=>{BJ.init(e,t),g5.init(e,t)}),v5=Y(`ZodSymbol`,(e,t)=>{VJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r)}),y5=Y(`ZodUndefined`,(e,t)=>{HJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),b5=Y(`ZodNull`,(e,t)=>{UJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r)}),x5=Y(`ZodAny`,(e,t)=>{WJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),S5=Y(`ZodUnknown`,(e,t)=>{GJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),C5=Y(`ZodNever`,(e,t)=>{KJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),w5=Y(`ZodVoid`,(e,t)=>{qJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),T5=Y(`ZodDate`,(e,t)=>{JJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r),e.min=(t,n)=>e.check(Q0(t,n)),e.max=(t,n)=>e.check(X0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),E5=Y(`ZodArray`,(e,t)=>{e6(),YJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(c2(e,t))},nonempty(e){return this.check(c2(1,e))},max(e,t){return this.check(s2(e,t))},length(e,t){return this.check(l2(e,t))},unwrap(){return this.element}}),D5=Y(`ZodObject`,(e,t)=>{e6(),$J.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),hW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return c8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:W6()})},loose(){return this.clone({...this._zod.def,catchall:W6()})},strict(){return this.clone({...this._zod.def,catchall:G6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return qU(this,e)},safeExtend(e){return JU(this,e)},merge(e){return YU(this,e)},pick(e){return GU(this,e)},omit(e){return KU(this,e)},partial(...e){return XU(B5,this,e[0])},exactPartial(...e){return XU(V5,this,e[0],`exactPartial`)},required(...e){return ZU(G5,this,e[0])}}),O5=Y(`ZodUnion`,(e,t)=>{eY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.options=t.options}),k5=Y(`ZodXor`,(e,t)=>{O5.init(e,t),tY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.options=t.options}),A5=Y(`ZodDiscriminatedUnion`,(e,t)=>{O5.init(e,t),nY.init(e,t)}),j5=Y(`ZodIntersection`,(e,t)=>{rY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r)}),M5=Y(`ZodTuple`,(e,t)=>{e6(),iY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new B5({type:`optional`,innerType:e}))})}}),N5=Y(`ZodRecord`,(e,t)=>{e6(),aY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),P5=Y(`ZodMap`,(e,t)=>{e6(),oY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(a2(...t)),e.nonempty=t=>e.check(a2(1,t)),e.max=(...t)=>e.check(i2(...t)),e.size=(...t)=>e.check(o2(...t))}),F5=Y(`ZodSet`,(e,t)=>{e6(),sY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.min=(...t)=>e.check(a2(...t)),e.nonempty=t=>e.check(a2(1,t)),e.max=(...t)=>e.check(i2(...t)),e.size=(...t)=>e.check(o2(...t))}),I5=Y(`ZodEnum`,(e,t)=>{cY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new I5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new I5({...t,checks:[],...q(r),entries:i})}}),L5=Y(`ZodLiteral`,(e,t)=>{lY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),R5=Y(`ZodFile`,(e,t)=>{uY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r),e.min=(t,n)=>e.check(a2(t,n)),e.max=(t,n)=>e.check(i2(t,n)),e.mime=(t,n)=>e.check(v2(Array.isArray(t)?t:[t],n))}),z5=Y(`ZodTransform`,(e,t)=>{e6(),dY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new RW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(cW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(cW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),B5=Y(`ZodOptional`,(e,t)=>{fY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),V5=Y(`ZodExactOptional`,(e,t)=>{pY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),H5=Y(`ZodNullable`,(e,t)=>{mY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodDefault`,(e,t)=>{hY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),W5=Y(`ZodPrefault`,(e,t)=>{gY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),G5=Y(`ZodNonOptional`,(e,t)=>{_Y.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),K5=Y(`ZodSuccess`,(e,t)=>{vY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodCatch`,(e,t)=>{yY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),J5=Y(`ZodNaN`,(e,t)=>{bY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r)}),Y5=Y(`ZodPipe`,(e,t)=>{xY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.in=t.in,e.out=t.out}),X5=Y(`ZodCodec`,(e,t)=>{Y5.init(e,t),SY.init(e,t)}),Z5=Y(`ZodPreprocess`,(e,t)=>{Y5.init(e,t),CY.init(e,t)}),Q5=Y(`ZodReadonly`,(e,t)=>{wY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),$5=Y(`ZodTemplateLiteral`,(e,t)=>{TY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),e7=Y(`ZodLazy`,(e,t)=>{OY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),t7=Y(`ZodPromise`,(e,t)=>{DY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),n7=Y(`ZodFunction`,(e,t)=>{EY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),r7=Y(`ZodCustom`,(e,t)=>{kY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r)}),i7=e4,a7=t4,o7=(...e)=>n4({Codec:X5,Boolean:h5,String:z8},...e)}));function c7(e){jW({customError:e})}function l7(){return jW().customError}var u7,d7,uie=o((()=>{C3(),u7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},d7||={}})),f7=c({ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,date:()=>die,datetime:()=>p7,duration:()=>pie,time:()=>fie});function p7(e){return S0(V8,e)}function die(e){return C0(H8,e)}function fie(e){return w0(U8,e)}function pie(e){return T0(W8,e)}var m7=o((()=>{C3(),s7()}));function mie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function h7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function g7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():v7(e,t)}function _7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=v7(gie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>_7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(x7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?v7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=v7(r,t);PU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=v7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!zU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=_ie(r,v7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=h7(n.map(e=>v7(e,t)),a),s=Array.isArray(i)?void 0:g7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=h7(i.map(e=>v7(e,t)),n),o=g7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=v7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function v7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=_7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>v7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>v7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:v7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function y7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:mie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??E$};return v7(n,r)}var $,b7,x7,vie=o((()=>{D$(),J(),M3(),m7(),s7(),$={...Q3,...j3,iso:f7},b7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),x7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function S7(e){return w3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:Q6(t.options)}})}var yie=o((()=>{E3(),s7()}));function bie(e,t){if(!t?.length)return e;let n=e._zod.def;return HU(e,FU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function C7(e){return bie(e.out,e.checks)}function xie(e){return e.in._zod.traits.has(`$ZodTransform`)?C7(e):e.in}function w7(e){return w3(e,{pipe:e=>xie(e._zod.def),default:(e,t)=>t?f8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function T7(e){return w3(e,{pipe:e=>C7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Sie=o((()=>{J(),E3(),s7()})),E7=c({bigint:()=>Eie,boolean:()=>Tie,date:()=>Die,number:()=>wie,string:()=>Cie});function Cie(e){return Z1(z8,e)}function wie(e){return D0(p5,e)}function Tie(e){return P0(h5,e)}function Eie(e){return I0(g5,e)}function Die(e){return q0(T5,e)}var Oie=o((()=>{C3(),s7()})),D7=c({$brand:()=>IW,$input:()=>w$,$output:()=>C$,NEVER:()=>NW,TimePrecision:()=>i4,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodError:()=>I3,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFirstPartyTypeKind:()=>d7,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodIssueCode:()=>u7,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRealError:()=>L3,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,clone:()=>HU,codec:()=>C8,coerce:()=>E7,compile:()=>k$,config:()=>jW,core:()=>S3,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,decode:()=>W3,decodeAsync:()=>K3,deepPartial:()=>S7,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,encode:()=>U3,encodeAsync:()=>G3,endsWith:()=>h2,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,flattenError:()=>VW,float32:()=>M6,float64:()=>N6,formatError:()=>HW,fromJSONSchema:()=>y7,function:()=>k8,getDiscriminatedOption:()=>Bq,getErrorMap:()=>l7,globalRegistry:()=>E$,gt:()=>Z0,gte:()=>Q0,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,includes:()=>p2,input:()=>w7,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,iso:()=>f7,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,length:()=>l2,literal:()=>Q,locales:()=>y$,looseObject:()=>Z6,looseRecord:()=>a8,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,mac:()=>_6,map:()=>o8,maxLength:()=>s2,maxSize:()=>i2,memoizer:()=>FY,meta:()=>a7,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,negative:()=>e2,never:()=>G6,nonnegative:()=>n2,nonoptional:()=>v8,nonpositive:()=>t2,normalize:()=>b2,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,output:()=>T7,overwrite:()=>y2,parse:()=>z3,parseAsync:()=>B3,partialRecord:()=>i8,pipe:()=>S8,positive:()=>$0,prefault:()=>_8,preprocess:()=>I8,prettifyError:()=>GW,promise:()=>O8,properties:()=>_2,property:()=>g2,readonly:()=>T8,record:()=>r8,refine:()=>M8,regex:()=>u2,regexes:()=>AG,registry:()=>x$,safeDecode:()=>J3,safeDecodeAsync:()=>X3,safeEncode:()=>q3,safeEncodeAsync:()=>Y3,safeParse:()=>V3,safeParseAsync:()=>H3,set:()=>s8,setErrorMap:()=>c7,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,toJSONSchema:()=>D4,toLowerCase:()=>S2,toUpperCase:()=>C2,toZod:()=>EU,transform:()=>d8,treeifyError:()=>UW,trim:()=>x2,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,uppercase:()=>f2,url:()=>s6,util:()=>TU,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,validate:()=>dG,validateAsync:()=>fG,void:()=>K6,xid:()=>m6,xor:()=>$6}),O7=o((()=>{C3(),s7(),M3(),R3(),Z3(),uie(),_3(),vie(),yie(),Sie(),b$(),m7(),Oie()})),kie=o((()=>{O7(),O7()})),Aie=c({$brand:()=>IW,$input:()=>w$,$output:()=>C$,NEVER:()=>NW,TimePrecision:()=>i4,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodError:()=>I3,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFirstPartyTypeKind:()=>d7,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodIssueCode:()=>u7,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRealError:()=>L3,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,clone:()=>HU,codec:()=>C8,coerce:()=>E7,compile:()=>k$,config:()=>jW,core:()=>S3,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,decode:()=>W3,decodeAsync:()=>K3,deepPartial:()=>S7,default:()=>D7,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,encode:()=>U3,encodeAsync:()=>G3,endsWith:()=>h2,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,flattenError:()=>VW,float32:()=>M6,float64:()=>N6,formatError:()=>HW,fromJSONSchema:()=>y7,function:()=>k8,getDiscriminatedOption:()=>Bq,getErrorMap:()=>l7,globalRegistry:()=>E$,gt:()=>Z0,gte:()=>Q0,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,includes:()=>p2,input:()=>w7,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,iso:()=>f7,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,length:()=>l2,literal:()=>Q,locales:()=>y$,looseObject:()=>Z6,looseRecord:()=>a8,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,mac:()=>_6,map:()=>o8,maxLength:()=>s2,maxSize:()=>i2,memoizer:()=>FY,meta:()=>a7,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,negative:()=>e2,never:()=>G6,nonnegative:()=>n2,nonoptional:()=>v8,nonpositive:()=>t2,normalize:()=>b2,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,output:()=>T7,overwrite:()=>y2,parse:()=>z3,parseAsync:()=>B3,partialRecord:()=>i8,pipe:()=>S8,positive:()=>$0,prefault:()=>_8,preprocess:()=>I8,prettifyError:()=>GW,promise:()=>O8,properties:()=>_2,property:()=>g2,readonly:()=>T8,record:()=>r8,refine:()=>M8,regex:()=>u2,regexes:()=>AG,registry:()=>x$,safeDecode:()=>J3,safeDecodeAsync:()=>X3,safeEncode:()=>q3,safeEncodeAsync:()=>Y3,safeParse:()=>V3,safeParseAsync:()=>H3,set:()=>s8,setErrorMap:()=>c7,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,toJSONSchema:()=>D4,toLowerCase:()=>S2,toUpperCase:()=>C2,toZod:()=>EU,transform:()=>d8,treeifyError:()=>UW,trim:()=>x2,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,uppercase:()=>f2,url:()=>s6,util:()=>TU,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,validate:()=>dG,validateAsync:()=>fG,void:()=>K6,xid:()=>m6,xor:()=>$6,z:()=>D7}),k7=o((()=>{O7(),kie()}));k7();var A7=`io.modelcontextprotocol/related-task`,j7=j8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),M7=Q6([X(),A6().int()]),N7=X();Z6({ttl:A6().optional(),pollInterval:A6().optional()});var jie=Z({ttl:A6().optional()}),Mie=Z({taskId:X()}),P7=Z6({progressToken:M7.optional(),[A7]:Mie.optional()}),F7=Z({_meta:P7.optional()}),I7=F7.extend({task:jie.optional()}),Nie=e=>I7.safeParse(e).success,L7=Z({method:X(),params:F7.loose().optional()}),R7=Z({_meta:P7.optional()}),z7=Z({method:X(),params:R7.loose().optional()}),B7=Z6({_meta:P7.optional()}),V7=Q6([X(),A6().int()]),H7=Z({jsonrpc:Q(`2.0`),id:V7,...L7.shape}).strict(),U7=e=>H7.safeParse(e).success,W7=Z({jsonrpc:Q(`2.0`),...z7.shape}).strict(),Pie=e=>W7.safeParse(e).success,G7=Z({jsonrpc:Q(`2.0`),id:V7,result:B7}).strict(),K7=e=>G7.safeParse(e).success,q7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(q7||={});var J7=Z({jsonrpc:Q(`2.0`),id:V7.optional(),error:Z({code:A6().int(),message:X(),data:W6().optional()})}).strict(),Fie=e=>J7.safeParse(e).success,Iie=Q6([H7,W7,G7,J7]);Q6([G7,J7]);var Y7=B7.strict(),Lie=R7.extend({requestId:V7.optional(),reason:X().optional()}),X7=z7.extend({method:Q(`notifications/cancelled`),params:Lie}),Z7=Z({icons:J6(Z({src:X(),mimeType:X().optional(),sizes:J6(X()).optional(),theme:c8([`light`,`dark`]).optional()})).optional()}),Q7=Z({name:X(),title:X().optional()}),$7=Q7.extend({...Q7.shape,...Z7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),Rie=I8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,t8(Z({form:t8(Z({applyDefaults:I6().optional()}),r8(X(),W6())).optional(),url:j7.optional()}),r8(X(),W6()).optional())),zie=Z6({list:j7.optional(),cancel:j7.optional(),requests:Z6({sampling:Z6({createMessage:j7.optional()}).optional(),elicitation:Z6({create:j7.optional()}).optional()}).optional()}),Bie=Z6({list:j7.optional(),cancel:j7.optional(),requests:Z6({tools:Z6({call:j7.optional()}).optional()}).optional()}),Vie=Z({experimental:r8(X(),j7).optional(),sampling:Z({context:j7.optional(),tools:j7.optional()}).optional(),elicitation:Rie.optional(),roots:Z({listChanged:I6().optional()}).optional(),tasks:zie.optional(),extensions:r8(X(),j7).optional()}),Hie=F7.extend({protocolVersion:X(),capabilities:Vie,clientInfo:$7}),Uie=L7.extend({method:Q(`initialize`),params:Hie}),Wie=Z({experimental:r8(X(),j7).optional(),logging:j7.optional(),completions:j7.optional(),prompts:Z({listChanged:I6().optional()}).optional(),resources:Z({subscribe:I6().optional(),listChanged:I6().optional()}).optional(),tools:Z({listChanged:I6().optional()}).optional(),tasks:Bie.optional(),extensions:r8(X(),j7).optional()}),Gie=B7.extend({protocolVersion:X(),capabilities:Wie,serverInfo:$7,instructions:X().optional()}),Kie=z7.extend({method:Q(`notifications/initialized`),params:R7.optional()}),e9=L7.extend({method:Q(`ping`),params:F7.optional()}),qie=Z({progress:A6(),total:f8(A6()),message:f8(X())}),Jie=Z({...R7.shape,...qie.shape,progressToken:M7}),t9=z7.extend({method:Q(`notifications/progress`),params:Jie}),Yie=F7.extend({cursor:N7.optional()}),n9=L7.extend({params:Yie.optional()}),r9=B7.extend({nextCursor:N7.optional()}),Xie=c8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),i9=Z({taskId:X(),status:Xie,ttl:Q6([A6(),H6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:f8(A6()),statusMessage:f8(X())}),a9=B7.extend({task:i9}),Zie=R7.merge(i9),o9=z7.extend({method:Q(`notifications/tasks/status`),params:Zie}),s9=L7.extend({method:Q(`tasks/get`),params:F7.extend({taskId:X()})}),c9=B7.merge(i9),l9=L7.extend({method:Q(`tasks/result`),params:F7.extend({taskId:X()})});B7.loose();var u9=n9.extend({method:Q(`tasks/list`)}),d9=r9.extend({tasks:J6(i9)}),f9=L7.extend({method:Q(`tasks/cancel`),params:F7.extend({taskId:X()})}),Qie=B7.merge(i9),p9=Z({uri:X(),mimeType:f8(X()),_meta:r8(X(),W6()).optional()}),m9=p9.extend({text:X()}),h9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),g9=p9.extend({blob:h9}),_9=c8([`user`,`assistant`]),v9=Z({audience:J6(_9).optional(),priority:A6().min(0).max(1).optional(),lastModified:p7({offset:!0}).optional()}),y9=Z({...Q7.shape,...Z7.shape,uri:X(),description:f8(X()),mimeType:f8(X()),size:f8(A6()),annotations:v9.optional(),_meta:f8(Z6({}))}),$ie=Z({...Q7.shape,...Z7.shape,uriTemplate:X(),description:f8(X()),mimeType:f8(X()),annotations:v9.optional(),_meta:f8(Z6({}))}),eae=n9.extend({method:Q(`resources/list`)}),b9=r9.extend({resources:J6(y9)}),tae=n9.extend({method:Q(`resources/templates/list`)}),nae=r9.extend({resourceTemplates:J6($ie)}),x9=F7.extend({uri:X()}),rae=x9,iae=L7.extend({method:Q(`resources/read`),params:rae}),S9=B7.extend({contents:J6(Q6([m9,g9]))}),aae=z7.extend({method:Q(`notifications/resources/list_changed`),params:R7.optional()}),oae=x9,sae=L7.extend({method:Q(`resources/subscribe`),params:oae}),cae=x9,lae=L7.extend({method:Q(`resources/unsubscribe`),params:cae}),uae=R7.extend({uri:X()}),dae=z7.extend({method:Q(`notifications/resources/updated`),params:uae}),fae=Z({name:X(),description:f8(X()),required:f8(I6())}),pae=Z({...Q7.shape,...Z7.shape,description:f8(X()),arguments:f8(J6(fae)),_meta:f8(Z6({}))}),C9=n9.extend({method:Q(`prompts/list`)}),mae=r9.extend({prompts:J6(pae)}),hae=F7.extend({name:X(),arguments:r8(X(),X()).optional()}),gae=L7.extend({method:Q(`prompts/get`),params:hae}),w9=Z({type:Q(`text`),text:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),T9=Z({type:Q(`image`),data:h9,mimeType:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),E9=Z({type:Q(`audio`),data:h9,mimeType:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),_ae=Z({type:Q(`tool_use`),name:X(),id:X(),input:r8(X(),W6()),_meta:r8(X(),W6()).optional()}),D9=Z({type:Q(`resource`),resource:Q6([m9,g9]),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),O9=y9.extend({type:Q(`resource_link`)}),k9=Q6([w9,T9,E9,O9,D9]),vae=Z({role:_9,content:k9}),yae=B7.extend({description:X().optional(),messages:J6(vae)}),bae=z7.extend({method:Q(`notifications/prompts/list_changed`),params:R7.optional()}),xae=Z({title:X().optional(),readOnlyHint:I6().optional(),destructiveHint:I6().optional(),idempotentHint:I6().optional(),openWorldHint:I6().optional()}),Sae=Z({taskSupport:c8([`required`,`optional`,`forbidden`]).optional()}),A9=Z({...Q7.shape,...Z7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:r8(X(),j7).optional(),required:J6(X()).optional()}).catchall(W6()),outputSchema:Z({type:Q(`object`),properties:r8(X(),j7).optional(),required:J6(X()).optional()}).catchall(W6()).optional(),annotations:xae.optional(),execution:Sae.optional(),_meta:r8(X(),W6()).optional()}),j9=n9.extend({method:Q(`tools/list`)}),Cae=r9.extend({tools:J6(A9)}),M9=B7.extend({content:J6(k9).default([]),structuredContent:r8(X(),W6()).optional(),isError:I6().optional()});M9.or(B7.extend({toolResult:W6()}));var wae=I7.extend({name:X(),arguments:r8(X(),W6()).optional()}),N9=L7.extend({method:Q(`tools/call`),params:wae}),Tae=z7.extend({method:Q(`notifications/tools/list_changed`),params:R7.optional()});Z({autoRefresh:I6().default(!0),debounceMs:A6().int().nonnegative().default(300)});var P9=c8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),Eae=F7.extend({level:P9}),Dae=L7.extend({method:Q(`logging/setLevel`),params:Eae}),Oae=R7.extend({level:P9,logger:X().optional(),data:W6()}),kae=z7.extend({method:Q(`notifications/message`),params:Oae}),Aae=Z({hints:J6(Z({name:X().optional()})).optional(),costPriority:A6().min(0).max(1).optional(),speedPriority:A6().min(0).max(1).optional(),intelligencePriority:A6().min(0).max(1).optional()}),jae=Z({mode:c8([`auto`,`required`,`none`]).optional()}),Mae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:J6(k9).default([]),structuredContent:Z({}).loose().optional(),isError:I6().optional(),_meta:r8(X(),W6()).optional()}),Nae=e8(`type`,[w9,T9,E9]),F9=e8(`type`,[w9,T9,E9,_ae,Mae]),Pae=Z({role:_9,content:Q6([F9,J6(F9)]),_meta:r8(X(),W6()).optional()}),Fae=I7.extend({messages:J6(Pae),modelPreferences:Aae.optional(),systemPrompt:X().optional(),includeContext:c8([`none`,`thisServer`,`allServers`]).optional(),temperature:A6().optional(),maxTokens:A6().int(),stopSequences:J6(X()).optional(),metadata:j7.optional(),tools:J6(A9).optional(),toolChoice:jae.optional()}),Iae=L7.extend({method:Q(`sampling/createMessage`),params:Fae}),I9=B7.extend({model:X(),stopReason:f8(c8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:_9,content:Nae}),L9=B7.extend({model:X(),stopReason:f8(c8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:_9,content:Q6([F9,J6(F9)])}),Lae=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:I6().optional()}),Rae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:A6().optional(),maxLength:A6().optional(),format:c8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),zae=Z({type:c8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:A6().optional(),maximum:A6().optional(),default:A6().optional()}),Bae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:J6(X()),default:X().optional()}),Vae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:J6(Z({const:X(),title:X()})),default:X().optional()}),Hae=Q6([Q6([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:J6(X()),enumNames:J6(X()).optional(),default:X().optional()}),Q6([Bae,Vae]),Q6([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:A6().optional(),maxItems:A6().optional(),items:Z({type:Q(`string`),enum:J6(X())}),default:J6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:A6().optional(),maxItems:A6().optional(),items:Z({anyOf:J6(Z({const:X(),title:X()}))}),default:J6(X()).optional()})])]),Lae,Rae,zae]),Uae=Q6([I7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:r8(X(),Hae),required:J6(X()).optional()})}),I7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),Wae=L7.extend({method:Q(`elicitation/create`),params:Uae}),Gae=R7.extend({elicitationId:X()}),Kae=z7.extend({method:Q(`notifications/elicitation/complete`),params:Gae}),qae=B7.extend({action:c8([`accept`,`decline`,`cancel`]),content:I8(e=>e===null?void 0:e,r8(X(),Q6([X(),A6(),I6(),J6(X())])).optional())}),Jae=Z({type:Q(`ref/resource`),uri:X()}),Yae=Z({type:Q(`ref/prompt`),name:X()}),Xae=F7.extend({ref:Q6([Yae,Jae]),argument:Z({name:X(),value:X()}),context:Z({arguments:r8(X(),X()).optional()}).optional()}),Zae=L7.extend({method:Q(`completion/complete`),params:Xae}),Qae=B7.extend({completion:Z6({values:J6(X()).max(100),total:f8(A6().int()),hasMore:f8(I6())})}),$ae=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:r8(X(),W6()).optional()}),eoe=L7.extend({method:Q(`roots/list`),params:F7.optional()}),toe=B7.extend({roots:J6($ae)}),noe=z7.extend({method:Q(`notifications/roots/list_changed`),params:R7.optional()});Q6([e9,Uie,Zae,Dae,gae,C9,eae,tae,iae,sae,lae,N9,j9,s9,l9,u9,f9]),Q6([X7,t9,Kie,noe,o9]),Q6([Y7,I9,L9,qae,toe,c9,d9,a9]),Q6([e9,Iae,Wae,eoe,s9,l9,u9,f9]),Q6([X7,t9,kae,dae,aae,Tae,bae,o9,Kae]),Q6([Y7,Gie,Qae,yae,mae,b9,nae,S9,M9,Cae,c9,d9,a9]);var R9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===q7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new roe(e.elicitations,n)}return new e(t,n,r)}},roe=class extends R9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(q7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function z9(e){return e===`completed`||e===`failed`||e===`cancelled`}function B9(e){let t=k3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=A3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function V9(e,t){let n=O3(e,t);if(!n.success)throw n.error;return n.data}var ioe=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(X7,e=>{this._oncancel(e)}),this.setNotificationHandler(t9,e=>{this._onprogress(e)}),this.setRequestHandler(e9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(s9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(q7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(l9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new R9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new R9(q7.InvalidParams,`Task not found: ${r}`);if(!z9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(z9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[A7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(u9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new R9(q7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(f9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new R9(q7.InvalidParams,`Task not found: ${e.params.taskId}`);if(z9(n.status))throw new R9(q7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new R9(q7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof R9?e:new R9(q7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),R9.fromError(q7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),K7(e)||Fie(e)?this._onresponse(e):U7(e)?this._onrequest(e,t):Pie(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=R9.fromError(q7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[A7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:q7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Nie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new R9(q7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:q7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),K7(e)?n(e):n(new R9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(K7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),K7(e)?r(e):r(R9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(q7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,a9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new R9(q7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},z9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new R9(q7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new R9(q7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof R9?e:new R9(q7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[A7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof R9?e:new R9(q7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=O3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(R9.fromError(q7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},c9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},d9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Qie,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[A7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[A7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[A7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=B9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=V9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=B9(e);this._notificationHandlers.set(n,n=>{let r=V9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&U7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new R9(q7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new R9(q7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new R9(q7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new R9(q7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=o9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),z9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new R9(q7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(z9(a.status))throw new R9(q7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=o9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),z9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function H9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function aoe(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=H9(a)&&H9(i)?{...a,...i}:i}return n}var ooe=`modulepreload`,soe=function(e,t){return new URL(e,t).href},U9={},coe=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=soe(t,n),t=s(t),t in U9)return;U9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:ooe,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};k7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var loe=class extends ioe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},uoe=`2026-01-26`,W9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Iie.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},doe=Q6([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),G9=Q6([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),foe=r8(Q6([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function f4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;f4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function p4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function m4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!v4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??p4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}PU(n,r,e.length===1?e[0]:m4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=p4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function h4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of v4)if(t in e)return;let n=t.filter(e=>y4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=m4(t);else{let e=n[0],i=y4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>m4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,o4(e,r))}function g4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):o4(i,s),o4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())f4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])h4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}o4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,PU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:x4(t,`input`,e.processors),output:x4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function _4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return _4(r.element,n);if(r.type===`set`)return _4(r.valueType,n);if(r.type===`lazy`)return _4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return _4(r.innerType,n);if(r.type===`intersection`)return _4(r.left,n)||_4(r.right,n);if(r.type===`record`||r.type===`map`)return _4(r.keyType,n)||_4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:_4(r.in,n)||_4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(_4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(_4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(_4(e,n))return!0;return!!(r.rest&&_4(r.rest,n))}return!1}var v4,y4,b4,x4,S4=o((()=>{D$(),J(),v4=new Set([`type`,`properties`,`required`,`additionalProperties`]),y4=[`oneOf`,`anyOf`],b4=(e,t={})=>n=>{let r=s4({...n,processors:t});return l4(e,r),d4(r,e),g4(r,e)},x4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=s4({...i??{},target:a,io:t,processors:n});return l4(e,o),d4(o,e),g4(o,e)}}));function C4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?C4(t.out):t.type===`catch`?C4(t.innerType):e._zod.optin}function w4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=w4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>w4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?SK:xK).source),p):p}function T4(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of r3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=w4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function E4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(c4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),s3):JSON.parse(o)}function D4(e,t){if(`_idmap`in e){let n=e,r=s4({...t,processors:g3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;l4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;d4(r,n),PU(a,t,g4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=s4({...t,processors:g3});return l4(e,n),d4(n,e),g4(n,e)}var O4,k4,A4,j4,M4,N4,P4,F4,I4,L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3=o((()=>{WK(),S4(),J(),O4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},k4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=O4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},A4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):c4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},j4=(e,t,n,r)=>{n.type=`boolean`},M4=(e,t,n,r)=>{c4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},N4=(e,t,n,r)=>{c4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},P4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},F4=(e,t,n,r)=>{c4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},I4=(e,t,n,r)=>{c4(e,t,n,r,`Void cannot be represented in JSON Schema`)},L4=(e,t,n,r)=>{n.not={}},R4=(e,t,n,r)=>{},z4=(e,t,n,r)=>{},B4=(e,t,n,r)=>{c4(e,t,n,r,`Date cannot be represented in JSON Schema`)},V4=(e,t,n,r)=>{let i=e._zod.def,a=DU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},H4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(c4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(c4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},U4=(e,t,n,r)=>{c4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},W4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},G4=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},K4=(e,t,n,r)=>{n.type=`boolean`},q4=(e,t,n,r)=>{c4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},J4=(e,t,n,r)=>{c4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Y4=(e,t,n,r)=>{c4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{c4(e,t,n,r,`Map cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{c4(e,t,n,r,`Set cannot be represented in JSON Schema`)},Q4=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=l4(a.element,t,{...r,path:[...r.path,`items`]})},$4=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&c4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)PU(i.properties,e,l4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?C4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=l4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},e3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>l4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},t3=(e,t,n,r)=>{let i=e._zod.def,a=l4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=l4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},n3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>l4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?l4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?C4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},r3=new WeakMap,i3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=l4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)PU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=l4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=r3.get(t);n||(n=[],r3.set(t,n),t.deferred.push(()=>T4(t))),n.push(e)}i.additionalProperties=l4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&C4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},a3=(e,t,n,r)=>{let i=e._zod.def,a=l4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},o3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},s3=Symbol(),c3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=E4(i.defaultValue,e,t,n,r);o!==s3&&(n.default=o)},l3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=E4(i.defaultValue,e,t,n,r);o!==s3&&(n._prefault=o)},u3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{c4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},d3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;l4(o,t,r);let s=t.seen.get(e);s.ref=o},f3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},p3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},m3=(e,t,n,r)=>{let i=e._zod.def;l4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},h3=(e,t,n,r)=>{let i=e._zod.innerType;l4(i,t,r);let a=t.seen.get(e);a.ref=i},g3={string:k4,number:A4,boolean:j4,bigint:M4,symbol:N4,null:P4,undefined:F4,void:I4,never:L4,any:R4,unknown:z4,date:B4,enum:V4,literal:H4,nan:U4,template_literal:W4,file:G4,success:K4,custom:q4,function:J4,transform:Y4,map:X4,set:Z4,array:Q4,object:$4,union:e3,intersection:t3,tuple:n3,record:i3,nullable:a3,nonoptional:o3,default:c3,prefault:l3,catch:u3,pipe:d3,readonly:f3,promise:p3,optional:m3,lazy:h3}})),v3,y3=o((()=>{_3(),S4(),v3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=s4({processors:g3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return l4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,d4(this.ctx,e);let{"~standard":n,...r}=g4(this.ctx,e);return r}}})),b3=c({}),x3=o((()=>{})),S3=c({$ZodAny:()=>WJ,$ZodArray:()=>YJ,$ZodAsyncError:()=>LW,$ZodBase64:()=>kJ,$ZodBase64URL:()=>AJ,$ZodBigInt:()=>zJ,$ZodBigIntFormat:()=>BJ,$ZodBoolean:()=>RJ,$ZodCIDRv4:()=>DJ,$ZodCIDRv6:()=>OJ,$ZodCUID:()=>mJ,$ZodCUID2:()=>hJ,$ZodCatch:()=>yY,$ZodCheck:()=>KK,$ZodCheckBigIntFormat:()=>eq,$ZodCheckEndsWith:()=>pq,$ZodCheckGreaterThan:()=>ZK,$ZodCheckIncludes:()=>dq,$ZodCheckLengthEquals:()=>oq,$ZodCheckLessThan:()=>XK,$ZodCheckLowerCase:()=>lq,$ZodCheckMaxLength:()=>iq,$ZodCheckMaxSize:()=>tq,$ZodCheckMimeType:()=>hq,$ZodCheckMinLength:()=>aq,$ZodCheckMinSize:()=>nq,$ZodCheckMultipleOf:()=>QK,$ZodCheckNumberFormat:()=>$K,$ZodCheckOverwrite:()=>gq,$ZodCheckProperty:()=>mq,$ZodCheckRegex:()=>cq,$ZodCheckSizeEquals:()=>rq,$ZodCheckStartsWith:()=>fq,$ZodCheckStringFormat:()=>sq,$ZodCheckUpperCase:()=>uq,$ZodCodec:()=>SY,$ZodCreditCard:()=>NJ,$ZodCustom:()=>kY,$ZodCustomStringFormat:()=>FJ,$ZodCyclicError:()=>LY,$ZodDate:()=>JJ,$ZodDefault:()=>hY,$ZodDiscriminatedUnion:()=>nY,$ZodE164:()=>jJ,$ZodEmail:()=>lJ,$ZodEmoji:()=>fJ,$ZodEncodeError:()=>RW,$ZodEnum:()=>cY,$ZodError:()=>ZW,$ZodExactOptional:()=>pY,$ZodFile:()=>uY,$ZodFunction:()=>EY,$ZodGUID:()=>sJ,$ZodIPv4:()=>CJ,$ZodIPv6:()=>TJ,$ZodISODate:()=>bJ,$ZodISODateTime:()=>yJ,$ZodISODuration:()=>SJ,$ZodISOTime:()=>xJ,$ZodIntersection:()=>rY,$ZodJWT:()=>PJ,$ZodKSUID:()=>vJ,$ZodLazy:()=>OY,$ZodLiteral:()=>lY,$ZodMAC:()=>EJ,$ZodMap:()=>oY,$ZodNaN:()=>bY,$ZodNanoID:()=>pJ,$ZodNever:()=>KJ,$ZodNonOptional:()=>_Y,$ZodNull:()=>UJ,$ZodNullable:()=>mY,$ZodNumber:()=>IJ,$ZodNumberFormat:()=>LJ,$ZodObject:()=>QJ,$ZodObjectJIT:()=>$J,$ZodOptional:()=>fY,$ZodPipe:()=>xY,$ZodPrefault:()=>gY,$ZodPreprocess:()=>CY,$ZodPromise:()=>DY,$ZodReadonly:()=>wY,$ZodRealError:()=>QW,$ZodRecord:()=>aY,$ZodRegistry:()=>T$,$ZodSet:()=>sY,$ZodString:()=>aJ,$ZodStringFormat:()=>oJ,$ZodSuccess:()=>vY,$ZodSymbol:()=>VJ,$ZodTemplateLiteral:()=>TY,$ZodTransform:()=>dY,$ZodTuple:()=>iY,$ZodType:()=>rJ,$ZodULID:()=>gJ,$ZodURL:()=>dJ,$ZodUUID:()=>cJ,$ZodUndefined:()=>HJ,$ZodUnion:()=>eY,$ZodUnknown:()=>GJ,$ZodVoid:()=>qJ,$ZodXID:()=>_J,$ZodXor:()=>tY,$brand:()=>IW,$constructor:()=>Y,$input:()=>w$,$output:()=>C$,Doc:()=>vq,INVALID:()=>U1,JSONSchema:()=>b3,JSONSchemaGenerator:()=>v3,NEVER:()=>NW,TimePrecision:()=>i4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,_any:()=>H0,_array:()=>T2,_base64:()=>_0,_base64url:()=>v0,_bigint:()=>F0,_boolean:()=>N0,_catch:()=>W2,_check:()=>$2,_cidrv4:()=>h0,_cidrv6:()=>g0,_coercedBigint:()=>I0,_coercedBoolean:()=>P0,_coercedDate:()=>q0,_coercedNumber:()=>D0,_coercedString:()=>Z1,_creditCard:()=>b0,_cuid:()=>s0,_cuid2:()=>c0,_custom:()=>X2,_date:()=>K0,_decode:()=>hG,_decodeAsync:()=>yG,_default:()=>V2,_discriminatedUnion:()=>O2,_e164:()=>y0,_email:()=>Q1,_emoji:()=>a0,_encode:()=>pG,_encodeAsync:()=>_G,_endsWith:()=>h2,_enum:()=>P2,_file:()=>L2,_float32:()=>k0,_float64:()=>A0,_gt:()=>Z0,_gte:()=>Q0,_guid:()=>$1,_includes:()=>p2,_int:()=>O0,_int32:()=>j0,_int64:()=>L0,_intersection:()=>k2,_ipv4:()=>f0,_ipv6:()=>p0,_isoDate:()=>C0,_isoDateTime:()=>S0,_isoDuration:()=>T0,_isoTime:()=>w0,_jwt:()=>x0,_ksuid:()=>d0,_lazy:()=>J2,_length:()=>l2,_literal:()=>I2,_lowercase:()=>d2,_lt:()=>Y0,_lte:()=>X0,_mac:()=>m0,_map:()=>M2,_max:()=>X0,_maxLength:()=>s2,_maxSize:()=>i2,_mime:()=>v2,_min:()=>Q0,_minLength:()=>c2,_minSize:()=>a2,_multipleOf:()=>r2,_nan:()=>J0,_nanoid:()=>o0,_nativeEnum:()=>F2,_negative:()=>e2,_never:()=>W0,_nonnegative:()=>n2,_nonoptional:()=>H2,_nonpositive:()=>t2,_normalize:()=>b2,_null:()=>V0,_nullable:()=>B2,_number:()=>E0,_optional:()=>z2,_overwrite:()=>y2,_parse:()=>tG,_parseAsync:()=>rG,_pipe:()=>G2,_positive:()=>$0,_promise:()=>Y2,_properties:()=>_2,_property:()=>g2,_readonly:()=>K2,_record:()=>j2,_refine:()=>Z2,_regex:()=>u2,_safeDecode:()=>CG,_safeDecodeAsync:()=>DG,_safeEncode:()=>xG,_safeEncodeAsync:()=>TG,_safeParse:()=>aG,_safeParseAsync:()=>sG,_set:()=>N2,_size:()=>o2,_slugify:()=>w2,_startsWith:()=>m2,_string:()=>X1,_stringFormat:()=>r4,_stringbool:()=>n4,_success:()=>U2,_superRefine:()=>Q2,_symbol:()=>z0,_templateLiteral:()=>q2,_toLowerCase:()=>S2,_toUpperCase:()=>C2,_transform:()=>R2,_trim:()=>x2,_tuple:()=>A2,_uint32:()=>M0,_uint64:()=>R0,_ulid:()=>l0,_undefined:()=>B0,_union:()=>E2,_unknown:()=>U0,_uppercase:()=>f2,_url:()=>i0,_uuid:()=>e0,_uuidv4:()=>t0,_uuidv6:()=>n0,_uuidv7:()=>r0,_void:()=>G0,_xid:()=>u0,_xor:()=>D2,clone:()=>HU,compile:()=>k$,compileFn:()=>j$,config:()=>jW,createStandardJSONSchemaMethod:()=>x4,createToJSONSchemaMethod:()=>b4,decode:()=>gG,decodeAsync:()=>bG,describe:()=>e4,encode:()=>mG,encodeAsync:()=>vG,extractDefs:()=>d4,finalize:()=>g4,flattenError:()=>VW,formatError:()=>HW,getDiscriminatedOption:()=>Bq,globalConfig:()=>zW,globalRegistry:()=>E$,handleUnrepresentable:()=>c4,initializeContext:()=>s4,isBackEdge:()=>IY,isRecursiveSchema:()=>NY,isValidBase64:()=>kq,isValidBase64URL:()=>Aq,isValidCIDRv6:()=>Oq,isValidCreditCard:()=>Mq,isValidIPv6:()=>Dq,isValidJWT:()=>Nq,locales:()=>y$,memoizer:()=>FY,mergeValues:()=>Vq,meta:()=>t4,parse:()=>nG,parseAsync:()=>iG,parseURLObject:()=>Cq,prettifyError:()=>GW,process:()=>l4,regexes:()=>AG,registry:()=>x$,safeDecode:()=>wG,safeDecodeAsync:()=>OG,safeEncode:()=>SG,safeEncodeAsync:()=>EG,safeParse:()=>oG,safeParseAsync:()=>cG,standardProps:()=>Sq,stripTabAndNewline:()=>wq,toDotPath:()=>WW,toJSONSchema:()=>D4,toZod:()=>EU,treeifyError:()=>UW,urlHostnameOk:()=>Tq,urlProtocolOk:()=>Eq,util:()=>TU,validate:()=>dG,validateAsync:()=>fG,version:()=>bq}),C3=o((()=>{BW(),kG(),$W(),AY(),WY(),_q(),xq(),J(),WK(),b$(),D$(),yq(),Y1(),a4(),S4(),_3(),y3(),x3()}));function w3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===T3)return new OY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,T3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?HU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:HU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?HU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:HU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:HU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?HU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:HU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:HU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:HU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:HU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return HU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var T3,E3=o((()=>{AY(),J(),T3=Symbol(`z.visit/resolving`)}));kG();function D3(e){return!!e._zod}function O3(e,t){return D3(e)?oG(e,t):e.safeParse(t)}function k3(e){if(!e)return;let t;if(t=D3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function A3(e){if(D3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var j3=c({endsWith:()=>h2,gt:()=>Z0,gte:()=>Q0,includes:()=>p2,length:()=>l2,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,maxLength:()=>s2,maxSize:()=>i2,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,negative:()=>e2,nonnegative:()=>n2,nonpositive:()=>t2,normalize:()=>b2,overwrite:()=>y2,positive:()=>$0,properties:()=>_2,property:()=>g2,regex:()=>u2,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,toLowerCase:()=>S2,toUpperCase:()=>C2,trim:()=>x2,uppercase:()=>f2}),M3=o((()=>{C3()}));function N3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var P3,F3,I3,L3,R3=o((()=>{C3(),J(),P3=new WeakSet([Object.prototype,Error.prototype]),F3=(e,t)=>{ZW.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);P3.has(n)||(P3.add(n),N3(n,`format`,e=>t=>HW(e,t)),N3(n,`flatten`,e=>t=>VW(e,t)),N3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,OU,2)}),N3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,OU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},I3=Y(`ZodError`,F3),L3=Y(`ZodError`,F3,void 0,{Parent:Error})})),z3,B3,V3,H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3=o((()=>{C3(),R3(),z3=tG(L3),B3=rG(L3),V3=aG(L3),H3=sG(L3),U3=pG(L3),W3=hG(L3),G3=_G(L3),K3=yG(L3),q3=xG(L3),J3=CG(L3),Y3=TG(L3),X3=DG(L3)})),Q3=c({ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,codec:()=>C8,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,float32:()=>M6,float64:()=>N6,function:()=>k8,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,literal:()=>Q,looseObject:()=>Z6,looseRecord:()=>a8,mac:()=>_6,map:()=>o8,meta:()=>a7,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,never:()=>G6,nonoptional:()=>v8,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,partialRecord:()=>i8,pipe:()=>S8,prefault:()=>_8,preprocess:()=>I8,promise:()=>O8,readonly:()=>T8,record:()=>r8,refine:()=>M8,set:()=>s8,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,transform:()=>d8,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,url:()=>s6,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,void:()=>K6,xid:()=>m6,xor:()=>$6});function $3(){zW.localeError||jW(TX())}function e6(){zW.memoizer||jW({memoizer:FY()})}function X(e){return X1(z8,e)}function t6(e){return Q1(G8,e)}function n6(e){return $1(K8,e)}function r6(e){return e0(q8,e)}function i6(e){return t0(q8,e)}function a6(e){return n0(q8,e)}function o6(e){return r0(q8,e)}function s6(e){return i0(J8,e)}function c6(e){return i0(J8,{protocol:mK,hostname:pK,...q(e)})}function l6(e){return a0(Y8,e)}function u6(e){return o0(X8,e)}function d6(e){return s0(Z8,e)}function f6(e){return c0(Q8,e)}function p6(e){return l0($8,e)}function m6(e){return u0(e5,e)}function h6(e){return d0(t5,e)}function g6(e){return f0(n5,e)}function _6(e){return m0(r5,e)}function v6(e){return p0(i5,e)}function y6(e){return h0(a5,e)}function b6(e){return g0(o5,e)}function x6(e){return _0(s5,e)}function S6(e){return v0(c5,e)}function C6(e){return y0(l5,e)}function w6(e){return b0(u5,e)}function T6(e){return x0(d5,e)}function E6(e,t,n={}){return r4(f5,e,t,n)}function D6(e){return r4(f5,`hostname`,fK,e)}function O6(e){return r4(f5,`hex`,OK,e)}function k6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=AG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return r4(f5,n,r,t)}function A6(e){return E0(p5,e)}function j6(e){return O0(m5,e)}function M6(e){return k0(m5,e)}function N6(e){return A0(m5,e)}function P6(e){return j0(m5,e)}function F6(e){return M0(m5,e)}function I6(e){return N0(h5,e)}function L6(e){return F0(g5,e)}function R6(e){return L0(_5,e)}function z6(e){return R0(_5,e)}function B6(e){return z0(v5,e)}function V6(e){return B0(y5,e)}function H6(e){return V0(b5,e)}function U6(){return H0(x5)}function W6(){return U0(S5)}function G6(e){return W0(C5,e)}function K6(e){return G0(w5,e)}function q6(e){return K0(T5,e)}function J6(e,t){return T2(E5,e,t)}function Y6(e){let t=e._zod.def.shape;return c8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new D5(n)}function X6(e,t){return new D5({type:`object`,shape:e,catchall:G6(),...q(t)})}function Z6(e,t){return new D5({type:`object`,shape:e,catchall:W6(),...q(t)})}function Q6(e,t){return new O5({type:`union`,options:e,...q(t)})}function $6(e,t){return new k5({type:`union`,options:e,inclusive:!1,...q(t)})}function e8(e,t,n){return new A5({type:`union`,options:t,discriminator:e,...q(n)})}function t8(e,t){return new j5({type:`intersection`,left:e,right:t})}function n8(e,t,n){let r=t instanceof rJ;return new M5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function r8(e,t,n){return!t||!t._zod?new N5({type:`record`,keyType:X(),valueType:e,...q(t)}):new N5({type:`record`,keyType:e,valueType:t,...q(n)})}function i8(e,t,n){return new N5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function a8(e,t,n){return new N5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function o8(e,t,n){return new P5({type:`map`,keyType:e,valueType:t,...q(n)})}function s8(e,t){return new F5({type:`set`,valueType:e,...q(t)})}function c8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new I5({type:`enum`,entries:n,...q(t)})}function l8(e,t){return new I5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new L5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function u8(e){return L2(R5,e)}function d8(e){return new z5({type:`transform`,transform:e})}function f8(e){return new B5({type:`optional`,innerType:e})}function p8(e){return new V5({type:`optional`,innerType:e})}function m8(e){return new H5({type:`nullable`,innerType:e})}function h8(e){return f8(m8(e))}function g8(e,t){return new U5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():BU(t)}})}function _8(e,t){return new W5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():BU(t)}})}function v8(e,t){return new G5({type:`nonoptional`,innerType:e,...q(t)})}function y8(e){return new K5({type:`success`,innerType:e})}function b8(e,t){return new q5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:gW(t)})}function x8(e){return J0(J5,e)}function S8(e,t){return new Y5({type:`pipe`,in:e,out:t})}function C8(e,t,n){return new X5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function w8(e){let t=e._zod.def;return new X5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function T8(e){return new Q5({type:`readonly`,innerType:e})}function E8(e,t){return new $5({type:`template_literal`,parts:e,...q(t)})}function D8(e){return new e7({type:`lazy`,getter:e})}function O8(e){return new t7({type:`promise`,innerType:e})}function k8(e){return new n7({type:`function`,input:Array.isArray(e?.input)?n8(e?.input):e?.input??J6(W6()),output:e?.output??W6()})}function A8(e){let t=new KK({check:`custom`});return t._zod.check=e,t}function j8(e,t){return X2(r7,e??(()=>!0),t)}function M8(e,t={}){return Z2(r7,e,t)}function N8(e,t){return Q2(e,t)}function P8(e,t={}){let n=new r7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function F8(e){let t=D8(()=>Q6([X(e),A6(),I6(),H6(),J6(t),r8(X(),t)]));return t}function I8(e,t){return new Z5({type:`pipe`,in:d8(e),out:t})}var L8,R8,z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7=o((()=>{C3(),_3(),S4(),DX(),M3(),Z3(),L8=Y(`ZodType`,(e,t)=>($3(),rJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(FU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return HU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(M8(e,t))},superRefine(e,t){return this.check(N8(e,t))},overwrite(e){return this.check(y2(e))},optional(){return f8(this)},exactOptional(){return p8(this)},nullable(){return m8(this)},nullish(){return f8(m8(this))},nonoptional(e){return v8(this,e)},array(){return J6(this)},or(e){return Q6([this,e])},and(e){return t8(this,e)},transform(e){return S8(this,d8(e))},default(e){return g8(this,e)},prefault(e){return _8(this,e)},catch(e){return b8(this,e)},pipe(e){return S8(this,e)},readonly(){return T8(this)},describe(e){let t=this.clone();return E$.add(t,{description:e}),t},meta(...e){if(e.length===0)return E$.get(this);let t=this.clone();return E$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return pW(this,`~standard`,{...Sq(this),jsonSchema:{input:x4(this,`input`),output:x4(this,`output`)}})},set"~standard"(e){fW(this,`~standard`,e)},parse:function e(t,n){return z3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await B3(this,t,n,{callee:e})},safeParse(e,t){return V3(this,e,t)},async safeParseAsync(e,t){return H3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){fW(this,`spa`,e)},encode:function e(t,n){return U3(this,t,n,{callee:e})},decode:function e(t,n){return W3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await G3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await K3(this,t,n,{callee:e})},safeEncode(e,t){return q3(this,e,t)},safeDecode(e,t){return J3(this,e,t)},async safeEncodeAsync(e,t){return Y3(this,e,t)},async safeDecodeAsync(e,t){return X3(this,e,t)},toJSONSchema(e){return b4(this,{})(e)},get description(){return E$.get(this)?.description},get _def(){return this._zod.def}}),R8=Y(`_ZodString`,(e,t)=>{aJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>k4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(u2(...e))},includes(...e){return this.check(p2(...e))},startsWith(...e){return this.check(m2(...e))},endsWith(...e){return this.check(h2(...e))},min(...e){return this.check(c2(...e))},max(...e){return this.check(s2(...e))},length(...e){return this.check(l2(...e))},nonempty(...e){return this.check(c2(1,...e))},lowercase(e){return this.check(d2(e))},uppercase(e){return this.check(f2(e))},trim(){return this.check(x2())},normalize(...e){return this.check(b2(...e))},toLowerCase(){return this.check(S2())},toUpperCase(){return this.check(C2())},slugify(){return this.check(w2())}}),z8=Y(`ZodString`,(e,t)=>{aJ.init(e,t),R8.init(e,t)},{email(e){return this.check(Q1(G8,e))},url(e){return this.check(i0(J8,e))},jwt(e){return this.check(x0(d5,e))},emoji(e){return this.check(a0(Y8,e))},guid(e){return this.check($1(K8,e))},uuid(e){return this.check(e0(q8,e))},uuidv4(e){return this.check(t0(q8,e))},uuidv6(e){return this.check(n0(q8,e))},uuidv7(e){return this.check(r0(q8,e))},nanoid(e){return this.check(o0(X8,e))},cuid(e){return this.check(s0(Z8,e))},cuid2(e){return this.check(c0(Q8,e))},ulid(e){return this.check(l0($8,e))},base64(e){return this.check(_0(s5,e))},base64url(e){return this.check(v0(c5,e))},xid(e){return this.check(u0(e5,e))},ksuid(e){return this.check(d0(t5,e))},ipv4(e){return this.check(f0(n5,e))},ipv6(e){return this.check(p0(i5,e))},cidrv4(e){return this.check(h0(a5,e))},cidrv6(e){return this.check(g0(o5,e))},e164(e){return this.check(y0(l5,e))},datetime(e){return this.check(S0(V8,e))},date(e){return this.check(C0(H8,e))},time(e){return this.check(w0(U8,e))},duration(e){return this.check(T0(W8,e))}}),B8=Y(`ZodStringFormat`,(e,t)=>{oJ.init(e,t),R8.init(e,t)}),V8=Y(`ZodISODateTime`,(e,t)=>{yJ.init(e,t),B8.init(e,t)}),H8=Y(`ZodISODate`,(e,t)=>{bJ.init(e,t),B8.init(e,t)}),U8=Y(`ZodISOTime`,(e,t)=>{xJ.init(e,t),B8.init(e,t)}),W8=Y(`ZodISODuration`,(e,t)=>{SJ.init(e,t),B8.init(e,t)}),G8=Y(`ZodEmail`,(e,t)=>{lJ.init(e,t),B8.init(e,t)}),K8=Y(`ZodGUID`,(e,t)=>{sJ.init(e,t),B8.init(e,t)}),q8=Y(`ZodUUID`,(e,t)=>{cJ.init(e,t),B8.init(e,t)}),J8=Y(`ZodURL`,(e,t)=>{dJ.init(e,t),B8.init(e,t)}),Y8=Y(`ZodEmoji`,(e,t)=>{fJ.init(e,t),B8.init(e,t)}),X8=Y(`ZodNanoID`,(e,t)=>{pJ.init(e,t),B8.init(e,t)}),Z8=Y(`ZodCUID`,(e,t)=>{mJ.init(e,t),B8.init(e,t)}),Q8=Y(`ZodCUID2`,(e,t)=>{hJ.init(e,t),B8.init(e,t)}),$8=Y(`ZodULID`,(e,t)=>{gJ.init(e,t),B8.init(e,t)}),e5=Y(`ZodXID`,(e,t)=>{_J.init(e,t),B8.init(e,t)}),t5=Y(`ZodKSUID`,(e,t)=>{vJ.init(e,t),B8.init(e,t)}),n5=Y(`ZodIPv4`,(e,t)=>{CJ.init(e,t),B8.init(e,t)}),r5=Y(`ZodMAC`,(e,t)=>{EJ.init(e,t),B8.init(e,t)}),i5=Y(`ZodIPv6`,(e,t)=>{TJ.init(e,t),B8.init(e,t)}),a5=Y(`ZodCIDRv4`,(e,t)=>{DJ.init(e,t),B8.init(e,t)}),o5=Y(`ZodCIDRv6`,(e,t)=>{OJ.init(e,t),B8.init(e,t)}),s5=Y(`ZodBase64`,(e,t)=>{kJ.init(e,t),B8.init(e,t)}),c5=Y(`ZodBase64URL`,(e,t)=>{AJ.init(e,t),B8.init(e,t)}),l5=Y(`ZodE164`,(e,t)=>{jJ.init(e,t),B8.init(e,t)}),u5=Y(`ZodCreditCard`,(e,t)=>{NJ.init(e,t),B8.init(e,t)}),d5=Y(`ZodJWT`,(e,t)=>{PJ.init(e,t),B8.init(e,t)}),f5=Y(`ZodCustomStringFormat`,(e,t)=>{FJ.init(e,t),B8.init(e,t)}),p5=Y(`ZodNumber`,(e,t)=>{IJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>A4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(Z0(e,t))},gte(e,t){return this.check(Q0(e,t))},min(e,t){return this.check(Q0(e,t))},lt(e,t){return this.check(Y0(e,t))},lte(e,t){return this.check(X0(e,t))},max(e,t){return this.check(X0(e,t))},int(e){return this.check(j6(e))},safe(e){return this.check(j6(e))},positive(e){return this.check(Z0(0,e))},nonnegative(e){return this.check(Q0(0,e))},negative(e){return this.check(Y0(0,e))},nonpositive(e){return this.check(X0(0,e))},multipleOf(e,t){return this.check(r2(e,t))},step(e,t){return this.check(r2(e,t))},finite(){return this}}),m5=Y(`ZodNumberFormat`,(e,t)=>{LJ.init(e,t),p5.init(e,t)}),h5=Y(`ZodBoolean`,(e,t)=>{RJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>j4(e,t,n,r)}),g5=Y(`ZodBigInt`,(e,t)=>{zJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>M4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(Q0(e,t))},min(e,t){return this.check(Q0(e,t))},gt(e,t){return this.check(Z0(e,t))},lt(e,t){return this.check(Y0(e,t))},lte(e,t){return this.check(X0(e,t))},max(e,t){return this.check(X0(e,t))},positive(e){return this.check(Z0(BigInt(0),e))},negative(e){return this.check(Y0(BigInt(0),e))},nonpositive(e){return this.check(X0(BigInt(0),e))},nonnegative(e){return this.check(Q0(BigInt(0),e))},multipleOf(e,t){return this.check(r2(e,t))}}),_5=Y(`ZodBigIntFormat`,(e,t)=>{BJ.init(e,t),g5.init(e,t)}),v5=Y(`ZodSymbol`,(e,t)=>{VJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>N4(e,t,n,r)}),y5=Y(`ZodUndefined`,(e,t)=>{HJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>F4(e,t,n,r)}),b5=Y(`ZodNull`,(e,t)=>{UJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>P4(e,t,n,r)}),x5=Y(`ZodAny`,(e,t)=>{WJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r)}),S5=Y(`ZodUnknown`,(e,t)=>{GJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r)}),C5=Y(`ZodNever`,(e,t)=>{KJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>L4(e,t,n,r)}),w5=Y(`ZodVoid`,(e,t)=>{qJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>I4(e,t,n,r)}),T5=Y(`ZodDate`,(e,t)=>{JJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r),e.min=(t,n)=>e.check(Q0(t,n)),e.max=(t,n)=>e.check(X0(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),E5=Y(`ZodArray`,(e,t)=>{e6(),YJ.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.element=t.element},{min(e,t){return this.check(c2(e,t))},nonempty(e){return this.check(c2(1,e))},max(e,t){return this.check(s2(e,t))},length(e,t){return this.check(l2(e,t))},unwrap(){return this.element}}),D5=Y(`ZodObject`,(e,t)=>{e6(),$J.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r),hW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return c8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:W6()})},loose(){return this.clone({...this._zod.def,catchall:W6()})},strict(){return this.clone({...this._zod.def,catchall:G6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return qU(this,e)},safeExtend(e){return JU(this,e)},merge(e){return YU(this,e)},pick(e){return GU(this,e)},omit(e){return KU(this,e)},partial(...e){return XU(B5,this,e[0])},exactPartial(...e){return XU(V5,this,e[0],`exactPartial`)},required(...e){return ZU(G5,this,e[0])}}),O5=Y(`ZodUnion`,(e,t)=>{eY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.options=t.options}),k5=Y(`ZodXor`,(e,t)=>{O5.init(e,t),tY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.options=t.options}),A5=Y(`ZodDiscriminatedUnion`,(e,t)=>{O5.init(e,t),nY.init(e,t)}),j5=Y(`ZodIntersection`,(e,t)=>{rY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r)}),M5=Y(`ZodTuple`,(e,t)=>{e6(),iY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new B5({type:`optional`,innerType:e}))})}}),N5=Y(`ZodRecord`,(e,t)=>{e6(),aY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),P5=Y(`ZodMap`,(e,t)=>{e6(),oY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(a2(...t)),e.nonempty=t=>e.check(a2(1,t)),e.max=(...t)=>e.check(i2(...t)),e.size=(...t)=>e.check(o2(...t))}),F5=Y(`ZodSet`,(e,t)=>{e6(),sY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.min=(...t)=>e.check(a2(...t)),e.nonempty=t=>e.check(a2(1,t)),e.max=(...t)=>e.check(i2(...t)),e.size=(...t)=>e.check(o2(...t))}),I5=Y(`ZodEnum`,(e,t)=>{cY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new I5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new I5({...t,checks:[],...q(r),entries:i})}}),L5=Y(`ZodLiteral`,(e,t)=>{lY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),R5=Y(`ZodFile`,(e,t)=>{uY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r),e.min=(t,n)=>e.check(a2(t,n)),e.max=(t,n)=>e.check(i2(t,n)),e.mime=(t,n)=>e.check(v2(Array.isArray(t)?t:[t],n))}),z5=Y(`ZodTransform`,(e,t)=>{e6(),dY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new RW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(cW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(cW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),B5=Y(`ZodOptional`,(e,t)=>{fY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),V5=Y(`ZodExactOptional`,(e,t)=>{pY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),H5=Y(`ZodNullable`,(e,t)=>{mY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodDefault`,(e,t)=>{hY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),W5=Y(`ZodPrefault`,(e,t)=>{gY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),G5=Y(`ZodNonOptional`,(e,t)=>{_Y.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),K5=Y(`ZodSuccess`,(e,t)=>{vY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodCatch`,(e,t)=>{yY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),J5=Y(`ZodNaN`,(e,t)=>{bY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r)}),Y5=Y(`ZodPipe`,(e,t)=>{xY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r),e.in=t.in,e.out=t.out}),X5=Y(`ZodCodec`,(e,t)=>{Y5.init(e,t),SY.init(e,t)}),Z5=Y(`ZodPreprocess`,(e,t)=>{Y5.init(e,t),CY.init(e,t)}),Q5=Y(`ZodReadonly`,(e,t)=>{wY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),$5=Y(`ZodTemplateLiteral`,(e,t)=>{TY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),e7=Y(`ZodLazy`,(e,t)=>{OY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),t7=Y(`ZodPromise`,(e,t)=>{DY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),n7=Y(`ZodFunction`,(e,t)=>{EY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),r7=Y(`ZodCustom`,(e,t)=>{kY.init(e,t),L8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r)}),i7=e4,a7=t4,o7=(...e)=>n4({Codec:X5,Boolean:h5,String:z8},...e)}));function c7(e){jW({customError:e})}function l7(){return jW().customError}var u7,d7,fie=o((()=>{C3(),u7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},d7||={}})),f7=c({ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,date:()=>pie,datetime:()=>p7,duration:()=>hie,time:()=>mie});function p7(e){return S0(V8,e)}function pie(e){return C0(H8,e)}function mie(e){return w0(U8,e)}function hie(e){return T0(W8,e)}var m7=o((()=>{C3(),s7()}));function gie(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function h7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function g7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():v7(e,t)}function _7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=v7(vie(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>_7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(x7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?v7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=v7(r,t);PU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=v7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!zU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=yie(r,v7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=h7(n.map(e=>v7(e,t)),a),s=Array.isArray(i)?void 0:g7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=h7(i.map(e=>v7(e,t)),n),o=g7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=v7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function v7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=_7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>v7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>v7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:v7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function y7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:gie(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??E$};return v7(n,r)}var $,b7,x7,bie=o((()=>{D$(),J(),M3(),m7(),s7(),$={...Q3,...j3,iso:f7},b7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),x7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function S7(e){return w3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:Q6(t.options)}})}var xie=o((()=>{E3(),s7()}));function Sie(e,t){if(!t?.length)return e;let n=e._zod.def;return HU(e,FU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function C7(e){return Sie(e.out,e.checks)}function Cie(e){return e.in._zod.traits.has(`$ZodTransform`)?C7(e):e.in}function w7(e){return w3(e,{pipe:e=>Cie(e._zod.def),default:(e,t)=>t?f8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function T7(e){return w3(e,{pipe:e=>C7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var wie=o((()=>{J(),E3(),s7()})),E7=c({bigint:()=>Oie,boolean:()=>Die,date:()=>kie,number:()=>Eie,string:()=>Tie});function Tie(e){return Z1(z8,e)}function Eie(e){return D0(p5,e)}function Die(e){return P0(h5,e)}function Oie(e){return I0(g5,e)}function kie(e){return q0(T5,e)}var Aie=o((()=>{C3(),s7()})),D7=c({$brand:()=>IW,$input:()=>w$,$output:()=>C$,NEVER:()=>NW,TimePrecision:()=>i4,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodError:()=>I3,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFirstPartyTypeKind:()=>d7,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodIssueCode:()=>u7,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRealError:()=>L3,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,clone:()=>HU,codec:()=>C8,coerce:()=>E7,compile:()=>k$,config:()=>jW,core:()=>S3,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,decode:()=>W3,decodeAsync:()=>K3,deepPartial:()=>S7,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,encode:()=>U3,encodeAsync:()=>G3,endsWith:()=>h2,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,flattenError:()=>VW,float32:()=>M6,float64:()=>N6,formatError:()=>HW,fromJSONSchema:()=>y7,function:()=>k8,getDiscriminatedOption:()=>Bq,getErrorMap:()=>l7,globalRegistry:()=>E$,gt:()=>Z0,gte:()=>Q0,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,includes:()=>p2,input:()=>w7,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,iso:()=>f7,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,length:()=>l2,literal:()=>Q,locales:()=>y$,looseObject:()=>Z6,looseRecord:()=>a8,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,mac:()=>_6,map:()=>o8,maxLength:()=>s2,maxSize:()=>i2,memoizer:()=>FY,meta:()=>a7,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,negative:()=>e2,never:()=>G6,nonnegative:()=>n2,nonoptional:()=>v8,nonpositive:()=>t2,normalize:()=>b2,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,output:()=>T7,overwrite:()=>y2,parse:()=>z3,parseAsync:()=>B3,partialRecord:()=>i8,pipe:()=>S8,positive:()=>$0,prefault:()=>_8,preprocess:()=>I8,prettifyError:()=>GW,promise:()=>O8,properties:()=>_2,property:()=>g2,readonly:()=>T8,record:()=>r8,refine:()=>M8,regex:()=>u2,regexes:()=>AG,registry:()=>x$,safeDecode:()=>J3,safeDecodeAsync:()=>X3,safeEncode:()=>q3,safeEncodeAsync:()=>Y3,safeParse:()=>V3,safeParseAsync:()=>H3,set:()=>s8,setErrorMap:()=>c7,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,toJSONSchema:()=>D4,toLowerCase:()=>S2,toUpperCase:()=>C2,toZod:()=>EU,transform:()=>d8,treeifyError:()=>UW,trim:()=>x2,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,uppercase:()=>f2,url:()=>s6,util:()=>TU,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,validate:()=>dG,validateAsync:()=>fG,void:()=>K6,xid:()=>m6,xor:()=>$6}),O7=o((()=>{C3(),s7(),M3(),R3(),Z3(),fie(),_3(),bie(),xie(),wie(),b$(),m7(),Aie()})),jie=o((()=>{O7(),O7()})),Mie=c({$brand:()=>IW,$input:()=>w$,$output:()=>C$,NEVER:()=>NW,TimePrecision:()=>i4,ZodAny:()=>x5,ZodArray:()=>E5,ZodBase64:()=>s5,ZodBase64URL:()=>c5,ZodBigInt:()=>g5,ZodBigIntFormat:()=>_5,ZodBoolean:()=>h5,ZodCIDRv4:()=>a5,ZodCIDRv6:()=>o5,ZodCUID:()=>Z8,ZodCUID2:()=>Q8,ZodCatch:()=>q5,ZodCodec:()=>X5,ZodCompileAsyncError:()=>G1,ZodCompileUnsupportedError:()=>K1,ZodCreditCard:()=>u5,ZodCustom:()=>r7,ZodCustomStringFormat:()=>f5,ZodDate:()=>T5,ZodDefault:()=>U5,ZodDiscriminatedUnion:()=>A5,ZodE164:()=>l5,ZodEmail:()=>G8,ZodEmoji:()=>Y8,ZodEnum:()=>I5,ZodError:()=>I3,ZodExactOptional:()=>V5,ZodFile:()=>R5,ZodFirstPartyTypeKind:()=>d7,ZodFunction:()=>n7,ZodGUID:()=>K8,ZodIPv4:()=>n5,ZodIPv6:()=>i5,ZodISODate:()=>H8,ZodISODateTime:()=>V8,ZodISODuration:()=>W8,ZodISOTime:()=>U8,ZodIntersection:()=>j5,ZodIssueCode:()=>u7,ZodJWT:()=>d5,ZodKSUID:()=>t5,ZodLazy:()=>e7,ZodLiteral:()=>L5,ZodMAC:()=>r5,ZodMap:()=>P5,ZodNaN:()=>J5,ZodNanoID:()=>X8,ZodNever:()=>C5,ZodNonOptional:()=>G5,ZodNull:()=>b5,ZodNullable:()=>H5,ZodNumber:()=>p5,ZodNumberFormat:()=>m5,ZodObject:()=>D5,ZodOptional:()=>B5,ZodPipe:()=>Y5,ZodPrefault:()=>W5,ZodPreprocess:()=>Z5,ZodPromise:()=>t7,ZodReadonly:()=>Q5,ZodRealError:()=>L3,ZodRecord:()=>N5,ZodSet:()=>F5,ZodString:()=>z8,ZodStringFormat:()=>B8,ZodSuccess:()=>K5,ZodSymbol:()=>v5,ZodTemplateLiteral:()=>$5,ZodTransform:()=>z5,ZodTuple:()=>M5,ZodType:()=>L8,ZodULID:()=>$8,ZodURL:()=>J8,ZodUUID:()=>q8,ZodUndefined:()=>y5,ZodUnion:()=>O5,ZodUnknown:()=>S5,ZodVoid:()=>w5,ZodXID:()=>e5,ZodXor:()=>k5,_ZodString:()=>R8,_default:()=>g8,_function:()=>k8,any:()=>U6,array:()=>J6,base64:()=>x6,base64url:()=>S6,bigint:()=>L6,boolean:()=>I6,catch:()=>b8,check:()=>A8,cidrv4:()=>y6,cidrv6:()=>b6,clone:()=>HU,codec:()=>C8,coerce:()=>E7,compile:()=>k$,config:()=>jW,core:()=>S3,creditCard:()=>w6,cuid:()=>d6,cuid2:()=>f6,custom:()=>j8,date:()=>q6,decode:()=>W3,decodeAsync:()=>K3,deepPartial:()=>S7,default:()=>D7,describe:()=>i7,discriminatedUnion:()=>e8,e164:()=>C6,email:()=>t6,emoji:()=>l6,encode:()=>U3,encodeAsync:()=>G3,endsWith:()=>h2,enum:()=>c8,exactOptional:()=>p8,file:()=>u8,flattenError:()=>VW,float32:()=>M6,float64:()=>N6,formatError:()=>HW,fromJSONSchema:()=>y7,function:()=>k8,getDiscriminatedOption:()=>Bq,getErrorMap:()=>l7,globalRegistry:()=>E$,gt:()=>Z0,gte:()=>Q0,guid:()=>n6,hash:()=>k6,hex:()=>O6,hostname:()=>D6,httpUrl:()=>c6,includes:()=>p2,input:()=>w7,instanceof:()=>P8,int:()=>j6,int32:()=>P6,int64:()=>R6,intersection:()=>t8,invertCodec:()=>w8,ipv4:()=>g6,ipv6:()=>v6,iso:()=>f7,json:()=>F8,jwt:()=>T6,keyof:()=>Y6,ksuid:()=>h6,lazy:()=>D8,length:()=>l2,literal:()=>Q,locales:()=>y$,looseObject:()=>Z6,looseRecord:()=>a8,lowercase:()=>d2,lt:()=>Y0,lte:()=>X0,mac:()=>_6,map:()=>o8,maxLength:()=>s2,maxSize:()=>i2,memoizer:()=>FY,meta:()=>a7,mime:()=>v2,minLength:()=>c2,minSize:()=>a2,multipleOf:()=>r2,nan:()=>x8,nanoid:()=>u6,nativeEnum:()=>l8,negative:()=>e2,never:()=>G6,nonnegative:()=>n2,nonoptional:()=>v8,nonpositive:()=>t2,normalize:()=>b2,null:()=>H6,nullable:()=>m8,nullish:()=>h8,number:()=>A6,object:()=>Z,optional:()=>f8,output:()=>T7,overwrite:()=>y2,parse:()=>z3,parseAsync:()=>B3,partialRecord:()=>i8,pipe:()=>S8,positive:()=>$0,prefault:()=>_8,preprocess:()=>I8,prettifyError:()=>GW,promise:()=>O8,properties:()=>_2,property:()=>g2,readonly:()=>T8,record:()=>r8,refine:()=>M8,regex:()=>u2,regexes:()=>AG,registry:()=>x$,safeDecode:()=>J3,safeDecodeAsync:()=>X3,safeEncode:()=>q3,safeEncodeAsync:()=>Y3,safeParse:()=>V3,safeParseAsync:()=>H3,set:()=>s8,setErrorMap:()=>c7,size:()=>o2,slugify:()=>w2,startsWith:()=>m2,strictObject:()=>X6,string:()=>X,stringFormat:()=>E6,stringbool:()=>o7,success:()=>y8,superRefine:()=>N8,symbol:()=>B6,templateLiteral:()=>E8,toJSONSchema:()=>D4,toLowerCase:()=>S2,toUpperCase:()=>C2,toZod:()=>EU,transform:()=>d8,treeifyError:()=>UW,trim:()=>x2,tuple:()=>n8,uint32:()=>F6,uint64:()=>z6,ulid:()=>p6,undefined:()=>V6,union:()=>Q6,unknown:()=>W6,uppercase:()=>f2,url:()=>s6,util:()=>TU,uuid:()=>r6,uuidv4:()=>i6,uuidv6:()=>a6,uuidv7:()=>o6,validate:()=>dG,validateAsync:()=>fG,void:()=>K6,xid:()=>m6,xor:()=>$6,z:()=>D7}),k7=o((()=>{O7(),jie()}));k7();var A7=`io.modelcontextprotocol/related-task`,j7=j8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),M7=Q6([X(),A6().int()]),N7=X();Z6({ttl:A6().optional(),pollInterval:A6().optional()});var Nie=Z({ttl:A6().optional()}),Pie=Z({taskId:X()}),P7=Z6({progressToken:M7.optional(),[A7]:Pie.optional()}),F7=Z({_meta:P7.optional()}),I7=F7.extend({task:Nie.optional()}),Fie=e=>I7.safeParse(e).success,L7=Z({method:X(),params:F7.loose().optional()}),R7=Z({_meta:P7.optional()}),z7=Z({method:X(),params:R7.loose().optional()}),B7=Z6({_meta:P7.optional()}),V7=Q6([X(),A6().int()]),H7=Z({jsonrpc:Q(`2.0`),id:V7,...L7.shape}).strict(),U7=e=>H7.safeParse(e).success,W7=Z({jsonrpc:Q(`2.0`),...z7.shape}).strict(),Iie=e=>W7.safeParse(e).success,G7=Z({jsonrpc:Q(`2.0`),id:V7,result:B7}).strict(),K7=e=>G7.safeParse(e).success,q7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(q7||={});var J7=Z({jsonrpc:Q(`2.0`),id:V7.optional(),error:Z({code:A6().int(),message:X(),data:W6().optional()})}).strict(),Lie=e=>J7.safeParse(e).success,Rie=Q6([H7,W7,G7,J7]);Q6([G7,J7]);var Y7=B7.strict(),zie=R7.extend({requestId:V7.optional(),reason:X().optional()}),X7=z7.extend({method:Q(`notifications/cancelled`),params:zie}),Z7=Z({icons:J6(Z({src:X(),mimeType:X().optional(),sizes:J6(X()).optional(),theme:c8([`light`,`dark`]).optional()})).optional()}),Q7=Z({name:X(),title:X().optional()}),$7=Q7.extend({...Q7.shape,...Z7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),Bie=I8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,t8(Z({form:t8(Z({applyDefaults:I6().optional()}),r8(X(),W6())).optional(),url:j7.optional()}),r8(X(),W6()).optional())),Vie=Z6({list:j7.optional(),cancel:j7.optional(),requests:Z6({sampling:Z6({createMessage:j7.optional()}).optional(),elicitation:Z6({create:j7.optional()}).optional()}).optional()}),Hie=Z6({list:j7.optional(),cancel:j7.optional(),requests:Z6({tools:Z6({call:j7.optional()}).optional()}).optional()}),Uie=Z({experimental:r8(X(),j7).optional(),sampling:Z({context:j7.optional(),tools:j7.optional()}).optional(),elicitation:Bie.optional(),roots:Z({listChanged:I6().optional()}).optional(),tasks:Vie.optional(),extensions:r8(X(),j7).optional()}),Wie=F7.extend({protocolVersion:X(),capabilities:Uie,clientInfo:$7}),Gie=L7.extend({method:Q(`initialize`),params:Wie}),Kie=Z({experimental:r8(X(),j7).optional(),logging:j7.optional(),completions:j7.optional(),prompts:Z({listChanged:I6().optional()}).optional(),resources:Z({subscribe:I6().optional(),listChanged:I6().optional()}).optional(),tools:Z({listChanged:I6().optional()}).optional(),tasks:Hie.optional(),extensions:r8(X(),j7).optional()}),qie=B7.extend({protocolVersion:X(),capabilities:Kie,serverInfo:$7,instructions:X().optional()}),Jie=z7.extend({method:Q(`notifications/initialized`),params:R7.optional()}),e9=L7.extend({method:Q(`ping`),params:F7.optional()}),Yie=Z({progress:A6(),total:f8(A6()),message:f8(X())}),Xie=Z({...R7.shape,...Yie.shape,progressToken:M7}),t9=z7.extend({method:Q(`notifications/progress`),params:Xie}),Zie=F7.extend({cursor:N7.optional()}),n9=L7.extend({params:Zie.optional()}),r9=B7.extend({nextCursor:N7.optional()}),Qie=c8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),i9=Z({taskId:X(),status:Qie,ttl:Q6([A6(),H6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:f8(A6()),statusMessage:f8(X())}),a9=B7.extend({task:i9}),$ie=R7.merge(i9),o9=z7.extend({method:Q(`notifications/tasks/status`),params:$ie}),s9=L7.extend({method:Q(`tasks/get`),params:F7.extend({taskId:X()})}),c9=B7.merge(i9),l9=L7.extend({method:Q(`tasks/result`),params:F7.extend({taskId:X()})});B7.loose();var u9=n9.extend({method:Q(`tasks/list`)}),d9=r9.extend({tasks:J6(i9)}),f9=L7.extend({method:Q(`tasks/cancel`),params:F7.extend({taskId:X()})}),eae=B7.merge(i9),p9=Z({uri:X(),mimeType:f8(X()),_meta:r8(X(),W6()).optional()}),m9=p9.extend({text:X()}),h9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),g9=p9.extend({blob:h9}),_9=c8([`user`,`assistant`]),v9=Z({audience:J6(_9).optional(),priority:A6().min(0).max(1).optional(),lastModified:p7({offset:!0}).optional()}),y9=Z({...Q7.shape,...Z7.shape,uri:X(),description:f8(X()),mimeType:f8(X()),size:f8(A6()),annotations:v9.optional(),_meta:f8(Z6({}))}),tae=Z({...Q7.shape,...Z7.shape,uriTemplate:X(),description:f8(X()),mimeType:f8(X()),annotations:v9.optional(),_meta:f8(Z6({}))}),nae=n9.extend({method:Q(`resources/list`)}),b9=r9.extend({resources:J6(y9)}),rae=n9.extend({method:Q(`resources/templates/list`)}),iae=r9.extend({resourceTemplates:J6(tae)}),x9=F7.extend({uri:X()}),aae=x9,oae=L7.extend({method:Q(`resources/read`),params:aae}),S9=B7.extend({contents:J6(Q6([m9,g9]))}),sae=z7.extend({method:Q(`notifications/resources/list_changed`),params:R7.optional()}),cae=x9,lae=L7.extend({method:Q(`resources/subscribe`),params:cae}),uae=x9,dae=L7.extend({method:Q(`resources/unsubscribe`),params:uae}),fae=R7.extend({uri:X()}),pae=z7.extend({method:Q(`notifications/resources/updated`),params:fae}),mae=Z({name:X(),description:f8(X()),required:f8(I6())}),hae=Z({...Q7.shape,...Z7.shape,description:f8(X()),arguments:f8(J6(mae)),_meta:f8(Z6({}))}),gae=n9.extend({method:Q(`prompts/list`)}),_ae=r9.extend({prompts:J6(hae)}),vae=F7.extend({name:X(),arguments:r8(X(),X()).optional()}),yae=L7.extend({method:Q(`prompts/get`),params:vae}),C9=Z({type:Q(`text`),text:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),w9=Z({type:Q(`image`),data:h9,mimeType:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),T9=Z({type:Q(`audio`),data:h9,mimeType:X(),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),bae=Z({type:Q(`tool_use`),name:X(),id:X(),input:r8(X(),W6()),_meta:r8(X(),W6()).optional()}),E9=Z({type:Q(`resource`),resource:Q6([m9,g9]),annotations:v9.optional(),_meta:r8(X(),W6()).optional()}),D9=y9.extend({type:Q(`resource_link`)}),O9=Q6([C9,w9,T9,D9,E9]),xae=Z({role:_9,content:O9}),Sae=B7.extend({description:X().optional(),messages:J6(xae)}),Cae=z7.extend({method:Q(`notifications/prompts/list_changed`),params:R7.optional()}),wae=Z({title:X().optional(),readOnlyHint:I6().optional(),destructiveHint:I6().optional(),idempotentHint:I6().optional(),openWorldHint:I6().optional()}),Tae=Z({taskSupport:c8([`required`,`optional`,`forbidden`]).optional()}),k9=Z({...Q7.shape,...Z7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:r8(X(),j7).optional(),required:J6(X()).optional()}).catchall(W6()),outputSchema:Z({type:Q(`object`),properties:r8(X(),j7).optional(),required:J6(X()).optional()}).catchall(W6()).optional(),annotations:wae.optional(),execution:Tae.optional(),_meta:r8(X(),W6()).optional()}),A9=n9.extend({method:Q(`tools/list`)}),Eae=r9.extend({tools:J6(k9)}),j9=B7.extend({content:J6(O9).default([]),structuredContent:r8(X(),W6()).optional(),isError:I6().optional()});j9.or(B7.extend({toolResult:W6()}));var Dae=I7.extend({name:X(),arguments:r8(X(),W6()).optional()}),M9=L7.extend({method:Q(`tools/call`),params:Dae}),Oae=z7.extend({method:Q(`notifications/tools/list_changed`),params:R7.optional()});Z({autoRefresh:I6().default(!0),debounceMs:A6().int().nonnegative().default(300)});var N9=c8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),kae=F7.extend({level:N9}),Aae=L7.extend({method:Q(`logging/setLevel`),params:kae}),jae=R7.extend({level:N9,logger:X().optional(),data:W6()}),Mae=z7.extend({method:Q(`notifications/message`),params:jae}),Nae=Z({hints:J6(Z({name:X().optional()})).optional(),costPriority:A6().min(0).max(1).optional(),speedPriority:A6().min(0).max(1).optional(),intelligencePriority:A6().min(0).max(1).optional()}),Pae=Z({mode:c8([`auto`,`required`,`none`]).optional()}),Fae=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:J6(O9).default([]),structuredContent:Z({}).loose().optional(),isError:I6().optional(),_meta:r8(X(),W6()).optional()}),Iae=e8(`type`,[C9,w9,T9]),P9=e8(`type`,[C9,w9,T9,bae,Fae]),Lae=Z({role:_9,content:Q6([P9,J6(P9)]),_meta:r8(X(),W6()).optional()}),Rae=I7.extend({messages:J6(Lae),modelPreferences:Nae.optional(),systemPrompt:X().optional(),includeContext:c8([`none`,`thisServer`,`allServers`]).optional(),temperature:A6().optional(),maxTokens:A6().int(),stopSequences:J6(X()).optional(),metadata:j7.optional(),tools:J6(k9).optional(),toolChoice:Pae.optional()}),zae=L7.extend({method:Q(`sampling/createMessage`),params:Rae}),F9=B7.extend({model:X(),stopReason:f8(c8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:_9,content:Iae}),I9=B7.extend({model:X(),stopReason:f8(c8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:_9,content:Q6([P9,J6(P9)])}),Bae=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:I6().optional()}),Vae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:A6().optional(),maxLength:A6().optional(),format:c8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),Hae=Z({type:c8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:A6().optional(),maximum:A6().optional(),default:A6().optional()}),Uae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:J6(X()),default:X().optional()}),Wae=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:J6(Z({const:X(),title:X()})),default:X().optional()}),Gae=Q6([Q6([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:J6(X()),enumNames:J6(X()).optional(),default:X().optional()}),Q6([Uae,Wae]),Q6([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:A6().optional(),maxItems:A6().optional(),items:Z({type:Q(`string`),enum:J6(X())}),default:J6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:A6().optional(),maxItems:A6().optional(),items:Z({anyOf:J6(Z({const:X(),title:X()}))}),default:J6(X()).optional()})])]),Bae,Vae,Hae]),Kae=Q6([I7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:r8(X(),Gae),required:J6(X()).optional()})}),I7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),qae=L7.extend({method:Q(`elicitation/create`),params:Kae}),Jae=R7.extend({elicitationId:X()}),Yae=z7.extend({method:Q(`notifications/elicitation/complete`),params:Jae}),Xae=B7.extend({action:c8([`accept`,`decline`,`cancel`]),content:I8(e=>e===null?void 0:e,r8(X(),Q6([X(),A6(),I6(),J6(X())])).optional())}),Zae=Z({type:Q(`ref/resource`),uri:X()}),Qae=Z({type:Q(`ref/prompt`),name:X()}),$ae=F7.extend({ref:Q6([Qae,Zae]),argument:Z({name:X(),value:X()}),context:Z({arguments:r8(X(),X()).optional()}).optional()}),eoe=L7.extend({method:Q(`completion/complete`),params:$ae}),toe=B7.extend({completion:Z6({values:J6(X()).max(100),total:f8(A6().int()),hasMore:f8(I6())})}),noe=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:r8(X(),W6()).optional()}),roe=L7.extend({method:Q(`roots/list`),params:F7.optional()}),ioe=B7.extend({roots:J6(noe)}),aoe=z7.extend({method:Q(`notifications/roots/list_changed`),params:R7.optional()});Q6([e9,Gie,eoe,Aae,yae,gae,nae,rae,oae,lae,dae,M9,A9,s9,l9,u9,f9]),Q6([X7,t9,Jie,aoe,o9]),Q6([Y7,F9,I9,Xae,ioe,c9,d9,a9]),Q6([e9,zae,qae,roe,s9,l9,u9,f9]),Q6([X7,t9,Mae,pae,sae,Oae,Cae,o9,Yae]),Q6([Y7,qie,toe,Sae,_ae,b9,iae,S9,j9,Eae,c9,d9,a9]);var L9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===q7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new ooe(e.elicitations,n)}return new e(t,n,r)}},ooe=class extends L9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(q7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function R9(e){return e===`completed`||e===`failed`||e===`cancelled`}function z9(e){let t=k3(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=A3(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function B9(e,t){let n=O3(e,t);if(!n.success)throw n.error;return n.data}var soe=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(X7,e=>{this._oncancel(e)}),this.setNotificationHandler(t9,e=>{this._onprogress(e)}),this.setRequestHandler(e9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(s9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new L9(q7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(l9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new L9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new L9(q7.InvalidParams,`Task not found: ${r}`);if(!R9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(R9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[A7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(u9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new L9(q7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(f9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new L9(q7.InvalidParams,`Task not found: ${e.params.taskId}`);if(R9(n.status))throw new L9(q7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new L9(q7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof L9?e:new L9(q7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),L9.fromError(q7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),K7(e)||Lie(e)?this._onresponse(e):U7(e)?this._onrequest(e,t):Iie(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=L9.fromError(q7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[A7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:q7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=Fie(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new L9(q7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:q7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),K7(e)?n(e):n(new L9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(K7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),K7(e)?r(e):r(L9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof L9?e:new L9(q7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,a9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new L9(q7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},R9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new L9(q7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new L9(q7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof L9?e:new L9(q7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[A7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof L9?e:new L9(q7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=O3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(L9.fromError(q7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},c9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},d9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},eae,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[A7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[A7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[A7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=z9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=B9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=z9(e);this._notificationHandlers.set(n,n=>{let r=B9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&U7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new L9(q7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new L9(q7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new L9(q7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new L9(q7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=o9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),R9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new L9(q7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(R9(a.status))throw new L9(q7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=o9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),R9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function V9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function coe(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=V9(a)&&V9(i)?{...a,...i}:i}return n}var loe=`modulepreload`,uoe=function(e,t){return new URL(e,t).href},H9={},doe=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=uoe(t,n),t=s(t),t in H9)return;H9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:loe,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};k7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var foe=class extends soe{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},poe=`2026-01-26`,U9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Rie.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},moe=Q6([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),W9=Q6([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),hoe=r8(Q6([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -94,10 +94,10 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var poe=Z({isError:I6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),moe=Z({isError:I6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),hoe=Z({isError:I6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var K9=Z({connectDomains:J6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var goe=Z({isError:I6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),_oe=Z({isError:I6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),voe=Z({isError:I6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var G9=Z({connectDomains:J6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive -- Empty or omitted → no network connections (secure default)`),resourceDomains:J6(X()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:J6(X()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:J6(X()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),q9=Z({camera:Z({}).optional().describe(`Request camera access. +- Empty or omitted → no network connections (secure default)`),resourceDomains:J6(X()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:J6(X()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:J6(X()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),K9=Z({camera:Z({}).optional().describe(`Request camera access. Maps to Permission Policy \`camera\` feature.`),microphone:Z({}).optional().describe(`Request microphone access. @@ -105,7 +105,7 @@ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Z({}).optional().describe(`Request clipboard write access. -Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:A6().optional().describe(`New width in pixels.`),height:A6().optional().describe(`New height in pixels.`)})});var goe=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:r8(X(),W6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),_oe=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:r8(X(),W6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),voe=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),yoe=Z({fonts:X().optional()}),boe=Z({variables:foe.optional().describe(`CSS variables for theming the app.`),css:yoe.optional().describe(`CSS blocks that apps can inject.`)}),xoe=Z({method:Q(`ui/resource-teardown`),params:Z({})});r8(X(),W6());var J9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var Soe=Z({experimental:r8(X(),r8(X(),U6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:I6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:I6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:q9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:K9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:J9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:J9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Coe=Z({experimental:r8(X(),r8(X(),U6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:I6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:J6(G9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:K9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:q9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. +Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:A6().optional().describe(`New width in pixels.`),height:A6().optional().describe(`New height in pixels.`)})});var yoe=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:r8(X(),W6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),boe=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:r8(X(),W6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),xoe=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Soe=Z({fonts:X().optional()}),Coe=Z({variables:hoe.optional().describe(`CSS variables for theming the app.`),css:Soe.optional().describe(`CSS blocks that apps can inject.`)}),woe=Z({method:Q(`ui/resource-teardown`),params:Z({})});r8(X(),W6());var q9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var Toe=Z({experimental:r8(X(),r8(X(),U6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:I6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:I6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:K9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:G9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:q9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:q9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Eoe=Z({experimental:r8(X(),r8(X(),U6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:I6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:J6(W9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:G9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:K9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. @@ -119,10 +119,10 @@ - \`true\`: request visible border + background - \`false\`: request no visible border + background -- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:G9.describe(`The display mode being requested.`)})});var woe=Z({mode:G9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Toe=Q6([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:J6(Toe).optional().describe(`Who can access this tool. Default: ["model", "app"] +- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:W9.describe(`The display mode being requested.`)})});var J9=Z({mode:W9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),Doe=Q6([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:J6(Doe).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:G6().optional(),permissions:G6().optional()}),Z({mimeTypes:J6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:J6(Q6([D9,O9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:J6(k9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:K9.optional().describe(`CSP configuration from resource metadata.`),permissions:q9.optional().describe(`Sandbox permissions from resource metadata.`)})});var Eoe=Z({method:Q(`ui/notifications/tool-result`),params:M9.describe(`Standard MCP tool execution result.`)}),Y9=Z({toolInfo:Z({id:V7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:A9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:doe.optional().describe(`Current color theme preference.`),styles:boe.optional().describe(`Style configuration for theming the app.`),displayMode:G9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:J6(G9).optional().describe(`Display modes the host supports.`),containerDimensions:Q6([Z({height:A6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:Q6([A6(),V6()]).optional().describe(`Maximum container height in pixels.`)})]).and(Q6([Z({width:A6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:Q6([A6(),V6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:Q6([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:I6().optional().describe(`Whether the device supports touch input.`),hover:I6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:A6().describe(`Top safe area inset in pixels.`),right:A6().describe(`Right safe area inset in pixels.`),bottom:A6().describe(`Bottom safe area inset in pixels.`),left:A6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),Doe=Z({method:Q(`ui/notifications/host-context-changed`),params:Y9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:J6(k9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:r8(X(),W6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:$7.describe(`App identification (name and version).`),appCapabilities:Coe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var Ooe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:$7.describe(`Host application identification and version.`),hostCapabilities:Soe.describe(`Features and capabilities provided by the host.`),hostContext:Y9.describe(`Rich context about the host environment.`)}).passthrough(),koe={target:`draft-2020-12`};async function X9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](koe);if(n.vendor===`zod`){let{z:n}=await coe(async()=>{let{z:e}=await Promise.resolve().then(()=>(k7(),Aie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var Aoe=class e extends loe{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:goe,toolinputpartial:_oe,toolresult:Eoe,toolcancelled:voe,hostcontextchanged:Doe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||jW({jitless:!0}),this.setRequestHandler(e9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=aoe(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(xoe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(N9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(j9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},M9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},S9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},b9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?L9:I9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},hoe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Y7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},poe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},moe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},woe,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new W9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:uoe}},Ooe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function joe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new W9(window.parent,window.parent);if(s=new Aoe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function Moe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=joe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function Noe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}NE([ib,fO]);function Poe(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=Moe(`Fanout service performance`),[o,s]=(0,W.useState)(`activity`),c=r?.theme===`dark`;return(0,G.jsxs)(OR,{dark:c,children:[(0,G.jsx)(kR,{title:i?.data.service||`System performance`,summary:i?`Traffic, latency, and errors ${i.data.service?`for ${i.data.service}`:`across all services`}`:void 0,onRefresh:()=>t(`service_performance`),disabled:!e}),(0,G.jsx)(AR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading performance signals…`:void 0,retry:()=>void t(`service_performance`)}),i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(jR,{active:o,onChange:s,items:[{id:`activity`,label:`Activity`},{id:`latency`,label:`Latency map`},{id:`endpoints`,label:`Endpoints`,count:i.data.endpoints.length},{id:`compare`,label:`Compare`}]}),o===`activity`&&(0,G.jsx)(Foe,{data:i.data,dark:c,window:i.provenance.window}),o===`latency`&&(0,G.jsx)(Roe,{data:i.data,dark:c,window:i.provenance.window}),o===`endpoints`&&(0,G.jsx)(zoe,{endpoints:i.data.endpoints,onEndpoint:t=>Noe(e,`Investigate ${t.method} ${t.path}. Explain its latency and errors.`)}),o===`compare`&&(0,G.jsx)(Boe,{data:i.data}),(0,G.jsx)(NR,{left:zre(i.provenance.window),right:`Updated ${new Date(i.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`})]})]})}function Foe({data:e,dark:t,window:n}){if(e.points.length===0)return(0,G.jsx)(MR,{tall:!0,icon:(0,G.jsx)(eR,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Trends will appear as activity is recorded.`});let{totals:r}=e,i=e.points.map(e=>e.time);return(0,G.jsxs)(iL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(tL,{cols:{base:1,xs:3},spacing:`sm`,children:[(0,G.jsx)(PR,{label:`Operations`,value:xU.format(r.spans)}),(0,G.jsx)(PR,{label:`P95 latency`,value:CU(r.p95_ms),color:r.p95_ms>=750?`warn`:`ok`}),(0,G.jsx)(PR,{label:`Error rate`,value:SU(r.error_rate),color:r.error_rate>=.01?`bad`:`ok`})]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Traffic and logs`,window:n,series:[{name:`Operations`,data:e.points.map(e=>e.spans),color:BR(`operations`,t)},{name:`Logs`,data:e.points.map(e=>e.log_count),color:BR(`logs`,t)}]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Latency and error correlation`,window:n,series:[{name:`P95 latency`,data:e.points.map(e=>e.p95_ms),color:zR(t).warn,axis:`duration`},{name:`Error rate`,data:e.points.map(e=>e.error_rate),color:zR(t).bad,axis:`percent`}]})]})}var Ioe={count:e=>xU.format(e),duration:CU,percent:SU},Loe={count:e=>xU.format(e),duration:CU,percent:e=>`${(e*100).toFixed(e>=.1?0:2)}%`};function Q9({labels:e,title:t,series:n,dark:r,window:i}){let a=(0,W.useMemo)(()=>{let t=RR(r),a=[...new Set(n.map(e=>e.axis??`count`))],o=e=>n.find(t=>t.name===e)?.axis??`count`;return{color:n.map(e=>e.color),grid:{left:46,right:a.length>1?54:18,top:42,bottom:30},legend:{top:5,left:0,textStyle:{color:t.muted,fontSize:pR.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:t.surface,borderColor:t.border,textStyle:{color:t.text,fontSize:pR.micro},formatter:e=>[e[0]?.axisValueLabel,...e.map(e=>`${e.marker}${e.seriesName}: ${Ioe[o(e.seriesName)](e.value)}`)].join(`
`)},xAxis:{type:`category`,data:e.map(e=>wU(e,i)),boundaryGap:!1,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:pR.micro,hideOverlap:!0}},yAxis:a.map((e,r)=>({type:`value`,position:r===0?`left`:`right`,min:0,...e===`percent`&&!n.some(e=>e.axis===`percent`&&e.data.some(e=>e>0))?{max:.01}:{},splitLine:r===0?{lineStyle:{color:t.grid}}:{show:!1},axisLabel:{color:t.muted,fontSize:pR.micro,formatter:t=>Loe[e](t)}})),series:n.map(e=>({name:e.name,type:`line`,yAxisIndex:a.indexOf(e.axis??`count`),data:e.data,smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.045}}))}},[r,e,n,i]);return(0,G.jsxs)(sF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(cI,{fw:650,size:`sm`,mb:`xs`,children:t}),(0,G.jsx)(bU,{option:a,height:210,label:t})]})}function Roe({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>({services:[...new Set(e.heatmap.map(e=>e.service))],times:[...new Set(e.heatmap.map(e=>e.time))],values:new Map(e.heatmap.map(e=>[`${e.service}\u0000${e.time}`,e.p95_ms])),max:Math.max(...e.heatmap.map(e=>e.p95_ms),1)}),[e.heatmap]);if(r.services.length===0)return(0,G.jsx)(MR,{tall:!0,icon:(0,G.jsx)(QL,{size:20,weight:`duotone`}),title:`No latency samples yet`,children:`The heatmap will compare service latency across time buckets.`});let i=RR(t),a={grid:{left:105,right:20,top:20,bottom:78},tooltip:{position:`top`,backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:pR.micro},formatter:e=>`${r.services[e.data[1]]}
${CU(e.data[2])}`},xAxis:{type:`category`,data:r.times.map(e=>wU(e,n)),splitArea:{show:!0},axisLabel:{color:i.muted,fontSize:pR.micro,hideOverlap:!0},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:r.services,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:pR.micro},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r.max,calculable:!0,orient:`horizontal`,left:`center`,bottom:0,itemWidth:12,itemHeight:90,text:[`slower`,`faster`],textGap:8,formatter:e=>CU(e),textStyle:{color:i.muted,fontSize:pR.micro},inRange:{color:[i.grid,zR(t).warn,zR(t).bad]}},series:[{type:`heatmap`,data:r.services.flatMap((e,t)=>r.times.map((n,i)=>[i,t,r.values.get(`${e}\u0000${n}`)??0]))}]};return(0,G.jsx)(sF,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},mb:`md`,p:`xs`,children:(0,G.jsx)(bU,{option:a,height:Math.max(280,r.services.length*32+110),label:`Service P95 latency heatmap`})})}function zoe({endpoints:e,onEndpoint:t}){let n=FR(e,8);return e.length===0?(0,G.jsx)(MR,{tall:!0,icon:(0,G.jsx)(JL,{size:20,weight:`duotone`}),title:`No endpoints detected`,children:`HTTP routes and span operations will appear here as traffic arrives.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(vL.ScrollContainer,{minWidth:700,children:(0,G.jsxs)(vL,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(vL.Thead,{children:(0,G.jsxs)(vL.Tr,{children:[(0,G.jsx)(vL.Th,{children:`Endpoint`}),(0,G.jsx)(vL.Th,{ta:`right`,children:`Calls`}),(0,G.jsx)(vL.Th,{ta:`right`,children:`P50`}),(0,G.jsx)(vL.Th,{ta:`right`,children:`P95`}),(0,G.jsx)(vL.Th,{ta:`right`,children:`P99`}),(0,G.jsx)(vL.Th,{ta:`right`,children:`Errors`})]})}),(0,G.jsx)(vL.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(vL.Tr,{tabIndex:0,onClick:()=>t(e),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e)},style:{cursor:`pointer`},children:[(0,G.jsxs)(vL.Td,{children:[(0,G.jsx)(dI,{variant:`light`,mr:`xs`,children:e.method}),(0,G.jsx)(cI,{component:`span`,ff:`monospace`,size:`sm`,children:e.path})]}),(0,G.jsx)(vL.Td,{ta:`right`,children:xU.format(e.calls)}),(0,G.jsx)(vL.Td,{ta:`right`,children:CU(e.p50_ms)}),(0,G.jsx)(vL.Td,{ta:`right`,children:CU(e.p95_ms)}),(0,G.jsx)(vL.Td,{ta:`right`,children:CU(e.p99_ms)}),(0,G.jsx)(vL.Td,{ta:`right`,children:(0,G.jsx)(cI,{c:LR(e.health),children:SU(e.error_rate)})})]},`${e.method}-${e.path}`))})]})}),(0,G.jsx)(IR,{...n,onChange:n.setPage})]})}function Boe({data:e}){return e.comparison.length===0?(0,G.jsx)(MR,{tall:!0,icon:(0,G.jsx)(XL,{size:20,weight:`duotone`}),title:`Nothing to compare yet`,children:`Fanout compares the first and second half of the selected window.`}):(0,G.jsx)(vL.ScrollContainer,{minWidth:620,children:(0,G.jsxs)(vL,{striped:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(vL.Thead,{children:(0,G.jsxs)(vL.Tr,{children:[(0,G.jsx)(vL.Th,{children:`Signal`}),(0,G.jsx)(vL.Th,{children:`Earlier`}),(0,G.jsx)(vL.Th,{children:`Change`}),(0,G.jsx)(vL.Th,{children:`Recent`})]})}),(0,G.jsx)(vL.Tbody,{children:e.comparison.map(e=>(0,G.jsxs)(vL.Tr,{children:[(0,G.jsxs)(vL.Td,{children:[(0,G.jsx)(cI,{fw:650,children:e.label}),(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,children:e.unit})]}),(0,G.jsx)(vL.Td,{children:$9(e.before,e.unit)}),(0,G.jsxs)(vL.Td,{children:[(0,G.jsxs)(dI,{color:e.direction===`improvement`?`ok`:e.direction===`regression`?`bad`:`gray`,variant:`light`,children:[e.change_pct>0?`↑`:e.change_pct<0?`↓`:`→`,` `,Math.abs(e.change_pct).toFixed(1),`%`]}),e.significant&&(0,G.jsx)(cI,{c:`dimmed`,size:`xs`,mt:3,children:`notable`})]}),(0,G.jsx)(vL.Td,{children:$9(e.after,e.unit)})]},e.label))})]})})}function $9(e,t){return t===`ms`?CU(e):t===`%`?`${e.toFixed(2)}%`:xU.format(e)}(0,iR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Poe,{})})); +- "app": Tool callable by the app from this server only`),csp:G6().optional(),permissions:G6().optional()}),Z({mimeTypes:J6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:J6(Q6([E9,D9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:J6(O9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:G9.optional().describe(`CSP configuration from resource metadata.`),permissions:K9.optional().describe(`Sandbox permissions from resource metadata.`)})});var Ooe=Z({method:Q(`ui/notifications/tool-result`),params:j9.describe(`Standard MCP tool execution result.`)}),Y9=Z({toolInfo:Z({id:V7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:k9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:moe.optional().describe(`Current color theme preference.`),styles:Coe.optional().describe(`Style configuration for theming the app.`),displayMode:W9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:J6(W9).optional().describe(`Display modes the host supports.`),containerDimensions:Q6([Z({height:A6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:Q6([A6(),V6()]).optional().describe(`Maximum container height in pixels.`)})]).and(Q6([Z({width:A6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:Q6([A6(),V6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:Q6([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:I6().optional().describe(`Whether the device supports touch input.`),hover:I6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:A6().describe(`Top safe area inset in pixels.`),right:A6().describe(`Right safe area inset in pixels.`),bottom:A6().describe(`Bottom safe area inset in pixels.`),left:A6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),koe=Z({method:Q(`ui/notifications/host-context-changed`),params:Y9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:J6(O9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:r8(X(),W6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:$7.describe(`App identification (name and version).`),appCapabilities:Eoe.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var Aoe=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:$7.describe(`Host application identification and version.`),hostCapabilities:Toe.describe(`Features and capabilities provided by the host.`),hostContext:Y9.describe(`Rich context about the host environment.`)}).passthrough(),joe={target:`draft-2020-12`};async function X9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](joe);if(n.vendor===`zod`){let{z:n}=await doe(async()=>{let{z:e}=await Promise.resolve().then(()=>(k7(),Mie));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var Moe=class e extends foe{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:yoe,toolinputpartial:boe,toolresult:Ooe,toolcancelled:xoe,hostcontextchanged:koe};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||jW({jitless:!0}),this.setRequestHandler(e9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=coe(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(woe,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(M9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(A9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},j9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},S9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},b9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?I9:F9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},voe,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Y7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},goe,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},_oe,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},J9,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new U9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:poe}},Aoe,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function Noe({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new U9(window.parent,window.parent);if(s=new Moe(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function Poe(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=Noe({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function Foe(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}QE([fb,sO]);function Ioe(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=Poe(`Fanout service performance`),[o,s]=(0,W.useState)(`activity`),c=r?.theme===`dark`;return(0,G.jsxs)(GR,{dark:c,children:[(0,G.jsx)(KR,{title:i?.data.service||`System performance`,summary:i?`Traffic, latency, and errors ${i.data.service?`for ${i.data.service}`:`across all services`}`:void 0,onRefresh:()=>t(`service_performance`),disabled:!e}),(0,G.jsx)(qR,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading performance signals…`:void 0,retry:()=>void t(`service_performance`)}),i&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(JR,{active:o,onChange:s,items:[{id:`activity`,label:`Activity`},{id:`latency`,label:`Latency map`},{id:`endpoints`,label:`Endpoints`,count:i.data.endpoints.length},{id:`compare`,label:`Compare`}]}),o===`activity`&&(0,G.jsx)(Loe,{data:i.data,dark:c,window:i.provenance.window}),o===`latency`&&(0,G.jsx)(Boe,{data:i.data,dark:c,window:i.provenance.window}),o===`endpoints`&&(0,G.jsx)(Voe,{endpoints:i.data.endpoints,onEndpoint:t=>Foe(e,`Investigate ${t.method} ${t.path}. Explain its latency and errors.`)}),o===`compare`&&(0,G.jsx)(Hoe,{data:i.data}),(0,G.jsx)(XR,{left:Vre(i.provenance.window),right:`Updated ${new Date(i.provenance.generated_at).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})} ${wU(i.provenance.generated_at)}`})]})]})}function Loe({data:e,dark:t,window:n}){if(e.points.length===0)return(0,G.jsx)(YR,{tall:!0,icon:(0,G.jsx)(_R,{size:20,weight:`duotone`}),title:`No activity in this window`,children:`Trends will appear as activity is recorded.`});let{totals:r}=e,i=e.points.map(e=>e.time);return(0,G.jsxs)(hL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(dL,{cols:{base:1,xs:3},spacing:`sm`,children:[(0,G.jsx)(ZR,{label:`Operations`,value:bU.format(r.spans)}),(0,G.jsx)(ZR,{label:`P95 latency`,value:SU(r.p95_ms),color:r.p95_ms>=750?`warn`:`ok`}),(0,G.jsx)(ZR,{label:`Error rate`,value:xU(r.error_rate),color:r.error_rate>=.01?`bad`:`ok`})]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Traffic and logs`,window:n,series:[{name:`Operations`,data:e.points.map(e=>e.spans),color:iz(`operations`,t)},{name:`Logs`,data:e.points.map(e=>e.log_count),color:iz(`logs`,t)}]}),(0,G.jsx)(Q9,{dark:t,labels:i,title:`Latency and error correlation`,window:n,series:[{name:`P95 latency`,data:e.points.map(e=>e.p95_ms),color:rz(t).warn,axis:`duration`},{name:`Error rate`,data:e.points.map(e=>e.error_rate),color:rz(t).bad,axis:`percent`}]})]})}var Roe={count:e=>bU.format(e),duration:SU,percent:xU},zoe={count:e=>bU.format(e),duration:SU,percent:e=>`${(e*100).toFixed(e>=.1?0:2)}%`};function Q9({labels:e,title:t,series:n,dark:r,window:i}){let a=(0,W.useMemo)(()=>{let t=nz(r),a=[...new Set(n.map(e=>e.axis??`count`))],o=e=>n.find(t=>t.name===e)?.axis??`count`;return{color:n.map(e=>e.color),grid:{left:46,right:a.length>1?54:18,top:42,bottom:30},legend:{top:5,left:0,textStyle:{color:t.muted,fontSize:AR.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:t.surface,borderColor:t.border,textStyle:{color:t.text,fontSize:AR.micro},formatter:e=>[e[0]?.axisValueLabel,...e.map(e=>`${e.marker}${e.seriesName}: ${Roe[o(e.seriesName)](e.value)}`)].join(`
`)},xAxis:{type:`category`,data:e.map(e=>CU(e,i)),boundaryGap:!1,axisLine:{lineStyle:{color:t.border}},axisTick:{show:!1},axisLabel:{color:t.muted,fontSize:AR.micro,hideOverlap:!0}},yAxis:a.map((e,r)=>({type:`value`,position:r===0?`left`:`right`,min:0,...e===`percent`&&!n.some(e=>e.axis===`percent`&&e.data.some(e=>e>0))?{max:.01}:{},splitLine:r===0?{lineStyle:{color:t.grid}}:{show:!1},axisLabel:{color:t.muted,fontSize:AR.micro,formatter:t=>zoe[e](t)}})),series:n.map(e=>({name:e.name,type:`line`,yAxisIndex:a.indexOf(e.axis??`count`),data:e.data,smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.045}}))}},[r,e,n,i]);return(0,G.jsxs)(tF,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,G.jsx)(nI,{fw:650,size:`sm`,mb:`xs`,children:t}),(0,G.jsx)(yU,{option:a,height:210,label:t})]})}function Boe({data:e,dark:t,window:n}){let r=(0,W.useMemo)(()=>({services:[...new Set(e.heatmap.map(e=>e.service))],times:[...new Set(e.heatmap.map(e=>e.time))],values:new Map(e.heatmap.map(e=>[`${e.service}\u0000${e.time}`,e.p95_ms])),max:Math.max(...e.heatmap.map(e=>e.p95_ms),1)}),[e.heatmap]);if(r.services.length===0)return(0,G.jsx)(YR,{tall:!0,icon:(0,G.jsx)(hR,{size:20,weight:`duotone`}),title:`No latency samples yet`,children:`The heatmap will compare service latency across time buckets.`});let i=nz(t),a={grid:{left:105,right:20,top:20,bottom:78},tooltip:{position:`top`,backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:AR.micro},formatter:e=>`${r.services[e.data[1]]}
${SU(e.data[2])}`},xAxis:{type:`category`,data:r.times.map(e=>CU(e,n)),splitArea:{show:!0},axisLabel:{color:i.muted,fontSize:AR.micro,hideOverlap:!0},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:r.services,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:AR.micro},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r.max,calculable:!0,orient:`horizontal`,left:`center`,bottom:0,itemWidth:12,itemHeight:90,text:[`slower`,`faster`],textGap:8,formatter:e=>SU(e),textStyle:{color:i.muted,fontSize:AR.micro},inRange:{color:[i.grid,rz(t).warn,rz(t).bad]}},series:[{type:`heatmap`,data:r.services.flatMap((e,t)=>r.times.map((n,i)=>[i,t,r.values.get(`${e}\u0000${n}`)??0]))}]};return(0,G.jsx)(tF,{withBorder:!0,radius:`md`,mx:{base:`md`,sm:`lg`},mb:`md`,p:`xs`,children:(0,G.jsx)(yU,{option:a,height:Math.max(280,r.services.length*32+110),label:`Service P95 latency heatmap`})})}function Voe({endpoints:e,onEndpoint:t}){let n=QR(e,8);return e.length===0?(0,G.jsx)(YR,{tall:!0,icon:(0,G.jsx)(dR,{size:20,weight:`duotone`}),title:`No endpoints detected`,children:`HTTP routes and span operations will appear here as traffic arrives.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(PL.ScrollContainer,{minWidth:700,children:(0,G.jsxs)(PL,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(PL.Thead,{children:(0,G.jsxs)(PL.Tr,{children:[(0,G.jsx)(PL.Th,{children:`Endpoint`}),(0,G.jsx)(PL.Th,{ta:`right`,children:`Calls`}),(0,G.jsx)(PL.Th,{ta:`right`,children:`P50`}),(0,G.jsx)(PL.Th,{ta:`right`,children:`P95`}),(0,G.jsx)(PL.Th,{ta:`right`,children:`P99`}),(0,G.jsx)(PL.Th,{ta:`right`,children:`Errors`})]})}),(0,G.jsx)(PL.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(PL.Tr,{tabIndex:0,onClick:()=>t(e),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e)},style:{cursor:`pointer`},children:[(0,G.jsxs)(PL.Td,{children:[(0,G.jsx)(aI,{variant:`light`,mr:`xs`,children:e.method}),(0,G.jsx)(nI,{component:`span`,ff:`monospace`,size:`sm`,children:e.path})]}),(0,G.jsx)(PL.Td,{ta:`right`,children:bU.format(e.calls)}),(0,G.jsx)(PL.Td,{ta:`right`,children:SU(e.p50_ms)}),(0,G.jsx)(PL.Td,{ta:`right`,children:SU(e.p95_ms)}),(0,G.jsx)(PL.Td,{ta:`right`,children:SU(e.p99_ms)}),(0,G.jsx)(PL.Td,{ta:`right`,children:(0,G.jsx)(nI,{c:tz(e.health),children:xU(e.error_rate)})})]},`${e.method}-${e.path}`))})]})}),(0,G.jsx)(ez,{...n,onChange:n.setPage})]})}function Hoe({data:e}){return e.comparison.length===0?(0,G.jsx)(YR,{tall:!0,icon:(0,G.jsx)(pR,{size:20,weight:`duotone`}),title:`Nothing to compare yet`,children:`Fanout compares the first and second half of the selected window.`}):(0,G.jsx)(PL.ScrollContainer,{minWidth:620,children:(0,G.jsxs)(PL,{striped:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(PL.Thead,{children:(0,G.jsxs)(PL.Tr,{children:[(0,G.jsx)(PL.Th,{children:`Signal`}),(0,G.jsx)(PL.Th,{children:`Earlier`}),(0,G.jsx)(PL.Th,{children:`Change`}),(0,G.jsx)(PL.Th,{children:`Recent`})]})}),(0,G.jsx)(PL.Tbody,{children:e.comparison.map(e=>(0,G.jsxs)(PL.Tr,{children:[(0,G.jsxs)(PL.Td,{children:[(0,G.jsx)(nI,{fw:650,children:e.label}),(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,children:e.unit})]}),(0,G.jsx)(PL.Td,{children:$9(e.before,e.unit)}),(0,G.jsxs)(PL.Td,{children:[(0,G.jsxs)(aI,{color:e.direction===`improvement`?`ok`:e.direction===`regression`?`bad`:`gray`,variant:`light`,children:[e.change_pct>0?`↑`:e.change_pct<0?`↓`:`→`,` `,Math.abs(e.change_pct).toFixed(1),`%`]}),e.significant&&(0,G.jsx)(nI,{c:`dimmed`,size:`xs`,mt:3,children:`notable`})]}),(0,G.jsx)(PL.Td,{children:$9(e.after,e.unit)})]},e.label))})]})})}function $9(e,t){return t===`ms`?SU(e):t===`%`?`${e.toFixed(2)}%`:bU.format(e)}(0,xR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(Ioe,{})}));
diff --git a/internal/mcp/apps/topology.html b/internal/mcp/apps/topology.html index a2664c1af..f3f25e0bf 100644 --- a/internal/mcp/apps/topology.html +++ b/internal/mcp/apps/topology.html @@ -13,7 +13,7 @@ `,` -`];function b_(e,t){return t.type=e,t}function x_(e){return e.type===`section`}function S_(e){return x_(e)?w_:T_}function C_(e){if(x_(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=C_(e);n>=t&&(t=n+ +(r&&(!n||x_(e)&&!e.noHeader)))}),t}return 0}function w_(e,t,n,r){var i=t.noHeader,a=D_(C_(t)),o=[],s=t.blocks||[];ke(!s||z(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Ve(l,c)){var u=new tee(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=S_(n)(s?F(F({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):O_(r,o.join(``),i?n:a.html);if(i)return d;var f=hg(t.header,`ordinal`,e.useUTC),p=__(r,e.renderMode).nameStyle,m=g_(r);return e.renderMode===`richText`?j_(e,f,p)+a.richText+d:O_(r,`
`+_h(f)+`
`+d,n)}function T_(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=z(e)?e:[e],R(e,function(e,t){return hg(e,z(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||V.color.secondary,i),f=a?``:hg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=__(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:j_(e,f,v))+(o?``:M_(e,m,h,g,y)):O_(r,(s?``:d)+(a?``:k_(f,!s,v))+(o?``:A_(m,h,g,y)),n)}}function E_(e,t,n,r,i,a){if(e)return S_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function D_(e){return{html:v_[e],richText:y_[e]}}function O_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=g_(e);return`
`+t+r+`
`}function k_(e,t,n){var r=t?`margin-left:2px`:``;return``+_h(e)+``}function A_(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=z(e)?e:[e],``+R(e,function(e){return _h(e)}).join(`  `)+``}function j_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function M_(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(z(t)?t.join(` `):t,a)}function N_(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return bg(n)}function P_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var F_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=$s()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=yg({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};z(t)?L(t,function(e){return F(n,e)}):F(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function I_(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=z(s),l=N_(t,n),u,d,f,p;if(o>1||c&&!o){var m=L_(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=mm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Ec(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return b_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[b_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Ae(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function L_(e,t,n,r,i){var a=t.getData(),o=ce(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(mm(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(b_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var R_=Mc();function z_(e,t){return e.getName(t)||e.getId(t)}var B_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Yg({count:U_,reset:W_}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(R_(this).sourceManager=new l_(this)).prepareSource();var r=this.getInitialData(e,n);G_(r,this),this.dataTask.context.data=r,R_(this).dataBeforeProcessed=r,V_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{},i=this.subType;Lg.hasClass(i)&&(i+=`Series`),P(e,t.getTheme().get(this.subType)),P(e,this.getDefaultOption()),fc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Ng(e,r,n)},t.prototype.mergeOption=function(e,t){e=P(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Mg(this);n&&Ng(this.option,e,n);var r=R_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);G_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,R_(this).dataBeforeProcessed=i,V_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!be(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return I_({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ge.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Vg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[z_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){ve(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Lg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Lg);oe(B_,qg),oe(B_,Vg),tt(B_,Lg);function V_(e){var t=e.name;Ec(e)||(e.name=H_(e)||t)}function H_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function U_(e){return e.model.getRawData().count()}function W_(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Pee}function Pee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function G_(e,t){L(ze(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,me(Fee,t))})}function Fee(e,t){var n=K_(e);return n&&n.setOutputEnd((t||this).count()),t}function K_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Iee=Ro.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Lee={line:Od,rect:Qo,roundRect:Qo,square:Qo,circle:Qu,diamond:Ro.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Ro.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Ro.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Iee},Ree={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},q_={};L(Lee,function(e,t){q_[t]=new e});var zee=Ro.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=An(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=q_[r];i||=(r=`rect`,q_[r]),Ree[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Bee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||V.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function J_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?_f(e.slice(8),new an(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?gf(e.slice(7),{},new an(t,n,r,i),o?`center`:`cover`):new zee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Bee,a&&c.setColor(a),c}function Y_(e){return z(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function X_(e,t){if(e!=null)return z(e)||(e=[e,e]),[Ms(e[0],t[0])||0,Ms(Te(e[1],e[0]),t[1])||0]}function Vee(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=mm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),_u(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=sl(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&nf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();nf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Y_(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Xu);function Uee(e,t){this.parent.drift(e,t)}function Z_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Q_(e){return e!=null&&!ve(e)&&(e={isIgnore:e}),e||{}}function $_(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:ap(t),cursorStyle:t.get(`cursor`)}}function ev(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Wee=function(){function e(e){this.group=new Xu,this._SymbolCtor=e||Hee}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Q_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=$_(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Z_(e,i,r,t)&&ev(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Z_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):$d(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){gv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),gv(r,e,t,n)},freeze:function(){}};function gv(e,t,n,r){Yc(n,r)&&(e[t][0]=n,e[t][1]=r)}function _v(e){return vv(e)||bv(e)}function vv(e){return e.type===`interval`}function yv(e){return e.type===`time`}function bv(e){return e.type===`log`}function xv(e){return e.type===`ordinal`}function tte(e){var t=Js(e),n=Es(10,t),r=Cs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ls(r*n,-t)}function Sv(e){return zs(e)+2}function Cv(e,t){return Ds(e)/Ds(t)}function wv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Ov=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,dv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new cv({}),z(i)&&(i=new cv({categories:R(i,function(e){return ve(e)?e.value:e})})),r._ordinalMeta=i;var a=uv(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,fv(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=Cs(e),e},t.prototype.getTicks=function(){var e=[];return Dv(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=bs(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=bs(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Ls(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Ls(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Ls(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return kv(this,e,Ah(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=zs(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),fg(Ls(e.value,n,!0))},t.type=`interval`,t}(sv);sv.registerClass(Av);var rte=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ate(e){var t=30*Fh;return e/=t,e>6?6:e>3?3:e>2?2:1}function ote(e){return e/=Ph,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Pv(e,t){return e/=t?Nh:Mh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function ste(e){return xs(Ys(e,!0),1)}function cte(e,t,n){var r=Math.max(0,ie(Hh,t)-1);return Qh(new Date(e),Hh[r],n).getTime()}function lte(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function ute(e,t,n,r,i,a){var o=Uh,s=0;function c(e,t,n,i,o,c,l){for(var u=lte(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!Nv(qh(e),r[0],r[1],n)){s&&(i=[{value:cte(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=le(R(u,function(e){return le(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=Mv.length,l=Math.min(rte(Mv,a,0,c),c-1),u=Mv[l][1],d=Mv[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};sv.registerClass(jv);var Fv=0,Iv=1,fte=2,Lv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=Av.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[Fv]=i[Iv]=a[Fv]=a[Iv]=NaN,dv(r,t.mapperMethods);var s=Oh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},fte,l),r.powStub=new Av({breakParsed:l.original}),r.intervalStub=new Av({breakParsed:l.transformed}),fv(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Oh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return R(i.getTicks(e||{}),function(e){var i=e.value,o=wv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Ah(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return kv(this,e,Ah(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Cv(e,this.base))},scale:function(e){return wv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Cv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Rv.depth=n,zv.lookup=this._lookup,wv(n===2?e:this.intervalStub.transformOut(e,Rv),this.base,zv)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Yc(t,n)||t<=0||n<=0)){var r=Bv,i=Bv;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[Fv]=t,r[Iv]=n);var o=this.base;this.intervalStub.setExtent2(e,i[Fv]=Cv(t,o),i[Iv]=Cv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Yc(t[0],t[1])&&nc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(sv);sv.registerClass(Lv);var Rv={},zv={},Bv=[],Vv={value:1,category:1,time:1,log:1},Hv=Mc();function pte(e){var t=e.get(`type`);return(t==null||!Ve(Vv,t)&&!sv.getClass(t))&&(t=`value`),t}function mte(e,t,n){var r=Oh(),i;switch(r&&(i=Jv(e,t,n)),t){case`category`:return new Ov({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Uc()});case`time`:return new jv({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Lv({logBase:e.get(`logBase`),breakOption:i});case`value`:return new Av({breakOption:i});default:return new((sv.getClass(t))||Av)({})}}function hte(e,t,n){var r=n?mv(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Yc(i,a)?i===t||a===t?2:it?1:3:3}function gte(e){Hv(e).noOnMyZero=!0}function _te(e){return Hv(e).noOnMyZero}function Uv(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Wh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(he(t)){if(e.type===`category`)return function(n,r){return t(Wv(e,n),n.value-e.scale.getExtent()[0],null)};var r=Oh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Wv(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Wv(e,t){var n=e.scale;return xv(n)?n.getLabel(t):t.value}function Gv(e){return e.get(`interval`)??`auto`}function vte(e){return e.type===`category`&&Gv(e.getLabelModel())===0}function yte(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[_ee(e,t)]=!0}),de(n)}function Kv(e){return e===`middle`||e===`center`}function qv(e){return e.getShallow(`show`)}function Jv(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Oh()||!n||!bte(t)?void 0:r}function bte(e){return e!==`category`}function Yv(e,t,n,r,i,a){var o=bv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=nte(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Xv(e,t){return xv(e)?e.getRawOrdinalNumber(t.value):t.value}function Zv(e,t){return xv(e)&&!!t.get(`boundaryGap`)}var xte=Mc(),Qv=Mc(),$v={estimate:1,determine:2};function ey(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function ty(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:R(ry(n,r),function(t,n){return{formattedLabel:Uv(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?iy(e,t):sy(e)}function ny(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:ry(i,r)}:e.type===`category`?oy(e,t):{ticks:r.getTicks(n)}}function ry(e,t){var n=t.getExtent(),r=[];return L(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),el(r,nl,null),Rs(r),R(r,function(e){return{value:e}})}function iy(e,t){var n=e.getLabelModel(),r=ay(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function ay(e,t,n){var r=ly(e),i=Gv(t),a=n.kind===$v.estimate;if(!a){var o=dy(r,i);if(o)return o}var s,c;he(i)?s=vy(e,i,!1):(c=i===`auto`?py(e,n):i,s=vy(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return fy(r,i,l),!0}):fy(r,i,l),l}function oy(e,t){var n=cy(e),r=Gv(t),i=dy(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),he(r))a=vy(e,r,!0);else if(r===`auto`){var s=ay(e,e.getLabelModel(),ey($v.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tick})}else o=r,a=vy(e,o,!0);return fy(n,r,{ticks:a,tickCategoryInterval:o})}function sy(e){var t=e.scale.getTicks(),n=Uv(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var cy=uy(`axisTick`),ly=uy(`axisLabel`);function uy(e){return function(t){return Qv(t)[e]||(Qv(t)[e]={list:[]})}}function dy(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Tn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===$v.estimate?(t.out.noPxChangeTryDetermine.push(pe(hy,null,e,S,c)),S):gy(e,S,c)??S}function hy(e,t,n){return gy(e,t,n)==null}function gy(e,t,n){var r=xte(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function _y(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function vy(e,t,n){var r=Uv(e),i=e.scale,a=[],o=he(t);return Dv(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var yy=Mc();function Ste(e){yy(e).prepare={}}function Cte(e){yy(e).fullUpdate={}}function by(e){return yy(e).fullUpdate}Qc();var xy=Mc();Mc();function wte(e,t){var n=e.model,r=xy(by(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Tte(e,t){return Sy(wte(e,t))}function Ete(e,t){var n=[];return Dte(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),nc(n)&&n>0&&nc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*Ate,e.w2=e.w*n/r)}var Ay=[0,1],jy=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),js(e,Ay,My(this),t)},e.prototype.coordToData=function(e,t){var n=js(e,My(this),Ay,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=R(ny(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Xv(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=Ny(this,n,r);return R(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(xv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=ey($v.determine),ty(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Dy(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=ey($v.determine),my(this,e)},e}();function My(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function Ny(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Dy(e).w;if(!i)return!1;L(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var Py=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(jy),Fy=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Iy=1,Ly=2,Ry=Iy|Ly;function zy(e,t,n){n||=Ry,t?e.dirty|=n:e.dirty&=~n}function By(e,t){return t||=Ry,e.dirty==null||!!(e.dirty&t)}function Vy(e){if(e)return By(e)&&Hy(e,e.label,e),e}function Hy(e,t,n){var r=t.getComputedTransform();e.transform=Kf(e.transform,r);var i=e.localRect=Gf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=gp.textMargin);for(var d=0;d<4;d++)Uy[d]=u===gp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===gp.textMargin&&Lf(i,Uy,!1,!1);var f=e.rect=Gf(e.rect,i);return r&&f.applyTransform(r),u===gp.minMargin&&Lf(f,Uy,!1,!1),e.axisAligned=Uf(r),(e.label=e.label||{}).ignore=t.ignore,zy(e,!1),zy(e,!0,Ly),e}var Uy=[0,0,0,0];function Wy(e,t,n){return e.transform=Kf(e.transform,n),e.localRect=Gf(e.localRect,t),e.rect=Gf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Uf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Gy(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Ky(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new an(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ob=vt(),sb=new an(0,0,0,0),cb=function(e,t,n,r,i,a){if(Kv(e.nameLocation)){var o=a.stOccupiedRect;o&&lb(Wy({},o,a.transGroup.transform),r,i)}else ub(a.labelInfoList,a.dirVec,r,i)};function lb(e,t,n){var r=new Wt;Yy(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Gy(t,r)}function ub(e,t,n,r){for(var i=Wt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ws(r-$y)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r<$y?n>0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),jte=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],Mte={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Vt(u,u,l),Vt(d,d,l));var p=F({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&jh(r.axis.scale))Zy().buildAxisBreakLine(r,i,a,m);else{var h=new Od(F({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));xf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);B(g)&&(g=[g,g]),(B(_)||_e(_))&&(_=[_,_]);var v=X_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];L([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=J_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){hb(t,i,s)&&fb(e,t,n,r,i,a,o,$v.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){hb(t,i,s)&&fb(e,t,n,r,i,a,o,$v.determine);var c=Ite(e,i,a,r);Fte(e,t.labelLayoutList,c),Lte(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(yb(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Wt(0,0),_=new Wt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=vt();_.transform(Ct(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*$y/180);var b,x;Kv(u)?b=db.innerTextLayout(e.rotation,y??e.rotation,d):(b=Nte(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=we(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new rs({x:g.x,y:g.y,rotation:b.rotation,silent:db.isLabelSilent(r),style:op(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Bf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=db.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,sl(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=Vy({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Kv(u)?eb[E]:tb[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function fb(e,t,n,r,i,a,o,s){gb(t)||Rte(e,t,i,s,r,o);var c=t.labelLayoutList;zte(e,r,c,a),xb(r,e.rotation,c);var l=e.optionHideOverlap;Pte(r,c,l),l&&Jy(le(c,function(e){return e&&!e.label.ignore})),ab(e,n,r,c)}function Nte(e,t,n,r){var i=Us(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ws(i-$y/2)?(o=c?`bottom`:`top`,a=`center`):Ws(i-$y*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=i<$y*1.5&&i>$y/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Pte(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(vte(r))return;function a(e,a,o){var s=Vy(t[a]),c=Vy(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=nb(s.label).labelInfo.tick;if(yv(l)&&u.notNice||xv(l)&&u.offInterval){pb(s.label);return}}if(e===!1||s.suggestIgnore){pb(s.label);return}if(c.suggestIgnore){pb(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=Ky({marginForce:f},s),c=Ky({marginForce:f},c)}Yy(s,c,null,{touchThreshold:d})&&pb(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function Fte(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=Ab(e,t.get(`startValue`,!0)),x=b!=null;!nc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),nc(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),kb(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),kb(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function kb(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Zc(t))}function Ab(e,t){return t==null?null:Ce(t)?NaN:e.parse(t)}function jb(e,t){var n;if(xv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=z(r)?r:[r,r]}return[Mb(n[0]),Mb(n[1])]}function Mb(e){return kn(typeof e==`boolean`?0:e,1)||0}function Nb(e){var t=Eb(e.scale);return t.extent||=Uc(),t}function Pb(e,t){Nb(e).dimIdxInCoord=t.get(e.dim)}function Fb(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Ib(n,e,i,r,t)}function Ib(e,t,n,r,i){var a=Nb(t),o=a.extent,s=!1;Ote(t,function(r){if(r.boxCoordinateSystem){var i=nh(r).coord,c=a.dimIdxInCoord;if(c>=0&&z(i)){var l=i[c];l!=null&&!z(l)&&Wc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;L(yte(u,n),function(e){qc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Vb(e,t,r);Rb(e,new Ob(e,r,o,s,c),i),a.extent=null}function Lb(e,t){var n=e.scale;Rb(n,new Ob(n,e.model,t,!1,!1),Db)}function Rb(e,t,n){e.rawExtentInfo=t,t.from=n}var zb=Re();function Bb(e,t,n,r,i){e.rawExtentInfo||Lb({scale:e,model:t},i||Uc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Vb(e,t,n){var r=Zv(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Cy(t,function(e){a=!!zb.get(e)||a}),a}function Hb(e,t,n,r){if(n.ctnShp){var i;if(Cy(e,function(t){var n=zb.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Gc(i,a[0]),Kc(i,a[1]),gte(e))}}),i){var a=t.getExtent();if(xv(t))e.onBand||t.setExtent2(1,bs(a[0],a[0]+i[0]),xs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=bs(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=xs(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var Ub={left:0,right:0,top:0,bottom:0},Wb=[`25%`,`25%`],Gb=`cartesian2d`,Kb=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Pg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Ng(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Ng(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Ub,outerBoundsContain:`all`,outerBoundsClampWidth:Wb[0],outerBoundsClampHeight:Wb[1],backgroundColor:V.color.transparent,borderWidth:1,borderColor:V.color.neutral30},t}(Lg),qb=`\0__throttleOriginMethod`,Jb=`\0__throttleRate`,Yb=`\0__throttleType`;function Xb(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Zb(e,t,n,r){var i=e[t];if(i){var a=i[qb]||i,o=i[Yb];if(i[Jb]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Xb(a,n,r===`debounce`),i[qb]=a,i[Yb]=r,i[Jb]=n}return i}}function Qb(e,t){var n=e[t];n&&n[qb]&&(n.clear&&n.clear(),e[t]=n[qb])}function $b(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),nx=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),rx=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new nx(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new nx(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new nx(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new nx(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new nx(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new nx(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),ix=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ax=[],ox=Ge.browser.firefox&&+Ge.browser.version.split(`.`)[0]<39;function sx(e,t,n,r){return n||={},r?cx(e,t,n):ox&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?cx(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function cx(e,t,n){if(Ge.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(hh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(mh(ax,e,r,i)){n.zrX=ax[0],n.zrY=ax[1];return}}n.zrX=n.zrY=0}function lx(e){return e||window.event}function ux(e,t,n){if(t=lx(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&sx(e,i,t,n)}else{sx(e,t,t,n);var a=dx(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&ix.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function dx(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function fx(e,t,n,r){e.addEventListener(t,n,r)}function px(e,t,n,r){e.removeEventListener(t,n,r)}var mx=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function hx(e){return e.which===2||e.which===3}var gx=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=_x(r)/_x(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=vx(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},bx=`silent`;function xx(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Sx}}function Sx(){mx(this.event)}var Cx=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ea),Tx=function(){function e(e,t){this.x=e,this.y=t}return e}(),Ex=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Dx=new an(0,0,0,0),Ox=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Tx(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Cx,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new rx(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(Ex,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=jx(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Tx(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Tx(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=xx(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Tx(e,t);if(Ax(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new an(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Dx.copy(u.getBoundingRect()),u.transform&&Dx.applyTransform(u.transform),Dx.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function kx(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||bx}return!1}function Ax(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=kx(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==bx)){t.target=o;break}}}function jx(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var Mx=32,Nx=7;function Px(e){for(var t=0;e>=Mx;)t|=e&1,e>>=1;return e+t}function Fx(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Ix(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Rx(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function zx(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function Bx(e,t){var n=Nx,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=Nx||m>=Nx);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Rx(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=Nx||g>=Nx);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),Lx(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Hx=!1;function Ux(){Hx||(Hx=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Wx(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Gx=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Wx}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Kx=Ge.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function qx(){return new Date().getTime()}var Vte=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=qx()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Kx(t),!e._paused&&e.update())}Kx(t)},t.prototype.start=function(){this._running||(this._time=qx(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=qx(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=qx()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new $i(e,t.loop);return this.addAnimator(n),n},t}(ea),Hte=300,Jx=Ge.domSupported,Yx=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Xx={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Zx=!1;function Qx(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Ute(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function $x(e){e&&(e.zrByTouch=!0)}function Wte(e,t){return ux(e.dom,new Gte(e,t),!0)}function eS(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Gte=function(){function e(e,t){this.stopPropagation=He,this.stopImmediatePropagation=He,this.preventDefault=He,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),tS={mousedown:function(e){e=ux(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=ux(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=ux(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=ux(this.dom,e);var t=e.toElement||e.relatedTarget;eS(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Zx=!0,e=ux(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Zx||(e=ux(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=ux(this.dom,e),$x(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),tS.mousemove.call(this,e),tS.mousedown.call(this,e)},touchmove:function(e){e=ux(this.dom,e),$x(e),this.handler.processGesture(e,`change`),tS.mousemove.call(this,e)},touchend:function(e){e=ux(this.dom,e),$x(e),this.handler.processGesture(e,`end`),tS.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!Dc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[_S],e},t.prototype.setTheme=function(e){this._theme=new Dp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function CS(e,t){return e.join(`,`)===t.join(`,`)}var wS=L,TS=ve,ES=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function DS(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ES.length;n0?e[n-1].seriesModel:null)}),XS(e))})}function XS(e){L(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Hs(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var ZS=function(){function e(){this.group=new Xu,this.uid=oh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();$e(ZS),ot(ZS);var QS=Mc(),$S={itemStyle:st(wp,!0),lineStyle:st(xp,!0)},eC={lineStyle:`stroke`,itemStyle:`fill`};function tC(e,t){return e.visualStyleMapper||$S[t]||(console.warn(`Unknown style type '`+t+`'.`),$S.itemStyle)}function nC(e,t){return e.visualDrawType||eC[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var rC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=tC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=nC(e,r),c=a[s],l=he(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||he(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||he(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=F({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},iC=new Dp,aC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=tC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){iC.option=n[r];var o=i(iC);F(e.ensureUniqueItemVisual(t,`style`),o),iC.option.decal&&(e.setItemVisual(t,`decal`,iC.option.decal),iC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},oC={performRawSeries:!0,overallReset:function(e){var t=Re();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();QS(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=QS(e).scope,a=nC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},sC=Math.PI;function cC(e,t){t||={},I(t,{text:`loading`,textColor:V.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:V.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Xu,r=new Qo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new rs({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Qo({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Pd({shape:{startAngle:-sC/2,endAngle:-sC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:sC*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:sC*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var lC=function(){function e(e,t,n,r){this._stageTaskMap=Re(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):il(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Re();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ke(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Re(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Yg({plan:mC,reset:hC,count:vC}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Yg({reset:uC});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Re(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;ke(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):L(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Yg({reset:dC,onDirty:pC})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return he(e)&&(e={overallReset:e,seriesType:yC(e)}),e.uid=oh(`stageHandler`),t&&(e.visualType=t),e},e}();function uC(e){e.overallReset(e.ecModel,e.api,e.payload)}function dC(e){return e.dirtyOnOverallProgress&&fC}function fC(){this.agent.dirty(),this.getDownstream().dirty()}function pC(){this.agent&&this.agent.dirty()}function mC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function hC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=dc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return _C(t)}):gC}var gC=_C(0);function _C(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),kC=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],AC=kC.concat([`symbolKeepAspect`]),jC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&KC(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function YC(e,t,n){for(var r=t.type===`radial`?JC(e,t,n):qC(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:_e(e)?[e]:z(e)?e:null}function ew(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&$C(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}var tw=new po(!0);function nw(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function rw(e){return typeof e==`string`&&e!==`none`}function iw(e){var t=e.fill;return t!=null&&t!==`none`}function aw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function ow(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function sw(e,t,n){var r=ht(t.image,t.__image,n);if(_t(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ue),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function cw(e,t,n,r,i){var a,o=nw(n),s=iw(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||tw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?YC(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?YC(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?sw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?sw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=ew(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&ow(e,n),s&&aw(e,n)):(s&&aw(e,n),o&&ow(e,n)),T&&e.setLineDash([])}function lw(e,t,n){var r=t.__image=ht(n.image,t.__image,t,t.onload);if(r&&_t(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function uw(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=ew(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(nw(n)&&e.strokeText(i,n.x,n.y),iw(n)&&e.fillText(i,n.x,n.y)):(iw(n)&&e.fillText(i,n.x,n.y),nw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var dw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],fw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function pw(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){ww(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ta.opacity:o}(r||t.blend!==n.blend)&&(a||=(ww(e,i),!0),e.globalCompositeOperation=t.blend||Ta.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[iT]){if(this._disposed){this.id;return}var r,i,a;if(ve(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[iT]=!0,IT(this),!this._model||t){var o=new cne(this._api),s=this._theme,c=this._model=new vS;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},WT);var l={seriesTransition:a,optionChanged:!0};if(n)this[oT]={silent:r,updateParams:l},this[iT]=!1,this.getZr().wakeUp();else{try{vT(this),xT.update.call(this,null,l)}catch(e){throw this[oT]=null,this[iT]=!1,e}this._ssr||this._zr.flush(),this[oT]=null,this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[iT]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[oT]&&(r??=this[oT].silent,i=this[oT].updateParams,this[oT]=null),this[iT]=!0,IT(this);try{this._updateTheme(e),n.setTheme(this._theme),vT(this),xT.update.call(this,{type:`setTheme`},i)}catch(e){throw this[iT]=!1,e}this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype._updateTheme=function(e){B(e)&&(e=KT[e]),e&&(e=N(e),e&&qS(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ge.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return L(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(YT[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(JT,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(N(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=cS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return L(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Qo({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new Wo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return ST(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return ST(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return ST(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return L(Pc(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Pc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?PC(i,t):NC(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;L(zT,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&IC(i,function(e){var t=sl(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=F({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(HT,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),ex(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&zc(this.getDom(),ZT,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete JT[e.id]},t.prototype.resize=function(e){if(!this[iT]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[oT]&&(r??=this[oT].silent,n=!0,this[oT]=null),this[iT]=!0,IT(this);try{n&&vT(this),xT.update.call(this,{type:`resize`,animation:F({duration:0},e&&e.animation)})}catch(e){throw this[iT]=!1,e}this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(ve(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),qT[e]){var n=qT[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=F({},e);return t.type=VT[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(ve(t)||(t={silent:!!t}),BT[e.type]&&this._model){if(this[iT]){this._pendingActions.push(e);return}var n=t.silent;wT.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ge.browser.weChat&&this._throttledZrFlush(),TT.call(this,n),ET.call(this,n)}},t.prototype.updateLabelLayout=function(){LC.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){vT=function(e){Ste(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),yT(e,!0),yT(e,!1),t.plan()},yT=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cTe(t.get(`hoverLayerThreshold`),pS.hoverLayerThreshold)&&!Ge.node&&!Ge.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=qf(e);t.eachRendered(function(e){return Yf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!tf(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(tf(e))return;if(e instanceof Ro&&Du(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}MT=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Ql(t,n),PT(e)},n.prototype.leaveEmphasis=function(t,n){$l(t,n),PT(e)},n.prototype.enterBlur=function(t){eu(t),PT(e)},n.prototype.leaveBlur=function(t){tu(t),PT(e)},n.prototype.enterSelect=function(t){nu(t),PT(e)},n.prototype.leaveSelect=function(t){ru(t),PT(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[aT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(bl))(e)},NT=function(e){function t(e,t){for(var n=0;n=0)){uE.push(n);var o=lC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function fE(e,t){qT[e]=t}function pE(e,t,n){var r=BC(`registerMap`);r&&r(e,t,n)}var mE=a_;lE(Yw,rC),lE(Qw,aC),lE(Qw,oC),lE(Yw,jC),lE(Qw,MC),lE(nT,Rw),tE(qS),nE(Hw,JS),fE(`default`,cC),oE({type:Ol,event:Ol,update:Ol},He),oE({type:kl,event:kl,update:kl},He),oE({type:Al,event:Nl,update:Al,action:He,refineEvent:hE,publishNonRefinedEvent:!0}),oE({type:jl,event:Nl,update:jl,action:He,refineEvent:hE,publishNonRefinedEvent:!0}),oE({type:Ml,event:Nl,update:Ml,action:He,refineEvent:hE,publishNonRefinedEvent:!0});function hE(e,t,n,r){return{eventContent:{selected:mu(n),isFromClick:t.isFromClick||!1}}}eE(`default`,{}),eE(`dark`,DC);var gE=[],_E={registerPreprocessor:tE,registerProcessor:nE,registerPostInit:rE,registerPostUpdate:iE,registerUpdateLifecycle:aE,registerAction:oE,registerCoordinateSystem:sE,registerLayout:cE,registerVisual:lE,registerTransform:mE,registerLoading:fE,registerMap:pE,registerImpl:zC,PRIORITY:rT,ComponentModel:Lg,ComponentView:ZS,SeriesModel:B_,ChartView:nv,registerComponentModel:function(e){Lg.registerClass(e)},registerComponentView:function(e){ZS.registerClass(e)},registerSeriesModel:function(e){B_.registerClass(e)},registerChartView:function(e){nv.registerClass(e)},registerCustomSeries:function(e,t){HC(e,t)},registerSubTypeDefaulter:function(e,t){Lg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Qte(e,t)}};function vE(e){if(z(e)){L(e,function(e){vE(e)});return}ie(gE,e)>=0||(gE.push(e),he(e)&&(e={install:e}),e.install(_E))}var yE=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),bE=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ic).models[0]},t.type=`cartesian2dAxis`,t}(Lg);oe(bE,yE);var xE={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:V.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:V.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:V.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[V.color.backgroundTint,V.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:V.color.neutral00,borderColor:V.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},SE=P({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},xE),CE=P({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:V.color.axisMinorSplitLine,width:1}}},xE),wE={category:SE,value:CE,time:P({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},CE),log:I({logBase:10},CE)};function TE(e,t,n,r){L(Vv,function(i,a){var o=P(P({},wE[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{};P(e,t.getTheme().get(a+`Axis`)),P(e,this.getDefaultOption()),e.type=EE(e),n&&Ng(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=cv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Zy();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,EE)}function EE(e){return e.type||(e.data?`category`:`value`)}var DE=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),le(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),OE=[`x`,`y`];function kE(e){return(e.type===`interval`||e.type===`time`)&&!jh(e)}var AE=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Gb,t.dimensions=OE,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(kE(e)&&kE(t)){var n=mv(e,null),r=mv(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Tt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new an(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Vt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Vt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new an(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(DE);function jE(e,t){var n=e.scale,r=e.model,i=Bb(n,r,r.ecModel,e,null),a=bv(n),o=bv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=Ss(l[0].value-l[1].value),g=Ss(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(M(),k=Ls(O-E*m,D),ee(),w<=C[0])return!0})):A(function(){k=Ls(Ts(C[0]/E)*E,D),O=Ls(ws(C[1]/E)*E,D);var e=Cs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=ws(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Yv(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function ME(e,t){var n=bv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=Tv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?PE(r,t):NE(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=Sv(d)),i[0]||(s[0]=Ls(ws(s[0]/u)*u,l)),i[1]||(s[1]=Ls(Ts(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Yv(e,i,o,s,a,c)}function NE(e,t){var n=Ev(t.splitNumber,5),r=hv(e),i=t.minInterval,a=t.maxInterval,o=Ys(r/n,!0);i!=null&&oa&&(o=a);var s=Sv(o),c=e.getExtent(),l=[Ls(Ts(c[0]/o)*o,s),Ls(ws(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function PE(e,t){var n=Ev(t.splitNumber,10),r=e.getExtent(),i=hv(e),a=xs(qs(i),1);n/i*a<=.5&&(a*=10);var o=Sv(a),s=[Ls(Ts(r[0]/a)*a,o),Ls(ws(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function FE(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;IE(t,n,r,i,null)}function IE(e,t,n,r,i){var a=Bb(e,t,r,n,i),o=vv(e)||yv(e);LE(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Hb(n,e,a,r)}function LE(e,t){RE[e.type](e,t)}var RE={interval:ME,log:ME,time:dte,ordinal:He},zE=[[3,1],[0,2]],BE=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=OE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;L(this._axesList,function(e){Fb(e,1);var t=e.scale;xv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=de(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):FE(i)}L(n,function(e){GE(e,e.__alignTo)?FE(e):jE(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};L(n.x,function(e){HE(n,`y`,e,i)}),L(n.y,function(e){HE(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Ag(e,t),i=this._rect=Dg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(qE(a,i),!n){var c=ZE(i,o,a,s,t),l=void 0;if(s)YE?(YE(this._axesList,i),qE(a,i)):l=XE(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=$E(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=XE(d,f,p,i,a,c,r))}QE(i,a,$v.determine,null,l,r),L(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}ve(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];_v(a.scale)&&Jv(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&L(r,function(e){e.__alignTo=n})}function GE(e,t){return jh(e.scale)||jh(t.scale)||t.scale.getTicks().length<2}function KE(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function qE(e,t){L(e.x,function(e){return JE(e,t.x,t.width)}),L(e.y,function(e){return JE(e,t.y,t.height)})}function JE(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),KE(e,t)}var YE;function XE(e,t,n,r,i,a,o){QE(r,i,$v.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=ue(s,function(e){return e>0})==null;return Lf(r,s,!0,!0,n),qE(i,r),c;function l(e){L(i[lf[e]],function(t){if(qv(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ce(t)&&t>1e-4&&(e/=t),e}}function ZE(e,t,n,r,i){var a=new ib(eD);return L(n,function(n){return L(n,function(n){if(qv(n.model)){var o=!r;n.axisBuilder=wb(e,t,n.model,i,a,o)}})}),a}function QE(e,t,n,r,i,a){var o=n===$v.determine;L(t,function(t){return L(t,function(t){qv(t.model)&&(Tb(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[lf[1-t]]=e[uf[t]]<=a.refContainer[uf[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){qv(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function $E(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Dg(e.get(`outerBounds`,!0)||Ub,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ie([`all`,`axisLabel`],a)<0?`all`:a,s=[Ps(Te(e.get(`outerBoundsClampWidth`,!0),Wb[0]),t.width),Ps(Te(e.get(`outerBoundsClampHeight`,!0),Wb[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var eD=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;cb(e,t,n,r,i,a),Kv(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&ub(e.labelInfoList,e.dirVec,r,i)})};function tD(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return nD(n,e,t),n.seriesInvolved&&iD(n,e),n}function nD(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=dD(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),me(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&L(f.baseAxes,me(p,!d||`cross`,u)),d&&L(f.otherAxes,me(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||uD(d))){s??=d.get(`triggerTooltip`),d=r?rD(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=dD(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:uD(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=aD(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function rD(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=N(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&I(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Dp(c,n,r))}function iD(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&L(e.coordSysAxesInfo[dD(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function aD(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function sD(e){var t=cD(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=uD(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(ED(this._zr,`globalPan`)||AD(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(mx(r.event),r.__ecRoamConsumed=!0,LD(e,t,n,r,i))},t}(ea);function AD(e){return e.__ecRoamConsumed}var jD=Mc();function MD(e){var t=jD(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function ND(e,t,n,r){for(var i=MD(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;SO[0]=o?(i[0]-r.x)/a:i[0],SO[1]=o?(i[1]-r.y)/a:i[1],Vt(SO,SO,e.mtRawInv);var s=hne(e,SO);CO(t,s,a),L(n,function(e){e!==t&&CO(e,s.slice(),a)})}var SO=[];function CO(e,t,n){var r=e.option;r.center=t,r.zoom=n}function wO(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function vne(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=zD(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function TO(e,t,n,r,i,a,o,s){if(!yO(e)){n.disable();return}n.enable(Te(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Zf(I({type:OO(r,e.subType,vl)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function yne(e){return function(t,n,r){return EO.copy(e.getBoundingRect()),EO.applyTransform(e.getComputedTransform()),EO.contain(n,r)}}var EO=new an(0,0,0,0);function DO(e,t,n){var r=OO(t,n,vl);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Rc(e,t,n),function(t){dne(e,t),fne(e,t,r,i)})})}function OO(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function bne(e){return e.zoom!=null}function kO(e,t,n,r,i,a,o){var s=new VD(null,gne(e.ecModel,t));return QD(s,n,r,i,a),o?$D(s,o.x,o.y,o.width,o.height):$D(s,n,r,i,a),ZD(s,e),s}var AO=Mc();function xne(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,jO(t,n,e),L(n,function(n){L(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,me(Sne,e))})}),t.wrapMethod(`cloneShallow`,me(wne,e)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,me(Cne,e))}),ke(n[t.dataType]===t)}function Sne(e,t){if(Dne(this)){var n=F({},AO(this).datas);n[this.dataType]=t,jO(t,n,e)}else MO(t,this.dataType,AO(this).mainData,e);return t}function Cne(e,t){return e.struct&&e.struct.update(),t}function wne(e,t){return L(AO(t).datas,function(n,r){n!==t&&MO(n.cloneShallow(),r,t,e)}),t}function Tne(e){var t=AO(this).mainData;return e==null||t==null?t:AO(t).datas[e]}function Ene(){var e=AO(this).mainData;return e==null?[{data:e}]:R(de(AO(e).datas),function(t){return{type:t,data:AO(e).datas[t]}})}function Dne(e){return AO(e).mainData===e}function jO(e,t,n){AO(e).datas={},L(t,function(t,r){MO(t,r,e,n)})}function MO(e,t,n,r){AO(n).datas[t]=e,AO(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=Tne,e.getLinkedDataAll=Ene}var NO=L,One=ve,PO=-1,FO=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=N(t);this.type=r,this.mappingMethod=n,this._normalizeData=jne[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(IO(i),kne(i)):n===`category`?i.categories?Ane(i):IO(i,!0):(ke(n!==`linear`||i.dataExtent),IO(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return pe(this._normalizeData,this)},e.listVisualTypes=function(){return de(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){ve(e)?L(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=z(t)?[]:ve(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&NO(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(One(e)){var t=[];NO(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function IO(e,t){var n=e.visual,r=[];ve(n)?NO(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),WO(e,r)}function LO(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:HO([0,1])}}function RO(e){var t=this.option.visual;return t[Math.round(js(e,[0,1],[0,t.length-1],!0))]||{}}function zO(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function BO(e){var t=this.option.visual;return t[this.option.loop&&e!==PO?e%t.length:e]}function VO(){return this.option.visual[0]}function HO(e){return{linear:function(t){return js(t,e,this.option.visual,!0)},category:BO,piecewise:function(t,n){var r=UO.call(this,n);return r??=js(t,e,this.option.visual,!0),r},fixed:VO}}function UO(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[FO.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function WO(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=R(t,function(e){return $r(e)||[0,0,0,1]})),t}var jne={linear:function(e){return js(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=FO.findPieceIndex(e,t,!0);if(n!=null)return js(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??PO},fixed:He};function GO(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof qO||(t=this._nodesMap[KO(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),JO=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=Re(),t=Re();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function YO(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}oe(qO,YO(`hostGraph`,`data`)),oe(JO,YO(`hostGraph`,`edgeData`));function XO(e,t,n,r,i){for(var a=new Mne(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=ah(e,n);else{var h=th.get(p),g=h&&h.dimensions||[];ie(g,`value`)<0&&g.concat([`value`]);var _=Qm(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Zm(_,n),m.initData(e)}var v=new Zm([`value`],n);return v.initData(c,s),i&&i(m,v),xne({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var ZO=`-->`,QO=function(e){return e.get(`autoCurveness`)||null},$O=function(e,t){var n=QO(e),r=20,i=[];if(_e(n))r=n;else if(z(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return I_({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=R(this.option.categories||[],function(e){return e.value==null?F({value:0},e):e}),t=new Zm([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return mO(e)&&e},t.type=`series.`+ik,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:V.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},t}(B_);function ak(e){return e instanceof Array||(e=[e,e]),e}var Rne=al(ik,zne);function zne(e){e.eachSeriesByType(ik,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=ak(e.get(`edgeSymbol`)),i=ak(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=ak(r.getShallow(`symbol`,!0)),o=ak(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(F(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function ok(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),sk(n,e)}}function sk(e,t){e.eachEdge(function(e,n){var r=Ee(e.getModel().get([`lineStyle`,`curveness`]),-rk(e,t,n,!0),0),i=Ot(e.node1.getLayout()),a=Ot(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Bne=al(ik,Vne);function Vne(e,t){e.eachSeriesByType(ik,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];L(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Xu),Qne=function(){function e(e){this.group=new Xu,this._LineCtor=e||Zne}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=Tk(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Tk(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!$ne(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function Tk(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:ap(t)}}function Ek(e){return isNaN(e[0])||isNaN(e[1])}function Dk(e){return e&&!Ek(e[0])&&!Ek(e[1])}var Ok=[],kk=[],Ak=[],jk=Ar,Mk=Bt,Nk=Math.abs;function Pk(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){Ok[0]=jk(r[0],i[0],a[0],u),Ok[1]=jk(r[1],i[1],a[1],u);var d=Nk(Mk(Ok,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function Fk(e,t){var n=[],r=Pr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[Ot(c[0]),Ot(c[1])],c[2]&&c.__original.push(Ot(c[2])));var d=c.__original;if(c[2]!=null){if(Dt(i[0],d[0]),Dt(i[1],d[2]),Dt(i[2],d[1]),l&&l!==`none`){var f=lk(e.node1),p=Pk(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=lk(e.node2),p=Pk(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}Dt(c[0],i[0]),Dt(c[1],i[2]),Dt(c[2],i[1])}else{if(Dt(a[0],d[0]),Dt(a[1],d[1]),Mt(o,a[1],a[0]),It(o,o),l&&l!==`none`){var f=lk(e.node1);jt(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=lk(e.node2);jt(a[1],a[1],o,-f*t)}Dt(c[0],a[0]),Dt(c[1],a[1])}})}var ere=Mc();function tre(e){if(e)return ere(e).bridge}var nre=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ik,t}return t.prototype.init=function(e,t){var n=new Wee,r=new Qne,i=this.group,a=new Xu;this._controller=new kD(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=yO(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&hO(o,2,i,this._firstRender?null:e),Fk(e.getGraph(),ck(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&TO(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),fk(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),sk(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(sl(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(sl(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){pk(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=yO(t);this._active&&r&&(hO(this._mainGroup,2,r,null),bne(e)&&(this._updateNodeAndLinkScale(),Fk(t.getGraph(),ck(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=ck(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(Fk(e.getGraph(),ck(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=tre(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(UD(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Xu,o=n.group.children(),s=r.group.children(),c=new Xu,l=new Xu;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=Hs(t[r],d.sign*a)),t}function Ik(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Lk(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var Rk=`sankey`,lre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o=0&&(a[i[o].depth]=new Dp(i[o],this,t));return XO(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return b_(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return b_(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+Rk,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:V.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:V.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(B_),ure=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),dre=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ure},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Ql(this)},t.prototype.downplay=function(){$l(this)},t}(Ro),fre=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Rk,t._mainGroup=new Xu,t}return t.prototype.init=function(e,t){this._controller=new kD(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),TO(e,n,this._controller,yne(i),null),r.eachEdge(function(t){var n=new dre,r=sl(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),zk(n.style,u,t);var k=``+a.get(`value`),A=ap(a,`edgeLabel`);ip(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,Ee(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var ee=a.getModel(`emphasis`);xu(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return zk(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var te=ee.get(`focus`);_u(n,te===`adjacency`?t.getAdjacentDataIndices():te===`trajectory`?t.getTrajectoryDataIndices():te,ee.get(`blurScope`),ee.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Qo({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});ip(f,ap(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),xu(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),sl(f).dataType=`node`;var p=u.get(`focus`);_u(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(pre(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){hO(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=kO(e,t,n.x,n.y,n.width,n.height);hO(this.group,2,r,this._firstRender?null:e)},t.type=Rk,t}(nv);function zk(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);B(r)&&B(i)&&(e.fill=new Ld(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function pre(e,t,n){var r=new Qo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ef(r,{shape:{width:e.width+20}},t,n),r}var mre=al(Rk,hre);function hre(e,t){e.eachSeriesByType(Rk,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=Ag(e,t).refContainer,a=Dg(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;_re(l),gre(l,u,n,r,o,s,le(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function gre(e,t,n,r,i,a,o,s,c){vre(e,t,n,i,a,s,c),Sre(e,t,a,i,r,o,s),jre(e,s)}function _re(e){L(e,function(e){var t=Wk(e.outEdges,Uk),n=Wk(e.inEdges,Uk),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function vre(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;vd-1?p:d-1;o&&o!==`left`&&yre(e,o,a,C),xre(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function Bk(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function yre(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Tre(s,c,o),Vk(s,i,n,r,o),Are(s,c,o),Vk(s,i,n,r,o)}function Cre(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Hc(e,function(e){return e.getLayout()[r]});return Rs(i.keys),L(i.keys,function(e){n.push(i.buckets.get(e))}),n}function wre(e,t,n,r,i,a){var o=1/0;L(e,function(e){var t=e.length,s=0;L(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Tre(e,t,n){L(e.slice().reverse(),function(e){L(e,function(e){if(e.outEdges.length){var r=Wk(e.outEdges,Ere,n)/Wk(e.outEdges,Uk);if(isNaN(r)){var i=e.outEdges.length;r=i?Wk(e.outEdges,Dre,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Hk(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Hk(e,n))*t;e.setLayout({y:o},!0)}}})})}function Ere(e,t){return Hk(e.node2,t)*e.getValue()}function Dre(e,t){return Hk(e.node2,t)}function Ore(e,t){return Hk(e.node1,t)*e.getValue()}function kre(e,t){return Hk(e.node1,t)}function Hk(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Uk(e){return e.getValue()}function Wk(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),L(n,function(t){var n=new FO({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&L(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function Pre(e){e.registerChartView(fre),e.registerSeriesModel(lre),e.registerLayout(mre),e.registerVisual(Mre),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:ll,subType:Rk,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),DO(e,ll,Rk)}var Fre=256,Ire=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=V.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function Lre(e,t,n){var r=e[1]-e[0];t=R(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var zre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):ov(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(ov(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Hf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=av(a,`cartesian2d`),s=av(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Dy(f).w+.5,l=Dy(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=ap(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var ee=a.dataToPoint([k,A]);D=new Qo({shape:{x:ee[0]-c/2,y:ee[1]-l/2,width:c,height:l},style:O})}else if(s){var te=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ce(te.x))continue;D=new Qo({z2:1,shape:te,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var j=a.dataToLayout([h.get(T[0],E)]),te=j.contentRect||j.rect;if(Ce(te.x)||Ce(te.y))continue;D=new Qo({z2:1,shape:te,style:O})}if(h.hasItemOption){var M=h.getItemModel(E),ne=M.getModel(`emphasis`);g=ne.getModel(`itemStyle`).getItemStyle(),_=M.getModel([`blur`,`itemStyle`]).getItemStyle(),v=M.getModel([`select`,`itemStyle`]).getItemStyle(),y=M.get([`itemStyle`,`borderRadius`]),S=ne.get(`focus`),C=ne.get(`blurScope`),w=ne.get(`disabled`),b=ap(M)}D.shape.r=y;var N=e.getRawValue(E),P=`-`;N&&N[2]!=null&&(P=N[2]+``),ip(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:P}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,_u(D,S,C,w),D.incremental=rl(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new Ire;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?Rre(v,n.option.range):Lre(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Wo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(nv),Bre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return ah(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=th.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:V.color.primary}}},t}(B_);function Vre(e){e.registerChartView(zre),e.registerSeriesModel(Bre)}function Gk(e){return Object.keys(e)}function Kk(e){return e&&typeof e==`object`&&!Array.isArray(e)}function qk(e,t){let n={...e},r=t;return Kk(e)&&Kk(t)&&Object.keys(t).forEach(t=>{Kk(r[t])&&t in e?n[t]=qk(n[t],r[t]):n[t]=r[t]}),n}function Hre(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ure(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Wre(e){let t=Ure(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function Jk(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function Yk(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?Jk(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?Jk(n):n}}return r}return n}var U=Yk(`rem`,{shouldScale:!0}),Xk=Yk(`em`);function Zk(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function Qk(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var Gre=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=Gre()})),W=u($k(),1);function Kre(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function eA(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function tA(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function nA(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function rA(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function iA(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(nA(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>qre(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=iA(l,c,r),d=rA(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[iA(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[rA(c.length,c,!1)]?.focus()}}}var Yre={app:100,modal:200,popover:300,overlay:400,max:9999};function aA(e){return Yre[e]}function oA(e,t=`size`,n=!0){if(e!==void 0)return Qk(e)?n?U(e):e:`var(--${t}-${e})`}function sA(e){return oA(e,`mantine-spacing`)}function cA(e){return e===void 0?`var(--mantine-radius-default)`:oA(e,`mantine-radius`)}function lA(e){return oA(e,`mantine-font-size`)}function Xre(e){return oA(e,`mantine-line-height`,!1)}function Zre(e){if(e)return oA(e,`mantine-shadow`,!1)}function uA(e,t){return n=>{e?.(n),t?.(n)}}function Qre(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function dA(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function fA(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=dA(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function $re(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function eie(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:$re(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var pA=typeof document<`u`?W.useLayoutEffect:W.useEffect;function tie(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var nie=e=>(e+1)%1e6;function rie(){let[,e]=(0,W.useReducer)(nie,0);return e}function mA(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return pA(()=>{r.current||(r.current=!0,n(Qre()))},[]),typeof e==`string`?e:t}function hA(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function iie(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=hA(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():hA(e,null)}),t.clear()}}}function gA(...e){return(0,W.useCallback)(iie(...e),e)}function _A({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function vA(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var yA=`dots`;function aie({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=_A({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return vA(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=$k();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=sie()}));function xA(e){return e?.props?.ref}function SA(e){let t=W.Children.toArray(e);return t.length!==1||!Kre(t[0])?null:t[0]}function CA(e){return e}function wA(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=TA(t[e],n):t[e]=n})}),t}function EA({theme:e,classNames:t,props:n,stylesCtx:r}){return lie((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||cie))}function DA({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function OA(e){return e===`auto`||e===`dark`||e===`light`}function uie({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return OA(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&OA(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function kA(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function die(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function fie(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function pie(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function mie(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function AA(e){return die(e)?fie(e):e.startsWith(`rgb`)?pie(e):e.startsWith(`hsl`)?mie(e):{r:0,g:0,b:0,a:1}}function jA(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function hie(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function gie(e){if(e.startsWith(`oklch(`))return(hie(e)||0)/100;let{r:t,g:n,b:r}=AA(e),i=t/255,a=n/255,o=r/255,s=jA(i),c=jA(a),l=jA(o);return .2126*s+.7152*c+.0722*l}function MA(e,t=.179){return!e.startsWith(`var(`)&&gie(e)>t}function NA({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:MA(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:MA(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:MA(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][kA(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:MA(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:MA(e,t.luminanceThreshold),shade:a,variable:void 0}}function PA(e,t){let n=NA({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function FA(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function IA(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=AA(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function LA(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=PA(n.from,t),i=PA(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function RA(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=AA(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var zA=RA,BA=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=NA({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&FA(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:IA(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:IA(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:RA(e,.1),hover:RA(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:RA(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:RA(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:RA(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:RA(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:LA(r,t),hover:LA(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function VA({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&NA({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function HA(e,t,n){return VA({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function UA(e,t){let n=e.colors[e.primaryColor];return FA(n)?e.autoContrast?HA(n,e,t):`var(--mantine-color-white)`:VA({color:n[kA(e,t)],theme:e,autoContrast:null})}function WA(e,t){return typeof e==`boolean`?e:t.autoContrast}var GA=(0,W.createContext)(null);function KA(){let e=(0,W.use)(GA);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function _ie(){return KA().cssVariablesResolver}function vie(){return KA().classNamesPrefix}function qA(){return KA().getStyleNonce}function yie(){return KA().withStaticClasses}function bie(){return KA().headless}function xie(){return KA().stylesTransform?.sx}function Sie(){return KA().stylesTransform?.styles}function JA(){return KA().env||`default`}function Cie(){return KA().deduplicateInlineStyles}function YA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function wie({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(YA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),YA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),pA(()=>{YA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return YA(r,n),()=>{};r===void 0&&YA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&YA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var Tie=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Eie=s(((e,t)=>{t.exports=Tie()})),Die={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},XA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,ZA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:Die,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:BA,autoContrast:!1,luminanceThreshold:.3,fontFamily:XA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:XA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},Oie=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,kie=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function QA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function $A(e){if(!(e.primaryColor in e.colors))throw Error(Oie);if(typeof e.primaryShade==`object`&&(!QA(e.primaryShade.dark)||!QA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!QA(e.primaryShade))throw Error(kie)}function Aie(e,t){if(!t)return $A(e),e;let n=qk(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),$A(n),n}var G=Eie(),ej=(0,W.createContext)(null),jie=()=>(0,W.use)(ej)||ZA;function tj(){let e=(0,W.use)(ej);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function nj({theme:e,children:t,inherit:n=!0}){let r=jie(),i=(0,W.useMemo)(()=>Aie(n?r:ZA,e),[e,r,n]);return(0,G.jsx)(ej,{value:i,children:t})}nj.displayName=`@mantine/core/MantineThemeProvider`;function rj(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function ij(e,t){let n=t?[t]:[`:root`,`:host`],r=rj(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=rj(e.dark),o=rj(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function aj({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=kA(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:zA(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=kA(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:IA(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:IA(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:zA(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function oj(e,t,n){Gk(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var sj=e=>{let t=kA(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":UA(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":UA(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};oj(r.variables,e.breakpoints,`breakpoint`),oj(r.variables,e.spacing,`spacing`),oj(r.variables,e.fontSizes,`font-size`),oj(r.variables,e.lineHeights,`line-height`),oj(r.variables,e.shadows,`shadow`),oj(r.variables,e.radius,`radius`),oj(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),Gk(e.colors).forEach(t=>{let n=e.colors[t];if(FA(n)){Object.assign(r.light,aj({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,aj({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=HA(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=HA(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,aj({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,aj({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return Gk(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function Mie(){let e=tj(),t=qA(),n=Gk(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Wre(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:Xk(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:Xk(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Nie({theme:e,generator:t}){let n=sj(e),r=t?.(e);return r?qk(n,r):n}var cj=sj(ZA);function Pie(e){let t={variables:{},light:{},dark:{}};return Gk(e.variables).forEach(n=>{cj.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Gk(e.light).forEach(n=>{cj.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Gk(e.dark).forEach(n=>{cj.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Fie(e){return ij({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function lj({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=tj(),r=qA(),i=Nie({theme:n,generator:_ie()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=ij(a?Pie(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:Fie(e)}`}}):null}lj.displayName=`@mantine/CssVariables`;function Iie({respectReducedMotion:e,getRootElement:t}){pA(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function uj({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=uie(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=wie({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Iie({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(GA,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(nj,{theme:e,children:[o&&(0,G.jsx)(lj,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(Mie,{}),t]})})}uj.displayName=`@mantine/core/MantineProvider`;function dj(e,t,n){let r=tj(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...Zk(n)}}function Lie(e){return e}var Rie={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function zie({theme:e,options:t,unstyled:n}){return TA(t?.focusable&&!n&&(e.focusClassName||Rie[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Bie({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return EA({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function Vie({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return EA({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Hie({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Uie({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Wie({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function fj({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function pj({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return TA(zie({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),fj({options:t,classes:s,selector:r,unstyled:c||m}),a[r],Vie({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Bie({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Hie({rootSelector:u,selector:r,className:l}),Uie({selector:r,classes:s,unstyled:c||m}),p&&!m&&Wie({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function mj({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...mj({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function hj({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&DA({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...mj({style:n?.style,theme:e})}}function gj(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...Zk(t[n])}}),e),{})}function _j({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Sie()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function vj({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=tj(),m=vie(),h=yie(),g=bie(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=_j({props:n,stylesCtx:r,themeName:_,theme:p}),b=EA({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>EA({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:DA({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=DA({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=gj([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=mj({style:a,theme:p});return(e,a)=>({...f?.[e],className:pj({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:hj({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function yj(e){return Gk(e).reduce((t,n)=>e[n]===void 0?t:`${t}${Hre(n)}:${e[n]};`,``).trim()}function bj({selector:e,styles:t,media:n,container:r}){let i=t?yj(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${yj(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${yj(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function xj(e){let t=5381;for(let n=0;n>>0).toString(36)}function Sj({deduplicate:e,...t}){let n=qA(),r=bj(t);return e?(0,G.jsx)(`style`,{href:`mantine-${xj(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Cj(e){let t=5381;for(let n=0;n>>0).toString(36)}function wj(e,t){return`__mdi__-${Cj(`${e?yj(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${yj(e.styles)}`).join(`|`):``}`)}`}function Tj(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:ee,ta:te,lh:j,fs:M,tt:ne,td:N,w:P,miw:F,maw:re,h:I,mih:ie,mah:ae,bgsz:oe,bgp:se,bgr:L,bga:R,pos:ce,top:le,left:ue,bottom:de,right:fe,inset:pe,display:me,flex:z,hiddenFrom:he,visibleFrom:B,lightHidden:ge,darkHidden:_e,sx:ve,...ye}=e;return{styleProps:Zk({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:ee,ta:te,lh:j,fs:M,tt:ne,td:N,w:P,miw:F,maw:re,h:I,mih:ie,mah:ae,bgsz:oe,bgp:se,bgr:L,bga:R,pos:ce,top:le,left:ue,bottom:de,right:fe,inset:pe,display:me,flex:z,bdrs:w,hiddenFrom:he,visibleFrom:B,lightHidden:ge,darkHidden:_e,sx:ve}),rest:ye}}var Ej={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function Dj(e,t){let n=NA({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function Oj(e,t){let n=NA({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Dj(e,t)}function kj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${Dj(i.join(` `),t)}`),a.trim()}return e}var Aj={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function jj(e){return typeof e==`string`&&e in Aj?Aj[e]:e}var Mj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Nj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&Mj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function Pj(e){return e}var Fj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Ij(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Fj.includes(e)?`var(--mantine-${e}-line-height)`:e}function Lj(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function Rj(e){return typeof e==`number`?U(e):e}function zj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var Bj={color:Dj,textColor:Oj,fontSize:Nj,spacing:zj,radius:Lj,identity:Pj,size:Rj,lineHeight:Ij,fontFamily:jj,border:kj};function Vj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Gie({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Vj(e))-Number(Vj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function Kie(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function qie(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Jie(e){return typeof e==`object`&&e?Gk(e).filter(e=>e!==`base`):[]}function Yie(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Xie({styleProps:e,data:t,theme:n}){return Gie(Gk(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=qie(e[i]);if(!Kie(e[i]))return o.forEach(e=>{r.inlineStyles[e]=Bj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Jie(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=Bj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:Bj[a.type](Yie(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Zie(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function Hj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Hj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Qie(e){return e}var Uj=Qie;function Wj(e){return e}function Gj(e){let t=e;return t.extend=Wj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Kj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Wj,t}function qj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function Jj(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[qj(n)]=e[n]),t},{})}function Yj(e){return e?typeof e==`string`?{[qj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Yj(t)}),{}):Jj(e):null}function Xj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Xj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Zj({theme:e,style:t,vars:n,styleProps:r}){let i=Xj(t,e),a=Xj(n,e);return{...i,...a,...r}}function Qj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=tj(),g=e||`div`,{styleProps:_,rest:v}=Tj(m),y=xie()?.()?.(_.sx),b=Zie(),x=Xie({styleProps:_,theme:h,data:Ej}),S=Cie(),C=S&&x.hasResponsiveStyles?wj(x.styles,x.media):b,w={ref:p,style:Zj({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:TA(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Qk(o)?void 0:o||void 0,size:f,...Yj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(Sj,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Qj.displayName=`@mantine/core/Box`;var $j=Uj(Qj),eM=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function tM(){return(0,W.use)(eM)}var[nM,rM]=eA(`ScrollArea.Root component was not found in tree`);function iM(e,t){let n=(0,W.useEffectEvent)(t);pA(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function aM(e){let{style:t,...n}=e,r=rM(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return iM(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),iM(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function oM(e){let t=rM(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(aM,{...e}):null}var sM={scrollHideDelay:1e3,type:`hover`};function cM(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=dj(`ScrollAreaRoot`,sM,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=gA(a,c);return(0,G.jsx)(nM,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)($j,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}cM.displayName=`@mantine/core/ScrollAreaRoot`;function lM(e,t){let n=e/t;return Number.isNaN(n)?0:n}function uM(e){let t=lM(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function dM(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function fM(e,[t,n]){return Math.min(n,Math.max(t,e))}function pM(e,t,n=`ltr`){let r=uM(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=fM(e,n===`ltr`?[0,o]:[o*-1,0]);return dM([0,o],[0,s])(c)}function mM(e,t,n,r=`ltr`){let i=uM(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return dM([c,l],d)(e)}function hM(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[vM,yM]=eA(`ScrollAreaScrollbar was not found in tree`);function bM(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=rM(),[p,m]=(0,W.useState)(null),h=gA(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=dA(o),S=fA(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),iM(p,S),iM(f.content,S),(0,G.jsx)(vM,{value:{scrollbar:p,hasThumb:n,onThumbChange:dA(r),onThumbPointerUp:dA(i),onThumbPositionChange:x,onThumbPointerDown:dA(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:_M(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:_M(e.onPointerMove,C),onPointerUp:_M(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var xM=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=rM(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=gA(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(bM,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${uM(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),hM(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:gM(s.paddingLeft),paddingEnd:gM(s.paddingRight)}})}})};xM.displayName=`@mantine/core/ScrollAreaScrollbarX`;function SM(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=rM(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=gA(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(bM,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${uM(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),hM(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:gM(s.paddingTop),paddingEnd:gM(s.paddingBottom)}})}})}SM.displayName=`@mantine/core/ScrollAreaScrollbarY`;function CM(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=tM(),i=rM(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=lM(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>mM(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(xM,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=pM(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(SM,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=pM(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}CM.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function wM(e){let t=rM(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=fA(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(wM,{"data-state":i?`visible`:`hidden`,...n}):null}TM.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function EM(e){let{forceMount:t,...n}=e,r=rM(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=fA(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(CM,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:_M(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:_M(e.onPointerLeave,()=>o(`idle`))}):null}function DM(e){let{forceMount:t,...n}=e,r=rM(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(TM,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(EM,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(wM,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(CM,{...n}):null}DM.displayName=`@mantine/core/ScrollAreaScrollbar`;function OM(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function kM(e){let{style:t,ref:n,...r}=e,i=rM(),a=yM(),{onThumbPositionChange:o}=a,s=gA(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=fA(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=OM(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:_M(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:_M(e.onPointerUp,a.onThumbPointerUp)})}kM.displayName=`@mantine/core/ScrollAreaThumb`;function AM(e){let{forceMount:t,...n}=e,r=yM();return t||r.hasThumb?(0,G.jsx)(kM,{...n}):null}AM.displayName=`@mantine/core/ScrollAreaThumb`;function jM({children:e,style:t,ref:n,onWheel:r,...i}){let a=rM(),o=gA(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)($j,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}jM.displayName=`@mantine/core/ScrollAreaViewport`;var MM={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function NM(){return typeof window<`u`}function PM(e){return LM(e)?(e.nodeName||``).toLowerCase():`#document`}function FM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function IM(e){return((LM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function LM(e){return NM()?e instanceof Node||e instanceof FM(e).Node:!1}function RM(e){return NM()?e instanceof Element||e instanceof FM(e).Element:!1}function zM(e){return NM()?e instanceof HTMLElement||e instanceof FM(e).HTMLElement:!1}function BM(e){return!NM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof FM(e).ShadowRoot}function VM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=JM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function $ie(e){return/^(table|td|th)$/.test(PM(e))}function HM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var eae=/transform|translate|scale|rotate|perspective|filter/,tae=/paint|layout|strict|content/,UM=e=>!!e&&e!==`none`,WM;function GM(e){let t=RM(e)?JM(e):e;return UM(t.transform)||UM(t.translate)||UM(t.scale)||UM(t.rotate)||UM(t.perspective)||!KM()&&(UM(t.backdropFilter)||UM(t.filter))||eae.test(t.willChange||``)||tae.test(t.contain||``)}function nae(e){let t=XM(e);for(;zM(t)&&!qM(t);){if(GM(t))return t;if(HM(t))return null;t=XM(t)}return null}function KM(){return WM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),WM}function qM(e){return/^(html|body|#document)$/.test(PM(e))}function JM(e){return FM(e).getComputedStyle(e)}function YM(e){return RM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function XM(e){if(PM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||BM(e)&&e.host||IM(e);return BM(t)?t.host:t}function ZM(e){let t=XM(e);return qM(t)?(e.ownerDocument||e).body:zM(t)&&VM(t)?t:ZM(t)}function QM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ZM(e),i=r===e.ownerDocument?.body,a=FM(r);if(i){let e=$M(a);return t.concat(a,a.visualViewport||[],VM(r)?r:[],e&&n?QM(e):[])}return t.concat(r,QM(r,[],n))}function $M(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var eN=Math.min,tN=Math.max,nN=Math.round,rN=Math.floor,iN=e=>({x:e,y:e}),aN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function oN(e,t,n){return tN(e,eN(t,n))}function sN(e,t){return typeof e==`function`?e(t):e}function cN(e){return e.split(`-`)[0]}function lN(e){return e.split(`-`)[1]}function uN(e){return e===`x`?`y`:`x`}function dN(e){return e===`y`?`height`:`width`}function fN(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function pN(e){return uN(fN(e))}function mN(e,t,n){n===void 0&&(n=!1);let r=lN(e),i=pN(e),a=dN(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=CN(o)),[o,CN(o)]}function hN(e){let t=CN(e);return[gN(e),t,gN(t)]}function gN(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var _N=[`left`,`right`],vN=[`right`,`left`],yN=[`top`,`bottom`],bN=[`bottom`,`top`];function xN(e,t,n){switch(e){case`top`:case`bottom`:return n?t?vN:_N:t?_N:vN;case`left`:case`right`:return t?yN:bN;default:return[]}}function SN(e,t,n,r){let i=lN(e),a=xN(cN(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(gN)))),a}function CN(e){let t=cN(e);return aN[t]+e.slice(t.length)}function wN(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function TN(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:wN(e)}function EN(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function DN(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function ON(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function kN(){return/apple/i.test(navigator.vendor)}function AN(){return DN().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function jN(){return ON().includes(`jsdom/`)}var MN=`data-floating-ui-focusable`,NN=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function PN(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function FN(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&BM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function IN(e){return`composedPath`in e?e.composedPath()[0]:e.target}function LN(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function RN(e){return e.matches(`html,body`)}function zN(e){return e?.ownerDocument||document}function BN(e){return zM(e)&&e.matches(NN)}function VN(e){if(!e||jN())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function HN(e){return e?e.hasAttribute(MN)?e:e.querySelector(`[`+MN+`]`)||e:null}function UN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...UN(e,t.id,n)])}function WN(e){return`nativeEvent`in e}function GN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var KN=typeof document<`u`?W.useLayoutEffect:function(){},qN={...W};function JN(e){let t=W.useRef(e);return KN(()=>{t.current=e}),t}var YN=qN.useInsertionEffect||(e=>e());function XN(e){let t=W.useRef(()=>{});return YN(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function ZN(e,t,n){let{reference:r,floating:i}=e,a=fN(t),o=pN(t),s=dN(o),c=cN(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=lN(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function QN(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=sN(t,e),p=TN(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=EN(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=EN(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var $N=50,eP=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:QN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=ZN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=sN(e,t)||{};if(l==null)return{};let d=TN(u),f={x:n,y:r},p=pN(i),m=dN(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=eN(d[_],T),D=eN(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=oN(E,k,O),ee=!c.arrow&&lN(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===fN(t)||T.every(e=>fN(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=fN(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function rP(e){let t=eN(...e.map(e=>e.left)),n=eN(...e.map(e=>e.top)),r=tN(...e.map(e=>e.right)),i=tN(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function iP(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>EN(rP(e)))}var aP=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=sN(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=iP(u),f=EN(rP(u)),p=TN(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(fN(n)===`y`){let e=d[0],t=d[d.length-1],r=cN(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return EN({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=cN(n)===`left`,t=tN(...d.map(e=>e.right)),r=eN(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return EN({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},oP=new Set([`left`,`top`]);async function sP(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=cN(n),s=lN(n),c=fN(n)===`y`,l=oP.has(o)?-1:1,u=a&&c?-1:1,d=sN(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var cP=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await sP(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},lP=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=sN(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=fN(i),p=uN(f),m=u[p],h=u[f],g=(e,t)=>oN(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function uP(e){let t=JM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=zM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=nN(n)!==a||nN(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function dP(e){return RM(e)?e:e.contextElement}function fP(e){let t=dP(e);if(!zM(t))return iN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=uP(t),o=(a?nN(n.width):n.width)/r,s=(a?nN(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var pP=iN(0);function mP(e){let t=FM(e);return!KM()||!t.visualViewport?pP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function hP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===FM(e)}function gP(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=dP(e),o=iN(1);t&&(r?RM(r)&&(o=fP(r)):o=fP(e));let s=hP(a,n,r)?mP(a):iN(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=FM(a),t=RM(r)?FM(r):r,n=e,i=$M(n);for(;i&&t!==n;){let e=fP(i),t=i.getBoundingClientRect(),r=JM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=FM(i),i=$M(n)}}return EN({width:u,height:d,x:c,y:l})}function _P(e,t){let n=YM(e).scrollLeft;return t?t.left+n:gP(IM(e)).left+n}function vP(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-_P(e,n),y:n.top+t.scrollTop}}function yP(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=IM(r),s=t?HM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=iN(1),u=iN(0),d=zM(r);if((d||!a)&&((PM(r)!==`body`||VM(o))&&(c=YM(r)),d)){let e=gP(r);l=fP(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?vP(o,c):iN(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function bP(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function xP(e){let t=YM(e),n=e.ownerDocument.body,r=tN(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=tN(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+_P(e),o=-t.scrollTop;return JM(n).direction===`rtl`&&(a+=tN(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var SP=25;function CP(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=FM(e),a=IM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!KM()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(_P(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=SP&&(s-=o)}return{width:s,height:c,x:l,y:u}}function wP(e,t){let n=gP(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=fP(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function TP(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=CP(e,n,t);else if(t===`document`)r=xP(IM(e));else if(RM(t))r=wP(t,n);else{let n=mP(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return EN(r)}function EP(e,t){let n=t.get(e);if(n)return n;let r=QM(e,[],!1).filter(e=>RM(e)&&PM(e)!==`body`),i=null,a=JM(e).position===`fixed`,o=a?XM(e):e;for(;RM(o)&&!qM(o);){let e=JM(o),t=GM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=XM(o)}return t.set(e,r),r}function DP(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?HM(t)?[]:EP(t,this._c):[].concat(n),r],o=TP(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=FM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function RP(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=dP(e),u=i||a?[...l?QM(l):[],...t?QM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?LP(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?gP(e):null;c&&g();function g(){let t=gP(e);h&&!IP(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var zP=cP,BP=lP,VP=nP,HP=tP,UP=aP,WP=(e,t,n)=>{let r=new Map,i=n??{},a={...FP,...i.platform,_c:r};return eP(e,t,{...i,platform:a})},GP=u(bA(),1),KP=typeof document<`u`?W.useLayoutEffect:function(){};function qP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!qP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!qP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function JP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function YP(e,t){let n=JP(e);return Math.round(t*n)/n}function XP(e){let t=W.useRef(e);return KP(()=>{t.current=e}),t}function ZP(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);qP(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=XP(c),D=XP(i),O=XP(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),WP(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!qP(w.current,t)&&(w.current=t,GP.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);KP(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);KP(()=>(A.current=!0,()=>{A.current=!1}),[]),KP(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let ee=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),te=W.useMemo(()=>({reference:b,floating:x}),[b,x]),j=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=YP(te.floating,u.x),r=YP(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...JP(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:ee,elements:te,floatingStyles:j}),[u,k,ee,te,j])}var QP=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:HP({element:r.current,padding:i}).fn(n):r?HP({element:r,padding:i}).fn(n):{}}}},$P=(e,t)=>{let n=zP(e);return{name:n.name,fn:n.fn,options:[e,t]}},eF=(e,t)=>{let n=BP(e);return{name:n.name,fn:n.fn,options:[e,t]}},tF=(e,t)=>{let n=VP(e);return{name:n.name,fn:n.fn,options:[e,t]}},nF=(e,t)=>{let n=UP(e);return{name:n.name,fn:n.fn,options:[e,t]}},rF=(e,t)=>{let n=QP(e);return{name:n.name,fn:n.fn,options:[e,t]}};function iF(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var aF=`data-floating-ui-focusable`,oF=`active`,sF=`selected`,cF=`ArrowLeft`,lF=`ArrowRight`,uF=`ArrowUp`,dF=`ArrowDown`,fF=[cF,lF],pF=[uF,dF];[...fF,...pF];var mF={...W},hF=!1,gF=0,_F=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+gF++;function vF(){let[e,t]=W.useState(()=>hF?_F():void 0);return KN(()=>{e??t(_F())},[]),W.useEffect(()=>{hF=!0},[]),e}var yF=mF.useId||vF;function bF(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var xF=W.createContext(null),SF=W.createContext(null),CF=()=>W.useContext(xF)?.id||null,wF=()=>W.useContext(SF);function TF(e){return`data-floating-ui-`+e}function EF(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var DF=TF(`safe-polygon`);function OF(e,t,n){if(n&&!GN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function kF(e){return typeof e==`function`?e():e}function AF(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=wF(),m=CF(),h=JN(l),g=JN(c),_=JN(n),v=JN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=XN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(EF(b),EF(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=zN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=OF(g.current,`close`,y.current);i&&!x.current?(EF(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(EF(b),r(!1,e,n))},[g,r]),k=XN(()=>{T.current(),x.current=void 0}),A=XN(()=>{if(w.current){let e=zN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(DF),w.current=!1}}),ee=XN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(EF(b),C.current=!1,u&&!GN(y.current)||kF(v.current)>0&&!OF(g.current,`open`))return;let t=OF(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(ee()){A();return}T.current();let t=zN(o.floating);if(EF(S),E.current=!1,h.current&&i.current.floatingContext){n||EF(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),ee()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!FN(o.floating,e.relatedTarget))&&O(e)}function a(e){ee()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),ee()||O(e)}})(e))}function c(){EF(b)}function l(e){ee()||O(e,!1)}if(RM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,ee,v]),KN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(RM(o.domReference)&&e){var t;let n=zN(o.floating).body;n.setAttribute(DF,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),KN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),EF(b),EF(S),A()},[s,o.domReference,k,A]);let te=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||GN(y.current))&&(n||kF(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(EF(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,kF(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:te}:{},[s,te])}var jF=()=>{},MF=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:jF,setState:jF,isInstantPhase:!1}),rae=()=>W.useContext(MF);function iae(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return KN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(MF.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function aae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=rae(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return KN(()=>{o&&l&&(f({delay:{open:1,close:OF(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),KN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),KN(()=>{o&&u!==jF&&n&&u(s)},[o,n,u,s]),c}function NF(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&BM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function oae(e){return`composedPath`in e?e.composedPath()[0]:e.target}var sae={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},cae={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},PF=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function lae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=wF(),g=XN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=PF(p),{escapeKey:x,outsidePress:S}=PF(m),C=W.useRef(!1),w=XN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?UN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,WN(e)?e.nativeEvent:e,`escape-key`)}),T=XN(e=>{var t;let n=()=>{var t;w(e),(t=IN(e))==null||t.removeEventListener(`keydown`,n)};(t=IN(e))==null||t.addEventListener(`keydown`,n)}),E=XN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=IN(e),s=`[`+TF(`inert`)+`]`,c=zN(i.floating).querySelectorAll(s),u=RM(o)?o:null;for(;u&&!qM(u);){let e=XM(u);if(qM(e)||!RM(e))break;u=e}if(c.length&&RM(o)&&!RN(o)&&!FN(o,i.floating)&&Array.from(c).every(e=>!FN(u,e)))return;if(zM(o)&&k){let t=qM(o),n=JM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&UN(h.nodesRef.current,d).some(t=>LN(e,t.context?.elements.floating));if(LN(e,i.floating)||LN(e,i.domReference)||f)return;let p=h?UN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=XN(e=>{var t;let n=()=>{var t;E(e),(t=IN(e))==null||t.removeEventListener(l,n)};(t=IN(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},KM()?5:0)}let d=zN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(RM(i.domReference)&&(p=QM(i.domReference)),RM(i.floating)&&(p=p.concat(QM(i.floating))),!RM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(QM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[sae[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[cae[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function uae(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=yF(),a=W.useRef({}),[o]=W.useState(()=>bF()),s=CF()!=null,[c,l]=W.useState(r.reference),u=XN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function FF(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=uae({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=wF();KN(()=>{d&&(f.current=d)},[d]);let m=ZP({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=RM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(RM(e)||e===null)&&(f.current=e,c(e)),(RM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!RM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return KN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function IF(){return AN()&&kN()}function dae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=FM(o.domReference);function t(){!n&&zM(o.domReference)&&o.domReference===PN(zN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),IF()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),IF()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{EF(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=IN(e.nativeEvent);if(c&&RM(t)){if(IF()&&!e.relatedTarget){if(!d.current&&!BN(t))return}else if(!VN(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=RM(t)&&t.hasAttribute(TF(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=PN(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(FN(a.current.floatingContext?.refs.floating.current,e)||FN(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function LF(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[oF]:t,[sF]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[aF]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[oF,sF].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function fae(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>LF(t,e,`reference`),t),a=W.useCallback(t=>LF(t,e,`floating`),n),o=W.useCallback(t=>LF(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var pae=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function mae(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=yF(),c=r.domReference?.id||s,l=W.useMemo(()=>HN(r.floating)?.id||i,[r.floating,i]),u=pae.get(o)??o,d=CF()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function RF(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...RF(e,t.id,n)])}function zF(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function hae(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function gae(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){EF(i),u()}if(EF(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=oae(e),v=e.type===`mouseleave`,y=NF(c.floating,_),b=NF(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=hae(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,ee=(O?x:S).top,te=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&RM(e.relatedTarget)&&NF(c.floating,e.relatedTarget)||f&&RF(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let j=[];switch(C){case`top`:j=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:j=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:j=[[S.right-1,te],[S.right-1,ee],[x.left+1,ee],[x.left+1,te]];break;case`right`:j=[[x.right-1,te],[x.right-1,ee],[S.left+1,ee],[S.left+1,te]]}function M(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!zF([m,h],j)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}zF([m,h],M([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var BF={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},VF=CA((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),HF=Gj(e=>{let t=dj(`ScrollArea`,BF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,ee]=(0,W.useState)(!1),te=(0,W.useRef)(!0),j=(0,W.useRef)(!1),M=(0,W.useRef)(!0),ne=(0,W.useRef)(!1),N=vj({name:`ScrollArea`,props:t,classes:MM,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:VF}),P=(0,W.useRef)(null),[F,re]=(0,W.useState)(null),I=iF([f,P,(0,W.useCallback)(e=>{re(t=>t===e?t:e)},[])]);return iM(h===`present`?F:null,()=>{let e=P.current;e&&(k(e.scrollHeight>e.clientHeight),ee(e.scrollWidth>e.clientWidth))}),pA(()=>{S&&P.current&&P.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(cM,{getStyles:N,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...N(`root`),...T,children:[(0,G.jsx)(jM,{...d,...N(`viewport`,{style:d?.style}),ref:I,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!j.current&&_?.(),c&&!te.current&&v?.(),j.current=s,te.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!ne.current&&b?.(),u&&!M.current&&y?.(),ne.current=l,M.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(DM,{...N(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(AM,{...N(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(DM,{...N(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(AM,{...N(`thumb`)})}),(0,G.jsx)(oM,{...N(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});HF.displayName=`@mantine/core/ScrollArea`;var UF=Gj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=dj(`ScrollAreaAutosize`,BF,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=iF([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return iM(S?T:null,A),(0,G.jsx)($j,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)($j,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(HF,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});HF.classes=MM,HF.varsResolver=VF,UF.displayName=`@mantine/core/ScrollAreaAutosize`,UF.classes=MM,HF.Autosize=UF;var WF={root:`m_87cf2631`},_ae={__staticSelector:`UnstyledButton`},GF=Kj(e=>{let t=dj(`UnstyledButton`,_ae,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)($j,{...vj({name:i,props:t,classes:WF,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});GF.classes=WF,GF.displayName=`@mantine/core/UnstyledButton`;var KF={root:`m_1b7284a3`},qF=CA((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:cA(t),"--paper-shadow":Zre(n)}})),JF=Kj(e=>{let t=dj(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=vj({name:`Paper`,props:t,classes:KF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:qF});return(0,G.jsx)($j,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});JF.classes=KF,JF.varsResolver=qF,JF.displayName=`@mantine/core/Paper`;function YF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function XF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var vae={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function yae({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function bae({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=yae({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[vae[c]]:r},d=-t/2;return c===`left`?{...u,...YF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...YF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...XF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...XF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function xae({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function ZF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=tM();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...bae({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}ZF.displayName=`@mantine/core/FloatingArrow`;function Sae(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function QF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function Cae({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||QF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=QF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return QF(n)}var wae={reuseTargetNode:!0},$F=Gj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=dj(`Portal`,wae,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return pA(()=>(s(!0),c.current=Cae({target:n,reuseTargetNode:r,...a}),hA(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,GP.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});$F.displayName=`@mantine/core/Portal`;var eI=Gj(({withinPortal:e=!0,children:t,...n})=>JA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)($F,{...n,children:t}));eI.displayName=`@mantine/core/OptionalPortal`;var tI=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),nI={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...tI(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...tI(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...tI(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...tI(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...tI(`top`),common:{transformOrigin:`top right`}}},rI={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function iI({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in nI?{transitionProperty:nI[e].transitionProperty,...i,...nI[e].common,...nI[e][rI[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[rI[t]]}}function Tae({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=tj(),d=oie(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{GP.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return tie(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function aI({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=JA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=Tae({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:iI({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(iI({transition:n,duration:h,state:g,timingFunction:_}))})}aI.displayName=`@mantine/core/Transition`;var Eae={duration:100,transition:`fade`};function oI(e,t){return{...Eae,...t,...e}}var sI={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},cI=({className:e,...t})=>(0,G.jsxs)($j,{component:`span`,className:TA(sI.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:sI.bar}),(0,G.jsx)(`span`,{className:sI.bar}),(0,G.jsx)(`span`,{className:sI.bar})]});cI.displayName=`@mantine/core/Bars`;var lI=({className:e,...t})=>(0,G.jsxs)($j,{component:`span`,className:TA(sI.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:sI.dot}),(0,G.jsx)(`span`,{className:sI.dot}),(0,G.jsx)(`span`,{className:sI.dot})]});lI.displayName=`@mantine/core/Dots`;var uI=({className:e,...t})=>(0,G.jsx)($j,{component:`span`,className:TA(sI.ovalLoader,e),...t});uI.displayName=`@mantine/core/Oval`;var dI={bars:cI,oval:uI,dots:lI},Dae={loaders:dI,type:`oval`},fI=CA((e,{size:t,color:n})=>({root:{"--loader-size":oA(t,`loader-size`),"--loader-color":n?PA(n,e):void 0}})),pI=Gj(e=>{let t=dj(`Loader`,Dae,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=vj({name:`Loader`,props:t,classes:sI,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:fI});return p?(0,G.jsx)($j,{...g(`root`),...h,children:p}):(0,G.jsx)($j,{...g(`root`),component:d[i],variant:f,size:n,...h})});pI.defaultLoaders=dI,pI.classes=sI,pI.varsResolver=fI,pI.displayName=`@mantine/core/Loader`;var mI={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},Oae={orientation:`horizontal`},hI=CA((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),gI=Gj(e=>{let t=dj(`ActionIconGroup`,Oae,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)($j,{...vj({name:`ActionIconGroup`,props:t,classes:mI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:hI,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});gI.classes=mI,gI.varsResolver=hI,gI.displayName=`@mantine/core/ActionIconGroup`;var _I=CA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":oA(o,`section-height`),"--section-padding-x":oA(o,`section-padding-x`),"--section-fz":lA(o),"--section-radius":t===void 0?void 0:cA(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),vI=Gj(e=>{let t=dj(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)($j,{...vj({name:`ActionIconGroupSection`,props:t,classes:mI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:_I,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});vI.classes=mI,vI.varsResolver=_I,vI.displayName=`@mantine/core/ActionIconGroupSection`;var yI=CA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":oA(t,`ai-size`),"--ai-radius":n===void 0?void 0:cA(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),bI=Kj(e=>{let t=dj(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=vj({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:mI,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:yI});return(0,G.jsxs)(GF,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(aI,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)($j,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(pI,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)($j,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});bI.classes=mI,bI.varsResolver=yI,bI.displayName=`@mantine/core/ActionIcon`,bI.Group=gI,bI.GroupSection=vI;function xI({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}xI.displayName=`@mantine/core/CloseIcon`;var SI={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},CI={variant:`subtle`},wI=CA((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":oA(t,`cb-size`),"--cb-radius":n===void 0?void 0:cA(n),"--cb-icon-size":U(r)}})),TI=Kj(e=>{let t=dj(`CloseButton`,CI,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=vj({name:_||`CloseButton`,props:t,className:o,style:c,classes:SI,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:wI});return(0,G.jsxs)(GF,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(xI,{}),r]})});TI.classes=SI,TI.varsResolver=wI,TI.displayName=`@mantine/core/CloseButton`;function EI(e){return W.Children.toArray(e).filter(Boolean)}var DI={root:`m_4081bf90`},OI={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},kI=CA((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":sA(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),AI=Gj(e=>{let t=dj(`Group`,OI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=EI(s),x=b.length,S=sA(c??`md`);return(0,G.jsx)($j,{...vj({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:DI,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:kI})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});AI.classes=DI,AI.varsResolver=kI,AI.displayName=`@mantine/core/Group`;var jI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},MI=CA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:cA(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),NI=Gj(e=>{let t=dj(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=vj({name:`Alert`,classes:jI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:MI}),C=mA(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)($j,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(TI,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});NI.classes=jI,NI.varsResolver=MI,NI.displayName=`@mantine/core/Alert`;var PI={root:`m_b6d8b162`};function FI(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var II={inherit:!1},LI=CA((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":lA(i),"--text-lh":Xre(i),"--text-gradient":t===`gradient`?LA(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),RI=Kj(e=>{let t=dj(`Text`,II,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)($j,{...vj({name:[`Text`,l],props:t,classes:PI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:LI})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":FI(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});RI.classes=PI,RI.varsResolver=LI,RI.displayName=`@mantine/core/Text`;var zI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},BI=CA((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":oA(a,`badge-height`),"--badge-padding-x":oA(a,`badge-padding-x`),"--badge-fz":oA(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:cA(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?PA(n,e):void 0}}}),VI=Kj(e=>{let t=dj(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=vj({name:`Badge`,props:t,classes:zI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:BI});return(0,G.jsxs)($j,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});VI.classes=zI,VI.varsResolver=BI,VI.displayName=`@mantine/core/Badge`;var HI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},UI={orientation:`horizontal`},WI=CA((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),GI=Gj(e=>{let t=dj(`ButtonGroup`,UI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=dj(`ButtonGroup`,UI,e);return(0,G.jsx)($j,{...vj({name:`ButtonGroup`,props:t,classes:HI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:WI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});GI.classes=HI,GI.varsResolver=WI,GI.displayName=`@mantine/core/ButtonGroup`;var KI=CA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":oA(o,`section-height`),"--section-padding-x":oA(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?lA(o.replace(`compact-`,``)):lA(o),"--section-radius":t===void 0?void 0:cA(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),qI=Gj(e=>{let t=dj(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)($j,{...vj({name:`ButtonGroupSection`,props:t,classes:HI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:KI,rootSelector:`groupSection`})(`groupSection`),...f})});qI.classes=HI,qI.varsResolver=KI,qI.displayName=`@mantine/core/ButtonGroupSection`;var JI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},YI=CA((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":oA(a,`button-height`),"--button-padding-x":oA(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?lA(a.replace(`compact-`,``)):lA(a),"--button-radius":t===void 0?void 0:cA(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),XI=Kj(e=>{let t=dj(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=vj({name:`Button`,props:t,classes:HI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:YI}),T=!!c,E=!!l;return(0,G.jsxs)(GF,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(aI,{mounted:p,transition:JI,duration:150,children:e=>(0,G.jsx)($j,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(pI,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)($j,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)($j,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)($j,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});XI.classes=HI,XI.varsResolver=YI,XI.displayName=`@mantine/core/Button`,XI.Group=GI,XI.GroupSection=qI;var ZI={root:`m_4451eb3a`},QI=Kj(e=>{let t=dj(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=vj({name:`Center`,props:t,classes:ZI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)($j,{mod:[{inline:c},l],...f(`root`),...d})});QI.classes=ZI,QI.displayName=`@mantine/core/Center`;var[$I,eL]=eA(`Pagination.Root component was not found in tree`),tL={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},nL={withPadding:!0},rL=Gj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=dj(`PaginationControl`,nL,e),d=eL(),f=s||d.disabled;return(0,G.jsx)(GF,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});rL.classes=tL,rL.displayName=`@mantine/core/PaginationControl`;function iL({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var aL=e=>(0,G.jsx)(iL,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),oL=e=>(0,G.jsx)(iL,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),sL=e=>(0,G.jsx)(iL,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),cL=e=>(0,G.jsx)(iL,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),lL={icon:e=>(0,G.jsx)(iL,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},uL=Gj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=dj(`PaginationDots`,lL,e);return(0,G.jsx)($j,{...eL().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});uL.classes=tL,uL.displayName=`@mantine/core/PaginationDots`;function dL({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=dj(t,i,e),s=eL(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(rL,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,Uj(a)}var fL=dL({icon:aL,name:`PaginationNext`,action:`onNext`,type:`next`}),pL=dL({icon:oL,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),mL=dL({icon:sL,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),hL=dL({icon:cL,name:`PaginationLast`,action:`onLast`,type:`next`});function gL({dotsIcon:e}){let t=eL();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(uL,{icon:e},r):(0,G.jsx)(rL,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}gL.displayName=`@mantine/core/PaginationItems`;var _L={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},vL=Gj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=dj(`PaginationLabel`,_L,e),c=eL();return(0,G.jsx)($j,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});vL.classes=tL,vL.displayName=`@mantine/core/PaginationLabel`;var yL={siblings:1,boundaries:1},bL=CA((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:cA(n),"--pagination-control-size":oA(t,`pagination-control-size`),"--pagination-control-fz":lA(t),"--pagination-active-bg":r?PA(r,e):void 0,"--pagination-active-color":WA(i,e)?VA({color:r,theme:e,autoContrast:i}):void 0}})),xL=Gj(e=>{let t=dj(`PaginationRoot`,yL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=vj({name:`Pagination`,classes:tL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:bL}),{range:k,setPage:A,next:ee,previous:te,active:j,first:M,last:ne}=aie({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)($I,{value:{total:c,range:k,active:j,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:uA(_,ee),onPrevious:uA(v,te),onFirst:uA(y,M),onLast:uA(b,ne),getStyles:O},children:(0,G.jsx)($j,{...O(`root`),mod:[{layout:w},T],...D})})});xL.classes=tL,xL.varsResolver=bL,xL.displayName=`@mantine/core/PaginationRoot`;var SL={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function CL({children:e}){return(0,G.jsx)($j,{...eL().getStyles(`items`),children:e})}var wL=Gj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=dj(`Pagination`,SL,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(CL,{children:(0,G.jsx)(gL,{dotsIcon:c})}),(0,G.jsx)(vL,{formatLabel:m})]}):(0,G.jsx)(gL,{dotsIcon:c}):null;return(0,G.jsx)(xL,{total:l,layout:p,...h,children:(0,G.jsxs)(AI,{gap:u,children:[t&&(0,G.jsx)(mL,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(pL,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(fL,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(hL,{icon:o,...r?.(`last`)})]})})});wL.classes=tL,wL.displayName=`@mantine/core/Pagination`,wL.Root=xL,wL.Control=rL,wL.Dots=uL,wL.First=mL,wL.Last=hL,wL.Next=fL,wL.Previous=pL,wL.Items=gL,wL.Label=vL;function TL({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=FF({placement:t,middleware:[eF({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=QM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var EL={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},DL={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:aA(`popover`)},OL=CA((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:cA(t),"--tooltip-bg":n?PA(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),kL=Gj(e=>{let t=dj(`TooltipFloating`,DL,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=tj(),E=vj({name:`TooltipFloating`,props:t,classes:EL,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:OL}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:ee,floating:te,setOpened:j}=TL({offset:p,position:m,defaultOpened:v}),M=SA(n);if(!M)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let ne=gA(ee,xA(M),C),N=M.props,P=e=>{N.onMouseEnter?.(e),D(e),j(!0)},F=e=>{N.onMouseLeave?.(e),j(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(eI,{...x,withinPortal:i,children:(0,G.jsx)($j,{...w,...E(`tooltip`,{style:{...Hj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:te,mod:{multiline:h},children:f})}),(0,W.cloneElement)(M,{...N,[r]:ne,onMouseEnter:P,onMouseLeave:F})]})});kL.classes=EL,kL.varsResolver=OL,kL.displayName=`@mantine/core/TooltipFloating`;var AL=(0,W.createContext)({withinGroup:!1}),jL={openDelay:0,closeDelay:0};function ML(e){let{openDelay:t,closeDelay:n,children:r}=dj(`TooltipGroup`,jL,e);return(0,G.jsx)(AL,{value:{withinGroup:!0},children:(0,G.jsx)(iae,{delay:{open:t,close:n},children:r})})}ML.displayName=`@mantine/core/TooltipGroup`,ML.extend=e=>e;function NL(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function PL(e){let t=NL(e.middlewares),n=[$P(e.offset)];return t.shift&&n.push(eF(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?tF():tF(t.flip)),n.push(rF({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?nF():nF(t.inline)):e.inline&&n.push(nF()),n}function FL(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(AL).withinGroup,a=mA(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=FF({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:PL(e),whileElementsMounted:RP}),{delay:m,currentId:h,setCurrentId:g}=aae(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=fae([AF(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?gae():null}),dae(l,{enabled:e.events?.focus,visibleOnly:!0}),mae(l,{role:`tooltip`}),lae(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);pA(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var IL={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:aA(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},LL=CA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:cA(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),RL=Gj(e=>{let t=dj(`Tooltip`,IL,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:ee,onMouseEnter:te,onMouseLeave:j,inline:M,variant:ne,keepMounted:N,vars:P,portalProps:F,mod:re,floatingStrategy:I,middlewares:ie,autoContrast:ae,attributes:oe,target:se,ref:L,...R}=t,{dir:ce}=tM(),le=(0,W.useRef)(null),ue=FL({position:Sae(ce,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:le,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:M,strategy:I,middlewares:ie});(0,W.useEffect)(()=>{let e=se instanceof HTMLElement?se:typeof se==`string`?document.querySelector(se):se?.current||null;e&&ue.reference(e)},[se,ue]);let de=vj({name:`Tooltip`,props:t,classes:EL,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:oe,rootSelector:`tooltip`,vars:P,varsResolver:LL}),fe=SA(n);if(!se&&!fe)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let pe=de(`tooltip`),me=O&&!A&&!!ue.opened,z=C===`merge`&&y?xae({position:ue.placement,dir:ce}):void 0;if(se){let e=oI(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)(eI,{...F,withinPortal:d,children:(0,G.jsx)(aI,{...e,keepMounted:N,mounted:!A&&!!ue.opened,duration:ue.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)($j,{...R,"data-fixed":I===`fixed`||void 0,variant:ne,mod:[{multiline:E,interactive:me},re],...pe,...ue.getFloatingProps({ref:ue.floating,className:pe.className,style:{...pe.style,...e,...z,zIndex:k,top:ue.y??0,left:ue.x??0}}),children:[a,(0,G.jsx)(ZF,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...de(`arrow`)})]})})})})}let he=fe.props,B=gA(ue.reference,xA(fe),L),ge=oI(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(eI,{...F,withinPortal:d,children:(0,G.jsx)(aI,{...ge,keepMounted:N,mounted:!A&&!!ue.opened,duration:ue.isGroupPhase?10:ge.duration,children:e=>(0,G.jsxs)($j,{...R,"data-fixed":I===`fixed`||void 0,variant:ne,mod:[{multiline:E,interactive:me},re],...ue.getFloatingProps({ref:ue.floating,className:de(`tooltip`).className,style:{...de(`tooltip`).style,...e,...z,zIndex:k,top:ue.y??0,left:ue.x??0}}),children:[a,(0,G.jsx)(ZF,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...de(`arrow`)})]})})}),(0,W.cloneElement)(fe,ue.getReferenceProps({onClick:ee,onMouseEnter:te,onMouseLeave:j,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...he,className:TA(v,he.className),[i]:B}))]})});RL.classes=EL,RL.varsResolver=LL,RL.displayName=`@mantine/core/Tooltip`,RL.Floating=kL,RL.Group=ML;var zL={root:`m_6d731127`},BL={gap:`md`,align:`stretch`,justify:`flex-start`},VL=CA((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":sA(t),"--stack-align":n,"--stack-justify":r}})),HL=Gj(e=>{let t=dj(`Stack`,BL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)($j,{...vj({name:`Stack`,props:t,classes:zL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:VL})(`root`),variant:d,...p})});HL.classes=zL,HL.varsResolver=VL,HL.displayName=`@mantine/core/Stack`;var[UL,WL]=eA(`Table component was not found in the tree`),GL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function KL(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function qL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Gj(r=>{let i=dj(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=WL();return(0,G.jsx)($j,{component:e,...KL(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=GL,r}var JL=qL(`th`,{columnBorder:!0}),YL=qL(`td`,{columnBorder:!0}),XL=qL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),ZL=qL(`thead`,{stickyHeader:!0}),QL=qL(`tbody`),$L=qL(`tfoot`),eR=qL(`caption`,{captionSide:!0}),tR={type:`scrollarea`},nR=CA((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),rR=Gj(e=>{let t=dj(`TableScrollContainer`,tR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=vj({name:`TableScrollContainer`,classes:GL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:nR,rootSelector:`scrollContainer`});return(0,G.jsx)($j,{component:d===`scrollarea`?HF:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});rR.classes=GL,rR.varsResolver=nR,rR.displayName=`@mantine/core/TableScrollContainer`;function iR({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)(eR,{children:e.caption}),e.head&&(0,G.jsx)(ZL,{children:(0,G.jsx)(XL,{children:e.head.map((e,t)=>(0,G.jsx)(JL,{children:e},t))})}),e.body&&(0,G.jsx)(QL,{children:e.body.map((e,t)=>(0,G.jsx)(XL,{children:e.map((e,t)=>(0,G.jsx)(YL,{children:e},t))},t))}),e.foot&&(0,G.jsx)($L,{children:(0,G.jsx)(XL,{children:e.foot.map((e,t)=>(0,G.jsx)(JL,{children:e},t))})})]})}iR.displayName=`@mantine/core/TableDataRenderer`;var aR={withRowBorders:!0,verticalSpacing:7},oR=CA((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":sA(r),"--table-vertical-spacing":sA(i),"--table-border-color":a?PA(a,e):void 0,"--table-striped-color":c&&o?PA(o,e):void 0,"--table-highlight-on-hover-color":l&&s?PA(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),sR=Gj(e=>{let t=dj(`Table`,aR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=vj({name:`Table`,props:t,className:r,style:i,classes:GL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:oR});return(0,G.jsx)(UL,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)($j,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(iR,{data:b})})})});sR.classes=GL,sR.varsResolver=oR,sR.displayName=`@mantine/core/Table`,sR.Td=YL,sR.Th=JL,sR.Tr=XL,sR.Thead=ZL,sR.Tbody=QL,sR.Tfoot=$L,sR.Caption=eR,sR.ScrollContainer=rR,sR.DataRenderer=iR;var[cR,lR]=eA(`Tabs component was not found in the tree`),uR={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},dR=Gj(e=>{let t=dj(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=lR();return(0,G.jsx)($j,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});dR.classes=uR,dR.displayName=`@mantine/core/TabsList`;var fR=Gj(e=>{let t=dj(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=JA(),f=lR();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)($j,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});fR.classes=uR,fR.displayName=`@mantine/core/TabsPanel`;var pR=Gj(e=>{let t=dj(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=tj(),{dir:y}=tM(),b=lR(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(GF,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?PA(u,v):void 0},onKeyDown:Jre({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});pR.classes=uR,pR.displayName=`@mantine/core/TabsTab`;var mR=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,hR={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},gR=CA((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":cA(t),"--tabs-color":PA(n,e),"--tabs-text-color":WA(r,e)?VA({color:n,theme:e,autoContrast:r}):void 0}})),_R=Gj(e=>{let t=dj(`Tabs`,hR,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=mA(c),k=(0,W.useRef)(new Set),A=rie(),ee=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[te,j]=_A({value:r,defaultValue:n,finalValue:null,onChange:i}),M=vj({name:`Tabs`,props:t,classes:uR,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:gR});return(0,G.jsx)(cR,{value:{placement:h,value:te,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:tA(`${O}-tab`,mR),getPanelId:tA(`${O}-panel`,mR),onChange:j,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:M,mountedPanels:k,setMountedPanel:ee},children:(0,G.jsx)($j,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...M(`root`),...D,children:o})})});_R.classes=uR,_R.varsResolver=gR,_R.displayName=`@mantine/core/Tabs`,_R.Tab=pR,_R.Panel=fR,_R.List=dR;var vR={root:`m_7341320d`},yR=CA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":oA(t,`ti-size`),"--ti-radius":n===void 0?void 0:cA(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),bR=Gj(e=>{let t=dj(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)($j,{...vj({name:`ThemeIcon`,classes:vR,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:yR})(`root`),...u})});bR.classes=vR,bR.varsResolver=yR,bR.displayName=`@mantine/core/ThemeIcon`;var xR=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],SR=[`xs`,`sm`,`md`,`lg`,`xl`];function CR(e,t){let n=t===void 0?`h${e}`:t;return xR.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:SR.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var wR={root:`m_8a5d1357`},TR={order:1},ER=CA((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=CR(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),DR=Gj(e=>{let t=dj(`Title`,TR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=vj({name:`Title`,props:t,classes:wR,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:ER});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)($j,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});DR.classes=wR,DR.varsResolver=ER,DR.displayName=`@mantine/core/Title`;var OR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),kR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M248.49,71.51l-32-32a12,12,0,0,0-17,17L211,68h-3c-52,0-64.8,30.71-75.08,55.38-8.82,21.17-15.45,37.05-42.75,40.09a44,44,0,1,0,.28,24.08c43.34-3.87,55.07-32,64.63-54.93C164.9,109,172,92,208,92h3l-11.52,11.51a12,12,0,0,0,17,17l32-32A12,12,0,0,0,248.49,71.51ZM48,196a20,20,0,1,1,20-20A20,20,0,0,1,48,196Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M80,176a32,32,0,1,1-32-32A32,32,0,0,1,80,176Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H208c-49.33,0-61.05,28.12-71.38,52.92-9.38,22.51-16.92,40.59-49.48,42.84a40,40,0,1,0,.1,16c43.26-2.65,54.34-29.15,64.14-52.69C161.41,107,169.33,88,208,88h12.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M245.66,85.66l-32,32a8,8,0,0,1-11.32-11.32L220.69,88H208c-38.67,0-46.59,19-56.62,43.08C141.05,155.88,129.33,184,80,184H79a32,32,0,1,1,0-16h1c38.67,0,46.59-19,56.62-43.08C147,100.12,158.67,72,208,72h12.69L202.34,53.66a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,245.66,85.66Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244.24,75.76l-32-32a6,6,0,0,0-8.48,8.48L225.51,74H208c-48,0-59.44,27.46-69.54,51.69-9.43,22.64-17.66,42.33-53,44.16a38,38,0,1,0,.06,12c43.34-2.06,54.29-28.29,64-51.55C159.44,106.53,168,86,208,86h17.51l-21.75,21.76a6,6,0,1,0,8.48,8.48l32-32A6,6,0,0,0,244.24,75.76ZM48,202a26,26,0,1,1,26-26A26,26,0,0,1,48,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H208c-49.33,0-61.05,28.12-71.38,52.92-9.38,22.51-16.92,40.59-49.48,42.84a40,40,0,1,0,.1,16c43.26-2.65,54.34-29.15,64.14-52.69C161.41,107,169.33,88,208,88h12.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M242.83,77.17l-32-32a4,4,0,0,0-5.66,5.66L230.34,76H208c-46.67,0-57.84,26.81-67.69,50.46-9.46,22.69-18.4,44.16-56.55,45.48a36,36,0,1,0,0,8c43.49-1.42,54.33-27.39,63.91-50.39C157.45,106.12,166.67,84,208,84h22.34l-25.17,25.17a4,4,0,0,0,5.66,5.66l32-32A4,4,0,0,0,242.83,77.17ZM48,204a28,28,0,1,1,28-28A28,28,0,0,1,48,204Z`}))]]),AR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),jR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,156a43.78,43.78,0,0,0-29.09,11L106.1,140.8a44.07,44.07,0,0,0,0-25.6L146.91,89a43.83,43.83,0,1,0-13-20.17L93.09,95a44,44,0,1,0,0,65.94L133.9,187.2A44,44,0,1,0,176,156Zm0-120a20,20,0,1,1-20,20A20,20,0,0,1,176,36ZM64,148a20,20,0,1,1,20-20A20,20,0,0,1,64,148Zm112,72a20,20,0,1,1,20-20A20,20,0,0,1,176,220Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,200a32,32,0,1,1-32-32A32,32,0,0,1,208,200ZM176,88a32,32,0,1,0-32-32A32,32,0,0,0,176,88Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M176,160a39.89,39.89,0,0,0-28.62,12.09l-46.1-29.63a39.8,39.8,0,0,0,0-28.92l46.1-29.63a40,40,0,1,0-8.66-13.45l-46.1,29.63a40,40,0,1,0,0,55.82l46.1,29.63A40,40,0,1,0,176,160Zm0-128a24,24,0,1,1-24,24A24,24,0,0,1,176,32ZM64,152a24,24,0,1,1,24-24A24,24,0,0,1,64,152Zm112,72a24,24,0,1,1,24-24A24,24,0,0,1,176,224Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212,200a36,36,0,1,1-69.85-12.25l-53-34.05a36,36,0,1,1,0-51.4l53-34a36.09,36.09,0,1,1,8.67,13.45l-53,34.05a36,36,0,0,1,0,24.5l53,34.05A36,36,0,0,1,212,200Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,162a37.91,37.91,0,0,0-28.3,12.67L98.8,143.24a37.89,37.89,0,0,0,0-30.48l48.9-31.43a38,38,0,1,0-6.5-10.09L92.3,102.67a38,38,0,1,0,0,50.66l48.9,31.43A38,38,0,1,0,176,162Zm0-132a26,26,0,1,1-26,26A26,26,0,0,1,176,30ZM64,154a26,26,0,1,1,26-26A26,26,0,0,1,64,154Zm112,72a26,26,0,1,1,26-26A26,26,0,0,1,176,226Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,160a39.89,39.89,0,0,0-28.62,12.09l-46.1-29.63a39.8,39.8,0,0,0,0-28.92l46.1-29.63a40,40,0,1,0-8.66-13.45l-46.1,29.63a40,40,0,1,0,0,55.82l46.1,29.63A40,40,0,1,0,176,160Zm0-128a24,24,0,1,1-24,24A24,24,0,0,1,176,32ZM64,152a24,24,0,1,1,24-24A24,24,0,0,1,64,152Zm112,72a24,24,0,1,1,24-24A24,24,0,0,1,176,224Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,164a36,36,0,0,0-27.92,13.3L96.25,144a35.92,35.92,0,0,0,0-32L148.08,78.7A35.93,35.93,0,1,0,143.75,72L91.92,105.3a36,36,0,1,0,0,45.4L143.75,184A36,36,0,1,0,176,164Zm0-136a28,28,0,1,1-28,28A28,28,0,0,1,176,28ZM64,156a28,28,0,1,1,28-28A28,28,0,0,1,64,156Zm112,72a28,28,0,1,1,28-28A28,28,0,0,1,176,228Z`}))]]),MR=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),NR=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(MR);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});NR.displayName=`IconBase`;var PR=W.forwardRef((e,t)=>W.createElement(NR,{ref:t,...e,weights:OR}));PR.displayName=`ArrowClockwiseIcon`;var FR=PR,IR=W.forwardRef((e,t)=>W.createElement(NR,{ref:t,...e,weights:kR}));IR.displayName=`FlowArrowIcon`;var LR=IR,RR=W.forwardRef((e,t)=>W.createElement(NR,{ref:t,...e,weights:AR}));RR.displayName=`MagnifyingGlassIcon`;var zR=RR,BR=W.forwardRef((e,t)=>W.createElement(NR,{ref:t,...e,weights:jR}));BR.displayName=`ShareNetworkIcon`;var VR=BR,HR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),UR=s(((e,t)=>{t.exports=HR()})),WR=s((e=>{var t=UR(),n=$k(),r=bA();function i(e){var t=`https://react.dev/errors/`+e;if(1P||(e.current=N[P],N[P]=null,P--)}function I(e,t){P++,N[P]=e.current,e.current=t}var ie=F(null),ae=F(null),oe=F(null),se=F(null);function L(e,t){switch(I(oe,t),I(ae,e),I(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}re(ie),I(ie,e)}function R(){re(ie),re(ae),re(oe)}function ce(e){e.memoizedState!==null&&I(se,e);var t=ie.current,n=Qd(t,e.type);t!==n&&(I(ae,e),I(ie,n))}function le(e){ae.current===e&&(re(ie),re(ae)),se.current===e&&(re(se),cp._currentValue=ne)}var ue,de;function fe(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``,de=-11||n>0&&!e.noHeader;return L(e.blocks,function(e){var n=C_(e);n>=t&&(t=n+ +(r&&(!n||x_(e)&&!e.noHeader)))}),t}return 0}function w_(e,t,n,r){var i=t.noHeader,a=D_(C_(t)),o=[],s=t.blocks||[];ke(!s||z(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Ve(l,c)){var u=new tee(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}L(s,function(n,i){var s=t.valueFormatter,c=S_(n)(s?F(F({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):O_(r,o.join(``),i?n:a.html);if(i)return d;var f=hg(t.header,`ordinal`,e.useUTC),p=__(r,e.renderMode).nameStyle,m=g_(r);return e.renderMode===`richText`?j_(e,f,p)+a.richText+d:O_(r,`
`+_h(f)+`
`+d,n)}function T_(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=z(e)?e:[e],R(e,function(e,t){return hg(e,z(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||V.color.secondary,i),f=a?``:hg(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=__(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:j_(e,f,v))+(o?``:M_(e,m,h,g,y)):O_(r,(s?``:d)+(a?``:k_(f,!s,v))+(o?``:A_(m,h,g,y)),n)}}function E_(e,t,n,r,i,a){if(e)return S_(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function D_(e){return{html:v_[e],richText:y_[e]}}function O_(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=g_(e);return`
`+t+r+`
`}function k_(e,t,n){var r=t?`margin-left:2px`:``;return``+_h(e)+``}function A_(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=z(e)?e:[e],``+R(e,function(e){return _h(e)}).join(`  `)+``}function j_(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function M_(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(z(t)?t.join(` `):t,a)}function N_(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return bg(n)}function P_(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var F_=function(){function e(){this.richTextStyles={},this._nextStyleNameId=$s()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=yg({color:t,type:e,renderMode:n,markerId:r});return B(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};z(t)?L(t,function(e){return F(n,e)}):F(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function I_(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=z(s),l=N_(t,n),u,d,f,p;if(o>1||c&&!o){var m=L_(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=mm(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=Ec(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return b_(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[b_(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!Ae(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function L_(e,t,n,r,i){var a=t.getData(),o=ce(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?L(r,function(e){u(mm(a,n,e),e)}):L(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(b_(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var R_=Mc();function z_(e,t){return e.getName(t)||e.getId(t)}var B_=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=Yg({count:U_,reset:Pee}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(R_(this).sourceManager=new l_(this)).prepareSource();var r=this.getInitialData(e,n);W_(r,this),this.dataTask.context.data=r,R_(this).dataBeforeProcessed=r,V_(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{},i=this.subType;Lg.hasClass(i)&&(i+=`Series`),P(e,t.getTheme().get(this.subType)),P(e,this.getDefaultOption()),fc(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&Ng(e,r,n)},t.prototype.mergeOption=function(e,t){e=P(this.option,e,!0),this.fillDataTextStyle(e.data);var n=Mg(this);n&&Ng(this.option,e,n);var r=R_(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);W_(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,R_(this).dataBeforeProcessed=i,V_(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!be(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return I_({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ge.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=Vg.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[z_(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){ve(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return Lg.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(Lg);oe(B_,qg),oe(B_,Vg),tt(B_,Lg);function V_(e){var t=e.name;Ec(e)||(e.name=H_(e)||t)}function H_(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return L(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function U_(e){return e.model.getRawData().count()}function Pee(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),Fee}function Fee(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function W_(e,t){L(ze(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,me(Iee,t))})}function Iee(e,t){var n=G_(e);return n&&n.setOutputEnd((t||this).count()),t}function G_(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var Lee=Ro.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),Ree={line:Od,rect:Qo,roundRect:Qo,square:Qo,circle:Qu,diamond:Ro.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Ro.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Ro.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:Lee},zee={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},K_={};L(Ree,function(e,t){K_[t]=new e});var Bee=Ro.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=An(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=K_[r];i||=(r=`rect`,K_[r]),zee[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Vee(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||V.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function q_(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?_f(e.slice(8),new an(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?gf(e.slice(7),{},new an(t,n,r,i),o?`center`:`cover`):new Bee({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Vee,a&&c.setColor(a),c}function J_(e){return z(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Y_(e,t){if(e!=null)return z(e)||(e=[e,e]),[Ms(e[0],t[0])||0,Ms(Te(e[1],e[0]),t[1])||0]}function Hee(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=mm(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),_u(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=sl(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&nf(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();nf(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return J_(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Xu);function Wee(e,t){this.parent.drift(e,t)}function X_(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Z_(e){return e!=null&&!ve(e)&&(e={isIgnore:e}),e||{}}function Q_(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:ap(t),cursorStyle:t.get(`cursor`)}}function $_(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Gee=function(){function e(e){this.group=new Xu,this._SymbolCtor=e||Uee}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Z_(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Q_(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);X_(e,i,r,t)&&$_(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!X_(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):$d(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){hv(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),hv(r,e,t,n)},freeze:function(){}};function hv(e,t,n,r){Yc(n,r)&&(e[t][0]=n,e[t][1]=r)}function gv(e){return _v(e)||yv(e)}function _v(e){return e.type===`interval`}function vv(e){return e.type===`time`}function yv(e){return e.type===`log`}function bv(e){return e.type===`ordinal`}function nte(e){var t=Js(e),n=Es(10,t),r=Cs(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,Ls(r*n,-t)}function xv(e){return zs(e)+2}function Sv(e,t){return Ds(e)/Ds(t)}function Cv(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var Dv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,uv(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new sv({}),z(i)&&(i=new sv({categories:R(i,function(e){return ve(e)?e.value:e})})),r._ordinalMeta=i;var a=lv(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,dv(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:B(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=Cs(e),e},t.prototype.getTicks=function(){var e=[];return Ev(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=bs(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=bs(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=Ls(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=Ls(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?Ls(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return Ov(this,e,Ah(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=zs(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),fg(Ls(e.value,n,!0))},t.type=`interval`,t}(ov);ov.registerClass(kv);var ite=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ote(e){var t=30*Fh;return e/=t,e>6?6:e>3?3:e>2?2:1}function ste(e){return e/=Ph,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function Nv(e,t){return e/=t?Nh:Mh,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function cte(e){return xs(Ys(e,!0),1)}function lte(e,t,n){var r=Math.max(0,ie(Hh,t)-1);return Qh(new Date(e),Hh[r],n).getTime()}function ute(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function dte(e,t,n,r,i,a){var o=Uh,s=0;function c(e,t,n,i,o,c,l){for(var u=ute(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!Mv(qh(e),r[0],r[1],n)){s&&(i=[{value:lte(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=le(R(u,function(e){return le(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=jv.length,l=Math.min(ite(jv,a,0,c),c-1),u=jv[l][1],d=jv[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};ov.registerClass(Av);var Pv=0,Fv=1,pte=2,Iv=function(e){p(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=kv.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[Pv]=i[Fv]=a[Pv]=a[Fv]=NaN,uv(r,t.mapperMethods);var s=Oh(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},pte,l),r.powStub=new kv({breakParsed:l.original}),r.intervalStub=new kv({breakParsed:l.transformed}),dv(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Oh(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return R(i.getTicks(e||{}),function(e){var i=e.value,o=Cv(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Ah(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return Ov(this,e,Ah(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(Sv(e,this.base))},scale:function(e){return Cv(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=Sv(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return Lv.depth=n,Rv.lookup=this._lookup,Cv(n===2?e:this.intervalStub.transformOut(e,Lv),this.base,Rv)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Yc(t,n)||t<=0||n<=0)){var r=zv,i=zv;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[Pv]=t,r[Fv]=n);var o=this.base;this.intervalStub.setExtent2(e,i[Pv]=Sv(t,o),i[Fv]=Sv(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Yc(t[0],t[1])&&nc(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(ov);ov.registerClass(Iv);var Lv={},Rv={},zv=[],Bv={value:1,category:1,time:1,log:1},Vv=Mc();function mte(e){var t=e.get(`type`);return(t==null||!Ve(Bv,t)&&!ov.getClass(t))&&(t=`value`),t}function hte(e,t,n){var r=Oh(),i;switch(r&&(i=qv(e,t,n)),t){case`category`:return new Dv({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Uc()});case`time`:return new Av({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new Iv({logBase:e.get(`logBase`),breakOption:i});case`value`:return new kv({breakOption:i});default:return new((ov.getClass(t))||kv)({})}}function gte(e,t,n){var r=n?pv(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Yc(i,a)?i===t||a===t?2:it?1:3:3}function _te(e){Vv(e).noOnMyZero=!0}function vte(e){return Vv(e).noOnMyZero}function Hv(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=Wh(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(B(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(he(t)){if(e.type===`category`)return function(n,r){return t(Uv(e,n),n.value-e.scale.getExtent()[0],null)};var r=Oh();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(Uv(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function Uv(e,t){var n=e.scale;return bv(n)?n.getLabel(t):t.value}function Wv(e){return e.get(`interval`)??`auto`}function yte(e){return e.type===`category`&&Wv(e.getLabelModel())===0}function bte(e,t){var n={};return L(e.mapDimensionsAll(t),function(t){n[_ee(e,t)]=!0}),de(n)}function Gv(e){return e===`middle`||e===`center`}function Kv(e){return e.getShallow(`show`)}function qv(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Oh()||!n||!xte(t)?void 0:r}function xte(e){return e!==`category`}function Jv(e,t,n,r,i,a){var o=yv(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=rte(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function Yv(e,t){return bv(e)?e.getRawOrdinalNumber(t.value):t.value}function Xv(e,t){return bv(e)&&!!t.get(`boundaryGap`)}var Ste=Mc(),Zv=Mc(),Qv={estimate:1,determine:2};function $v(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function ey(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:R(ny(n,r),function(t,n){return{formattedLabel:Hv(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?ry(e,t):oy(e)}function ty(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:ny(i,r)}:e.type===`category`?ay(e,t):{ticks:r.getTicks(n)}}function ny(e,t){var n=t.getExtent(),r=[];return L(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),el(r,nl,null),Rs(r),R(r,function(e){return{value:e}})}function ry(e,t){var n=e.getLabelModel(),r=iy(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function iy(e,t,n){var r=cy(e),i=Wv(t),a=n.kind===Qv.estimate;if(!a){var o=uy(r,i);if(o)return o}var s,c;he(i)?s=_y(e,i,!1):(c=i===`auto`?fy(e,n):i,s=_y(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return dy(r,i,l),!0}):dy(r,i,l),l}function ay(e,t){var n=sy(e),r=Wv(t),i=uy(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),he(r))a=_y(e,r,!0);else if(r===`auto`){var s=iy(e,e.getLabelModel(),$v(Qv.determine));o=s.labelCategoryInterval,a=R(s.labels,function(e){return e.tick})}else o=r,a=_y(e,o,!0);return dy(n,r,{ticks:a,tickCategoryInterval:o})}function oy(e){var t=e.scale.getTicks(),n=Hv(e);return{labels:R(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var sy=ly(`axisTick`),cy=ly(`axisLabel`);function ly(e){return function(t){return Zv(t)[e]||(Zv(t)[e]={list:[]})}}function uy(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=Tn(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===Qv.estimate?(t.out.noPxChangeTryDetermine.push(pe(my,null,e,S,c)),S):hy(e,S,c)??S}function my(e,t,n){return hy(e,t,n)==null}function hy(e,t,n){var r=Ste(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function gy(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function _y(e,t,n){var r=Hv(e),i=e.scale,a=[],o=he(t);return Ev(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var vy=Mc();function Cte(e){vy(e).prepare={}}function wte(e){vy(e).fullUpdate={}}function yy(e){return vy(e).fullUpdate}Qc();var by=Mc();Mc();function Tte(e,t){var n=e.model,r=by(yy(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function Ete(e,t){return xy(Tte(e,t))}function Dte(e,t){var n=[];return Ote(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),nc(n)&&n>0&&nc(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*jte,e.w2=e.w*n/r)}var ky=[0,1],Ay=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),js(e,ky,jy(this),t)},e.prototype.coordToData=function(e,t){var n=js(e,jy(this),ky,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=R(ty(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(Yv(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=My(this,n,r);return R(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(bv(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),R(this.scale.getMinorTicks(e),function(e){return R(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=$v(Qv.determine),ey(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return Ey(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=$v(Qv.determine),py(this,e)},e}();function jy(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function My(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=Ey(e).w;if(!i)return!1;L(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var Ny=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Ay),Py=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],Fy=1,Iy=2,Ly=Fy|Iy;function Ry(e,t,n){n||=Ly,t?e.dirty|=n:e.dirty&=~n}function zy(e,t){return t||=Ly,e.dirty==null||!!(e.dirty&t)}function By(e){if(e)return zy(e)&&Vy(e,e.label,e),e}function Vy(e,t,n){var r=t.getComputedTransform();e.transform=Kf(e.transform,r);var i=e.localRect=Gf(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=gp.textMargin);for(var d=0;d<4;d++)Hy[d]=u===gp.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===gp.textMargin&&Lf(i,Hy,!1,!1);var f=e.rect=Gf(e.rect,i);return r&&f.applyTransform(r),u===gp.minMargin&&Lf(f,Hy,!1,!1),e.axisAligned=Uf(r),(e.label=e.label||{}).ignore=t.ignore,Ry(e,!1),Ry(e,!0,Iy),e}var Hy=[0,0,0,0];function Uy(e,t,n){return e.transform=Kf(e.transform,n),e.localRect=Gf(e.localRect,t),e.rect=Gf(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Uf(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function Wy(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function Gy(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new an(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var ab=vt(),ob=new an(0,0,0,0),sb=function(e,t,n,r,i,a){if(Gv(e.nameLocation)){var o=a.stOccupiedRect;o&&cb(Uy({},o,a.transGroup.transform),r,i)}else lb(a.labelInfoList,a.dirVec,r,i)};function cb(e,t,n){var r=new Wt;Jy(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&Wy(t,r)}function lb(e,t,n,r){for(var i=Wt.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Ws(r-Qy)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),Mte=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],Nte={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Vt(u,u,l),Vt(d,d,l));var p=F({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&jh(r.axis.scale))Xy().buildAxisBreakLine(r,i,a,m);else{var h=new Od(F({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));xf(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);B(g)&&(g=[g,g]),(B(_)||_e(_))&&(_=[_,_]);var v=Y_(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];L([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=q_(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){mb(t,i,s)&&db(e,t,n,r,i,a,o,Qv.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){mb(t,i,s)&&db(e,t,n,r,i,a,o,Qv.determine);var c=Lte(e,i,a,r);Ite(e,t.labelLayoutList,c),Rte(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(vb(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Wt(0,0),_=new Wt(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=vt();_.transform(Ct(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*Qy/180);var b,x;Gv(u)?b=ub.innerTextLayout(e.rotation,y??e.rotation,d):(b=Pte(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=we(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new rs({x:g.x,y:g.y,rotation:b.rotation,silent:ub.isLabelSilent(r),style:op(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Bf({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=ub.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,sl(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=By({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:Gv(u)?$y[E]:eb[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function db(e,t,n,r,i,a,o,s){hb(t)||zte(e,t,i,s,r,o);var c=t.labelLayoutList;Bte(e,r,c,a),bb(r,e.rotation,c);var l=e.optionHideOverlap;Fte(r,c,l),l&&qy(le(c,function(e){return e&&!e.label.ignore})),ib(e,n,r,c)}function Pte(e,t,n,r){var i=Us(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Ws(i-Qy/2)?(o=c?`bottom`:`top`,a=`center`):Ws(i-Qy*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iQy/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function Fte(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(yte(r))return;function a(e,a,o){var s=By(t[a]),c=By(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=tb(s.label).labelInfo.tick;if(vv(l)&&u.notNice||bv(l)&&u.offInterval){fb(s.label);return}}if(e===!1||s.suggestIgnore){fb(s.label);return}if(c.suggestIgnore){fb(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=Gy({marginForce:f},s),c=Gy({marginForce:f},c)}Jy(s,c,null,{touchThreshold:d})&&fb(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function Ite(e,t,n){e.showMinorTicks||L(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=kb(e,t.get(`startValue`,!0)),x=b!=null;!nc(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),nc(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),Ob(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),Ob(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function Ob(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Zc(t))}function kb(e,t){return t==null?null:Ce(t)?NaN:e.parse(t)}function Ab(e,t){var n;if(bv(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=z(r)?r:[r,r]}return[jb(n[0]),jb(n[1])]}function jb(e){return kn(typeof e==`boolean`?0:e,1)||0}function Mb(e){var t=Tb(e.scale);return t.extent||=Uc(),t}function Nb(e,t){Mb(e).dimIdxInCoord=t.get(e.dim)}function Pb(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||Fb(n,e,i,r,t)}function Fb(e,t,n,r,i){var a=Mb(t),o=a.extent,s=!1;kte(t,function(r){if(r.boxCoordinateSystem){var i=nh(r).coord,c=a.dimIdxInCoord;if(c>=0&&z(i)){var l=i[c];l!=null&&!z(l)&&Wc(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;L(bte(u,n),function(e){qc(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=Bb(e,t,r);Lb(e,new Db(e,r,o,s,c),i),a.extent=null}function Ib(e,t){var n=e.scale;Lb(n,new Db(n,e.model,t,!1,!1),Eb)}function Lb(e,t,n){e.rawExtentInfo=t,t.from=n}var Rb=Re();function zb(e,t,n,r,i){e.rawExtentInfo||Ib({scale:e,model:t},i||Uc());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function Bb(e,t,n){var r=Xv(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return Sy(t,function(e){a=!!Rb.get(e)||a}),a}function Vb(e,t,n,r){if(n.ctnShp){var i;if(Sy(e,function(t){var n=Rb.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Gc(i,a[0]),Kc(i,a[1]),_te(e))}}),i){var a=t.getExtent();if(bv(t))e.onBand||t.setExtent2(1,bs(a[0],a[0]+i[0]),xs(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=bs(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=xs(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}var Hb={left:0,right:0,top:0,bottom:0},Ub=[`25%`,`25%`],Wb=`cartesian2d`,Gb=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=Pg(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&Ng(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Ng(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Hb,outerBoundsContain:`all`,outerBoundsClampWidth:Ub[0],outerBoundsClampHeight:Ub[1],backgroundColor:V.color.transparent,borderWidth:1,borderColor:V.color.neutral30},t}(Lg),Kb=`\0__throttleOriginMethod`,qb=`\0__throttleRate`,Jb=`\0__throttleType`;function Yb(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Xb(e,t,n,r){var i=e[t];if(i){var a=i[Kb]||i,o=i[Jb];if(i[qb]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Yb(a,n,r===`debounce`),i[Kb]=a,i[Jb]=r,i[qb]=n}return i}}function Zb(e,t){var n=e[t];n&&n[Kb]&&(n.clear&&n.clear(),e[t]=n[Kb])}function Qb(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),tx=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),nx=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new tx(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new tx(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new tx(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new tx(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new tx(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new tx(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),rx=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ix=[],ax=Ge.browser.firefox&&+Ge.browser.version.split(`.`)[0]<39;function ox(e,t,n,r){return n||={},r?sx(e,t,n):ax&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?sx(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function sx(e,t,n){if(Ge.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(hh(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(mh(ix,e,r,i)){n.zrX=ix[0],n.zrY=ix[1];return}}n.zrX=n.zrY=0}function cx(e){return e||window.event}function lx(e,t,n){if(t=cx(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&ox(e,i,t,n)}else{ox(e,t,t,n);var a=ux(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&rx.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function ux(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function dx(e,t,n,r){e.addEventListener(t,n,r)}function fx(e,t,n,r){e.removeEventListener(t,n,r)}var px=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function mx(e){return e.which===2||e.which===3}var hx=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=gx(r)/gx(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=_x(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},yx=`silent`;function bx(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:xx}}function xx(){px(this.event)}var Sx=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(ea),Cx=function(){function e(e,t){this.x=e,this.y=t}return e}(),Tx=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],Ex=new an(0,0,0,0),Dx=function(e){p(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new Cx(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new Sx,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new nx(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(L(Tx,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=Ax(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new Cx(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new Cx(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=bx(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new Cx(e,t);if(kx(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new an(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(Ex.copy(u.getBoundingRect()),u.transform&&Ex.applyTransform(u.transform),Ex.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function Ox(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||yx}return!1}function kx(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=Ox(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==yx)){t.target=o;break}}}function Ax(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var jx=32,Mx=7;function Nx(e){for(var t=0;e>=jx;)t|=e&1,e>>=1;return e+t}function Px(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function Fx(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function Lx(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function Rx(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function zx(e,t){var n=Mx,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=Mx||m>=Mx);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-Lx(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=Mx||g>=Mx);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),Ix(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var Vx=!1;function Hx(){Vx||(Vx=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function Ux(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Wx=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Ux}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Gx=Ge.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function Kx(){return new Date().getTime()}var Hte=function(e){p(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=Kx()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Gx(t),!e._paused&&e.update())}Gx(t)},t.prototype.start=function(){this._running||(this._time=Kx(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=Kx(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=Kx()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new $i(e,t.loop);return this.addAnimator(n),n},t}(ea),Ute=300,qx=Ge.domSupported,Jx=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:R(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Yx={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Xx=!1;function Zx(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Wte(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Qx(e){e&&(e.zrByTouch=!0)}function Gte(e,t){return lx(e.dom,new Kte(e,t),!0)}function $x(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Kte=function(){function e(e,t){this.stopPropagation=He,this.stopImmediatePropagation=He,this.preventDefault=He,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),eS={mousedown:function(e){e=lx(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=lx(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=lx(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=lx(this.dom,e);var t=e.toElement||e.relatedTarget;$x(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Xx=!0,e=lx(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Xx||(e=lx(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=lx(this.dom,e),Qx(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),eS.mousemove.call(this,e),eS.mousedown.call(this,e)},touchmove:function(e){e=lx(this.dom,e),Qx(e),this.handler.processGesture(e,`change`),eS.mousemove.call(this,e)},touchend:function(e){e=lx(this.dom,e),Qx(e),this.handler.processGesture(e,`end`),eS.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!Dc(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[gS],e},t.prototype.setTheme=function(e){this._theme=new Dp(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function CS(e,t){return e.join(`,`)===t.join(`,`)}var wS=L,TS=ve,ES=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function DS(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=ES.length;n0?e[n-1].seriesModel:null)}),XS(e))})}function XS(e){L(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Hs(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var ZS=function(){function e(){this.group=new Xu,this.uid=oh(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();$e(ZS),ot(ZS);var QS=Mc(),$S={itemStyle:st(wp,!0),lineStyle:st(xp,!0)},eC={lineStyle:`stroke`,itemStyle:`fill`};function tC(e,t){return e.visualStyleMapper||$S[t]||(console.warn(`Unknown style type '`+t+`'.`),$S.itemStyle)}function nC(e,t){return e.visualDrawType||eC[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var rC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=tC(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=nC(e,r),c=a[s],l=he(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||he(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||he(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=F({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},iC=new Dp,aC={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=tC(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){iC.option=n[r];var o=i(iC);F(e.ensureUniqueItemVisual(t,`style`),o),iC.option.decal&&(e.setItemVisual(t,`decal`,iC.option.decal),iC.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},oC={performRawSeries:!0,overallReset:function(e){var t=Re();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();QS(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=QS(e).scope,a=nC(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},sC=Math.PI;function cC(e,t){t||={},I(t,{text:`loading`,textColor:V.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:V.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Xu,r=new Qo({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new rs({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new Qo({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new Pd({shape:{startAngle:-sC/2,endAngle:-sC/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:sC*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:sC*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var lC=function(){function e(e,t,n,r){this._stageTaskMap=Re(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):il(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=Re();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;L(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ke(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;L(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=Re(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||Yg({plan:mC,reset:hC,count:vC}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||Yg({reset:uC});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=Re(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;ke(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):L(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,Yg({reset:dC,onDirty:pC})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return he(e)&&(e={overallReset:e,seriesType:yC(e)}),e.uid=oh(`stageHandler`),t&&(e.visualType=t),e},e}();function uC(e){e.overallReset(e.ecModel,e.api,e.payload)}function dC(e){return e.dirtyOnOverallProgress&&fC}function fC(){this.agent.dirty(),this.getDownstream().dirty()}function pC(){this.agent&&this.agent.dirty()}function mC(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function hC(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=dc(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?R(t,function(e,t){return _C(t)}):gC}var gC=_C(0);function _C(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),kC=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],AC=kC.concat([`symbolKeepAspect`]),jC={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&KC(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function YC(e,t,n){for(var r=t.type===`radial`?JC(e,t,n):qC(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:_e(e)?[e]:z(e)?e:null}function ew(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&$C(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=R(n,function(e){return e/i}),r/=i)}return[n,r]}var tw=new po(!0);function nw(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function rw(e){return typeof e==`string`&&e!==`none`}function iw(e){var t=e.fill;return t!=null&&t!==`none`}function aw(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function ow(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function sw(e,t,n){var r=ht(t.image,t.__image,n);if(_t(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Ue),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function cw(e,t,n,r,i){var a,o=nw(n),s=iw(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||tw,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?YC(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?YC(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?sw(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?sw(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=ew(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&ow(e,n),s&&aw(e,n)):(s&&aw(e,n),o&&ow(e,n)),T&&e.setLineDash([])}function lw(e,t,n){var r=t.__image=ht(n.image,t.__image,t,t.onload);if(r&&_t(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function uw(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=ew(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(nw(n)&&e.strokeText(i,n.x,n.y),iw(n)&&e.fillText(i,n.x,n.y)):(iw(n)&&e.fillText(i,n.x,n.y),nw(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var dw=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],fw=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function pw(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){ww(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?Ta.opacity:o}(r||t.blend!==n.blend)&&(a||=(ww(e,i),!0),e.globalCompositeOperation=t.blend||Ta.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[iT]){if(this._disposed){this.id;return}var r,i,a;if(ve(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[iT]=!0,IT(this),!this._model||t){var o=new lne(this._api),s=this._theme,c=this._model=new _S;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},WT);var l={seriesTransition:a,optionChanged:!0};if(n)this[oT]={silent:r,updateParams:l},this[iT]=!1,this.getZr().wakeUp();else{try{vT(this),xT.update.call(this,null,l)}catch(e){throw this[oT]=null,this[iT]=!1,e}this._ssr||this._zr.flush(),this[oT]=null,this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[iT]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[oT]&&(r??=this[oT].silent,i=this[oT].updateParams,this[oT]=null),this[iT]=!0,IT(this);try{this._updateTheme(e),n.setTheme(this._theme),vT(this),xT.update.call(this,{type:`setTheme`},i)}catch(e){throw this[iT]=!1,e}this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype._updateTheme=function(e){B(e)&&(e=KT[e]),e&&(e=N(e),e&&qS(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ge.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return L(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;L(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return L(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(YT[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();L(JT,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(N(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=b.createCanvas(),h=sS(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return L(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new Qo({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),L(u,function(e){var t=new Wo({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return ST(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return ST(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return ST(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return L(Pc(n,e),function(e,n){n.indexOf(`Models`)>=0&&L(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Pc(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?PC(i,t):NC(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;L(zT,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&IC(i,function(e){var t=sl(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=F({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;L(HT,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),$b(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&zc(this.getDom(),ZT,``);var e=this,t=e._api,n=e._model;L(e._componentsViews,function(e){e.dispose(n,t)}),L(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete JT[e.id]},t.prototype.resize=function(e){if(!this[iT]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[oT]&&(r??=this[oT].silent,n=!0,this[oT]=null),this[iT]=!0,IT(this);try{n&&vT(this),xT.update.call(this,{type:`resize`,animation:F({duration:0},e&&e.animation)})}catch(e){throw this[iT]=!1,e}this[iT]=!1,TT.call(this,r),ET.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(ve(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),qT[e]){var n=qT[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=F({},e);return t.type=VT[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(ve(t)||(t={silent:!!t}),BT[e.type]&&this._model){if(this[iT]){this._pendingActions.push(e);return}var n=t.silent;wT.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ge.browser.weChat&&this._throttledZrFlush(),TT.call(this,n),ET.call(this,n)}},t.prototype.updateLabelLayout=function(){LC.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){vT=function(e){Cte(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),yT(e,!0),yT(e,!1),t.plan()},yT=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cTe(t.get(`hoverLayerThreshold`),fS.hoverLayerThreshold)&&!Ge.node&&!Ge.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=qf(e);t.eachRendered(function(e){return Yf(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!tf(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(tf(e))return;if(e instanceof Ro&&Du(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}MT=function(e){return new(function(t){p(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Ql(t,n),PT(e)},n.prototype.leaveEmphasis=function(t,n){$l(t,n),PT(e)},n.prototype.enterBlur=function(t){eu(t),PT(e)},n.prototype.leaveBlur=function(t){tu(t),PT(e)},n.prototype.enterSelect=function(t){nu(t),PT(e)},n.prototype.leaveSelect=function(t){ru(t),PT(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[aT]},n.prototype.usingTHL=function(){return e._usingTHL},n}(bl))(e)},NT=function(e){function t(e,t){for(var n=0;n=0)){uE.push(n);var o=lC.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function fE(e,t){qT[e]=t}function pE(e,t,n){var r=BC(`registerMap`);r&&r(e,t,n)}var mE=a_;lE(Yw,rC),lE(Qw,aC),lE(Qw,oC),lE(Yw,jC),lE(Qw,MC),lE(nT,Rw),tE(qS),nE(Hw,JS),fE(`default`,cC),oE({type:Ol,event:Ol,update:Ol},He),oE({type:kl,event:kl,update:kl},He),oE({type:Al,event:Nl,update:Al,action:He,refineEvent:hE,publishNonRefinedEvent:!0}),oE({type:jl,event:Nl,update:jl,action:He,refineEvent:hE,publishNonRefinedEvent:!0}),oE({type:Ml,event:Nl,update:Ml,action:He,refineEvent:hE,publishNonRefinedEvent:!0});function hE(e,t,n,r){return{eventContent:{selected:mu(n),isFromClick:t.isFromClick||!1}}}eE(`default`,{}),eE(`dark`,DC);var gE=[],_E={registerPreprocessor:tE,registerProcessor:nE,registerPostInit:rE,registerPostUpdate:iE,registerUpdateLifecycle:aE,registerAction:oE,registerCoordinateSystem:sE,registerLayout:cE,registerVisual:lE,registerTransform:mE,registerLoading:fE,registerMap:pE,registerImpl:zC,PRIORITY:rT,ComponentModel:Lg,ComponentView:ZS,SeriesModel:B_,ChartView:tv,registerComponentModel:function(e){Lg.registerClass(e)},registerComponentView:function(e){ZS.registerClass(e)},registerSeriesModel:function(e){B_.registerClass(e)},registerChartView:function(e){tv.registerClass(e)},registerCustomSeries:function(e,t){HC(e,t)},registerSubTypeDefaulter:function(e,t){Lg.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){$te(e,t)}};function vE(e){if(z(e)){L(e,function(e){vE(e)});return}ie(gE,e)>=0||(gE.push(e),he(e)&&(e={install:e}),e.install(_E))}var yE=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),bE=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Ic).models[0]},t.type=`cartesian2dAxis`,t}(Lg);oe(bE,yE);var xE={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:V.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:V.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:V.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[V.color.backgroundTint,V.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:V.color.neutral00,borderColor:V.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},SE=P({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},xE),CE=P({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:V.color.axisMinorSplitLine,width:1}}},xE),wE={category:SE,value:CE,time:P({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},CE),log:I({logBase:10},CE)};function TE(e,t,n,r){L(Bv,function(i,a){var o=P(P({},wE[a],!0),r,!0),s=function(e){p(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=Mg(this),r=n?Pg(e):{};P(e,t.getTheme().get(a+`Axis`)),P(e,this.getDefaultOption()),e.type=EE(e),n&&Ng(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=sv.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=Xy();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,EE)}function EE(e){return e.type||(e.data?`category`:`value`)}var DE=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return R(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),le(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),OE=[`x`,`y`];function kE(e){return(e.type===`interval`||e.type===`time`)&&!jh(e)}var AE=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Wb,t.dimensions=OE,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(kE(e)&&kE(t)){var n=pv(e,null),r=pv(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=Tt([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new an(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Vt(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Vt(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new an(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(DE);function jE(e,t){var n=e.scale,r=e.model,i=zb(n,r,r.ecModel,e,null),a=yv(n),o=yv(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=Ss(l[0].value-l[1].value),g=Ss(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(M(),k=Ls(O-E*m,D),ee(),w<=C[0])return!0})):A(function(){k=Ls(Ts(C[0]/E)*E,D),O=Ls(ws(C[1]/E)*E,D);var e=Cs((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=ws(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}Jv(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function ME(e,t){var n=yv(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=wv(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?PE(r,t):NE(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=xv(d)),i[0]||(s[0]=Ls(ws(s[0]/u)*u,l)),i[1]||(s[1]=Ls(Ts(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),Jv(e,i,o,s,a,c)}function NE(e,t){var n=Tv(t.splitNumber,5),r=mv(e),i=t.minInterval,a=t.maxInterval,o=Ys(r/n,!0);i!=null&&oa&&(o=a);var s=xv(o),c=e.getExtent(),l=[Ls(Ts(c[0]/o)*o,s),Ls(ws(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function PE(e,t){var n=Tv(t.splitNumber,10),r=e.getExtent(),i=mv(e),a=xs(qs(i),1);n/i*a<=.5&&(a*=10);var o=xv(a),s=[Ls(Ts(r[0]/a)*a,o),Ls(ws(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function FE(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;IE(t,n,r,i,null)}function IE(e,t,n,r,i){var a=zb(e,t,r,n,i),o=_v(e)||vv(e);LE(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&Vb(n,e,a,r)}function LE(e,t){RE[e.type](e,t)}var RE={interval:ME,log:ME,time:fte,ordinal:He},zE=[[3,1],[0,2]],BE=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=OE,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;L(this._axesList,function(e){Pb(e,1);var t=e.scale;bv(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=de(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):FE(i)}L(n,function(e){GE(e,e.__alignTo)?FE(e):jE(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};L(n.x,function(e){HE(n,`y`,e,i)}),L(n.y,function(e){HE(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=Ag(e,t),i=this._rect=Dg(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(qE(a,i),!n){var c=ZE(i,o,a,s,t),l=void 0;if(s)YE?(YE(this._axesList,i),qE(a,i)):l=XE(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=$E(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=XE(d,f,p,i,a,c,r))}QE(i,a,Qv.determine,null,l,r),L(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}ve(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];gv(a.scale)&&qv(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&L(r,function(e){e.__alignTo=n})}function GE(e,t){return jh(e.scale)||jh(t.scale)||t.scale.getTicks().length<2}function KE(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function qE(e,t){L(e.x,function(e){return JE(e,t.x,t.width)}),L(e.y,function(e){return JE(e,t.y,t.height)})}function JE(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),KE(e,t)}var YE;function XE(e,t,n,r,i,a,o){QE(r,i,Qv.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=ue(s,function(e){return e>0})==null;return Lf(r,s,!0,!0,n),qE(i,r),c;function l(e){L(i[lf[e]],function(t){if(Kv(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!Ce(t)&&t>1e-4&&(e/=t),e}}function ZE(e,t,n,r,i){var a=new rb(eD);return L(n,function(n){return L(n,function(n){if(Kv(n.model)){var o=!r;n.axisBuilder=Cb(e,t,n.model,i,a,o)}})}),a}function QE(e,t,n,r,i,a){var o=n===Qv.determine;L(t,function(t){return L(t,function(t){Kv(t.model)&&(wb(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[lf[1-t]]=e[uf[t]]<=a.refContainer[uf[t]]*.5?0:1-t==1?2:1}L(t,function(e,t){return L(e,function(e){Kv(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function $E(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=Dg(e.get(`outerBounds`,!0)||Hb,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||ie([`all`,`axisLabel`],a)<0?`all`:a,s=[Ps(Te(e.get(`outerBoundsClampWidth`,!0),Ub[0]),t.width),Ps(Te(e.get(`outerBoundsClampHeight`,!0),Ub[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var eD=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;sb(e,t,n,r,i,a),Gv(e.nameLocation)||L(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&lb(e.labelInfoList,e.dirVec,r,i)})};function tD(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return nD(n,e,t),n.seriesInvolved&&iD(n,e),n}function nD(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];L(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=dD(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(L(n.getAxes(),me(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&L(f.baseAxes,me(p,!d||`cross`,u)),d&&L(f.otherAxes,me(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||uD(d))){s??=d.get(`triggerTooltip`),d=r?rD(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=dD(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:uD(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=aD(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function rD(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};L(s,function(e){c[e]=N(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&I(l,u.textStyle)}return e.model.getModel(`axisPointer`,new Dp(c,n,r))}function iD(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&L(e.coordSysAxesInfo[dD(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function aD(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function sD(e){var t=cD(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=uD(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(ED(this._zr,`globalPan`)||AD(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(px(r.event),r.__ecRoamConsumed=!0,LD(e,t,n,r,i))},t}(ea);function AD(e){return e.__ecRoamConsumed}var jD=Mc();function MD(e){var t=jD(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function ND(e,t,n,r){for(var i=MD(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;SO[0]=o?(i[0]-r.x)/a:i[0],SO[1]=o?(i[1]-r.y)/a:i[1],Vt(SO,SO,e.mtRawInv);var s=hne(e,SO);CO(t,s,a),L(n,function(e){e!==t&&CO(e,s.slice(),a)})}var SO=[];function CO(e,t,n){var r=e.option;r.center=t,r.zoom=n}function wO(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function vne(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=zD(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function TO(e,t,n,r,i,a,o,s){if(!yO(e)){n.disable();return}n.enable(Te(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Zf(I({type:OO(r,e.subType,vl)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}function yne(e){return function(t,n,r){return EO.copy(e.getBoundingRect()),EO.applyTransform(e.getComputedTransform()),EO.contain(n,r)}}var EO=new an(0,0,0,0);function DO(e,t,n){var r=OO(t,n,vl);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Rc(e,t,n),function(t){dne(e,t),fne(e,t,r,i)})})}function OO(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function bne(e){return e.zoom!=null}function kO(e,t,n,r,i,a,o){var s=new VD(null,gne(e.ecModel,t));return QD(s,n,r,i,a),o?$D(s,o.x,o.y,o.width,o.height):$D(s,n,r,i,a),ZD(s,e),s}var AO=Mc();function xne(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,jO(t,n,e),L(n,function(n){L(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,me(Sne,e))})}),t.wrapMethod(`cloneShallow`,me(wne,e)),L(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,me(Cne,e))}),ke(n[t.dataType]===t)}function Sne(e,t){if(Dne(this)){var n=F({},AO(this).datas);n[this.dataType]=t,jO(t,n,e)}else MO(t,this.dataType,AO(this).mainData,e);return t}function Cne(e,t){return e.struct&&e.struct.update(),t}function wne(e,t){return L(AO(t).datas,function(n,r){n!==t&&MO(n.cloneShallow(),r,t,e)}),t}function Tne(e){var t=AO(this).mainData;return e==null||t==null?t:AO(t).datas[e]}function Ene(){var e=AO(this).mainData;return e==null?[{data:e}]:R(de(AO(e).datas),function(t){return{type:t,data:AO(e).datas[t]}})}function Dne(e){return AO(e).mainData===e}function jO(e,t,n){AO(e).datas={},L(t,function(t,r){MO(t,r,e,n)})}function MO(e,t,n,r){AO(n).datas[t]=e,AO(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=Tne,e.getLinkedDataAll=Ene}var NO=L,One=ve,PO=-1,FO=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=N(t);this.type=r,this.mappingMethod=n,this._normalizeData=jne[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(IO(i),kne(i)):n===`category`?i.categories?Ane(i):IO(i,!0):(ke(n!==`linear`||i.dataExtent),IO(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return pe(this._normalizeData,this)},e.listVisualTypes=function(){return de(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){ve(e)?L(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=z(t)?[]:ve(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&NO(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(One(e)){var t=[];NO(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function IO(e,t){var n=e.visual,r=[];ve(n)?NO(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),WO(e,r)}function LO(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:HO([0,1])}}function RO(e){var t=this.option.visual;return t[Math.round(js(e,[0,1],[0,t.length-1],!0))]||{}}function zO(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function BO(e){var t=this.option.visual;return t[this.option.loop&&e!==PO?e%t.length:e]}function VO(){return this.option.visual[0]}function HO(e){return{linear:function(t){return js(t,e,this.option.visual,!0)},category:BO,piecewise:function(t,n){var r=UO.call(this,n);return r??=js(t,e,this.option.visual,!0),r},fixed:VO}}function UO(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[FO.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function WO(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=R(t,function(e){return $r(e)||[0,0,0,1]})),t}var jne={linear:function(e){return js(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=FO.findPieceIndex(e,t,!0);if(n!=null)return js(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??PO},fixed:He};function GO(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof qO||(t=this._nodesMap[KO(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),JO=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=Re(),t=Re();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function YO(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}oe(qO,YO(`hostGraph`,`data`)),oe(JO,YO(`hostGraph`,`edgeData`));function XO(e,t,n,r,i){for(var a=new Mne(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=ah(e,n);else{var h=th.get(p),g=h&&h.dimensions||[];ie(g,`value`)<0&&g.concat([`value`]);var _=Qm(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Zm(_,n),m.initData(e)}var v=new Zm([`value`],n);return v.initData(c,s),i&&i(m,v),xne({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var ZO=`-->`,QO=function(e){return e.get(`autoCurveness`)||null},$O=function(e,t){var n=QO(e),r=20,i=[];if(_e(n))r=n;else if(z(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return I_({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=R(this.option.categories||[],function(e){return e.value==null?F({value:0},e):e}),t=new Zm([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return mO(e)&&e},t.type=`series.`+ik,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:V.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:V.color.primary}}},t}(B_);function ak(e){return e instanceof Array||(e=[e,e]),e}var Rne=al(ik,zne);function zne(e){e.eachSeriesByType(ik,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=ak(e.get(`edgeSymbol`)),i=ak(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=ak(r.getShallow(`symbol`,!0)),o=ak(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(F(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function ok(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),sk(n,e)}}function sk(e,t){e.eachEdge(function(e,n){var r=Ee(e.getModel().get([`lineStyle`,`curveness`]),-rk(e,t,n,!0),0),i=Ot(e.node1.getLayout()),a=Ot(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Bne=al(ik,Vne);function Vne(e,t){e.eachSeriesByType(ik,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];L(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Xu),Qne=function(){function e(e){this.group=new Xu,this._LineCtor=e||Zne}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=Tk(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Tk(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!$ne(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function Tk(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:ap(t)}}function Ek(e){return isNaN(e[0])||isNaN(e[1])}function Dk(e){return e&&!Ek(e[0])&&!Ek(e[1])}var Ok=[],kk=[],Ak=[],jk=Ar,Mk=Bt,Nk=Math.abs;function Pk(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){Ok[0]=jk(r[0],i[0],a[0],u),Ok[1]=jk(r[1],i[1],a[1],u);var d=Nk(Mk(Ok,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function Fk(e,t){var n=[],r=Pr,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[Ot(c[0]),Ot(c[1])],c[2]&&c.__original.push(Ot(c[2])));var d=c.__original;if(c[2]!=null){if(Dt(i[0],d[0]),Dt(i[1],d[2]),Dt(i[2],d[1]),l&&l!==`none`){var f=lk(e.node1),p=Pk(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=lk(e.node2),p=Pk(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}Dt(c[0],i[0]),Dt(c[1],i[2]),Dt(c[2],i[1])}else{if(Dt(a[0],d[0]),Dt(a[1],d[1]),Mt(o,a[1],a[0]),It(o,o),l&&l!==`none`){var f=lk(e.node1);jt(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=lk(e.node2);jt(a[1],a[1],o,-f*t)}Dt(c[0],a[0]),Dt(c[1],a[1])}})}var ere=Mc();function tre(e){if(e)return ere(e).bridge}var nre=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=ik,t}return t.prototype.init=function(e,t){var n=new Gee,r=new Qne,i=this.group,a=new Xu;this._controller=new kD(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=yO(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&hO(o,2,i,this._firstRender?null:e),Fk(e.getGraph(),ck(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&TO(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),fk(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),sk(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(sl(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(sl(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){pk(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=yO(t);this._active&&r&&(hO(this._mainGroup,2,r,null),bne(e)&&(this._updateNodeAndLinkScale(),Fk(t.getGraph(),ck(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=ck(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(Fk(e.getGraph(),ck(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=tre(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(UD(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Xu,o=n.group.children(),s=r.group.children(),c=new Xu,l=new Xu;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=Hs(t[r],d.sign*a)),t}function Ik(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function Lk(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var Rk=`sankey`,lre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){var n=e.edges||e.links||[],r=e.data||e.nodes||[],i=e.levels||[];this.levelModels=[];for(var a=this.levelModels,o=0;o=0&&(a[i[o].depth]=new Dp(i[o],this,t));return XO(r,n,this,!0,s).data;function s(e,t){e.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getData().getItemLayout(t);if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e}),t.wrapMethod(`getItemModel`,function(e,t){var n=e.parentModel,r=n.getGraph().getEdgeByIndex(t).node1.getLayout();if(r){var i=r.depth,a=n.levelModels[i];a&&(e.parentModel=a)}return e})}},t.prototype.setNodePosition=function(e,t){var n=(this.option.data||this.option.nodes)[e];n.localX=t[0],n.localY=t[1]},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,t,n){function r(e){return isNaN(e)||e==null}if(n===`edge`){var i=this.getDataParams(e,n),a=i.data,o=i.value;return b_(`nameValue`,{name:a.source+` -- `+a.target,value:o,noValue:r(o)})}var s=this.getGraph().getNodeByIndex(e).getLayout().value,c=this.getDataParams(e,n).data.name;return b_(`nameValue`,{name:c==null?null:c+``,value:s,noValue:r(s)})},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(t,n){var r=e.prototype.getDataParams.call(this,t,n);return r.value==null&&n===`node`&&(r.value=this.getGraph().getNodeByIndex(t).getLayout().value),r},t.prototype.__ownRoamView=function(){return this.coordinateSystem},t.type=`series.`+Rk,t.layoutMode=`box`,t.defaultOption={z:2,coordinateSystemUsage:`box`,left:`5%`,top:`5%`,right:`20%`,bottom:`5%`,orient:`horizontal`,nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:`global`,center:null,zoom:1,label:{show:!0,position:`right`,fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:`justify`,lineStyle:{color:V.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:V.color.primary}},animationEasing:`linear`,animationDuration:1e3},t}(B_),ure=function(){function e(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return e}(),dre=function(e){p(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new ure},t.prototype.buildPath=function(e,t){var n=t.extent;e.moveTo(t.x1,t.y1),e.bezierCurveTo(t.cpx1,t.cpy1,t.cpx2,t.cpy2,t.x2,t.y2),t.orient===`vertical`?(e.lineTo(t.x2+n,t.y2),e.bezierCurveTo(t.cpx2+n,t.cpy2,t.cpx1+n,t.cpy1,t.x1+n,t.y1)):(e.lineTo(t.x2,t.y2+n),e.bezierCurveTo(t.cpx2,t.cpy2+n,t.cpx1,t.cpy1+n,t.x1,t.y1+n)),e.closePath()},t.prototype.highlight=function(){Ql(this)},t.prototype.downplay=function(){$l(this)},t}(Ro),fre=function(e){p(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Rk,t._mainGroup=new Xu,t}return t.prototype.init=function(e,t){this._controller=new kD(t.getZr()),this.group.add(this._mainGroup),this._firstRender=!0},t.prototype.render=function(e,t,n){var r=e.getGraph(),i=this._mainGroup,a=e.layoutInfo,o=a.width,s=a.height,c=e.getData(),l=e.getData(`edge`),u=e.get(`orient`);i.removeAll(),i.x=a.x,i.y=a.y,this._updateViewCoordSys(e,n),TO(e,n,this._controller,yne(i),null),r.eachEdge(function(t){var n=new dre,r=sl(n);r.dataIndex=t.dataIndex,r.seriesIndex=e.seriesIndex,r.dataType=`edge`;var a=t.getModel(),c=a.getModel(`lineStyle`),d=c.get(`curveness`),f=t.node1.getLayout(),p=t.node1.getModel(),m=p.get(`localX`),h=p.get(`localY`),g=t.node2.getLayout(),_=t.node2.getModel(),v=_.get(`localX`),y=_.get(`localY`),b=t.getLayout(),x,S,C,w,T,E,D,O;n.shape.extent=Math.max(1,b.dy),n.shape.orient=u,u===`vertical`?(x=(m==null?f.x:m*o)+b.sy,S=(h==null?f.y:h*s)+f.dy,C=(v==null?g.x:v*o)+b.ty,w=y==null?g.y:y*s,T=x,E=S*(1-d)+w*d,D=C,O=S*d+w*(1-d)):(x=(m==null?f.x:m*o)+f.dx,S=(h==null?f.y:h*s)+b.sy,C=v==null?g.x:v*o,w=(y==null?g.y:y*s)+b.ty,T=x*(1-d)+C*d,E=S,D=x*d+C*(1-d),O=w),n.setShape({x1:x,y1:S,x2:C,y2:w,cpx1:T,cpy1:E,cpx2:D,cpy2:O}),n.useStyle(c.getItemStyle()),zk(n.style,u,t);var k=``+a.get(`value`),A=ap(a,`edgeLabel`);ip(n,A,{labelFetcher:{getFormattedLabel:function(t,n,r,i,a,o){return e.getFormattedLabel(t,n,`edge`,i,Ee(a,A.normal&&A.normal.get(`formatter`),k),o)}},labelDataIndex:t.dataIndex,defaultText:k}),n.setTextConfig({position:`inside`});var ee=a.getModel(`emphasis`);xu(n,a,`lineStyle`,function(e){var n=e.getItemStyle();return zk(n,u,t),n}),i.add(n),l.setItemGraphicEl(t.dataIndex,n);var te=ee.get(`focus`);_u(n,te===`adjacency`?t.getAdjacentDataIndices():te===`trajectory`?t.getTrajectoryDataIndices():te,ee.get(`blurScope`),ee.get(`disabled`))}),r.eachNode(function(t){var n=t.getLayout(),r=t.getModel(),a=r.get(`localX`),l=r.get(`localY`),u=r.getModel(`emphasis`),d=r.get([`itemStyle`,`borderRadius`])||0,f=new Qo({shape:{x:a==null?n.x:a*o,y:l==null?n.y:l*s,width:n.dx,height:n.dy,r:d},style:r.getModel(`itemStyle`).getItemStyle(),z2:10});ip(f,ap(r),{labelFetcher:{getFormattedLabel:function(t,n){return e.getFormattedLabel(t,n,`node`)}},labelDataIndex:t.dataIndex,defaultText:t.id}),f.disableLabelAnimation=!0,f.setStyle(`fill`,t.getVisual(`color`)),f.setStyle(`decal`,t.getVisual(`style`).decal),xu(f,r),i.add(f),c.setItemGraphicEl(t.dataIndex,f),sl(f).dataType=`node`;var p=u.get(`focus`);_u(f,p===`adjacency`?t.getAdjacentDataIndices():p===`trajectory`?t.getTrajectoryDataIndices():p,u.get(`blurScope`),u.get(`disabled`))}),c.eachItemGraphicEl(function(t,r){c.getItemModel(r).get(`draggable`)&&(t.drift=function(t,i){this.shape.x+=t,this.shape.y+=i,this.dirty(),n.dispatchAction({type:`dragNode`,seriesId:e.id,dataIndex:c.getRawIndex(r),localX:this.shape.x/o,localY:this.shape.y/s})},t.draggable=!0,t.cursor=`move`)}),!this._data&&e.isAnimationEnabled()&&i.setClipPath(pre(i.getBoundingRect(),e,function(){i.removeClipPath()})),this._data=e.getData(),this._firstRender=!1},t.prototype.__updateOnOwnRoam=function(e,t,n){hO(this.group,2,t.coordinateSystem,null)},t.prototype.dispose=function(){this._controller&&this._controller.dispose()},t.prototype._updateViewCoordSys=function(e,t){var n=e.layoutInfo,r=e.coordinateSystem=kO(e,t,n.x,n.y,n.width,n.height);hO(this.group,2,r,this._firstRender?null:e)},t.type=Rk,t}(tv);function zk(e,t,n){switch(e.fill){case`source`:e.fill=n.node1.getVisual(`color`),e.decal=n.node1.getVisual(`style`).decal;break;case`target`:e.fill=n.node2.getVisual(`color`),e.decal=n.node2.getVisual(`style`).decal;break;case`gradient`:var r=n.node1.getVisual(`color`),i=n.node2.getVisual(`color`);B(r)&&B(i)&&(e.fill=new Ld(0,0,+(t===`horizontal`),+(t===`vertical`),[{color:r,offset:0},{color:i,offset:1}]))}}function pre(e,t,n){var r=new Qo({shape:{x:e.x-10,y:e.y-10,width:0,height:e.height+20}});return ef(r,{shape:{width:e.width+20}},t,n),r}var mre=al(Rk,hre);function hre(e,t){e.eachSeriesByType(Rk,function(e){var n=e.get(`nodeWidth`),r=e.get(`nodeGap`),i=Ag(e,t).refContainer,a=Dg(e.getBoxLayoutParams(),i);e.layoutInfo=a;var o=a.width,s=a.height,c=e.getGraph(),l=c.nodes,u=c.edges;_re(l),gre(l,u,n,r,o,s,le(l,function(e){return e.getLayout().value===0}).length===0?e.get(`layoutIterations`):0,e.get(`orient`),e.get(`nodeAlign`))})}function gre(e,t,n,r,i,a,o,s,c){vre(e,t,n,i,a,s,c),Sre(e,t,a,i,r,o,s),jre(e,s)}function _re(e){L(e,function(e){var t=Wk(e.outEdges,Uk),n=Wk(e.inEdges,Uk),r=e.getValue()||0,i=Math.max(t,n,r);e.setLayout({value:i},!0)})}function vre(e,t,n,r,i,a,o){for(var s=[],c=[],l=[],u=[],d=0,f=0;f=0;_&&g.depth>p&&(p=g.depth),h.setLayout({depth:_?g.depth:d},!0),a===`vertical`?h.setLayout({dy:n},!0):h.setLayout({dx:n},!0);for(var v=0;vd-1?p:d-1;o&&o!==`left`&&yre(e,o,a,C),xre(e,a===`vertical`?(i-n)/C:(r-n)/C,a)}function Bk(e){var t=e.hostGraph.data.getRawDataItem(e.dataIndex);return t.depth!=null&&t.depth>=0}function yre(e,t,n,r){if(t===`right`){for(var i=[],a=e,o=0;a.length;){for(var s=0;s0;a--)c*=.99,Tre(s,c,o),Vk(s,i,n,r,o),Are(s,c,o),Vk(s,i,n,r,o)}function Cre(e,t){var n=[],r=t===`vertical`?`y`:`x`,i=Hc(e,function(e){return e.getLayout()[r]});return Rs(i.keys),L(i.keys,function(e){n.push(i.buckets.get(e))}),n}function wre(e,t,n,r,i,a){var o=1/0;L(e,function(e){var t=e.length,s=0;L(e,function(e){s+=e.getLayout().value});var c=a===`vertical`?(r-(t-1)*i)/s:(n-(t-1)*i)/s;c0&&(o=s.getLayout()[a]+c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]+s.getLayout()[d]+t;var p=i===`vertical`?r:n;if(c=l-t-p,c>0){o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0),l=o;for(var f=u-2;f>=0;--f)s=e[f],c=s.getLayout()[a]+s.getLayout()[d]+t-l,c>0&&(o=s.getLayout()[a]-c,i===`vertical`?s.setLayout({x:o},!0):s.setLayout({y:o},!0)),l=s.getLayout()[a]}})}function Tre(e,t,n){L(e.slice().reverse(),function(e){L(e,function(e){if(e.outEdges.length){var r=Wk(e.outEdges,Ere,n)/Wk(e.outEdges,Uk);if(isNaN(r)){var i=e.outEdges.length;r=i?Wk(e.outEdges,Dre,n)/i:0}if(n===`vertical`){var a=e.getLayout().x+(r-Hk(e,n))*t;e.setLayout({x:a},!0)}else{var o=e.getLayout().y+(r-Hk(e,n))*t;e.setLayout({y:o},!0)}}})})}function Ere(e,t){return Hk(e.node2,t)*e.getValue()}function Dre(e,t){return Hk(e.node2,t)}function Ore(e,t){return Hk(e.node1,t)*e.getValue()}function kre(e,t){return Hk(e.node1,t)}function Hk(e,t){return t===`vertical`?e.getLayout().x+e.getLayout().dx/2:e.getLayout().y+e.getLayout().dy/2}function Uk(e){return e.getValue()}function Wk(e,t,n){for(var r=0,i=e.length,a=-1;++aa&&(a=t)}),L(n,function(t){var n=new FO({type:`color`,mappingMethod:`linear`,dataExtent:[i,a],visual:e.get(`color`)}).mapValueToVisual(t.getLayout().value),r=t.getModel().get([`itemStyle`,`color`]);r==null?(t.setVisual(`color`,n),t.setVisual(`style`,{fill:n})):(t.setVisual(`color`,r),t.setVisual(`style`,{fill:r}))})}r.length&&L(r,function(e){var t=e.getModel().get(`lineStyle`);e.setVisual(`style`,t)})})}function Pre(e){e.registerChartView(fre),e.registerSeriesModel(lre),e.registerLayout(mre),e.registerVisual(Mre),e.registerAction({type:`dragNode`,event:`dragnode`,update:`update`},function(e,t){t.eachComponent({mainType:ll,subType:Rk,query:e},function(t){t.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),DO(e,ll,Rk)}var Fre=256,Ire=function(){function e(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=b.createCanvas();this.canvas=e}return e.prototype.update=function(e,t,n,r,i,a){var o=this._getBrush(),s=this._getGradient(i,`inRange`),c=this._getGradient(i,`outOfRange`),l=this.pointSize+this.blurSize,u=this.canvas,d=u.getContext(`2d`),f=e.length;u.width=t,u.height=n;for(var p=0;p0){var E=a(v)?s:c;v>0&&(v=v*w+C),b[x++]=E[T],b[x++]=E[T+1],b[x++]=E[T+2],b[x++]=E[T+3]*v*256}else x+=4}return d.putImageData(y,0,0),u},e.prototype._getBrush=function(){var e=this._brushCanvas||=b.createCanvas(),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var r=e.getContext(`2d`);return r.clearRect(0,0,n,n),r.shadowOffsetX=n,r.shadowBlur=this.blurSize,r.shadowColor=V.color.neutral99,r.beginPath(),r.arc(-t,t,this.pointSize,0,Math.PI*2,!0),r.closePath(),r.fill(),e},e.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,r=n[t]||(n[t]=new Uint8ClampedArray(1024)),i=[0,0,0,0],a=0,o=0;o<256;o++)e[t](o/255,!0,i),r[a++]=i[0],r[a++]=i[1],r[a++]=i[2],r[a++]=i[3];return r},e}();function Lre(e,t,n){var r=e[1]-e[0];t=R(t,function(t){return{interval:[(t.interval[0]-e[0])/r,(t.interval[1]-e[0])/r]}});var i=t.length,a=0;return function(e){for(var r=a;r=0;r--){var o=t[r].interval;if(o[0]<=e&&e<=o[1]){a=r;break}}return r>=0&&r=t[0]&&e<=t[1]}}var zre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r;t.eachComponent(`visualMap`,function(t){t.eachTargetSeries(function(n){n===e&&(r=t)})}),this._progressiveEls=null,this.group.removeAll();var i=e.coordinateSystem;i.type===`cartesian2d`||i.type===`calendar`||i.type===`matrix`?this._renderOnGridLike(e,n,0,e.getData().count()):av(i)&&this._renderOnGeo(i,e,r,n)},t.prototype.incrementalPrepareRender=function(e,t,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,t,n,r){var i=t.coordinateSystem;i&&(av(i)?this.render(t,n,r):(this._progressiveEls=[],this._renderOnGridLike(t,r,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Hf(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,t,n,r,i){var a=e.coordinateSystem,o=iv(a,`cartesian2d`),s=iv(a,`matrix`),c,l,u,d;if(o){var f=a.getAxis(`x`),p=a.getAxis(`y`);c=Ey(f).w+.5,l=Ey(p).w+.5,u=f.scale.getExtent(),d=p.scale.getExtent()}for(var m=this.group,h=e.getData(),g=e.getModel([`emphasis`,`itemStyle`]).getItemStyle(),_=e.getModel([`blur`,`itemStyle`]).getItemStyle(),v=e.getModel([`select`,`itemStyle`]).getItemStyle(),y=e.get([`itemStyle`,`borderRadius`]),b=ap(e),x=e.getModel(`emphasis`),S=x.get(`focus`),C=x.get(`blurScope`),w=x.get(`disabled`),T=o||s?[h.mapDimension(`x`),h.mapDimension(`y`),h.mapDimension(`value`)]:[h.mapDimension(`time`),h.mapDimension(`value`)],E=n;Eu[1]||Ad[1])continue;var ee=a.dataToPoint([k,A]);D=new Qo({shape:{x:ee[0]-c/2,y:ee[1]-l/2,width:c,height:l},style:O})}else if(s){var te=a.dataToLayout([h.get(T[0],E),h.get(T[1],E)]).rect;if(Ce(te.x))continue;D=new Qo({z2:1,shape:te,style:O})}else{if(isNaN(h.get(T[1],E)))continue;var j=a.dataToLayout([h.get(T[0],E)]),te=j.contentRect||j.rect;if(Ce(te.x)||Ce(te.y))continue;D=new Qo({z2:1,shape:te,style:O})}if(h.hasItemOption){var M=h.getItemModel(E),ne=M.getModel(`emphasis`);g=ne.getModel(`itemStyle`).getItemStyle(),_=M.getModel([`blur`,`itemStyle`]).getItemStyle(),v=M.getModel([`select`,`itemStyle`]).getItemStyle(),y=M.get([`itemStyle`,`borderRadius`]),S=ne.get(`focus`),C=ne.get(`blurScope`),w=ne.get(`disabled`),b=ap(M)}D.shape.r=y;var N=e.getRawValue(E),P=`-`;N&&N[2]!=null&&(P=N[2]+``),ip(D,b,{labelFetcher:e,labelDataIndex:E,defaultOpacity:O.opacity,defaultText:P}),D.ensureState(`emphasis`).style=g,D.ensureState(`blur`).style=_,D.ensureState(`select`).style=v,_u(D,S,C,w),D.incremental=rl(e,i),i&&(D.states.emphasis.hoverLayer=2),m.add(D),h.setItemGraphicEl(E,D),this._progressiveEls&&this._progressiveEls.push(D)}},t.prototype._renderOnGeo=function(e,t,n,r){var i=n.targetVisuals.inRange,a=n.targetVisuals.outOfRange,o=t.getData(),s=this._hmLayer||this._hmLayer||new Ire;s.blurSize=t.get(`blurSize`),s.pointSize=t.get(`pointSize`),s.minOpacity=t.get(`minOpacity`),s.maxOpacity=t.get(`maxOpacity`);var c=e.getViewRect().clone(),l=e.getRoamTransform();c.applyTransform(l);var u=Math.max(c.x,0),d=Math.max(c.y,0),f=Math.min(c.width+c.x,r.getWidth()),p=Math.min(c.height+c.y,r.getHeight()),m=f-u,h=p-d,g=[o.mapDimension(`lng`),o.mapDimension(`lat`),o.mapDimension(`value`)],_=o.mapArray(g,function(t,n,r){var i=e.dataToPoint([t,n]);return i[0]-=u,i[1]-=d,i.push(r),i}),v=n.getExtent(),y=n.type===`visualMap.continuous`?Rre(v,n.option.range):Lre(v,n.getPieceList(),n.option.selected);s.update(_,m,h,i.color.getNormalizer(),{inRange:i.color.getColorMapper(),outOfRange:a.color.getColorMapper()},y);var b=new Wo({style:{width:m,height:h,x:u,y:d,image:s.canvas},silent:!0});this.group.add(b)},t.type=`heatmap`,t}(tv),Bre=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(e,t){return ah(null,this,{generateCoord:`value`})},t.prototype.preventIncremental=function(){var e=th.get(this.get(`coordinateSystem`));if(e&&e.dimensions)return e.dimensions[0]===`lng`&&e.dimensions[1]===`lat`},t.type=`series.heatmap`,t.dependencies=[`grid`,`geo`,`calendar`,`matrix`],t.defaultOption={coordinateSystem:`cartesian2d`,z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:V.color.primary}}},t}(B_);function Vre(e){e.registerChartView(zre),e.registerSeriesModel(Bre)}function Gk(e){return Object.keys(e)}function Kk(e){return e&&typeof e==`object`&&!Array.isArray(e)}function qk(e,t){let n={...e},r=t;return Kk(e)&&Kk(t)&&Object.keys(t).forEach(t=>{Kk(r[t])&&t in e?n[t]=qk(n[t],r[t]):n[t]=r[t]}),n}function Hre(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}function Ure(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function Wre(e){let t=Ure(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function Jk(e){return e===`0rem`?`0rem`:`calc(${e} * var(--mantine-scale))`}function Yk(e,{shouldScale:t=!1}={}){function n(r){if(r===0||r===`0`)return`0${e}`;if(typeof r==`number`){let n=`${r/16}${e}`;return t?Jk(n):n}if(typeof r==`string`){if(r===``||r.startsWith(`calc(`)||r.startsWith(`clamp(`)||r.includes(`rgba(`))return r;if(r.includes(`,`))return r.split(`,`).map(e=>n(e)).join(`,`);if(r.includes(` `))return r.split(` `).map(e=>n(e)).join(` `);let i=r.replace(`px`,``);if(!Number.isNaN(Number(i))){let n=`${Number(i)/16}${e}`;return t?Jk(n):n}}return r}return n}var U=Yk(`rem`,{shouldScale:!0}),Xk=Yk(`em`);function Zk(e){return Object.keys(e).reduce((t,n)=>(e[n]!==void 0&&(t[n]=e[n]),t),{})}function Qk(e){if(typeof e==`number`)return!0;if(typeof e==`string`){if(e.startsWith(`calc(`)||e.startsWith(`var(`)||e.includes(` `)&&e.trim()!==``)return!0;let t=/^[+-]?[0-9]+(\.[0-9]+)?(px|em|rem|ex|ch|lh|rlh|vw|vh|vmin|vmax|vb|vi|svw|svh|lvw|lvh|dvw|dvh|cm|mm|in|pt|pc|q|cqw|cqh|cqi|cqb|cqmin|cqmax|%)?$/;return e.trim().split(/\s+/).every(e=>t.test(e))}return!1}var Gre=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function ee(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function te(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function j(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,j(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ee(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),j(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u{t.exports=Gre()})),W=u($k(),1);function Kre(e){return Array.isArray(e)||e===null?!1:typeof e==`object`&&e.type!==W.Fragment}function eA(e){let t=(0,W.createContext)(null);return[t,()=>{let n=(0,W.use)(t);if(n===null)throw Error(e);return n}]}function tA(e,t){return n=>{if(typeof n!=`string`||n.trim().length===0)throw Error(t);return`${e}-${n}`}}function nA(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function rA(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function iA(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(nA(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>qre(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=iA(l,c,r),d=rA(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[iA(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[rA(c.length,c,!1)]?.focus()}}}var Yre={app:100,modal:200,popover:300,overlay:400,max:9999};function aA(e){return Yre[e]}function oA(e,t=`size`,n=!0){if(e!==void 0)return Qk(e)?n?U(e):e:`var(--${t}-${e})`}function sA(e){return oA(e,`mantine-spacing`)}function cA(e){return e===void 0?`var(--mantine-radius-default)`:oA(e,`mantine-radius`)}function lA(e){return oA(e,`mantine-font-size`)}function Xre(e){return oA(e,`mantine-line-height`,!1)}function Zre(e){if(e)return oA(e,`mantine-shadow`,!1)}function uA(e,t){return n=>{e?.(n),t?.(n)}}function Qre(e=`mantine-`){return`${e}${Math.random().toString(36).slice(2,11)}`}function dA(e){let t=(0,W.useRef)(e);return(0,W.useEffect)(()=>{t.current=e}),(0,W.useMemo)(()=>((...e)=>t.current?.(...e)),[])}function fA(e,t){let{delay:n,flushOnUnmount:r,leading:i,maxWait:a}=typeof t==`number`?{delay:t,flushOnUnmount:!1,leading:!1,maxWait:void 0}:t,o=dA(e),s=(0,W.useRef)(0),c=(0,W.useRef)(0),l=(0,W.useRef)(null),u=(0,W.useMemo)(()=>{let e=Object.assign((...t)=>{window.clearTimeout(s.current),l.current=t;let r=e._isFirstCall;e._isFirstCall=!1;function u(){window.clearTimeout(s.current),window.clearTimeout(c.current),s.current=0,c.current=0,e._isFirstCall=!0,e._hasPendingCallback=!1}function d(){a!==void 0&&c.current===0&&(c.current=window.setTimeout(()=>{if(s.current!==0){let e=l.current;u(),o(...e)}},a))}if(i&&r){o(...t),e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}if(i&&!r){e._hasPendingCallback=!0,e.flush=()=>{s.current!==0&&(u(),o(...t))},e.cancel=()=>{u()},s.current=window.setTimeout(()=>{u()},n),d();return}e._hasPendingCallback=!0;let f=()=>{s.current!==0&&(u(),o(...t))};e.flush=f,e.cancel=()=>{u()},s.current=window.setTimeout(f,n),d()},{flush:()=>{},cancel:()=>{},isPending:()=>e._hasPendingCallback,_isFirstCall:!0,_hasPendingCallback:!1});return e},[o,n,i,a]);return(0,W.useEffect)(()=>()=>{r?u.flush():u.cancel()},[u,r]),u}function $re(e,t){return typeof t==`boolean`?t:typeof window<`u`&&`matchMedia`in window&&window.matchMedia(e).matches}function eie(e,t,{getInitialValueInEffect:n}={getInitialValueInEffect:!0}){let[r,i]=(0,W.useState)(n?t:$re(e));return(0,W.useEffect)(()=>{try{if(`matchMedia`in window){let t=window.matchMedia(e);i(t.matches);let n=e=>i(e.matches);return t.addEventListener(`change`,n),()=>{t.removeEventListener(`change`,n)}}}catch{return}},[e]),r||!1}var pA=typeof document<`u`?W.useLayoutEffect:W.useEffect;function tie(e,t){let n=(0,W.useRef)(!1);(0,W.useEffect)(()=>()=>{n.current=!1},[]),(0,W.useEffect)(()=>{if(n.current)return e();n.current=!0},t)}var nie=e=>(e+1)%1e6;function rie(){let[,e]=(0,W.useReducer)(nie,0);return e}function mA(e){let[t,n]=(0,W.useState)(`mantine-${(0,W.useId)().replace(/:/g,``)}`),r=(0,W.useRef)(!1);return pA(()=>{r.current||(r.current=!0,n(Qre()))},[]),typeof e==`string`?e:t}function hA(e,t){if(typeof e==`function`)return e(t);typeof e==`object`&&e&&`current`in e&&(e.current=t)}function iie(...e){let t=new Map;return n=>{if(e.forEach(e=>{let r=hA(e,n);r&&t.set(e,r)}),t.size>0)return()=>{e.forEach(e=>{let n=t.get(e);n&&typeof n==`function`?n():hA(e,null)}),t.clear()}}}function gA(...e){return(0,W.useCallback)(iie(...e),e)}function _A({value:e,defaultValue:t,finalValue:n,onChange:r=()=>{}}){let[i,a]=(0,W.useState)(t===void 0?n:t);return e===void 0?[i,(e,...t)=>{a(e),r?.(e,...t)},!1]:[e,r,!0]}function vA(e,t){let n=t-e+1;return Array.from({length:n},(t,n)=>n+e)}var yA=`dots`;function aie({total:e,siblings:t=1,boundaries:n=1,page:r,initialPage:i,onChange:a,startValue:o=1}){let s=Math.max(Math.trunc(o),1),c=Math.max(Math.trunc(e),s),l=c-s+1,u=i??s,[d,f]=_A({value:r,onChange:a,defaultValue:u,finalValue:u}),p=(0,W.useCallback)(e=>{f(ec?c:e)},[s,c,f]),m=(0,W.useCallback)(()=>p(d+1),[d,p]),h=(0,W.useCallback)(()=>p(d-1),[d,p]),g=(0,W.useCallback)(()=>p(s),[p,s]),_=(0,W.useCallback)(()=>p(c),[c,p]);return{range:(0,W.useMemo)(()=>{if(t*2+3+n*2>=l)return vA(s,c);let e=Math.max(d-t,s+n-1),r=Math.min(d+t,c-n),i=e>s+n+1,a=r{var t=$k();function n(e){var t=`https://react.dev/errors/`+e;if(1{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=sie()}));function xA(e){return e?.props?.ref}function SA(e){let t=W.Children.toArray(e);return t.length!==1||!Kre(t[0])?null:t[0]}function CA(e){return e}function wA(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t{Object.entries(e).forEach(([e,n])=>{t[e]?t[e]=TA(t[e],n):t[e]=n})}),t}function EA({theme:e,classNames:t,props:n,stylesCtx:r}){return lie((Array.isArray(t)?t:[t]).map(t=>typeof t==`function`?t(e,n,r):t||cie))}function DA({theme:e,styles:t,props:n,stylesCtx:r}){let i=Array.isArray(t)?t:[t],a={};for(let t of i)typeof t==`function`?Object.assign(a,t(e,n,r)):t&&Object.assign(a,t);return a}function OA(e){return e===`auto`||e===`dark`||e===`light`}function uie({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return OA(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&OA(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function kA(e,t){return typeof e.primaryShade==`number`?e.primaryShade:t===`dark`?e.primaryShade.dark:e.primaryShade.light}function die(e){return/^#?([0-9A-F]{3}){1,2}([0-9A-F]{2})?$/i.test(e)}function fie(e){let t=e.replace(`#`,``);if(t.length===3){let e=t.split(``);t=[e[0],e[0],e[1],e[1],e[2],e[2]].join(``)}if(t.length===8){let e=parseInt(t.slice(6,8),16)/255;return{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16),a:e}}let n=parseInt(t,16);return{r:n>>16&255,g:n>>8&255,b:n&255,a:1}}function pie(e){let[t,n,r,i]=e.replace(/[^0-9,./]/g,``).split(/[/,]/).map(Number);return{r:t,g:n,b:r,a:i===void 0?1:i}}function mie(e){let t=e.match(/^hsla?\(\s*(\d+)\s*,\s*(\d+%)\s*,\s*(\d+%)\s*(,\s*(0?\.\d+|\d+(\.\d+)?))?\s*\)$/i);if(!t)return{r:0,g:0,b:0,a:1};let n=parseInt(t[1],10),r=parseInt(t[2],10)/100,i=parseInt(t[3],10)/100,a=t[5]?parseFloat(t[5]):void 0,o=(1-Math.abs(2*i-1))*r,s=n/60,c=o*(1-Math.abs(s%2-1)),l=i-o/2,u,d,f;return s>=0&&s<1?(u=o,d=c,f=0):s>=1&&s<2?(u=c,d=o,f=0):s>=2&&s<3?(u=0,d=o,f=c):s>=3&&s<4?(u=0,d=c,f=o):s>=4&&s<5?(u=c,d=0,f=o):(u=o,d=0,f=c),{r:Math.round((u+l)*255),g:Math.round((d+l)*255),b:Math.round((f+l)*255),a:a||1}}function AA(e){return die(e)?fie(e):e.startsWith(`rgb`)?pie(e):e.startsWith(`hsl`)?mie(e):{r:0,g:0,b:0,a:1}}function jA(e){return e<=.03928?e/12.92:((e+.055)/1.055)**2.4}function hie(e){let t=e.match(/oklch\((.*?)%\s/);return t?parseFloat(t[1]):null}function gie(e){if(e.startsWith(`oklch(`))return(hie(e)||0)/100;let{r:t,g:n,b:r}=AA(e),i=t/255,a=n/255,o=r/255,s=jA(i),c=jA(a),l=jA(o);return .2126*s+.7152*c+.0722*l}function MA(e,t=.179){return!e.startsWith(`var(`)&&gie(e)>t}function NA({color:e,theme:t,colorScheme:n}){if(typeof e!=`string`)throw Error(`[@mantine/core] Failed to parse color. Expected color to be a string, instead got ${typeof e}`);if(e===`bright`)return{color:e,value:n===`dark`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:MA(n===`dark`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-bright`};if(e===`dimmed`)return{color:e,value:n===`dark`?t.colors.dark[2]:t.colors.gray[7],shade:void 0,isThemeColor:!1,isLight:MA(n===`dark`?t.colors.dark[2]:t.colors.gray[6],t.luminanceThreshold),variable:`--mantine-color-dimmed`};if(e===`white`||e===`black`)return{color:e,value:e===`white`?t.white:t.black,shade:void 0,isThemeColor:!1,isLight:MA(e===`white`?t.white:t.black,t.luminanceThreshold),variable:`--mantine-color-${e}`};let[r,i]=e.split(`.`),a=i?Number(i):void 0,o=r in t.colors;if(o){let e=a===void 0?t.colors[r][kA(t,n||`light`)]:t.colors[r][a];return{color:r,value:e,shade:a,isThemeColor:o,isLight:MA(e,t.luminanceThreshold),variable:i?`--mantine-color-${r}-${a}`:`--mantine-color-${r}-filled`}}return{color:e,value:e,isThemeColor:o,isLight:MA(e,t.luminanceThreshold),shade:a,variable:void 0}}function PA(e,t){let n=NA({color:e||t.primaryColor,theme:t});return n.variable?`var(${n.variable})`:e}function FA(e){return!!e&&typeof e==`object`&&`mantine-virtual-color`in e}function IA(e,t){if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, black ${t*100}%)`;let{r:n,g:r,b:i,a}=AA(e),o=1-t,s=e=>Math.round(e*o);return`rgba(${s(n)}, ${s(r)}, ${s(i)}, ${a})`}function LA(e,t){let n={from:e?.from||t.defaultGradient.from,to:e?.to||t.defaultGradient.to,deg:e?.deg??t.defaultGradient.deg??0},r=PA(n.from,t),i=PA(n.to,t);return`linear-gradient(${n.deg}deg, ${r} 0%, ${i} 100%)`}function RA(e,t){if(typeof e!=`string`||t>1||t<0)return`rgba(0, 0, 0, 1)`;if(e.startsWith(`var(`))return`color-mix(in srgb, ${e}, transparent ${(1-t)*100}%)`;if(e.startsWith(`oklch`))return e.includes(`/`)?e.replace(/\/\s*[\d.]+\s*\)/,`/ ${t})`):e.replace(`)`,` / ${t})`);let{r:n,g:r,b:i}=AA(e);return`rgba(${n}, ${r}, ${i}, ${t})`}var zA=RA,BA=({color:e,theme:t,variant:n,gradient:r,autoContrast:i})=>{let a=NA({color:e,theme:t}),o=typeof i==`boolean`?i:t.autoContrast;if(n===`none`)return{background:`transparent`,hover:`transparent`,color:`inherit`,border:`none`};if(n===`filled`){let n=a.isThemeColor&&a.shade===void 0&&FA(t.colors[a.color]),r=o?n?`var(--mantine-color-${a.color}-contrast)`:a.isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`:`var(--mantine-color-white)`;return a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-${e}-filled)`,hover:`var(--mantine-color-${e}-filled-hover)`,color:r,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-${a.color}-${a.shade})`,hover:`var(--mantine-color-${a.color}-${a.shade===9?8:a.shade+1})`,color:r,border:`${U(1)} solid transparent`}:{background:e,hover:IA(e,.1),color:r,border:`${U(1)} solid transparent`}}if(n===`light`){if(a.isThemeColor){if(a.shade===void 0)return{background:`var(--mantine-color-${e}-light)`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:n,hover:IA(n,.1),color:`var(--mantine-color-${a.color}-light-color)`,border:`${U(1)} solid transparent`}}return{background:RA(e,.1),hover:RA(e,.12),color:e,border:`${U(1)} solid transparent`}}if(n===`outline`)return a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`var(--mantine-color-${e}-outline-hover)`,color:`var(--mantine-color-${e}-outline)`,border:`${U(1)} solid var(--mantine-color-${e}-outline)`}:{background:`transparent`,hover:RA(t.colors[a.color][a.shade],.05),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid var(--mantine-color-${a.color}-${a.shade})`}:{background:`transparent`,hover:RA(e,.05),color:e,border:`${U(1)} solid ${e}`};if(n===`subtle`){if(a.isThemeColor){if(a.shade===void 0)return{background:`transparent`,hover:`var(--mantine-color-${e}-light-hover)`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`};let n=t.colors[a.color][a.shade];return{background:`transparent`,hover:RA(n,.12),color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}}return{background:`transparent`,hover:RA(e,.12),color:e,border:`${U(1)} solid transparent`}}return n===`transparent`?a.isThemeColor?a.shade===void 0?{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${e}-light-color)`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:`var(--mantine-color-${a.color}-${Math.min(a.shade,6)})`,border:`${U(1)} solid transparent`}:{background:`transparent`,hover:`transparent`,color:e,border:`${U(1)} solid transparent`}:n===`white`?a.isThemeColor?a.shade===void 0?{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:`var(--mantine-color-${e}-filled)`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:`var(--mantine-color-${a.color}-${a.shade})`,border:`${U(1)} solid transparent`}:{background:`var(--mantine-color-white)`,hover:IA(t.white,.01),color:e,border:`${U(1)} solid transparent`}:n===`gradient`?{background:LA(r,t),hover:LA(r,t),color:`var(--mantine-color-white)`,border:`none`}:n==="default"?{background:`var(--mantine-color-default)`,hover:`var(--mantine-color-default-hover)`,color:`var(--mantine-color-default-color)`,border:`${U(1)} solid var(--mantine-color-default-border)`}:{}};function VA({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&NA({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function HA(e,t,n){return VA({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function UA(e,t){let n=e.colors[e.primaryColor];return FA(n)?e.autoContrast?HA(n,e,t):`var(--mantine-color-white)`:VA({color:n[kA(e,t)],theme:e,autoContrast:null})}function WA(e,t){return typeof e==`boolean`?e:t.autoContrast}var GA=(0,W.createContext)(null);function KA(){let e=(0,W.use)(GA);if(!e)throw Error(`[@mantine/core] MantineProvider was not found in tree`);return e}function _ie(){return KA().cssVariablesResolver}function vie(){return KA().classNamesPrefix}function qA(){return KA().getStyleNonce}function yie(){return KA().withStaticClasses}function bie(){return KA().headless}function xie(){return KA().stylesTransform?.sx}function Sie(){return KA().stylesTransform?.styles}function JA(){return KA().env||`default`}function Cie(){return KA().deduplicateInlineStyles}function YA(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function wie({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,W.useRef)(null),[a,o]=(0,W.useState)(()=>e.get(t)),s=r||a,c=(0,W.useCallback)(t=>{r||(YA(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,W.useCallback)(()=>{o(t),YA(t,n),e.clear()},[e.clear,t]);return(0,W.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),pA(()=>{YA(e.get(t),n)},[]),(0,W.useEffect)(()=>{if(r)return YA(r,n),()=>{};r===void 0&&YA(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&YA(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}var Tie=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Eie=s(((e,t)=>{t.exports=Tie()})),Die={dark:[`#C9C9C9`,`#b8b8b8`,`#828282`,`#696969`,`#424242`,`#3b3b3b`,`#2e2e2e`,`#242424`,`#1f1f1f`,`#141414`],gray:[`#f8f9fa`,`#f1f3f5`,`#e9ecef`,`#dee2e6`,`#ced4da`,`#adb5bd`,`#868e96`,`#495057`,`#343a40`,`#212529`],red:[`#fff5f5`,`#ffe3e3`,`#ffc9c9`,`#ffa8a8`,`#ff8787`,`#ff6b6b`,`#fa5252`,`#f03e3e`,`#e03131`,`#c92a2a`],pink:[`#fff0f6`,`#ffdeeb`,`#fcc2d7`,`#faa2c1`,`#f783ac`,`#f06595`,`#e64980`,`#d6336c`,`#c2255c`,`#a61e4d`],grape:[`#f8f0fc`,`#f3d9fa`,`#eebefa`,`#e599f7`,`#da77f2`,`#cc5de8`,`#be4bdb`,`#ae3ec9`,`#9c36b5`,`#862e9c`],violet:[`#f3f0ff`,`#e5dbff`,`#d0bfff`,`#b197fc`,`#9775fa`,`#845ef7`,`#7950f2`,`#7048e8`,`#6741d9`,`#5f3dc4`],indigo:[`#edf2ff`,`#dbe4ff`,`#bac8ff`,`#91a7ff`,`#748ffc`,`#5c7cfa`,`#4c6ef5`,`#4263eb`,`#3b5bdb`,`#364fc7`],blue:[`#e7f5ff`,`#d0ebff`,`#a5d8ff`,`#74c0fc`,`#4dabf7`,`#339af0`,`#228be6`,`#1c7ed6`,`#1971c2`,`#1864ab`],cyan:[`#e3fafc`,`#c5f6fa`,`#99e9f2`,`#66d9e8`,`#3bc9db`,`#22b8cf`,`#15aabf`,`#1098ad`,`#0c8599`,`#0b7285`],teal:[`#e6fcf5`,`#c3fae8`,`#96f2d7`,`#63e6be`,`#38d9a9`,`#20c997`,`#12b886`,`#0ca678`,`#099268`,`#087f5b`],green:[`#ebfbee`,`#d3f9d8`,`#b2f2bb`,`#8ce99a`,`#69db7c`,`#51cf66`,`#40c057`,`#37b24d`,`#2f9e44`,`#2b8a3e`],lime:[`#f4fce3`,`#e9fac8`,`#d8f5a2`,`#c0eb75`,`#a9e34b`,`#94d82d`,`#82c91e`,`#74b816`,`#66a80f`,`#5c940d`],yellow:[`#fff9db`,`#fff3bf`,`#ffec99`,`#ffe066`,`#ffd43b`,`#fcc419`,`#fab005`,`#f59f00`,`#f08c00`,`#e67700`],orange:[`#fff4e6`,`#ffe8cc`,`#ffd8a8`,`#ffc078`,`#ffa94d`,`#ff922b`,`#fd7e14`,`#f76707`,`#e8590c`,`#d9480f`]},XA=`-apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji`,ZA={scale:1,fontSmoothing:!0,focusRing:`auto`,white:`#fff`,black:`#000`,colors:Die,primaryShade:{light:6,dark:8},primaryColor:`blue`,variantColorResolver:BA,autoContrast:!1,luminanceThreshold:.3,fontFamily:XA,fontFamilyMonospace:`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, Liberation Mono, Courier New, monospace`,respectReducedMotion:!1,cursorType:`default`,defaultGradient:{from:`blue`,to:`cyan`,deg:45},defaultRadius:`md`,activeClassName:`mantine-active`,focusClassName:``,headings:{fontFamily:XA,fontWeight:`700`,textWrap:`wrap`,sizes:{h1:{fontSize:U(34),lineHeight:`1.3`},h2:{fontSize:U(26),lineHeight:`1.35`},h3:{fontSize:U(22),lineHeight:`1.4`},h4:{fontSize:U(18),lineHeight:`1.45`},h5:{fontSize:U(16),lineHeight:`1.5`},h6:{fontSize:U(14),lineHeight:`1.5`}}},fontSizes:{xs:U(12),sm:U(14),md:U(16),lg:U(18),xl:U(20)},lineHeights:{xs:`1.4`,sm:`1.45`,md:`1.55`,lg:`1.6`,xl:`1.65`},fontWeights:{regular:`400`,medium:`600`,bold:`700`},radius:{xs:U(2),sm:U(4),md:U(8),lg:U(16),xl:U(32)},spacing:{xs:U(10),sm:U(12),md:U(16),lg:U(20),xl:U(32)},breakpoints:{xs:`36em`,sm:`48em`,md:`62em`,lg:`75em`,xl:`88em`},shadows:{xs:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), 0 ${U(1)} ${U(2)} rgba(0, 0, 0, 0.1)`,sm:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(10)} ${U(15)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(7)} ${U(7)} ${U(-5)}`,md:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(20)} ${U(25)} ${U(-5)}, rgba(0, 0, 0, 0.04) 0 ${U(10)} ${U(10)} ${U(-5)}`,lg:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(28)} ${U(23)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(12)} ${U(12)} ${U(-7)}`,xl:`0 ${U(1)} ${U(3)} rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05) 0 ${U(36)} ${U(28)} ${U(-7)}, rgba(0, 0, 0, 0.04) 0 ${U(17)} ${U(17)} ${U(-7)}`},other:{},components:{}},Oie=`[@mantine/core] MantineProvider: Invalid theme.primaryColor, it accepts only key of theme.colors, learn more – https://mantine.dev/theming/colors/#primary-color`,kie=`[@mantine/core] MantineProvider: Invalid theme.primaryShade, it accepts only 0-9 integers or an object { light: 0-9, dark: 0-9 }`;function QA(e){return e<0||e>9?!1:parseInt(e.toString(),10)===e}function $A(e){if(!(e.primaryColor in e.colors))throw Error(Oie);if(typeof e.primaryShade==`object`&&(!QA(e.primaryShade.dark)||!QA(e.primaryShade.light))||typeof e.primaryShade==`number`&&!QA(e.primaryShade))throw Error(kie)}function Aie(e,t){if(!t)return $A(e),e;let n=qk(e,t);return t.fontFamily&&!t.headings?.fontFamily&&(n.headings={...n.headings,fontFamily:t.fontFamily}),$A(n),n}var G=Eie(),ej=(0,W.createContext)(null),jie=()=>(0,W.use)(ej)||ZA;function tj(){let e=(0,W.use)(ej);if(!e)throw Error(`@mantine/core: MantineProvider was not found in component tree, make sure you have it in your app`);return e}function nj({theme:e,children:t,inherit:n=!0}){let r=jie(),i=(0,W.useMemo)(()=>Aie(n?r:ZA,e),[e,r,n]);return(0,G.jsx)(ej,{value:i,children:t})}nj.displayName=`@mantine/core/MantineThemeProvider`;function rj(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function ij(e,t){let n=t?[t]:[`:root`,`:host`],r=rj(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=rj(e.dark),o=rj(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function aj({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:i=!0}){if(!e.colors[t])return{};if(n===`light`){let n=kA(e,`light`),a={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:zA(e.colors[t][n],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...a}:a}let a=kA(e,`dark`),o={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${a})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${a===9?8:a+1})`,[`--mantine-color-${r}-light`]:IA(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:IA(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(a-4,0)})`,[`--mantine-color-${r}-outline-hover`]:zA(e.colors[t][Math.max(a-4,0)],.05)};return i?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...o}:o}function oj(e,t,n){Gk(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var sj=e=>{let t=kA(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:U(e.defaultRadius),r={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":UA(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":UA(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};oj(r.variables,e.breakpoints,`breakpoint`),oj(r.variables,e.spacing,`spacing`),oj(r.variables,e.fontSizes,`font-size`),oj(r.variables,e.lineHeights,`line-height`),oj(r.variables,e.shadows,`shadow`),oj(r.variables,e.radius,`radius`),oj(r.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{r.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),Gk(e.colors).forEach(t=>{let n=e.colors[t];if(FA(n)){Object.assign(r.light,aj({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(r.dark,aj({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),r.light[`--mantine-color-${n.name}-contrast`]=HA(n,e,`light`),r.dark[`--mantine-color-${n.name}-contrast`]=HA(n,e,`dark`);return}n.forEach((e,n)=>{r.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(r.light,aj({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(r.dark,aj({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let i=e.headings.sizes;return Gk(i).forEach(t=>{r.variables[`--mantine-${t}-font-size`]=i[t].fontSize,r.variables[`--mantine-${t}-line-height`]=i[t].lineHeight,r.variables[`--mantine-${t}-font-weight`]=i[t].fontWeight||e.headings.fontWeight}),r};function Mie(){let e=tj(),t=qA(),n=Gk(e.breakpoints).reduce((t,n)=>{let r=e.breakpoints[n].includes(`px`),i=Wre(e.breakpoints[n]);return`${t}@media (max-width: ${r?`${i-.1}px`:Xk(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:Xk(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,G.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:t?.(),dangerouslySetInnerHTML:{__html:n}})}function Nie({theme:e,generator:t}){let n=sj(e),r=t?.(e);return r?qk(n,r):n}var cj=sj(ZA);function Pie(e){let t={variables:{},light:{},dark:{}};return Gk(e.variables).forEach(n=>{cj.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),Gk(e.light).forEach(n=>{cj.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),Gk(e.dark).forEach(n=>{cj.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Fie(e){return ij({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function lj({cssVariablesSelector:e,deduplicateCssVariables:t}){let n=tj(),r=qA(),i=Nie({theme:n,generator:_ie()}),a=(e===void 0||e===`:root`||e===`:host`)&&t,o=ij(a?Pie(i):i,e);return o?(0,G.jsx)(`style`,{"data-mantine-styles":!0,nonce:r?.(),dangerouslySetInnerHTML:{__html:`${o}${a?``:Fie(e)}`}}):null}lj.displayName=`@mantine/CssVariables`;function Iie({respectReducedMotion:e,getRootElement:t}){pA(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function uj({theme:e,children:t,getStyleNonce:n,withStaticClasses:r=!0,withGlobalClasses:i=!0,deduplicateCssVariables:a=!0,withCssVariables:o=!0,cssVariablesSelector:s,classNamesPrefix:c=`mantine`,colorSchemeManager:l=uie(),defaultColorScheme:u=`light`,getRootElement:d=()=>document.documentElement,cssVariablesResolver:f,forceColorScheme:p,stylesTransform:m,env:h,deduplicateInlineStyles:g=!1}){let{colorScheme:_,setColorScheme:v,clearColorScheme:y}=wie({defaultColorScheme:u,forceColorScheme:p,manager:l,getRootElement:d});return Iie({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:d}),(0,G.jsx)(GA,{value:{colorScheme:_,setColorScheme:v,clearColorScheme:y,getRootElement:d,classNamesPrefix:c,getStyleNonce:n,cssVariablesResolver:f,cssVariablesSelector:s??`:root`,withStaticClasses:r,stylesTransform:m,env:h,deduplicateInlineStyles:g},children:(0,G.jsxs)(nj,{theme:e,children:[o&&(0,G.jsx)(lj,{cssVariablesSelector:s,deduplicateCssVariables:a}),i&&(0,G.jsx)(Mie,{}),t]})})}uj.displayName=`@mantine/core/MantineProvider`;function dj(e,t,n){let r=tj(),i=(Array.isArray(e)?e:[e]).filter(Boolean),a={};for(let e of i){let t=r.components[e]?.defaultProps,n=typeof t==`function`?t(r):t;n&&(a={...a,...n})}return{...t,...a,...Zk(n)}}function Lie(e){return e}var Rie={always:`mantine-focus-always`,auto:`mantine-focus-auto`,never:`mantine-focus-never`};function zie({theme:e,options:t,unstyled:n}){return TA(t?.focusable&&!n&&(e.focusClassName||Rie[e.focusRing]),t?.active&&!n&&e.activeClassName)}function Bie({selector:e,stylesCtx:t,options:n,props:r,theme:i}){return EA({theme:i,classNames:n?.classNames,props:n?.props||r,stylesCtx:t})[e]}function Vie({selector:e,stylesCtx:t,theme:n,classNames:r,props:i}){return EA({theme:n,classNames:r,props:i,stylesCtx:t})[e]}function Hie({rootSelector:e,selector:t,className:n}){return e===t?n:void 0}function Uie({selector:e,classes:t,unstyled:n}){return n?void 0:t[e]}function Wie({themeName:e,classNamesPrefix:t,selector:n,withStaticClass:r}){return r===!1?[]:e.map(e=>`${t}-${e}-${n}`)}function Gie({options:e,classes:t,selector:n,unstyled:r}){return e?.variant&&!r?t[`${n}--${e.variant}`]:void 0}function fj({theme:e,options:t,themeName:n,selector:r,classNamesPrefix:i,resolvedClassNames:a,resolvedThemeClassNames:o,classes:s,unstyled:c,className:l,rootSelector:u,props:d,stylesCtx:f,withStaticClasses:p,headless:m,transformedStyles:h}){return TA(zie({theme:e,options:t,unstyled:c||m}),o.map(e=>e[r]),Gie({options:t,classes:s,selector:r,unstyled:c||m}),a[r],Vie({selector:r,stylesCtx:f,theme:e,classNames:h,props:d}),Bie({selector:r,stylesCtx:f,options:t,props:d,theme:e}),Hie({rootSelector:u,selector:r,className:l}),Uie({selector:r,classes:s,unstyled:c||m}),p&&!m&&Wie({themeName:n,classNamesPrefix:i,selector:r,withStaticClass:t?.withStaticClass}),t?.className)}function pj({style:e,theme:t}){return Array.isArray(e)?e.reduce((e,n)=>({...e,...pj({style:n,theme:t})}),{}):typeof e==`function`?e(t):e??{}}function mj({theme:e,selector:t,options:n,props:r,stylesCtx:i,rootSelector:a,withStylesTransform:o,resolvedStyles:s,resolvedThemeStyles:c,resolvedVars:l,resolvedRootStyle:u}){return{...c[t],...s[t],...!o&&DA({theme:e,styles:n?.styles,props:n?.props||r,stylesCtx:i})[t],...l[t],...a===t?u:null,...pj({style:n?.style,theme:e})}}function hj(e){return e.reduce((e,t)=>(t&&Object.keys(t).forEach(n=>{e[n]={...e[n],...Zk(t[n])}}),e),{})}function gj({props:e,stylesCtx:t,themeName:n,theme:r}){let i=Sie()?.();return{getTransformedStyles:a=>i?[...a.map(n=>i(n,{props:e,theme:r,ctx:t})),...n.map(n=>i(r.components[n]?.styles,{props:e,theme:r,ctx:t}))].filter(Boolean):[],withStylesTransform:!!i}}function _j({name:e,classes:t,props:n,stylesCtx:r,className:i,style:a,rootSelector:o=`root`,unstyled:s,classNames:c,styles:l,vars:u,varsResolver:d,attributes:f}){let p=tj(),m=vie(),h=yie(),g=bie(),_=(Array.isArray(e)?e:[e]).filter(e=>e),{withStylesTransform:v,getTransformedStyles:y}=gj({props:n,stylesCtx:r,themeName:_,theme:p}),b=EA({theme:p,classNames:c,props:n,stylesCtx:r}),x=_.map(e=>EA({theme:p,classNames:p.components[e]?.classNames,props:n,stylesCtx:r})),S=v?{}:DA({theme:p,styles:l,props:n,stylesCtx:r}),C={};if(!v)for(let e of _){let t=DA({theme:p,styles:p.components[e]?.styles,props:n,stylesCtx:r});for(let e of Object.keys(t))C[e]={...C[e],...t[e]}}let w=hj([g?{}:d?.(p,n,r),..._.map(e=>p.components?.[e]?.vars?.(p,n,r)),u?.(p,n,r)]),T=pj({style:a,theme:p});return(e,a)=>({...f?.[e],className:fj({theme:p,options:a,themeName:_,selector:e,classNamesPrefix:m,resolvedClassNames:b,resolvedThemeClassNames:x,classes:t,unstyled:s,className:i,rootSelector:o,props:n,stylesCtx:r,withStaticClasses:h,headless:g,transformedStyles:y([a?.styles,l])}),style:mj({theme:p,selector:e,options:a,props:n,stylesCtx:r,rootSelector:o,withStylesTransform:v,resolvedStyles:S,resolvedThemeStyles:C,resolvedVars:w,resolvedRootStyle:T})})}function vj(e){return Gk(e).reduce((t,n)=>e[n]===void 0?t:`${t}${Hre(n)}:${e[n]};`,``).trim()}function yj({selector:e,styles:t,media:n,container:r}){let i=t?vj(t):``,a=Array.isArray(n)?n.map(t=>`@media${t.query}{${e}{${vj(t.styles)}}}`):[],o=Array.isArray(r)?r.map(t=>`@container ${t.query}{${e}{${vj(t.styles)}}}`):[];return`${i?`${e}{${i}}`:``}${a.join(``)}${o.join(``)}`.trim()}function bj(e){let t=5381;for(let n=0;n>>0).toString(36)}function xj({deduplicate:e,...t}){let n=qA(),r=yj(t);return e?(0,G.jsx)(`style`,{href:`mantine-${bj(r)}`,precedence:`mantine`,nonce:n?.(),children:r}):(0,G.jsx)(`style`,{"data-mantine-styles":`inline`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function Sj(e){let t=5381;for(let n=0;n>>0).toString(36)}function Cj(e,t){return`__mdi__-${Sj(`${e?vj(e):``}|${Array.isArray(t)?t.map(e=>`${e.query}:${vj(e.styles)}`).join(`|`):``}`)}`}function wj(e){let{m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pe:y,ps:b,pis:x,pie:S,bd:C,bdrs:w,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:ee,ta:te,lh:j,fs:M,tt:ne,td:N,w:P,miw:F,maw:re,h:I,mih:ie,mah:ae,bgsz:oe,bgp:se,bgr:L,bga:R,pos:ce,top:le,left:ue,bottom:de,right:fe,inset:pe,display:me,flex:z,hiddenFrom:he,visibleFrom:B,lightHidden:ge,darkHidden:_e,sx:ve,...ye}=e;return{styleProps:Zk({m:t,mx:n,my:r,mt:i,mb:a,ml:o,mr:s,me:c,ms:l,mis:u,mie:d,p:f,px:p,py:m,pt:h,pb:g,pl:_,pr:v,pis:x,pie:S,pe:y,ps:b,bd:C,bg:T,c:E,opacity:D,ff:O,fz:k,fw:A,lts:ee,ta:te,lh:j,fs:M,tt:ne,td:N,w:P,miw:F,maw:re,h:I,mih:ie,mah:ae,bgsz:oe,bgp:se,bgr:L,bga:R,pos:ce,top:le,left:ue,bottom:de,right:fe,inset:pe,display:me,flex:z,bdrs:w,hiddenFrom:he,visibleFrom:B,lightHidden:ge,darkHidden:_e,sx:ve}),rest:ye}}var Tj={m:{type:`spacing`,property:`margin`},mt:{type:`spacing`,property:`marginTop`},mb:{type:`spacing`,property:`marginBottom`},ml:{type:`spacing`,property:`marginLeft`},mr:{type:`spacing`,property:`marginRight`},ms:{type:`spacing`,property:`marginInlineStart`},me:{type:`spacing`,property:`marginInlineEnd`},mis:{type:`spacing`,property:`marginInlineStart`},mie:{type:`spacing`,property:`marginInlineEnd`},mx:{type:`spacing`,property:`marginInline`},my:{type:`spacing`,property:`marginBlock`},p:{type:`spacing`,property:`padding`},pt:{type:`spacing`,property:`paddingTop`},pb:{type:`spacing`,property:`paddingBottom`},pl:{type:`spacing`,property:`paddingLeft`},pr:{type:`spacing`,property:`paddingRight`},ps:{type:`spacing`,property:`paddingInlineStart`},pe:{type:`spacing`,property:`paddingInlineEnd`},pis:{type:`spacing`,property:`paddingInlineStart`},pie:{type:`spacing`,property:`paddingInlineEnd`},px:{type:`spacing`,property:`paddingInline`},py:{type:`spacing`,property:`paddingBlock`},bd:{type:`border`,property:`border`},bdrs:{type:`radius`,property:`borderRadius`},bg:{type:`color`,property:`background`},c:{type:`textColor`,property:`color`},opacity:{type:`identity`,property:`opacity`},ff:{type:`fontFamily`,property:`fontFamily`},fz:{type:`fontSize`,property:`fontSize`},fw:{type:`identity`,property:`fontWeight`},lts:{type:`size`,property:`letterSpacing`},ta:{type:`identity`,property:`textAlign`},lh:{type:`lineHeight`,property:`lineHeight`},fs:{type:`identity`,property:`fontStyle`},tt:{type:`identity`,property:`textTransform`},td:{type:`identity`,property:`textDecoration`},w:{type:`spacing`,property:`width`},miw:{type:`spacing`,property:`minWidth`},maw:{type:`spacing`,property:`maxWidth`},h:{type:`spacing`,property:`height`},mih:{type:`spacing`,property:`minHeight`},mah:{type:`spacing`,property:`maxHeight`},bgsz:{type:`size`,property:`backgroundSize`},bgp:{type:`identity`,property:`backgroundPosition`},bgr:{type:`identity`,property:`backgroundRepeat`},bga:{type:`identity`,property:`backgroundAttachment`},pos:{type:`identity`,property:`position`},top:{type:`size`,property:`top`},left:{type:`size`,property:`left`},bottom:{type:`size`,property:`bottom`},right:{type:`size`,property:`right`},inset:{type:`size`,property:`inset`},display:{type:`identity`,property:`display`},flex:{type:`identity`,property:`flex`}};function Ej(e,t){let n=NA({color:e,theme:t});return n.color===`dimmed`?`var(--mantine-color-dimmed)`:n.color===`bright`?`var(--mantine-color-bright)`:n.variable?`var(${n.variable})`:n.color}function Dj(e,t){let n=NA({color:e,theme:t});return n.isThemeColor&&n.shade===void 0?`var(--mantine-color-${n.color}-text)`:Ej(e,t)}function Oj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let[n,r,...i]=e.split(` `).filter(e=>e.trim()!==``),a=`${U(n)}`;return r&&(a+=` ${r}`),i.length>0&&(a+=` ${Ej(i.join(` `),t)}`),a.trim()}return e}var kj={text:`var(--mantine-font-family)`,mono:`var(--mantine-font-family-monospace)`,monospace:`var(--mantine-font-family-monospace)`,heading:`var(--mantine-font-family-headings)`,headings:`var(--mantine-font-family-headings)`};function Aj(e){return typeof e==`string`&&e in kj?kj[e]:e}var jj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Mj(e,t){return typeof e==`string`&&e in t.fontSizes?`var(--mantine-font-size-${e})`:typeof e==`string`&&jj.includes(e)?`var(--mantine-${e}-font-size)`:typeof e==`number`||typeof e==`string`?U(e):e}function Nj(e){return e}var Pj=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`];function Fj(e,t){return typeof e==`string`&&e in t.lineHeights?`var(--mantine-line-height-${e})`:typeof e==`string`&&Pj.includes(e)?`var(--mantine-${e}-line-height)`:e}function Ij(e,t){return typeof e==`string`&&e in t.radius?`var(--mantine-radius-${e})`:typeof e==`number`||typeof e==`string`?U(e):e}function Lj(e){return typeof e==`number`?U(e):e}function Rj(e,t){if(typeof e==`number`)return U(e);if(typeof e==`string`){let n=e.replace(`-`,``);if(!(n in t.spacing))return U(e);let r=`--mantine-spacing-${n}`;return e.startsWith(`-`)?`calc(var(${r}) * -1)`:`var(${r})`}return e}var zj={color:Ej,textColor:Dj,fontSize:Mj,spacing:Rj,radius:Ij,identity:Nj,size:Lj,lineHeight:Fj,fontFamily:Aj,border:Oj};function Bj(e){return e.replace(`(min-width: `,``).replace(`em)`,``)}function Kie({media:e,...t}){let n=Object.keys(e).sort((e,t)=>Number(Bj(e))-Number(Bj(t))).map(t=>({query:t,styles:e[t]}));return{...t,media:n}}function qie(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length!==1||t[0]!==`base`}function Jie(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function Yie(e){return typeof e==`object`&&e?Gk(e).filter(e=>e!==`base`):[]}function Xie(e,t){return typeof e==`object`&&e&&t in e?e[t]:e}function Zie({styleProps:e,data:t,theme:n}){return Kie(Gk(e).reduce((r,i)=>{if(i===`hiddenFrom`||i===`visibleFrom`||i===`sx`)return r;let a=t[i],o=Array.isArray(a.property)?a.property:[a.property],s=Jie(e[i]);if(!qie(e[i]))return o.forEach(e=>{r.inlineStyles[e]=zj[a.type](s,n)}),r;r.hasResponsiveStyles=!0;let c=Yie(e[i]);return o.forEach(t=>{s!=null&&(r.styles[t]=zj[a.type](s,n)),c.forEach(o=>{let s=`(min-width: ${n.breakpoints[o]})`;r.media[s]={...r.media[s],[t]:zj[a.type](Xie(e[i],o),n)}})}),r},{hasResponsiveStyles:!1,styles:{},inlineStyles:{},media:{}}))}function Qie(){return`__m__-${(0,W.useId)().replace(/[:«»]/g,``)}`}function Vj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Vj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function $ie(e){return e}var Hj=$ie;function Uj(e){return e}function Wj(e){let t=e;return t.extend=Uj,t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t}function Gj(e){let t=e;return t.withProps=e=>{let n=n=>(0,G.jsx)(t,{...e,...n});return n.extend=t.extend,n.displayName=`WithProps(${t.displayName})`,n},t.extend=Uj,t}function Kj(e){return`data-${(e.startsWith(`data-`)?e.slice(5):e).replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}`}function qj(e){return Object.keys(e).reduce((t,n)=>{let r=e[n];return r===void 0||r===``||r===!1||r===null||(t[Kj(n)]=e[n]),t},{})}function Jj(e){return e?typeof e==`string`?{[Kj(e)]:!0}:Array.isArray(e)?[...e].reduce((e,t)=>({...e,...Jj(t)}),{}):qj(e):null}function Yj(e,t){return Array.isArray(e)?[...e].reduce((e,n)=>({...e,...Yj(n,t)}),{}):typeof e==`function`?e(t):e??{}}function Xj({theme:e,style:t,vars:n,styleProps:r}){let i=Yj(t,e),a=Yj(n,e);return{...i,...a,...r}}function Zj({component:e,style:t,__vars:n,className:r,variant:i,mod:a,size:o,hiddenFrom:s,visibleFrom:c,lightHidden:l,darkHidden:u,renderRoot:d,__size:f,ref:p,...m}){let h=tj(),g=e||`div`,{styleProps:_,rest:v}=wj(m),y=xie()?.()?.(_.sx),b=Qie(),x=Zie({styleProps:_,theme:h,data:Tj}),S=Cie(),C=S&&x.hasResponsiveStyles?Cj(x.styles,x.media):b,w={ref:p,style:Xj({theme:h,style:t,vars:n,styleProps:x.inlineStyles}),className:TA(r,y,{[C]:x.hasResponsiveStyles,"mantine-light-hidden":l,"mantine-dark-hidden":u,[`mantine-hidden-from-${s}`]:s,[`mantine-visible-from-${c}`]:c}),"data-variant":i,"data-size":Qk(o)?void 0:o||void 0,size:f,...Jj(a),...v};return(0,G.jsxs)(G.Fragment,{children:[x.hasResponsiveStyles&&(0,G.jsx)(xj,{selector:`.${C}`,styles:x.styles,media:x.media,deduplicate:S}),typeof d==`function`?d(w):(0,G.jsx)(g,{...w})]})}Zj.displayName=`@mantine/core/Box`;var Qj=Hj(Zj),$j=(0,W.createContext)({dir:`ltr`,toggleDirection:()=>{},setDirection:()=>{}});function eM(){return(0,W.use)($j)}var[tM,nM]=eA(`ScrollArea.Root component was not found in tree`);function rM(e,t){let n=(0,W.useEffectEvent)(t);pA(()=>{let t=0;if(e){let r=new ResizeObserver(()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(n)});return r.observe(e),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}},[e])}function iM(e){let{style:t,...n}=e,r=nM(),[i,a]=(0,W.useState)(0),[o,s]=(0,W.useState)(0),c=!!(i&&o);return rM(r.scrollbarX,()=>{let e=r.scrollbarX?.offsetHeight||0;r.onCornerHeightChange(e),s(e)}),rM(r.scrollbarY,()=>{let e=r.scrollbarY?.offsetWidth||0;r.onCornerWidthChange(e),a(e)}),c?(0,G.jsx)(`div`,{...n,style:{...t,width:i,height:o}}):null}function aM(e){let t=nM(),n=!!(t.scrollbarX&&t.scrollbarY);return t.type!==`scroll`&&n?(0,G.jsx)(iM,{...e}):null}var oM={scrollHideDelay:1e3,type:`hover`};function sM(e){let{type:t,scrollHideDelay:n,scrollbars:r,getStyles:i,ref:a,...o}=dj(`ScrollAreaRoot`,oM,e),[s,c]=(0,W.useState)(null),[l,u]=(0,W.useState)(null),[d,f]=(0,W.useState)(null),[p,m]=(0,W.useState)(null),[h,g]=(0,W.useState)(null),[_,v]=(0,W.useState)(0),[y,b]=(0,W.useState)(0),[x,S]=(0,W.useState)(!1),[C,w]=(0,W.useState)(!1),T=gA(a,c);return(0,G.jsx)(tM,{value:{type:t,scrollHideDelay:n,scrollArea:s,viewport:l,onViewportChange:u,content:d,onContentChange:f,scrollbarX:p,onScrollbarXChange:m,scrollbarXEnabled:x,onScrollbarXEnabledChange:S,scrollbarY:h,onScrollbarYChange:g,scrollbarYEnabled:C,onScrollbarYEnabledChange:w,onCornerWidthChange:v,onCornerHeightChange:b,getStyles:i},children:(0,G.jsx)(Qj,{...o,ref:T,__vars:{"--sa-corner-width":r===`xy`?`${_}px`:`0px`,"--sa-corner-height":r===`xy`?`${y}px`:`0px`}})})}sM.displayName=`@mantine/core/ScrollAreaRoot`;function cM(e,t){let n=e/t;return Number.isNaN(n)?0:n}function lM(e){let t=cM(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function uM(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];let r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function dM(e,[t,n]){return Math.min(n,Math.max(t,e))}function fM(e,t,n=`ltr`){let r=lM(t),i=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,a=t.scrollbar.size-i,o=t.content-t.viewport,s=a-r,c=dM(e,n===`ltr`?[0,o]:[o*-1,0]);return uM([0,o],[0,s])(c)}function pM(e,t,n,r=`ltr`){let i=lM(n),a=i/2,o=t||a,s=i-o,c=n.scrollbar.paddingStart+o,l=n.scrollbar.size-n.scrollbar.paddingEnd-s,u=n.content-n.viewport,d=r===`ltr`?[0,u]:[u*-1,0];return uM([c,l],d)(e)}function mM(e,t){return e>0&&e{e?.(r),(n===!1||!r.defaultPrevented)&&t?.(r)}}var[_M,vM]=eA(`ScrollAreaScrollbar was not found in tree`);function yM(e){let{sizes:t,hasThumb:n,onThumbChange:r,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:o,onDragScroll:s,onWheelScroll:c,onResize:l,ref:u,...d}=e,f=nM(),[p,m]=(0,W.useState)(null),h=gA(u,m),g=(0,W.useRef)(null),_=(0,W.useRef)(``),{viewport:v}=f,y=t.content-t.viewport,b=(0,W.useEffectEvent)(c),x=dA(o),S=fA(l,10),C=e=>{if(g.current){let t=e.clientX-g.current.left,n=e.clientY-g.current.top;s({x:t,y:n})}};return(0,W.useEffect)(()=>{let e=e=>{let t=e.target;p?.contains(t)&&b(e,y)};return document.addEventListener(`wheel`,e,{passive:!1}),()=>document.removeEventListener(`wheel`,e,{passive:!1})},[v,p,y]),(0,W.useEffect)(x,[t,x]),rM(p,S),rM(f.content,S),(0,G.jsx)(_M,{value:{scrollbar:p,hasThumb:n,onThumbChange:dA(r),onThumbPointerUp:dA(i),onThumbPositionChange:x,onThumbPointerDown:dA(a)},children:(0,G.jsx)(`div`,{...d,ref:h,"data-mantine-scrollbar":!0,style:{position:`absolute`,...d.style},onPointerDown:gM(e.onPointerDown,e=>{e.preventDefault(),e.button===0&&(e.target.setPointerCapture(e.pointerId),g.current=p.getBoundingClientRect(),_.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect=`none`,C(e))}),onPointerMove:gM(e.onPointerMove,C),onPointerUp:gM(e.onPointerUp,e=>{let t=e.target;t.hasPointerCapture(e.pointerId)&&(e.preventDefault(),t.releasePointerCapture(e.pointerId))}),onLostPointerCapture:()=>{document.body.style.webkitUserSelect=_.current,g.current=null}})})}var bM=e=>{let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=nM(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=gA(i,l,o.onScrollbarXChange);return(0,W.useEffect)(()=>{l.current&&c(getComputedStyle(l.current))},[l]),(0,G.jsx)(yM,{"data-orientation":`horizontal`,...a,ref:u,sizes:t,style:{...r,"--sa-thumb-width":`${lM(t)}px`},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollLeft+t.deltaX;e.onWheelScroll(r),mM(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollWidth,viewport:o.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:hM(s.paddingLeft),paddingEnd:hM(s.paddingRight)}})}})};bM.displayName=`@mantine/core/ScrollAreaScrollbarX`;function xM(e){let{sizes:t,onSizesChange:n,style:r,ref:i,...a}=e,o=nM(),[s,c]=(0,W.useState)(),l=(0,W.useRef)(null),u=gA(i,l,o.onScrollbarYChange);return(0,W.useEffect)(()=>{l.current&&c(window.getComputedStyle(l.current))},[]),(0,G.jsx)(yM,{...a,"data-orientation":`vertical`,ref:u,sizes:t,style:{"--sa-thumb-height":`${lM(t)}px`,...r},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,n)=>{if(o.viewport){let r=o.viewport.scrollTop+t.deltaY;e.onWheelScroll(r),mM(r,n)&&t.preventDefault()}},onResize:()=>{l.current&&o.viewport&&s&&n({content:o.viewport.scrollHeight,viewport:o.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:hM(s.paddingTop),paddingEnd:hM(s.paddingBottom)}})}})}xM.displayName=`@mantine/core/ScrollAreaScrollbarY`;function SM(e){let{orientation:t=`vertical`,...n}=e,{dir:r}=eM(),i=nM(),a=(0,W.useRef)(null),o=(0,W.useRef)(0),[s,c]=(0,W.useState)({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),l=cM(s.viewport,s.content),u={...n,sizes:s,onSizesChange:c,hasThumb:l>0&&l<1,onThumbChange:e=>{a.current=e},onThumbPointerUp:()=>{o.current=0},onThumbPointerDown:e=>{o.current=e}},d=(e,t)=>pM(e,o.current,s,t);return t===`horizontal`?(0,G.jsx)(bM,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollLeft,t=fM(e,s,r);a.current.style.transform=`translate3d(${t}px, 0, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollLeft=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollLeft=d(e,r))}}):t===`vertical`?(0,G.jsx)(xM,{...u,onThumbPositionChange:()=>{if(i.viewport&&a.current){let e=i.viewport.scrollTop,t=fM(e,s);s.scrollbar.size===0?a.current.style.setProperty(`--thumb-opacity`,`0`):a.current.style.setProperty(`--thumb-opacity`,`1`),a.current.style.transform=`translate3d(0, ${t}px, 0)`}},onWheelScroll:e=>{i.viewport&&(i.viewport.scrollTop=e)},onDragScroll:e=>{i.viewport&&(i.viewport.scrollTop=d(e))}}):null}SM.displayName=`@mantine/core/ScrollAreaScrollbarVisible`;function CM(e){let t=nM(),{forceMount:n,...r}=e,[i,a]=(0,W.useState)(!1),o=e.orientation===`horizontal`,s=fA(()=>{if(t.viewport){let e=t.viewport.offsetWidth{let{scrollArea:e}=r,t=0;if(e){let n=()=>{window.clearTimeout(t),a(!0)},i=()=>{t=window.setTimeout(()=>a(!1),r.scrollHideDelay)};return e.addEventListener(`pointerenter`,n),e.addEventListener(`pointerleave`,i),()=>{window.clearTimeout(t),e.removeEventListener(`pointerenter`,n),e.removeEventListener(`pointerleave`,i)}}},[r.scrollArea,r.scrollHideDelay]),t||i?(0,G.jsx)(CM,{"data-state":i?`visible`:`hidden`,...n}):null}wM.displayName=`@mantine/core/ScrollAreaScrollbarHover`;function TM(e){let{forceMount:t,...n}=e,r=nM(),i=e.orientation===`horizontal`,[a,o]=(0,W.useState)(`hidden`),s=fA(()=>o(`idle`),100);return(0,W.useEffect)(()=>{if(a===`idle`){let e=window.setTimeout(()=>o(`hidden`),r.scrollHideDelay);return()=>window.clearTimeout(e)}},[a,r.scrollHideDelay]),(0,W.useEffect)(()=>{let{viewport:e}=r,t=i?`scrollLeft`:`scrollTop`;if(e){let n=e[t],r=()=>{let r=e[t];n!==r&&(o(`scrolling`),s()),n=r};return e.addEventListener(`scroll`,r),()=>e.removeEventListener(`scroll`,r)}},[r.viewport,i,s]),t||a!==`hidden`?(0,G.jsx)(SM,{"data-state":a===`hidden`?`hidden`:`visible`,...n,onPointerEnter:gM(e.onPointerEnter,()=>o(`interacting`)),onPointerLeave:gM(e.onPointerLeave,()=>o(`idle`))}):null}function EM(e){let{forceMount:t,...n}=e,r=nM(),{onScrollbarXEnabledChange:i,onScrollbarYEnabledChange:a}=r,o=e.orientation===`horizontal`;return(0,W.useEffect)(()=>(o?i(!0):a(!0),()=>{o?i(!1):a(!1)}),[o,i,a]),r.type===`hover`?(0,G.jsx)(wM,{...n,forceMount:t}):r.type===`scroll`?(0,G.jsx)(TM,{...n,forceMount:t}):r.type===`auto`?(0,G.jsx)(CM,{...n,forceMount:t}):r.type===`always`?(0,G.jsx)(SM,{...n}):null}EM.displayName=`@mantine/core/ScrollAreaScrollbar`;function DM(e,t=()=>{}){let n={left:e.scrollLeft,top:e.scrollTop},r=0;return(function i(){let a={left:e.scrollLeft,top:e.scrollTop},o=n.left!==a.left,s=n.top!==a.top;(o||s)&&t(),n=a,r=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(r)}function OM(e){let{style:t,ref:n,...r}=e,i=nM(),a=vM(),{onThumbPositionChange:o}=a,s=gA(n,a.onThumbChange),c=(0,W.useRef)(void 0),l=fA(()=>{c.current&&=(c.current(),void 0)},100);return(0,W.useEffect)(()=>{let{viewport:e}=i;if(e){let t=()=>{if(l(),!c.current){let t=DM(e,o);c.current=t,o()}};return o(),e.addEventListener(`scroll`,t),()=>e.removeEventListener(`scroll`,t)}},[i.viewport,l,o]),(0,G.jsx)(`div`,{"data-state":a.hasThumb?`visible`:`hidden`,...r,ref:s,style:{width:`var(--sa-thumb-width)`,height:`var(--sa-thumb-height)`,...t},onPointerDownCapture:gM(e.onPointerDownCapture,e=>{let t=e.target.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;a.onThumbPointerDown({x:n,y:r})}),onPointerUp:gM(e.onPointerUp,a.onThumbPointerUp)})}OM.displayName=`@mantine/core/ScrollAreaThumb`;function kM(e){let{forceMount:t,...n}=e,r=vM();return t||r.hasThumb?(0,G.jsx)(OM,{...n}):null}kM.displayName=`@mantine/core/ScrollAreaThumb`;function AM({children:e,style:t,ref:n,onWheel:r,...i}){let a=nM(),o=gA(n,a.onViewportChange),s=e=>{if(r?.(e),a.scrollbarXEnabled&&a.viewport&&e.shiftKey){let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollWidth:i,clientWidth:o}=a.viewport,s=t<1,c=t>=n-r-1;i>o&&(s||c)&&e.stopPropagation()}};return(0,G.jsx)(Qj,{...i,ref:o,onWheel:s,"data-scrollarea-viewport":!0,style:{overflowX:a.scrollbarXEnabled?`scroll`:`hidden`,overflowY:a.scrollbarYEnabled?`scroll`:`hidden`,...t},children:(0,G.jsx)(`div`,{...a.getStyles(`content`),ref:a.onContentChange,children:e})})}AM.displayName=`@mantine/core/ScrollAreaViewport`;var jM={root:`m_d57069b5`,content:`m_b1336c6`,viewport:`m_c0783ff9`,viewportInner:`m_f8f631dd`,scrollbar:`m_c44ba933`,thumb:`m_d8b5e363`,corner:`m_21657268`};function MM(){return typeof window<`u`}function NM(e){return IM(e)?(e.nodeName||``).toLowerCase():`#document`}function PM(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function FM(e){return((IM(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function IM(e){return MM()?e instanceof Node||e instanceof PM(e).Node:!1}function LM(e){return MM()?e instanceof Element||e instanceof PM(e).Element:!1}function RM(e){return MM()?e instanceof HTMLElement||e instanceof PM(e).HTMLElement:!1}function zM(e){return!MM()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof PM(e).ShadowRoot}function BM(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=qM(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function eae(e){return/^(table|td|th)$/.test(NM(e))}function VM(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var tae=/transform|translate|scale|rotate|perspective|filter/,nae=/paint|layout|strict|content/,HM=e=>!!e&&e!==`none`,UM;function WM(e){let t=LM(e)?qM(e):e;return HM(t.transform)||HM(t.translate)||HM(t.scale)||HM(t.rotate)||HM(t.perspective)||!GM()&&(HM(t.backdropFilter)||HM(t.filter))||tae.test(t.willChange||``)||nae.test(t.contain||``)}function rae(e){let t=YM(e);for(;RM(t)&&!KM(t);){if(WM(t))return t;if(VM(t))return null;t=YM(t)}return null}function GM(){return UM??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),UM}function KM(e){return/^(html|body|#document)$/.test(NM(e))}function qM(e){return PM(e).getComputedStyle(e)}function JM(e){return LM(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function YM(e){if(NM(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||zM(e)&&e.host||FM(e);return zM(t)?t.host:t}function XM(e){let t=YM(e);return KM(t)?(e.ownerDocument||e).body:RM(t)&&BM(t)?t:XM(t)}function ZM(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=XM(e),i=r===e.ownerDocument?.body,a=PM(r);if(i){let e=QM(a);return t.concat(a,a.visualViewport||[],BM(r)?r:[],e&&n?ZM(e):[])}return t.concat(r,ZM(r,[],n))}function QM(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var $M=Math.min,eN=Math.max,tN=Math.round,nN=Math.floor,rN=e=>({x:e,y:e}),iN={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function aN(e,t,n){return eN(e,$M(t,n))}function oN(e,t){return typeof e==`function`?e(t):e}function sN(e){return e.split(`-`)[0]}function cN(e){return e.split(`-`)[1]}function lN(e){return e===`x`?`y`:`x`}function uN(e){return e===`y`?`height`:`width`}function dN(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function fN(e){return lN(dN(e))}function pN(e,t,n){n===void 0&&(n=!1);let r=cN(e),i=fN(e),a=uN(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=SN(o)),[o,SN(o)]}function mN(e){let t=SN(e);return[hN(e),t,hN(t)]}function hN(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var gN=[`left`,`right`],_N=[`right`,`left`],vN=[`top`,`bottom`],yN=[`bottom`,`top`];function bN(e,t,n){switch(e){case`top`:case`bottom`:return n?t?_N:gN:t?gN:_N;case`left`:case`right`:return t?vN:yN;default:return[]}}function xN(e,t,n,r){let i=cN(e),a=bN(sN(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(hN)))),a}function SN(e){let t=sN(e);return iN[t]+e.slice(t.length)}function CN(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function wN(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:CN(e)}function TN(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function EN(){let e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform}function DN(){let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+`/`+n}).join(` `):navigator.userAgent}function ON(){return/apple/i.test(navigator.vendor)}function kN(){return EN().toLowerCase().startsWith(`mac`)&&!navigator.maxTouchPoints}function AN(){return DN().includes(`jsdom/`)}var jN=`data-floating-ui-focusable`,MN=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`;function NN(e){let t=e.activeElement;for(;((n=t)==null||(n=n.shadowRoot)==null?void 0:n.activeElement)!=null;){var n;t=t.shadowRoot.activeElement}return t}function PN(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&zM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function FN(e){return`composedPath`in e?e.composedPath()[0]:e.target}function IN(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function LN(e){return e.matches(`html,body`)}function RN(e){return e?.ownerDocument||document}function zN(e){return RM(e)&&e.matches(MN)}function BN(e){if(!e||AN())return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function VN(e){return e?e.hasAttribute(jN)?e:e.querySelector(`[`+jN+`]`)||e:null}function HN(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...HN(e,t.id,n)])}function UN(e){return`nativeEvent`in e}function WN(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}var GN=typeof document<`u`?W.useLayoutEffect:function(){},KN={...W};function qN(e){let t=W.useRef(e);return GN(()=>{t.current=e}),t}var JN=KN.useInsertionEffect||(e=>e());function YN(e){let t=W.useRef(()=>{});return JN(()=>{t.current=e}),W.useCallback(function(){var e=[...arguments];return t.current==null?void 0:t.current(...e)},[])}function XN(e,t,n){let{reference:r,floating:i}=e,a=dN(t),o=fN(t),s=uN(o),c=sN(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=cN(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function ZN(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=oN(t,e),p=wN(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=TN(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=TN(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var QN=50,$N=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:ZN},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=XN(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=oN(e,t)||{};if(l==null)return{};let d=wN(u),f={x:n,y:r},p=fN(i),m=uN(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=$M(d[_],T),D=$M(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=aN(E,k,O),ee=!c.arrow&&cN(i)!=null&&k!==A&&a.reference[m]/2-(ke<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===dN(t)||T.every(e=>dN(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=dN(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function nP(e){let t=$M(...e.map(e=>e.left)),n=$M(...e.map(e=>e.top)),r=eN(...e.map(e=>e.right)),i=eN(...e.map(e=>e.bottom));return{x:t,y:n,width:r-t,height:i-n}}function rP(e){let t=e.slice().sort((e,t)=>e.y-t.y),n=[],r=null;for(let e=0;er.height/2?n.push([i]):n[n.length-1].push(i),r=i}return n.map(e=>TN(nP(e)))}var iP=function(e){return e===void 0&&(e={}),{name:`inline`,options:e,async fn(t){let{placement:n,elements:r,rects:i,platform:a,strategy:o}=t,{padding:s=2,x:c,y:l}=oN(e,t),u=Array.from(await(a.getClientRects==null?void 0:a.getClientRects(r.reference))||[]);if(!u.length)return{};let d=rP(u),f=TN(nP(u)),p=wN(s);function m(){if(d.length===2&&(d[0].left>d[1].right||d[1].left>d[0].right)&&c!=null&&l!=null)return d.find(e=>c>e.left-p.left&&ce.top-p.top&&l=2){if(dN(n)===`y`){let e=d[0],t=d[d.length-1],r=sN(n)===`top`,i=e.top,a=t.bottom,o=r?e.left:t.left;return TN({x:o,y:i,width:(r?e.right:t.right)-o,height:a-i})}let e=sN(n)===`left`,t=eN(...d.map(e=>e.right)),r=$M(...d.map(e=>e.left)),i=d.filter(n=>e?n.left===r:n.right===t),a=i[0].top,o=i[i.length-1].bottom;return TN({x:r,y:a,width:t-r,height:o-a})}return f}let h=await a.getElementRects({reference:{getBoundingClientRect:m},floating:r.floating,strategy:o});return i.reference.x!==h.reference.x||i.reference.y!==h.reference.y||i.reference.width!==h.reference.width||i.reference.height!==h.reference.height?{reset:{rects:h}}:{}}}},aP=new Set([`left`,`top`]);async function oP(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=sN(n),s=cN(n),c=dN(n)===`y`,l=aP.has(o)?-1:1,u=a&&c?-1:1,d=oN(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var sP=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await oP(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},cP=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=oN(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=dN(i),p=lN(f),m=u[p],h=u[f],g=(e,t)=>aN(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}};function lP(e){let t=qM(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=RM(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=tN(n)!==a||tN(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function uP(e){return LM(e)?e:e.contextElement}function dP(e){let t=uP(e);if(!RM(t))return rN(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=lP(t),o=(a?tN(n.width):n.width)/r,s=(a?tN(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var fP=rN(0);function pP(e){let t=PM(e);return!GM()||!t.visualViewport?fP:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mP(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===PM(e)}function hP(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=uP(e),o=rN(1);t&&(r?LM(r)&&(o=dP(r)):o=dP(e));let s=mP(a,n,r)?pP(a):rN(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=PM(a),t=LM(r)?PM(r):r,n=e,i=QM(n);for(;i&&t!==n;){let e=dP(i),t=i.getBoundingClientRect(),r=qM(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=PM(i),i=QM(n)}}return TN({width:u,height:d,x:c,y:l})}function gP(e,t){let n=JM(e).scrollLeft;return t?t.left+n:hP(FM(e)).left+n}function _P(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-gP(e,n),y:n.top+t.scrollTop}}function vP(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=FM(r),s=t?VM(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=rN(1),u=rN(0),d=RM(r);if((d||!a)&&((NM(r)!==`body`||BM(o))&&(c=JM(r)),d)){let e=hP(r);l=dP(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?_P(o,c):rN(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function yP(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function bP(e){let t=JM(e),n=e.ownerDocument.body,r=eN(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=eN(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+gP(e),o=-t.scrollTop;return qM(n).direction===`rtl`&&(a+=eN(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var xP=25;function SP(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=PM(e),a=FM(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!GM()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(gP(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=xP&&(s-=o)}return{width:s,height:c,x:l,y:u}}function CP(e,t){let n=hP(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=dP(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function wP(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=SP(e,n,t);else if(t===`document`)r=bP(FM(e));else if(LM(t))r=CP(t,n);else{let n=pP(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return TN(r)}function TP(e,t){let n=t.get(e);if(n)return n;let r=ZM(e,[],!1).filter(e=>LM(e)&&NM(e)!==`body`),i=null,a=qM(e).position===`fixed`,o=a?YM(e):e;for(;LM(o)&&!KM(o);){let e=qM(o),t=WM(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=YM(o)}return t.set(e,r),r}function EP(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?VM(t)?[]:TP(t,this._c):[].concat(n),r],o=wP(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=PM(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function LP(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=uP(e),u=i||a?[...l?ZM(l):[],...t?ZM(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?IP(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?hP(e):null;c&&g();function g(){let t=hP(e);h&&!FP(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var RP=sP,zP=cP,BP=tP,VP=eP,HP=iP,UP=(e,t,n)=>{let r=new Map,i=n??{},a={...PP,...i.platform,_c:r};return $N(e,t,{...i,platform:a})},WP=u(bA(),1),GP=typeof document<`u`?W.useLayoutEffect:function(){};function KP(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!KP(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!KP(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function qP(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function JP(e,t){let n=qP(e);return Math.round(t*n)/n}function YP(e){let t=W.useRef(e);return GP(()=>{t.current=e}),t}function XP(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=W.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=W.useState(r);KP(f,r)||p(r);let[m,h]=W.useState(null),[g,_]=W.useState(null),v=W.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=W.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=W.useRef(null),C=W.useRef(null),w=W.useRef(u),T=c!=null,E=YP(c),D=YP(i),O=YP(l),k=W.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),UP(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!KP(w.current,t)&&(w.current=t,WP.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);GP(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=W.useRef(!1);GP(()=>(A.current=!0,()=>{A.current=!1}),[]),GP(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let ee=W.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),te=W.useMemo(()=>({reference:b,floating:x}),[b,x]),j=W.useMemo(()=>{let e={position:n,left:0,top:0};if(!te.floating)return e;let t=JP(te.floating,u.x),r=JP(te.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...qP(te.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,te.floating,u.x,u.y]);return W.useMemo(()=>({...u,update:k,refs:ee,elements:te,floatingStyles:j}),[u,k,ee,te,j])}var ZP=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:VP({element:r.current,padding:i}).fn(n):r?VP({element:r,padding:i}).fn(n):{}}}},QP=(e,t)=>{let n=RP(e);return{name:n.name,fn:n.fn,options:[e,t]}},$P=(e,t)=>{let n=zP(e);return{name:n.name,fn:n.fn,options:[e,t]}},eF=(e,t)=>{let n=BP(e);return{name:n.name,fn:n.fn,options:[e,t]}},tF=(e,t)=>{let n=HP(e);return{name:n.name,fn:n.fn,options:[e,t]}},nF=(e,t)=>{let n=ZP(e);return{name:n.name,fn:n.fn,options:[e,t]}};function rF(e){let t=W.useRef(void 0),n=W.useCallback(t=>{let n=e.map(e=>{if(e!=null){if(typeof e==`function`){let n=e,r=n(t);return typeof r==`function`?r:()=>{n(null)}}return e.current=t,()=>{e.current=null}}});return()=>{n.forEach(e=>e?.())}},e);return W.useMemo(()=>e.every(e=>e==null)?null:e=>{t.current&&=(t.current(),void 0),e!=null&&(t.current=n(e))},e)}var iF=`data-floating-ui-focusable`,aF=`active`,oF=`selected`,sF=`ArrowLeft`,cF=`ArrowRight`,lF=`ArrowUp`,uF=`ArrowDown`,dF=[sF,cF],fF=[lF,uF];[...dF,...fF];var pF={...W},mF=!1,hF=0,gF=()=>`floating-ui-`+Math.random().toString(36).slice(2,6)+hF++;function _F(){let[e,t]=W.useState(()=>mF?gF():void 0);return GN(()=>{e??t(gF())},[]),W.useEffect(()=>{mF=!0},[]),e}var vF=pF.useId||_F;function yF(){let e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}var bF=W.createContext(null),xF=W.createContext(null),SF=()=>W.useContext(bF)?.id||null,CF=()=>W.useContext(xF);function wF(e){return`data-floating-ui-`+e}function TF(e){e.current!==-1&&(clearTimeout(e.current),e.current=-1)}var EF=wF(`safe-polygon`);function DF(e,t,n){if(n&&!WN(n))return 0;if(typeof e==`number`)return e;if(typeof e==`function`){let n=e();return typeof n==`number`?n:n?.[t]}return e?.[t]}function OF(e){return typeof e==`function`?e():e}function kF(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,dataRef:i,events:a,elements:o}=e,{enabled:s=!0,delay:c=0,handleClose:l=null,mouseOnly:u=!1,restMs:d=0,move:f=!0}=t,p=CF(),m=SF(),h=qN(l),g=qN(c),_=qN(n),v=qN(d),y=W.useRef(),b=W.useRef(-1),x=W.useRef(),S=W.useRef(-1),C=W.useRef(!0),w=W.useRef(!1),T=W.useRef(()=>{}),E=W.useRef(!1),D=YN(()=>{let e=i.current.openEvent?.type;return e?.includes(`mouse`)&&e!==`mousedown`});W.useEffect(()=>{if(!s)return;function e(e){let{open:t}=e;t||(TF(b),TF(S),C.current=!0,E.current=!1)}return a.on(`openchange`,e),()=>{a.off(`openchange`,e)}},[s,a]),W.useEffect(()=>{if(!s||!h.current||!n)return;function e(e){D()&&r(!1,e,`hover`)}let t=RN(o.floating).documentElement;return t.addEventListener(`mouseleave`,e),()=>{t.removeEventListener(`mouseleave`,e)}},[o.floating,n,r,s,h,D]);let O=W.useCallback(function(e,t,n){t===void 0&&(t=!0),n===void 0&&(n=`hover`);let i=DF(g.current,`close`,y.current);i&&!x.current?(TF(b),b.current=window.setTimeout(()=>r(!1,e,n),i)):t&&(TF(b),r(!1,e,n))},[g,r]),k=YN(()=>{T.current(),x.current=void 0}),A=YN(()=>{if(w.current){let e=RN(o.floating).body;e.style.pointerEvents=``,e.removeAttribute(EF),w.current=!1}}),ee=YN(()=>i.current.openEvent?[`click`,`mousedown`].includes(i.current.openEvent.type):!1);W.useEffect(()=>{if(!s)return;function e(e){if(TF(b),C.current=!1,u&&!WN(y.current)||OF(v.current)>0&&!DF(g.current,`open`))return;let t=DF(g.current,`open`,y.current);t?b.current=window.setTimeout(()=>{_.current||r(!0,e,`hover`)},t):n||r(!0,e,`hover`)}function t(e){if(ee()){A();return}T.current();let t=RN(o.floating);if(TF(S),E.current=!1,h.current&&i.current.floatingContext){n||TF(b),x.current=h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),ee()||O(e,!0,`safe-polygon`)}});let r=x.current;t.addEventListener(`mousemove`,r),T.current=()=>{t.removeEventListener(`mousemove`,r)};return}(y.current!==`touch`||!PN(o.floating,e.relatedTarget))&&O(e)}function a(e){ee()||i.current.floatingContext&&(h.current==null||h.current({...i.current.floatingContext,tree:p,x:e.clientX,y:e.clientY,onClose(){A(),k(),ee()||O(e)}})(e))}function c(){TF(b)}function l(e){ee()||O(e,!1)}if(LM(o.domReference)){let r=o.domReference,i=o.floating;return n&&r.addEventListener(`mouseleave`,a),f&&r.addEventListener(`mousemove`,e,{once:!0}),r.addEventListener(`mouseenter`,e),r.addEventListener(`mouseleave`,t),i&&(i.addEventListener(`mouseleave`,a),i.addEventListener(`mouseenter`,c),i.addEventListener(`mouseleave`,l)),()=>{n&&r.removeEventListener(`mouseleave`,a),f&&r.removeEventListener(`mousemove`,e),r.removeEventListener(`mouseenter`,e),r.removeEventListener(`mouseleave`,t),i&&(i.removeEventListener(`mouseleave`,a),i.removeEventListener(`mouseenter`,c),i.removeEventListener(`mouseleave`,l))}}},[o,s,e,u,f,O,k,A,r,n,_,p,g,h,i,ee,v]),GN(()=>{var e;if(s&&n&&(e=h.current)!=null&&(e=e.__options)!=null&&e.blockPointerEvents&&D()){w.current=!0;let e=o.floating;if(LM(o.domReference)&&e){var t;let n=RN(o.floating).body;n.setAttribute(EF,``);let r=o.domReference,i=p==null||(t=p.nodesRef.current.find(e=>e.id===m))==null||(t=t.context)==null?void 0:t.elements.floating;return i&&(i.style.pointerEvents=``),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,e.style.pointerEvents=`auto`,()=>{n.style.pointerEvents=``,r.style.pointerEvents=``,e.style.pointerEvents=``}}}},[s,n,m,o,p,h,D]),GN(()=>{n||(y.current=void 0,E.current=!1,k(),A())},[n,k,A]),W.useEffect(()=>()=>{k(),TF(b),TF(S),A()},[s,o.domReference,k,A]);let te=W.useMemo(()=>{function e(e){y.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){let{nativeEvent:t}=e;function i(){!C.current&&!_.current&&r(!0,t,`hover`)}(!u||WN(y.current))&&(n||OF(v.current)===0||E.current&&e.movementX**2+e.movementY**2<2||(TF(S),y.current===`touch`?i():(E.current=!0,S.current=window.setTimeout(i,OF(v.current)))))}}},[u,r,n,_,v]);return W.useMemo(()=>s?{reference:te}:{},[s,te])}var AF=()=>{},jF=W.createContext({delay:0,initialDelay:0,timeoutMs:0,currentId:null,setCurrentId:AF,setState:AF,isInstantPhase:!1}),iae=()=>W.useContext(jF);function aae(e){let{children:t,delay:n,timeoutMs:r=0}=e,[i,a]=W.useReducer((e,t)=>({...e,...t}),{delay:n,timeoutMs:r,initialDelay:n,currentId:null,isInstantPhase:!1}),o=W.useRef(null),s=W.useCallback(e=>{a({currentId:e})},[]);return GN(()=>{i.currentId?o.current===null?o.current=i.currentId:i.isInstantPhase||a({isInstantPhase:!0}):(i.isInstantPhase&&a({isInstantPhase:!1}),o.current=null)},[i.currentId,i.isInstantPhase]),(0,G.jsx)(jF.Provider,{value:W.useMemo(()=>({...i,setState:a,setCurrentId:s}),[i,s]),children:t})}function oae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,floatingId:i}=e,{id:a,enabled:o=!0}=t,s=a??i,c=iae(),{currentId:l,setCurrentId:u,initialDelay:d,setState:f,timeoutMs:p}=c;return GN(()=>{o&&l&&(f({delay:{open:1,close:DF(d,`close`)}}),l!==s&&r(!1))},[o,s,r,f,l,d]),GN(()=>{function e(){r(!1),f({delay:d,currentId:null})}if(o&&l&&!n&&l===s){if(p){let t=window.setTimeout(e,p);return()=>{clearTimeout(t)}}e()}},[o,n,f,l,s,r,d,p]),GN(()=>{o&&u!==AF&&n&&u(s)},[o,n,u,s]),c}function MF(e,t){if(!e||!t)return!1;let n=t.getRootNode==null?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&zM(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function sae(e){return`composedPath`in e?e.composedPath()[0]:e.target}var cae={pointerdown:`onPointerDown`,mousedown:`onMouseDown`,click:`onClick`},lae={pointerdown:`onPointerDownCapture`,mousedown:`onMouseDownCapture`,click:`onClickCapture`},NF=e=>({escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0});function uae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,elements:i,dataRef:a}=e,{enabled:o=!0,escapeKey:s=!0,outsidePress:c=!0,outsidePressEvent:l=`pointerdown`,referencePress:u=!1,referencePressEvent:d=`pointerdown`,ancestorScroll:f=!1,bubbles:p,capture:m}=t,h=CF(),g=YN(typeof c==`function`?c:()=>!1),_=typeof c==`function`?g:c,v=W.useRef(!1),{escapeKey:y,outsidePress:b}=NF(p),{escapeKey:x,outsidePress:S}=NF(m),C=W.useRef(!1),w=YN(e=>{if(!n||!o||!s||e.key!==`Escape`||C.current)return;let t=a.current.floatingContext?.nodeId,i=h?HN(h.nodesRef.current,t):[];if(!y&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__escapeKeyBubbles){e=!1;return}}),!e)return}r(!1,UN(e)?e.nativeEvent:e,`escape-key`)}),T=YN(e=>{var t;let n=()=>{var t;w(e),(t=FN(e))==null||t.removeEventListener(`keydown`,n)};(t=FN(e))==null||t.addEventListener(`keydown`,n)}),E=YN(e=>{let t=a.current.insideReactTree;a.current.insideReactTree=!1;let n=v.current;if(v.current=!1,l===`click`&&n||t||typeof _==`function`&&!_(e))return;let o=FN(e),s=`[`+wF(`inert`)+`]`,c=RN(i.floating).querySelectorAll(s),u=LM(o)?o:null;for(;u&&!KM(u);){let e=YM(u);if(KM(e)||!LM(e))break;u=e}if(c.length&&LM(o)&&!LN(o)&&!PN(o,i.floating)&&Array.from(c).every(e=>!PN(u,e)))return;if(RM(o)&&k){let t=KM(o),n=qM(o),r=/auto|scroll/,i=t||r.test(n.overflowX),a=t||r.test(n.overflowY),s=i&&o.clientWidth>0&&o.scrollWidth>o.clientWidth,c=a&&o.clientHeight>0&&o.scrollHeight>o.clientHeight,l=n.direction===`rtl`,u=c&&(l?e.offsetX<=o.offsetWidth-o.clientWidth:e.offsetX>o.clientWidth),d=s&&e.offsetY>o.clientHeight;if(u||d)return}let d=a.current.floatingContext?.nodeId,f=h&&HN(h.nodesRef.current,d).some(t=>IN(e,t.context?.elements.floating));if(IN(e,i.floating)||IN(e,i.domReference)||f)return;let p=h?HN(h.nodesRef.current,d):[];if(p.length>0){let e=!0;if(p.forEach(t=>{var n;if((n=t.context)!=null&&n.open&&!t.context.dataRef.current.__outsidePressBubbles){e=!1;return}}),!e)return}r(!1,e,`outside-press`)}),D=YN(e=>{var t;let n=()=>{var t;E(e),(t=FN(e))==null||t.removeEventListener(l,n)};(t=FN(e))==null||t.addEventListener(l,n)});W.useEffect(()=>{if(!n||!o)return;a.current.__escapeKeyBubbles=y,a.current.__outsidePressBubbles=b;let e=-1;function t(e){r(!1,e,`ancestor-scroll`)}function c(){window.clearTimeout(e),C.current=!0}function u(){e=window.setTimeout(()=>{C.current=!1},GM()?5:0)}let d=RN(i.floating);s&&(d.addEventListener(`keydown`,x?T:w,x),d.addEventListener(`compositionstart`,c),d.addEventListener(`compositionend`,u)),_&&d.addEventListener(l,S?D:E,S);let p=[];return f&&(LM(i.domReference)&&(p=ZM(i.domReference)),LM(i.floating)&&(p=p.concat(ZM(i.floating))),!LM(i.reference)&&i.reference&&i.reference.contextElement&&(p=p.concat(ZM(i.reference.contextElement)))),p=p.filter(e=>e!==d.defaultView?.visualViewport),p.forEach(e=>{e.addEventListener(`scroll`,t)}),()=>{s&&(d.removeEventListener(`keydown`,x?T:w,x),d.removeEventListener(`compositionstart`,c),d.removeEventListener(`compositionend`,u)),_&&d.removeEventListener(l,S?D:E,S),p.forEach(e=>{e.removeEventListener(`scroll`,t)}),window.clearTimeout(e)}},[a,i,s,_,l,n,r,f,o,y,b,w,x,T,E,S,D]),W.useEffect(()=>{a.current.insideReactTree=!1},[a,_,l]);let O=W.useMemo(()=>({onKeyDown:w,...u&&{[cae[d]]:e=>{r(!1,e.nativeEvent,`reference-press`)},...d!==`click`&&{onClick(e){r(!1,e.nativeEvent,`reference-press`)}}}}),[w,r,u,d]),k=W.useMemo(()=>{function e(e){e.button===0&&(v.current=!0)}return{onKeyDown:w,onMouseDown:e,onMouseUp:e,[lae[l]]:()=>{a.current.insideReactTree=!0}}},[w,l,a]);return W.useMemo(()=>o?{reference:O,floating:k}:{},[o,O,k])}function dae(e){let{open:t=!1,onOpenChange:n,elements:r}=e,i=vF(),a=W.useRef({}),[o]=W.useState(()=>yF()),s=SF()!=null,[c,l]=W.useState(r.reference),u=YN((e,t,r)=>{a.current.openEvent=e?t:void 0,o.emit(`openchange`,{open:e,event:t,reason:r,nested:s}),n?.(e,t,r)}),d=W.useMemo(()=>({setPositionReference:l}),[]),f=W.useMemo(()=>({reference:c||r.reference||null,floating:r.floating||null,domReference:r.reference}),[c,r.reference,r.floating]);return W.useMemo(()=>({dataRef:a,open:t,onOpenChange:u,elements:f,events:o,floatingId:i,refs:d}),[t,u,f,o,i,d])}function PF(e){let{elements:t,...n}=e===void 0?{}:e,{nodeId:r}=n,i=dae({...n,elements:{reference:t?.reference??null,floating:t?.floating??null}}),a=n.rootContext||i,o=a.elements,[s,c]=W.useState(null),[l,u]=W.useState(null),d=o?.domReference||s,f=W.useRef(null),p=CF();GN(()=>{d&&(f.current=d)},[d]);let m=XP({...n,elements:{...o,...l&&{reference:l}}}),h=W.useCallback(e=>{let t=LM(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=W.useCallback(e=>{(LM(e)||e===null)&&(f.current=e,c(e)),(LM(m.refs.reference.current)||m.refs.reference.current===null||e!==null&&!LM(e))&&m.refs.setReference(e)},[m.refs]),_=W.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:f}),[m.refs,g,h]),v=W.useMemo(()=>({...m.elements,domReference:d}),[m.elements,d]),y=W.useMemo(()=>({...m,...a,refs:_,elements:v,nodeId:r}),[m,_,v,r,a]);return GN(()=>{a.dataRef.current.floatingContext=y;let e=p?.nodesRef.current.find(e=>e.id===r);e&&(e.context=y)}),W.useMemo(()=>({...m,context:y,refs:_,elements:v}),[m,_,v,y])}function FF(){return kN()&&ON()}function fae(e,t){t===void 0&&(t={});let{open:n,onOpenChange:r,events:i,dataRef:a,elements:o}=e,{enabled:s=!0,visibleOnly:c=!0}=t,l=W.useRef(!1),u=W.useRef(-1),d=W.useRef(!0);W.useEffect(()=>{if(!s)return;let e=PM(o.domReference);function t(){!n&&RM(o.domReference)&&o.domReference===NN(RN(o.domReference))&&(l.current=!0)}function r(){d.current=!0}function i(){d.current=!1}return e.addEventListener(`blur`,t),FF()&&(e.addEventListener(`keydown`,r,!0),e.addEventListener(`pointerdown`,i,!0)),()=>{e.removeEventListener(`blur`,t),FF()&&(e.removeEventListener(`keydown`,r,!0),e.removeEventListener(`pointerdown`,i,!0))}},[o.domReference,n,s]),W.useEffect(()=>{if(!s)return;function e(e){let{reason:t}=e;(t===`reference-press`||t===`escape-key`)&&(l.current=!0)}return i.on(`openchange`,e),()=>{i.off(`openchange`,e)}},[i,s]),W.useEffect(()=>()=>{TF(u)},[]);let f=W.useMemo(()=>({onMouseLeave(){l.current=!1},onFocus(e){if(l.current)return;let t=FN(e.nativeEvent);if(c&&LM(t)){if(FF()&&!e.relatedTarget){if(!d.current&&!zN(t))return}else if(!BN(t))return}r(!0,e.nativeEvent,`focus`)},onBlur(e){l.current=!1;let t=e.relatedTarget,n=e.nativeEvent,i=LM(t)&&t.hasAttribute(wF(`focus-guard`))&&t.getAttribute(`data-type`)===`outside`;u.current=window.setTimeout(()=>{let e=NN(o.domReference?o.domReference.ownerDocument:document);(t||e!==o.domReference)&&(PN(a.current.floatingContext?.refs.floating.current,e)||PN(o.domReference,e)||i||r(!1,n,`focus`))})}}),[a,o.domReference,r,c]);return W.useMemo(()=>s?{reference:f}:{},[s,f])}function IF(e,t,n){let r=new Map,i=n===`item`,a=e;if(i&&e){let{[aF]:t,[oF]:n,...r}=e;a=r}return{...n===`floating`&&{tabIndex:-1,[iF]:``},...a,...t.map(t=>{let r=t?t[n]:null;return typeof r==`function`?e?r(e):null:r}).concat(e).reduce((e,t)=>(t&&Object.entries(t).forEach(t=>{let[n,a]=t;if(!(i&&[aF,oF].includes(n))){if(n.indexOf(`on`)===0){if(r.has(n)||r.set(n,[]),typeof a==`function`){var o;(o=r.get(n))==null||o.push(a),e[n]=function(){var e=[...arguments];return r.get(n)?.map(t=>t(...e)).find(e=>e!==void 0)}}}else e[n]=a}}),e),{})}}function pae(e){e===void 0&&(e=[]);let t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),i=W.useCallback(t=>IF(t,e,`reference`),t),a=W.useCallback(t=>IF(t,e,`floating`),n),o=W.useCallback(t=>IF(t,e,`item`),r);return W.useMemo(()=>({getReferenceProps:i,getFloatingProps:a,getItemProps:o}),[i,a,o])}var mae=new Map([[`select`,`listbox`],[`combobox`,`listbox`],[`label`,!1]]);function hae(e,t){t===void 0&&(t={});let{open:n,elements:r,floatingId:i}=e,{enabled:a=!0,role:o=`dialog`}=t,s=vF(),c=r.domReference?.id||s,l=W.useMemo(()=>VN(r.floating)?.id||i,[r.floating,i]),u=mae.get(o)??o,d=SF()!=null,f=W.useMemo(()=>u===`tooltip`||o===`label`?{[`aria-`+(o===`label`?`labelledby`:`describedby`)]:n?l:void 0}:{"aria-expanded":n?`true`:`false`,"aria-haspopup":u===`alertdialog`?`dialog`:u,"aria-controls":n?l:void 0,...u===`listbox`&&{role:`combobox`},...u===`menu`&&{id:c},...u===`menu`&&d&&{role:`menuitem`},...o===`select`&&{"aria-autocomplete":`none`},...o===`combobox`&&{"aria-autocomplete":`list`}},[u,l,d,n,c,o]),p=W.useMemo(()=>{let e={id:l,...u&&{role:u}};return u===`tooltip`||o===`label`?e:{...e,...u===`menu`&&{"aria-labelledby":c}}},[u,l,c,o]),m=W.useCallback(e=>{let{active:t,selected:n}=e,r={role:`option`,...t&&{id:l+`-fui-option`}};switch(o){case`select`:case`combobox`:return{...r,"aria-selected":n}}return{}},[l,o]);return W.useMemo(()=>a?{reference:f,floating:p,item:m}:{},[a,f,p,m])}function LF(e,t,n){return n===void 0&&(n=!0),e.filter(e=>e.parentId===t&&(!n||e.context?.open)).flatMap(t=>[t,...LF(e,t.id,n)])}function RF(e,t){let[n,r]=e,i=!1,a=t.length;for(let e=0,o=a-1;e=r!=l>=r&&n<=(c-a)*(r-s)/(l-s)+a&&(i=!i)}return i}function gae(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function _ae(e){e===void 0&&(e={});let{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i={current:-1},a=!1,o=null,s=null,c=typeof performance<`u`?performance.now():0;function l(e,t){let n=performance.now(),r=n-c;if(o===null||s===null||r===0)return o=e,s=t,c=n,null;let i=e-o,a=t-s,l=Math.sqrt(i*i+a*a)/r;return o=e,s=t,c=n,l}let u=e=>{let{x:n,y:o,placement:s,elements:c,onClose:u,nodeId:d,tree:f}=e;return function(e){function p(){TF(i),u()}if(TF(i),!c.domReference||!c.floating||s==null||n==null||o==null)return;let{clientX:m,clientY:h}=e,g=[m,h],_=sae(e),v=e.type===`mouseleave`,y=MF(c.floating,_),b=MF(c.domReference,_),x=c.domReference.getBoundingClientRect(),S=c.floating.getBoundingClientRect(),C=s.split(`-`)[0],w=n>S.right-S.width/2,T=o>S.bottom-S.height/2,E=gae(g,x),D=S.width>x.width,O=S.height>x.height,k=(D?x:S).left,A=(D?x:S).right,ee=(O?x:S).top,te=(O?x:S).bottom;if(y&&(a=!0,!v))return;if(b&&(a=!1),b&&!v){a=!0;return}if(v&&LM(e.relatedTarget)&&MF(c.floating,e.relatedTarget)||f&&LF(f.nodesRef.current,d).length)return;if(C===`top`&&o>=x.bottom-1||C===`bottom`&&o<=x.top+1||C===`left`&&n>=x.right-1||C===`right`&&n<=x.left+1)return p();let j=[];switch(C){case`top`:j=[[k,x.top+1],[k,S.bottom-1],[A,S.bottom-1],[A,x.top+1]];break;case`bottom`:j=[[k,S.top+1],[k,x.bottom-1],[A,x.bottom-1],[A,S.top+1]];break;case`left`:j=[[S.right-1,te],[S.right-1,ee],[x.left+1,ee],[x.left+1,te]];break;case`right`:j=[[x.right-1,te],[x.right-1,ee],[S.left+1,ee],[S.left+1,te]]}function M(e){let[n,r]=e;switch(C){case`top`:return[[D?n+t/2:w?n+t*4:n-t*4,r+t+1],[D?n-t/2:w?n+t*4:n-t*4,r+t+1],[S.left,w||D?S.bottom-t:S.top],[S.right,w?D?S.bottom-t:S.top:S.bottom-t]];case`bottom`:return[[D?n+t/2:w?n+t*4:n-t*4,r-t],[D?n-t/2:w?n+t*4:n-t*4,r-t],[S.left,w||D?S.top+t:S.bottom],[S.right,w?D?S.top+t:S.bottom:S.top+t]];case`left`:{let e=[n+t+1,O?r+t/2:T?r+t*4:r-t*4],i=[n+t+1,O?r-t/2:T?r+t*4:r-t*4];return[[T||O?S.right-t:S.left,S.top],[T?O?S.right-t:S.left:S.right-t,S.bottom],e,i]}case`right`:return[[n-t,O?r+t/2:T?r+t*4:r-t*4],[n-t,O?r-t/2:T?r+t*4:r-t*4],[T||O?S.left+t:S.right,S.top],[T?O?S.left+t:S.right:S.left+t,S.bottom]]}}if(!RF([m,h],j)){if(a&&!E)return p();if(!v&&r){let t=l(e.clientX,e.clientY);if(t!==null&&t<.1)return p()}RF([m,h],M([n,o]))?!a&&r&&(i.current=window.setTimeout(p,40)):p()}}};return u.__options={blockPointerEvents:n},u}var zF={scrollHideDelay:1e3,type:`hover`,scrollbars:`xy`},BF=CA((e,{scrollbarSize:t,overscrollBehavior:n,scrollbars:r})=>{let i=n;return n&&r&&(r===`x`?i=`${n} auto`:r===`y`&&(i=`auto ${n}`)),{root:{"--scrollarea-scrollbar-size":U(t),"--scrollarea-over-scroll-behavior":i}}}),VF=Wj(e=>{let t=dj(`ScrollArea`,zF,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,scrollbarSize:s,vars:c,type:l,scrollHideDelay:u,viewportProps:d,viewportRef:f,onScrollPositionChange:p,children:m,offsetScrollbars:h,scrollbars:g,onBottomReached:_,onTopReached:v,onLeftReached:y,onRightReached:b,overscrollBehavior:x,startScrollPosition:S,verticalScrollbarPosition:C,attributes:w,...T}=t,[E,D]=(0,W.useState)(!1),[O,k]=(0,W.useState)(!1),[A,ee]=(0,W.useState)(!1),te=(0,W.useRef)(!0),j=(0,W.useRef)(!1),M=(0,W.useRef)(!0),ne=(0,W.useRef)(!1),N=_j({name:`ScrollArea`,props:t,classes:jM,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:w,vars:c,varsResolver:BF}),P=(0,W.useRef)(null),[F,re]=(0,W.useState)(null),I=rF([f,P,(0,W.useCallback)(e=>{re(t=>t===e?t:e)},[])]);return rM(h===`present`?F:null,()=>{let e=P.current;e&&(k(e.scrollHeight>e.clientHeight),ee(e.scrollWidth>e.clientWidth))}),pA(()=>{S&&P.current&&P.current.scrollTo({left:S.x??0,top:S.y??0})},[]),(0,G.jsxs)(sM,{getStyles:N,type:l===`never`?`always`:l,scrollHideDelay:u,scrollbars:g,...N(`root`),...T,children:[(0,G.jsx)(AM,{...d,...N(`viewport`,{style:d?.style}),ref:I,"data-offset-scrollbars":h===!0?`xy`:h||void 0,"data-scrollbars":g||void 0,"data-vertical-scrollbar-position":C||void 0,"data-horizontal-hidden":h===`present`&&!A?`true`:void 0,"data-vertical-hidden":h===`present`&&!O?`true`:void 0,onScroll:e=>{d?.onScroll?.(e),p?.({x:e.currentTarget.scrollLeft,y:e.currentTarget.scrollTop});let{scrollTop:t,scrollHeight:n,clientHeight:r,scrollLeft:i,scrollWidth:a,clientWidth:o}=e.currentTarget,s=t-(n-r)>=-.8,c=t===0;s&&!j.current&&_?.(),c&&!te.current&&v?.(),j.current=s,te.current=c;let l=i-(a-o)>=-.8,u=i===0;l&&!ne.current&&b?.(),u&&!M.current&&y?.(),ne.current=l,M.current=u},children:m}),(g===`xy`||g===`x`)&&(0,G.jsx)(EM,{...N(`scrollbar`),orientation:`horizontal`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!A||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(kM,{...N(`thumb`)})}),(g===`xy`||g===`y`)&&(0,G.jsx)(EM,{...N(`scrollbar`),orientation:`vertical`,"data-vertical-scrollbar-position":C||void 0,"data-hidden":l===`never`||h===`present`&&!O||void 0,forceMount:!0,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),children:(0,G.jsx)(kM,{...N(`thumb`)})}),(0,G.jsx)(aM,{...N(`corner`),"data-vertical-scrollbar-position":C||void 0,"data-hovered":E||void 0,"data-hidden":l===`never`||void 0})]})});VF.displayName=`@mantine/core/ScrollArea`;var HF=Wj(e=>{let{children:t,classNames:n,styles:r,scrollbarSize:i,scrollHideDelay:a,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:u,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,scrollbars:h,style:g,vars:_,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,onOverflowChange:S,...C}=dj(`ScrollAreaAutosize`,zF,e),w=(0,W.useRef)(null),[T,E]=(0,W.useState)(null),D=rF([u,w,(0,W.useCallback)(e=>{E(t=>t===e?t:e)},[])]),O=(0,W.useRef)(!1),k=(0,W.useRef)(!1),A=(0,W.useEffectEvent)(()=>{let e=w.current;if(!e||!S)return;let t=e.scrollHeight>e.clientHeight;t!==O.current&&(k.current?S(t):(k.current=!0,t&&S(!0)),O.current=t)});return rM(S?T:null,A),(0,G.jsx)(Qj,{...C,variant:p,style:[{display:`flex`,overflow:`hidden`},g],children:(0,G.jsx)(Qj,{style:{display:`flex`,flexDirection:`column`,flex:1,overflow:`hidden`,...h===`y`&&{minWidth:0},...h===`x`&&{minHeight:0},...h===`xy`&&{minWidth:0,minHeight:0},...h===!1&&{minWidth:0,minHeight:0}},children:(0,G.jsx)(VF,{classNames:n,styles:r,scrollHideDelay:a,scrollbarSize:i,type:o,dir:s,offsetScrollbars:c,overscrollBehavior:l,viewportRef:D,onScrollPositionChange:d,unstyled:f,variant:p,viewportProps:m,vars:_,scrollbars:h,onBottomReached:v,onTopReached:y,startScrollPosition:b,verticalScrollbarPosition:x,"data-autosize":`true`,children:t})})})});VF.classes=jM,VF.varsResolver=BF,HF.displayName=`@mantine/core/ScrollAreaAutosize`,HF.classes=jM,VF.Autosize=HF;var UF={root:`m_87cf2631`},vae={__staticSelector:`UnstyledButton`},WF=Gj(e=>{let t=dj(`UnstyledButton`,vae,e),{className:n,component:r=`button`,__staticSelector:i,unstyled:a,classNames:o,styles:s,style:c,attributes:l,...u}=t;return(0,G.jsx)(Qj,{..._j({name:i,props:t,classes:UF,className:n,style:c,classNames:o,styles:s,unstyled:a,attributes:l})(`root`,{focusable:!0}),component:r,type:r===`button`?`button`:void 0,...u})});WF.classes=UF,WF.displayName=`@mantine/core/UnstyledButton`;var GF={root:`m_1b7284a3`},KF=CA((e,{radius:t,shadow:n})=>({root:{"--paper-radius":t===void 0?void 0:cA(t),"--paper-shadow":Zre(n)}})),qF=Gj(e=>{let t=dj(`Paper`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,withBorder:s,vars:c,radius:l,shadow:u,variant:d,mod:f,attributes:p,...m}=t,h=_j({name:`Paper`,props:t,classes:GF,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:c,varsResolver:KF});return(0,G.jsx)(Qj,{mod:[{"data-with-border":s},f],...h(`root`),variant:d,...m})});qF.classes=GF,qF.varsResolver=KF,qF.displayName=`@mantine/core/Paper`;function JF(e,t,n,r){return e===`center`||r===`center`?{top:t}:e===`end`?{bottom:n}:e===`start`?{top:n}:{}}function YF(e,t,n,r,i){return e===`center`||r===`center`?{left:t}:e===`end`?{[i===`ltr`?`right`:`left`]:n}:e===`start`?{[i===`ltr`?`left`:`right`]:n}:{}}var yae={bottom:`borderTopLeftRadius`,left:`borderTopRightRadius`,right:`borderBottomLeftRadius`,top:`borderBottomRightRadius`};function bae({position:e,arrowSize:t,dir:n}){let[r,i]=e.split(`-`);if(!i)return;let a={width:t,height:t,position:`absolute`};if(r===`bottom`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,top:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(100% 0%, 0% 100%, 100% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`}}if(r===`top`){let e=i===`start`,r=e?n===`ltr`?`left`:`right`:n===`ltr`?`right`:`left`;return{...a,bottom:-t,[r]:0,clipPath:e===(n===`rtl`)?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(0% 0%, 100% 0%, 0% 100%)`}}if(r===`left`)return{...a,right:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 0% 100%)`:`polygon(0% 0%, 0% 100%, 100% 100%)`};if(r===`right`)return{...a,left:-t,[i===`start`?`top`:`bottom`]:0,clipPath:i===`start`?`polygon(0% 0%, 100% 0%, 100% 100%)`:`polygon(100% 0%, 0% 100%, 100% 100%)`}}function xae({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,arrowX:a,arrowY:o,dir:s}){if(i===`merge`){let n=bae({position:e,arrowSize:t,dir:s});if(n)return n}let[c,l=`center`]=e.split(`-`),u={width:t,height:t,transform:`rotate(45deg)`,position:`absolute`,[yae[c]]:r},d=-t/2;return c===`left`?{...u,...JF(l,o,n,i),right:d,borderLeftColor:`transparent`,borderBottomColor:`transparent`,clipPath:`polygon(100% 0, 0 0, 100% 100%)`}:c===`right`?{...u,...JF(l,o,n,i),left:d,borderRightColor:`transparent`,borderTopColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 100%)`}:c===`top`?{...u,...YF(l,a,n,i,s),bottom:d,borderTopColor:`transparent`,borderLeftColor:`transparent`,clipPath:`polygon(0 100%, 100% 100%, 100% 0)`}:c===`bottom`?{...u,...YF(l,a,n,i,s),top:d,borderBottomColor:`transparent`,borderRightColor:`transparent`,clipPath:`polygon(0 100%, 0 0, 100% 0)`}:{}}function Sae({position:e,dir:t}){let[n,r]=e.split(`-`);if(!r)return;let i=r===`start`&&t===`ltr`||r===`end`&&t===`rtl`;if(n===`bottom`)return i?{borderTopLeftRadius:0}:{borderTopRightRadius:0};if(n===`top`)return i?{borderBottomLeftRadius:0}:{borderBottomRightRadius:0};if(n===`left`)return r===`start`?{borderTopRightRadius:0}:{borderBottomRightRadius:0};if(n===`right`)return r===`start`?{borderTopLeftRadius:0}:{borderBottomLeftRadius:0}}function XF({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,visible:a,arrowX:o,arrowY:s,style:c,...l}){let{dir:u}=eM();return a?(0,G.jsx)(`div`,{role:`presentation`,...l,style:{...c,...xae({position:e,arrowSize:t,arrowOffset:n,arrowRadius:r,arrowPosition:i,dir:u,arrowX:o,arrowY:s})}}):null}XF.displayName=`@mantine/core/FloatingArrow`;function Cae(e,t){if(e===`rtl`&&(t.includes(`right`)||t.includes(`left`))){let[e,n]=t.split(`-`),r=e===`right`?`left`:`right`;return n===void 0?r:`${r}-${n}`}return t}function ZF(e){let t=document.createElement(`div`);return t.setAttribute(`data-portal`,`true`),typeof e.className==`string`&&t.classList.add(...e.className.split(` `).filter(Boolean)),typeof e.style==`object`&&Object.assign(t.style,e.style),typeof e.id==`string`&&t.setAttribute(`id`,e.id),t}function wae({target:e,reuseTargetNode:t,...n}){if(e)return typeof e==`string`?document.querySelector(e)||ZF(n):e;if(t){let e=document.querySelector(`[data-mantine-shared-portal-node]`);if(e)return e;let t=ZF(n);return t.setAttribute(`data-mantine-shared-portal-node`,`true`),document.body.appendChild(t),t}return ZF(n)}var Tae={reuseTargetNode:!0},QF=Wj(e=>{let{children:t,target:n,reuseTargetNode:r,ref:i,...a}=dj(`Portal`,Tae,e),[o,s]=(0,W.useState)(!1),c=(0,W.useRef)(null);return pA(()=>(s(!0),c.current=wae({target:n,reuseTargetNode:r,...a}),hA(i,c.current),!n&&!r&&c.current&&document.body.appendChild(c.current),()=>{!n&&!r&&c.current&&document.body.removeChild(c.current)}),[n]),!o||!c.current?null:(0,WP.createPortal)((0,G.jsx)(G.Fragment,{children:t}),c.current)});QF.displayName=`@mantine/core/Portal`;var $F=Wj(({withinPortal:e=!0,children:t,...n})=>JA()===`test`||!e?(0,G.jsx)(G.Fragment,{children:t}):(0,G.jsx)(QF,{...n,children:t}));$F.displayName=`@mantine/core/OptionalPortal`;var eI=e=>({in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(.9) translateY(${e===`bottom`?10:-10}px)`},transitionProperty:`transform, opacity`}),tI={fade:{in:{opacity:1},out:{opacity:0},transitionProperty:`opacity`},"fade-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(30px)`},transitionProperty:`opacity, transform`},"fade-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-30px)`},transitionProperty:`opacity, transform`},"fade-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(30px)`},transitionProperty:`opacity, transform`},"fade-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-30px)`},transitionProperty:`opacity, transform`},scale:{in:{opacity:1,transform:`scale(1)`},out:{opacity:0,transform:`scale(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-y":{in:{opacity:1,transform:`scaleY(1)`},out:{opacity:0,transform:`scaleY(0)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"scale-x":{in:{opacity:1,transform:`scaleX(1)`},out:{opacity:0,transform:`scaleX(0)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"skew-up":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(-20px) skew(-10deg, -5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"skew-down":{in:{opacity:1,transform:`translateY(0) skew(0deg, 0deg)`},out:{opacity:0,transform:`translateY(20px) skew(-10deg, -5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-left":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(-5deg)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"rotate-right":{in:{opacity:1,transform:`translateY(0) rotate(0deg)`},out:{opacity:0,transform:`translateY(20px) rotate(5deg)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-down":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(-100%)`},common:{transformOrigin:`top`},transitionProperty:`transform, opacity`},"slide-up":{in:{opacity:1,transform:`translateY(0)`},out:{opacity:0,transform:`translateY(100%)`},common:{transformOrigin:`bottom`},transitionProperty:`transform, opacity`},"slide-left":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(100%)`},common:{transformOrigin:`left`},transitionProperty:`transform, opacity`},"slide-right":{in:{opacity:1,transform:`translateX(0)`},out:{opacity:0,transform:`translateX(-100%)`},common:{transformOrigin:`right`},transitionProperty:`transform, opacity`},pop:{...eI(`bottom`),common:{transformOrigin:`center center`}},"pop-bottom-left":{...eI(`bottom`),common:{transformOrigin:`bottom left`}},"pop-bottom-right":{...eI(`bottom`),common:{transformOrigin:`bottom right`}},"pop-top-left":{...eI(`top`),common:{transformOrigin:`top left`}},"pop-top-right":{...eI(`top`),common:{transformOrigin:`top right`}}},nI={entering:`in`,entered:`in`,exiting:`out`,exited:`out`,"pre-exiting":`out`,"pre-entering":`out`};function rI({transition:e,state:t,duration:n,timingFunction:r}){let i={WebkitBackfaceVisibility:`hidden`,transitionDuration:`${n}ms`,transitionTimingFunction:r};return typeof e==`string`?e in tI?{transitionProperty:tI[e].transitionProperty,...i,...tI[e].common,...tI[e][nI[t]]}:{}:{transitionProperty:e.transitionProperty,...i,...e.common,...e[nI[t]]}}function Eae({duration:e,exitDuration:t,timingFunction:n,mounted:r,onEnter:i,onExit:a,onEntered:o,onExited:s,enterDelay:c,exitDelay:l}){let u=tj(),d=oie(),f=u.respectReducedMotion?d:!1,[p,m]=(0,W.useState)(f?0:e),[h,g]=(0,W.useState)(r?`entered`:`exited`),_=(0,W.useRef)(-1),v=(0,W.useRef)(-1),y=(0,W.useRef)(-1);function b(){window.clearTimeout(_.current),window.clearTimeout(v.current),cancelAnimationFrame(y.current)}let x=n=>{b();let r=n?i:a,c=n?o:s,l=f?0:n?e:t;m(l),l===0?(typeof r==`function`&&r(),typeof c==`function`&&c(),g(n?`entered`:`exited`)):y.current=requestAnimationFrame(()=>{WP.flushSync(()=>{g(n?`pre-entering`:`pre-exiting`)}),y.current=requestAnimationFrame(()=>{typeof r==`function`&&r(),g(n?`entering`:`exiting`),_.current=window.setTimeout(()=>{typeof c==`function`&&c(),g(n?`entered`:`exited`)},l)})})},S=e=>{if(b(),typeof(e?c:l)!=`number`){x(e);return}v.current=window.setTimeout(()=>{x(e)},e?c:l)};return tie(()=>{S(r)},[r]),(0,W.useEffect)(()=>()=>{b()},[]),{transitionDuration:p,transitionStatus:h,transitionTimingFunction:n||`ease`}}function iI({keepMounted:e,keepMountedMode:t=`activity`,transition:n=`fade`,duration:r=250,exitDuration:i=r,mounted:a,children:o,timingFunction:s=`ease`,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p}){let m=JA(),{transitionDuration:h,transitionStatus:g,transitionTimingFunction:_}=Eae({mounted:a,exitDuration:i,duration:r,timingFunction:s,onExit:c,onEntered:l,onEnter:u,onExited:d,enterDelay:f,exitDelay:p});if(m===`test`)return a?(0,G.jsx)(G.Fragment,{children:o({})}):e?o({display:`none`}):null;if(h===0)return e?t===`display-none`?a?(0,G.jsx)(G.Fragment,{children:o({})}):o({display:`none`}):(0,G.jsx)(W.Activity,{mode:a?`visible`:`hidden`,children:o({})}):a?(0,G.jsx)(G.Fragment,{children:o({})}):null;let v=g===`exited`;if(e){let e=o(v?t===`display-none`?{display:`none`}:{}:rI({transition:n,duration:h,state:g,timingFunction:_}));return t===`display-none`?e:(0,G.jsx)(W.Activity,{mode:v?`hidden`:`visible`,children:e})}return v?null:(0,G.jsx)(G.Fragment,{children:o(rI({transition:n,duration:h,state:g,timingFunction:_}))})}iI.displayName=`@mantine/core/Transition`;var Dae={duration:100,transition:`fade`};function aI(e,t){return{...Dae,...t,...e}}var oI={root:`m_5ae2e3c`,barsLoader:`m_7a2bd4cd`,bar:`m_870bb79`,"bars-loader-animation":`m_5d2b3b9d`,dotsLoader:`m_4e3f22d7`,dot:`m_870c4af`,"loader-dots-animation":`m_aac34a1`,ovalLoader:`m_b34414df`,"oval-loader-animation":`m_f8e89c4b`},sI=({className:e,...t})=>(0,G.jsxs)(Qj,{component:`span`,className:TA(oI.barsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:oI.bar}),(0,G.jsx)(`span`,{className:oI.bar}),(0,G.jsx)(`span`,{className:oI.bar})]});sI.displayName=`@mantine/core/Bars`;var cI=({className:e,...t})=>(0,G.jsxs)(Qj,{component:`span`,className:TA(oI.dotsLoader,e),...t,children:[(0,G.jsx)(`span`,{className:oI.dot}),(0,G.jsx)(`span`,{className:oI.dot}),(0,G.jsx)(`span`,{className:oI.dot})]});cI.displayName=`@mantine/core/Dots`;var lI=({className:e,...t})=>(0,G.jsx)(Qj,{component:`span`,className:TA(oI.ovalLoader,e),...t});lI.displayName=`@mantine/core/Oval`;var uI={bars:sI,oval:lI,dots:cI},Oae={loaders:uI,type:`oval`},dI=CA((e,{size:t,color:n})=>({root:{"--loader-size":oA(t,`loader-size`),"--loader-color":n?PA(n,e):void 0}})),fI=Wj(e=>{let t=dj(`Loader`,Oae,e),{size:n,color:r,type:i,vars:a,className:o,style:s,classNames:c,styles:l,unstyled:u,loaders:d,variant:f,children:p,attributes:m,...h}=t,g=_j({name:`Loader`,props:t,classes:oI,className:o,style:s,classNames:c,styles:l,unstyled:u,attributes:m,vars:a,varsResolver:dI});return p?(0,G.jsx)(Qj,{...g(`root`),...h,children:p}):(0,G.jsx)(Qj,{...g(`root`),component:d[i],variant:f,size:n,...h})});fI.defaultLoaders=uI,fI.classes=oI,fI.varsResolver=dI,fI.displayName=`@mantine/core/Loader`;var pI={root:`m_8d3f4000`,icon:`m_8d3afb97`,loader:`m_302b9fb1`,group:`m_1a0f1b21`,groupSection:`m_437b6484`},kae={orientation:`horizontal`},mI=CA((e,{borderWidth:t})=>({group:{"--ai-border-width":U(t)}})),hI=Wj(e=>{let t=dj(`ActionIconGroup`,kae,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,variant:u,mod:d,attributes:f,...p}=t;return(0,G.jsx)(Qj,{..._j({name:`ActionIconGroup`,props:t,classes:pI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:c,varsResolver:mI,rootSelector:`group`})(`group`),variant:u,mod:[{"data-orientation":s},d],role:`group`,...p})});hI.classes=pI,hI.varsResolver=mI,hI.displayName=`@mantine/core/ActionIconGroup`;var gI=CA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":oA(o,`section-height`),"--section-padding-x":oA(o,`section-padding-x`),"--section-fz":lA(o),"--section-radius":t===void 0?void 0:cA(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),_I=Wj(e=>{let t=dj(`ActionIconGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,variant:c,gradient:l,radius:u,autoContrast:d,attributes:f,...p}=t;return(0,G.jsx)(Qj,{..._j({name:`ActionIconGroupSection`,props:t,classes:pI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:gI,rootSelector:`groupSection`})(`groupSection`),variant:c,...p})});_I.classes=pI,_I.varsResolver=gI,_I.displayName=`@mantine/core/ActionIconGroupSection`;var vI=CA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ai-size":oA(t,`ai-size`),"--ai-radius":n===void 0?void 0:cA(n),"--ai-bg":a||r?s.background:void 0,"--ai-hover":a||r?s.hover:void 0,"--ai-hover-color":a||r?s.hoverColor:void 0,"--ai-color":s.color,"--ai-bd":a||r?s.border:void 0}}}),yI=Gj(e=>{let t=dj(`ActionIcon`,null,e),{className:n,unstyled:r,variant:i,classNames:a,styles:o,style:s,loading:c,loaderProps:l,size:u,color:d,radius:f,__staticSelector:p,gradient:m,vars:h,children:g,disabled:_,"data-disabled":v,autoContrast:y,mod:b,attributes:x,...S}=t,C=_j({name:[`ActionIcon`,p],props:t,className:n,style:s,classes:pI,classNames:a,styles:o,unstyled:r,attributes:x,vars:h,varsResolver:vI});return(0,G.jsxs)(WF,{...C(`root`,{active:!_&&!c&&!v}),"aria-busy":c||void 0,...S,unstyled:r,variant:i,size:u,disabled:_||c,mod:[{loading:c,disabled:_||v},b],children:[typeof c==`boolean`&&(0,G.jsx)(iI,{mounted:c,transition:`slide-down`,duration:150,children:e=>(0,G.jsx)(Qj,{component:`span`,...C(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(fI,{color:`var(--ai-color)`,size:`calc(var(--ai-size) * 0.55)`,...l})})}),(0,G.jsx)(Qj,{component:`span`,mod:{loading:c},...C(`icon`),children:g})]})});yI.classes=pI,yI.varsResolver=vI,yI.displayName=`@mantine/core/ActionIcon`,yI.Group=hI,yI.GroupSection=_I;function bI({size:e=`var(--cb-icon-size, 70%)`,style:t,...n}){return(0,G.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...t,width:e,height:e},...n,children:(0,G.jsx)(`path`,{d:`M11.7816 4.03157C12.0062 3.80702 12.0062 3.44295 11.7816 3.2184C11.5571 2.99385 11.193 2.99385 10.9685 3.2184L7.50005 6.68682L4.03164 3.2184C3.80708 2.99385 3.44301 2.99385 3.21846 3.2184C2.99391 3.44295 2.99391 3.80702 3.21846 4.03157L6.68688 7.49999L3.21846 10.9684C2.99391 11.193 2.99391 11.557 3.21846 11.7816C3.44301 12.0061 3.80708 12.0061 4.03164 11.7816L7.50005 8.31316L10.9685 11.7816C11.193 12.0061 11.5571 12.0061 11.7816 11.7816C12.0062 11.557 12.0062 11.193 11.7816 10.9684L8.31322 7.49999L11.7816 4.03157Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}bI.displayName=`@mantine/core/CloseIcon`;var xI={root:`m_86a44da5`,"root--subtle":`m_220c80f2`},SI={variant:`subtle`},CI=CA((e,{size:t,radius:n,iconSize:r})=>({root:{"--cb-size":oA(t,`cb-size`),"--cb-radius":n===void 0?void 0:cA(n),"--cb-icon-size":U(r)}})),wI=Gj(e=>{let t=dj(`CloseButton`,SI,e),{iconSize:n,children:r,vars:i,radius:a,className:o,classNames:s,style:c,styles:l,unstyled:u,"data-disabled":d,disabled:f,variant:p,icon:m,mod:h,attributes:g,__staticSelector:_,...v}=t,y=_j({name:_||`CloseButton`,props:t,className:o,style:c,classes:xI,classNames:s,styles:l,unstyled:u,attributes:g,vars:i,varsResolver:CI});return(0,G.jsxs)(WF,{...v,unstyled:u,variant:p,disabled:f,mod:[{disabled:f||d},h],...y(`root`,{variant:p,active:!f&&!d}),children:[m||(0,G.jsx)(bI,{}),r]})});wI.classes=xI,wI.varsResolver=CI,wI.displayName=`@mantine/core/CloseButton`;function TI(e){return W.Children.toArray(e).filter(Boolean)}var EI={root:`m_4081bf90`},DI={preventGrowOverflow:!0,gap:`md`,align:`center`,justify:`flex-start`,wrap:`wrap`},OI=CA((e,{grow:t,preventGrowOverflow:n,gap:r,align:i,justify:a,wrap:o},{childWidth:s})=>({root:{"--group-child-width":t&&n?s:void 0,"--group-gap":sA(r),"--group-align":i,"--group-justify":a,"--group-wrap":o}})),kI=Wj(e=>{let t=dj(`Group`,DI,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,children:s,gap:c,align:l,justify:u,wrap:d,grow:f,preventGrowOverflow:p,vars:m,variant:h,__size:g,mod:_,attributes:v,...y}=t,b=TI(s),x=b.length,S=sA(c??`md`);return(0,G.jsx)(Qj,{..._j({name:`Group`,props:t,stylesCtx:{childWidth:`calc(${100/x}% - (${S} - ${S} / ${x}))`},className:r,style:i,classes:EI,classNames:n,styles:a,unstyled:o,attributes:v,vars:m,varsResolver:OI})(`root`),variant:h,mod:[{grow:f},_],size:g,...y,children:b})});kI.classes=EI,kI.varsResolver=OI,kI.displayName=`@mantine/core/Group`;var AI={root:`m_66836ed3`,wrapper:`m_a5d60502`,body:`m_667c2793`,title:`m_6a03f287`,label:`m_698f4f23`,icon:`m_667f2a6a`,message:`m_7fa78076`,closeButton:`m_87f54839`},jI=CA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({color:n||e.primaryColor,theme:e,variant:r||`light`,autoContrast:i});return{root:{"--alert-radius":t===void 0?void 0:cA(t),"--alert-bg":n||r?a.background:void 0,"--alert-color":a.color,"--alert-bd":n||r?a.border:void 0}}}),MI=Wj(e=>{let t=dj(`Alert`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,title:u,children:d,id:f,icon:p,withCloseButton:m,onClose:h,closeButtonLabel:g,variant:_,autoContrast:v,role:y,attributes:b,...x}=t,S=_j({name:`Alert`,classes:AI,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:b,vars:s,varsResolver:jI}),C=mA(f),w=u&&`${C}-title`||void 0,T=`${C}-body`;return(0,G.jsx)(Qj,{id:C,...S(`root`,{variant:_}),variant:_,...x,role:y||`alert`,"aria-describedby":d?T:void 0,"aria-labelledby":u?w:void 0,children:(0,G.jsxs)(`div`,{...S(`wrapper`),children:[p&&(0,G.jsx)(`div`,{...S(`icon`),children:p}),(0,G.jsxs)(`div`,{...S(`body`),children:[u&&(0,G.jsx)(`div`,{...S(`title`),"data-with-close-button":m||void 0,children:(0,G.jsx)(`span`,{id:w,...S(`label`),children:u})}),d&&(0,G.jsx)(`div`,{id:T,...S(`message`),"data-variant":_,children:d})]}),m&&(0,G.jsx)(wI,{...S(`closeButton`),onClick:h,variant:`transparent`,size:16,iconSize:16,"aria-label":g,unstyled:o})]})})});MI.classes=AI,MI.varsResolver=jI,MI.displayName=`@mantine/core/Alert`;var NI={root:`m_b6d8b162`};function PI(e){if(e===`start`)return`start`;if(e===`end`||e)return`end`}var FI={inherit:!1},II=CA((e,{variant:t,lineClamp:n,gradient:r,size:i,textWrap:a})=>({root:{"--text-fz":lA(i),"--text-lh":Xre(i),"--text-gradient":t===`gradient`?LA(r,e):void 0,"--text-line-clamp":typeof n==`number`?n.toString():void 0,"--text-text-wrap":a}})),LI=Gj(e=>{let t=dj(`Text`,FI,e),{lineClamp:n,truncate:r,inline:i,inherit:a,gradient:o,span:s,textWrap:c,__staticSelector:l,vars:u,className:d,style:f,classNames:p,styles:m,unstyled:h,variant:g,mod:_,size:v,attributes:y,...b}=t;return(0,G.jsx)(Qj,{..._j({name:[`Text`,l],props:t,classes:NI,className:d,style:f,classNames:p,styles:m,unstyled:h,attributes:y,vars:u,varsResolver:II})(`root`,{focusable:!0}),component:s?`span`:`p`,variant:g,mod:[{"data-truncate":PI(r),"data-line-clamp":typeof n==`number`,"data-inline":i,"data-inherit":a},_],size:v,...b})});LI.classes=NI,LI.varsResolver=II,LI.displayName=`@mantine/core/Text`;var RI={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},zI=CA((e,{radius:t,color:n,gradient:r,variant:i,size:a,autoContrast:o,circle:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:o});return{root:{"--badge-height":oA(a,`badge-height`),"--badge-padding-x":oA(a,`badge-padding-x`),"--badge-fz":oA(a,`badge-fz`),"--badge-radius":s||t===void 0?void 0:cA(t),"--badge-bg":n||i?c.background:void 0,"--badge-color":n||i?c.color:void 0,"--badge-bd":n||i?c.border:void 0,"--badge-dot-color":i===`dot`?PA(n,e):void 0}}}),BI=Gj(e=>{let t=dj(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:v,attributes:y,...b}=t,x=_j({name:`Badge`,props:t,classes:RI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:zI});return(0,G.jsxs)(Qj,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},v],...x(`root`,{variant:m}),...b,children:[d&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`left`,children:d}),(0,G.jsx)(`span`,{...x(`label`),children:p}),f&&(0,G.jsx)(`span`,{...x(`section`),"data-position":`right`,children:f})]})});BI.classes=RI,BI.varsResolver=zI,BI.displayName=`@mantine/core/Badge`;var VI={root:`m_77c9d27d`,inner:`m_80f1301b`,label:`m_811560b9`,section:`m_a74036a`,loader:`m_a25b86ee`,group:`m_80d6d844`,groupSection:`m_70be2a01`},HI={orientation:`horizontal`},UI=CA((e,{borderWidth:t})=>({group:{"--button-border-width":U(t)}})),WI=Wj(e=>{let t=dj(`ButtonGroup`,HI,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,orientation:s,vars:c,borderWidth:l,mod:u,attributes:d,...f}=dj(`ButtonGroup`,HI,e);return(0,G.jsx)(Qj,{..._j({name:`ButtonGroup`,props:t,classes:VI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:c,varsResolver:UI,rootSelector:`group`})(`group`),mod:[{"data-orientation":s},u],role:`group`,...f})});WI.classes=VI,WI.varsResolver=UI,WI.displayName=`@mantine/core/ButtonGroup`;var GI=CA((e,{radius:t,color:n,gradient:r,variant:i,autoContrast:a,size:o})=>{let s=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:a});return{groupSection:{"--section-height":oA(o,`section-height`),"--section-padding-x":oA(o,`section-padding-x`),"--section-fz":o?.includes(`compact`)?lA(o.replace(`compact-`,``)):lA(o),"--section-radius":t===void 0?void 0:cA(t),"--section-bg":n||i?s.background:void 0,"--section-color":s.color,"--section-bd":n||i?s.border:void 0}}}),KI=Wj(e=>{let t=dj(`ButtonGroupSection`,null,e),{className:n,style:r,classNames:i,styles:a,unstyled:o,vars:s,gradient:c,radius:l,autoContrast:u,attributes:d,...f}=t;return(0,G.jsx)(Qj,{..._j({name:`ButtonGroupSection`,props:t,classes:VI,className:n,style:r,classNames:i,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:GI,rootSelector:`groupSection`})(`groupSection`),...f})});KI.classes=VI,KI.varsResolver=GI,KI.displayName=`@mantine/core/ButtonGroupSection`;var qI={in:{opacity:1,transform:`translate(-50%, calc(-50% + ${U(1)}))`},out:{opacity:0,transform:`translate(-50%, -200%)`},common:{transformOrigin:`center`},transitionProperty:`transform, opacity`},JI=CA((e,{radius:t,color:n,gradient:r,variant:i,size:a,justify:o,autoContrast:s})=>{let c=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--button-justify":o,"--button-height":oA(a,`button-height`),"--button-padding-x":oA(a,`button-padding-x`),"--button-fz":a?.includes(`compact`)?lA(a.replace(`compact-`,``)):lA(a),"--button-radius":t===void 0?void 0:cA(t),"--button-bg":n||i?c.background:void 0,"--button-hover":n||i?c.hover:void 0,"--button-color":c.color,"--button-bd":n||i?c.border:void 0,"--button-hover-color":n||i?c.hoverColor:void 0}}}),YI=Gj(e=>{let t=dj(`Button`,null,e),{style:n,vars:r,className:i,color:a,disabled:o,children:s,leftSection:c,rightSection:l,fullWidth:u,variant:d,radius:f,loading:p,loaderProps:m,gradient:h,classNames:g,styles:_,unstyled:v,"data-disabled":y,autoContrast:b,mod:x,attributes:S,...C}=t,w=_j({name:`Button`,props:t,classes:VI,className:i,style:n,classNames:g,styles:_,unstyled:v,attributes:S,vars:r,varsResolver:JI}),T=!!c,E=!!l;return(0,G.jsxs)(WF,{...w(`root`,{active:!o&&!p&&!y}),unstyled:v,variant:d,disabled:o||p,mod:[{disabled:o||y,loading:p,block:u,"with-left-section":T,"with-right-section":E},x],...C,children:[typeof p==`boolean`&&(0,G.jsx)(iI,{mounted:p,transition:qI,duration:150,children:e=>(0,G.jsx)(Qj,{component:`span`,...w(`loader`,{style:e}),"aria-hidden":!0,children:(0,G.jsx)(fI,{color:`var(--button-color)`,size:`calc(var(--button-height) / 1.8)`,...m})})}),(0,G.jsxs)(`span`,{...w(`inner`),children:[c&&(0,G.jsx)(Qj,{component:`span`,...w(`section`),mod:{position:`left`},children:c}),(0,G.jsx)(Qj,{component:`span`,mod:{loading:p},...w(`label`),children:s}),l&&(0,G.jsx)(Qj,{component:`span`,...w(`section`),mod:{position:`right`},children:l})]})]})});YI.classes=VI,YI.varsResolver=JI,YI.displayName=`@mantine/core/Button`,YI.Group=WI,YI.GroupSection=KI;var XI={root:`m_4451eb3a`},ZI=Gj(e=>{let t=dj(`Center`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,inline:c,mod:l,attributes:u,...d}=t,f=_j({name:`Center`,props:t,classes:XI,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:u,vars:s});return(0,G.jsx)(Qj,{mod:[{inline:c},l],...f(`root`),...d})});ZI.classes=XI,ZI.displayName=`@mantine/core/Center`;var[QI,$I]=eA(`Pagination.Root component was not found in tree`),eL={root:`m_4addd315`,control:`m_326d024a`,dots:`m_4ad7767d`,items:`m_105fdbed`,label:`m_10817321`},tL={withPadding:!0},nL=Wj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,active:o,disabled:s,withPadding:c,mod:l,...u}=dj(`PaginationControl`,tL,e),d=$I(),f=s||d.disabled;return(0,G.jsx)(WF,{disabled:f,mod:[{active:o,disabled:f,"with-padding":c},l],...d.getStyles(`control`,{className:n,style:r,classNames:t,styles:i,active:!f}),...u})});nL.classes=eL,nL.displayName=`@mantine/core/PaginationControl`;function rL({style:e,children:t,path:n,...r}){return(0,G.jsx)(`svg`,{viewBox:`0 0 16 16`,xmlns:`http://www.w3.org/2000/svg`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`,...e},...r,children:(0,G.jsx)(`path`,{d:n,fill:`currentColor`})})}var iL=e=>(0,G.jsx)(rL,{...e,path:`M8.781 8l-3.3-3.3.943-.943L10.667 8l-4.243 4.243-.943-.943 3.3-3.3z`}),aL=e=>(0,G.jsx)(rL,{...e,path:`M7.219 8l3.3 3.3-.943.943L5.333 8l4.243-4.243.943.943-3.3 3.3z`}),oL=e=>(0,G.jsx)(rL,{...e,path:`M6.85355 3.85355C7.04882 3.65829 7.04882 3.34171 6.85355 3.14645C6.65829 2.95118 6.34171 2.95118 6.14645 3.14645L2.14645 7.14645C1.95118 7.34171 1.95118 7.65829 2.14645 7.85355L6.14645 11.8536C6.34171 12.0488 6.65829 12.0488 6.85355 11.8536C7.04882 11.6583 7.04882 11.3417 6.85355 11.1464L3.20711 7.5L6.85355 3.85355ZM12.8536 3.85355C13.0488 3.65829 13.0488 3.34171 12.8536 3.14645C12.6583 2.95118 12.3417 2.95118 12.1464 3.14645L8.14645 7.14645C7.95118 7.34171 7.95118 7.65829 8.14645 7.85355L12.1464 11.8536C12.3417 12.0488 12.6583 12.0488 12.8536 11.8536C13.0488 11.6583 13.0488 11.3417 12.8536 11.1464L9.20711 7.5L12.8536 3.85355Z`}),sL=e=>(0,G.jsx)(rL,{...e,path:`M2.14645 11.1464C1.95118 11.3417 1.95118 11.6583 2.14645 11.8536C2.34171 12.0488 2.65829 12.0488 2.85355 11.8536L6.85355 7.85355C7.04882 7.65829 7.04882 7.34171 6.85355 7.14645L2.85355 3.14645C2.65829 2.95118 2.34171 2.95118 2.14645 3.14645C1.95118 3.34171 1.95118 3.65829 2.14645 3.85355L5.79289 7.5L2.14645 11.1464ZM8.14645 11.1464C7.95118 11.3417 7.95118 11.6583 8.14645 11.8536C8.34171 12.0488 8.65829 12.0488 8.85355 11.8536L12.8536 7.85355C13.0488 7.65829 13.0488 7.34171 12.8536 7.14645L8.85355 3.14645C8.65829 2.95118 8.34171 2.95118 8.14645 3.14645C7.95118 3.34171 7.95118 3.65829 8.14645 3.85355L11.7929 7.5L8.14645 11.1464Z`}),cL={icon:e=>(0,G.jsx)(rL,{...e,path:`M2 8c0-.733.6-1.333 1.333-1.333.734 0 1.334.6 1.334 1.333s-.6 1.333-1.334 1.333C2.6 9.333 2 8.733 2 8zm9.333 0c0-.733.6-1.333 1.334-1.333C13.4 6.667 14 7.267 14 8s-.6 1.333-1.333 1.333c-.734 0-1.334-.6-1.334-1.333zM6.667 8c0-.733.6-1.333 1.333-1.333s1.333.6 1.333 1.333S8.733 9.333 8 9.333 6.667 8.733 6.667 8z`})},lL=Wj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,icon:o,...s}=dj(`PaginationDots`,cL,e);return(0,G.jsx)(Qj,{...$I().getStyles(`dots`,{className:n,style:r,styles:i,classNames:t}),...s,children:(0,G.jsx)(o,{style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})});lL.classes=eL,lL.displayName=`@mantine/core/PaginationDots`;function uL({icon:e,name:t,action:n,type:r}){let i={icon:e},a=e=>{let{icon:a,...o}=dj(t,i,e),s=$I(),c=r===`next`?s.active===s.total:s.active===1;return(0,G.jsx)(nL,{disabled:s.disabled||c,onClick:s[n],withPadding:!1,...o,children:(0,G.jsx)(a,{className:`mantine-rotate-rtl`,style:{width:`calc(var(--pagination-control-size) / 1.8)`,height:`calc(var(--pagination-control-size) / 1.8)`}})})};return a.displayName=`@mantine/core/${t}`,Hj(a)}var dL=uL({icon:iL,name:`PaginationNext`,action:`onNext`,type:`next`}),fL=uL({icon:aL,name:`PaginationPrevious`,action:`onPrevious`,type:`previous`}),pL=uL({icon:oL,name:`PaginationFirst`,action:`onFirst`,type:`previous`}),mL=uL({icon:sL,name:`PaginationLast`,action:`onLast`,type:`next`});function hL({dotsIcon:e}){let t=$I();return(0,G.jsx)(G.Fragment,{children:t.range.map((n,r)=>n===`dots`?(0,G.jsx)(lL,{icon:e},r):(0,G.jsx)(nL,{active:n===t.active,"aria-current":n===t.active?`page`:void 0,onClick:()=>t.onChange(n),disabled:t.disabled,...t.getItemProps?.(n),children:t.getItemProps?.(n)?.children??n},r))})}hL.displayName=`@mantine/core/PaginationItems`;var gL={formatLabel:({page:e,totalPages:t})=>`Page ${e} of ${t}`},_L=Wj(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,formatLabel:o,...s}=dj(`PaginationLabel`,gL,e),c=$I();return(0,G.jsx)(Qj,{...c.getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...s,children:o({page:c.active,totalPages:c.total})})});_L.classes=eL,_L.displayName=`@mantine/core/PaginationLabel`;var vL={siblings:1,boundaries:1},yL=CA((e,{size:t,radius:n,color:r,autoContrast:i})=>({root:{"--pagination-control-radius":n===void 0?void 0:cA(n),"--pagination-control-size":oA(t,`pagination-control-size`),"--pagination-control-fz":lA(t),"--pagination-active-bg":r?PA(r,e):void 0,"--pagination-active-color":WA(i,e)?VA({color:r,theme:e,autoContrast:i}):void 0}})),bL=Wj(e=>{let t=dj(`PaginationRoot`,vL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,total:c,value:l,defaultValue:u,onChange:d,disabled:f,siblings:p,boundaries:m,color:h,radius:g,onNextPage:_,onPreviousPage:v,onFirstPage:y,onLastPage:b,getItemProps:x,autoContrast:S,startValue:C,layout:w,mod:T,attributes:E,...D}=t,O=_j({name:`Pagination`,classes:eL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:E,vars:s,varsResolver:yL}),{range:k,setPage:A,next:ee,previous:te,active:j,first:M,last:ne}=aie({page:l,initialPage:u,onChange:d,total:c,siblings:p,boundaries:m,startValue:C});return(0,G.jsx)(QI,{value:{total:c,range:k,active:j,disabled:f,layout:w,getItemProps:x,onChange:A,onNext:uA(_,ee),onPrevious:uA(v,te),onFirst:uA(y,M),onLast:uA(b,ne),getStyles:O},children:(0,G.jsx)(Qj,{...O(`root`),mod:[{layout:w},T],...D})})});bL.classes=eL,bL.varsResolver=yL,bL.displayName=`@mantine/core/PaginationRoot`;var xL={withControls:!0,withPages:!0,siblings:1,boundaries:1,gap:8};function SL({children:e}){return(0,G.jsx)(Qj,{...$I().getStyles(`items`),children:e})}var CL=Wj(e=>{let{withEdges:t,withControls:n,getControlProps:r,nextIcon:i,previousIcon:a,lastIcon:o,firstIcon:s,dotsIcon:c,total:l,gap:u,hideWithOnePage:d,withPages:f,layout:p,formatLabel:m,...h}=dj(`Pagination`,xL,e);if(l<=0||d&&l===1)return null;let g=f?p===`responsive`?(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(SL,{children:(0,G.jsx)(hL,{dotsIcon:c})}),(0,G.jsx)(_L,{formatLabel:m})]}):(0,G.jsx)(hL,{dotsIcon:c}):null;return(0,G.jsx)(bL,{total:l,layout:p,...h,children:(0,G.jsxs)(kI,{gap:u,children:[t&&(0,G.jsx)(pL,{icon:s,...r?.(`first`)}),n&&(0,G.jsx)(fL,{icon:a,...r?.(`previous`)}),g,n&&(0,G.jsx)(dL,{icon:i,...r?.(`next`)}),t&&(0,G.jsx)(mL,{icon:o,...r?.(`last`)})]})})});CL.classes=eL,CL.displayName=`@mantine/core/Pagination`,CL.Root=bL,CL.Control=nL,CL.Dots=lL,CL.First=pL,CL.Last=mL,CL.Next=dL,CL.Previous=fL,CL.Items=hL,CL.Label=_L;function wL({offset:e,position:t,defaultOpened:n}){let[r,i]=(0,W.useState)(n),a=(0,W.useRef)(null),{x:o,y:s,elements:c,refs:l,update:u,placement:d}=PF({placement:t,middleware:[$P({crossAxis:!0,padding:5,rootBoundary:`document`})]}),f=d.includes(`right`)?e:t.includes(`left`)?e*-1:0,p=d.includes(`bottom`)?e:t.includes(`top`)?e*-1:0,m=(0,W.useCallback)(({clientX:e,clientY:t})=>{Number.isFinite(e)&&Number.isFinite(t)&&l.setPositionReference({getBoundingClientRect(){return{width:0,height:0,x:e,y:t,left:e+f,top:t+p,right:e,bottom:t}}})},[c.reference]);return(0,W.useEffect)(()=>{if(l.floating.current){let e=a.current;e.addEventListener(`mousemove`,m);let t=ZM(l.floating.current);return t.forEach(e=>{e.addEventListener(`scroll`,u)}),()=>{e.removeEventListener(`mousemove`,m),t.forEach(e=>{e.removeEventListener(`scroll`,u)})}}},[c.reference,l.floating.current,u,m,r]),{handleMouseMove:m,x:o,y:s,opened:r,setOpened:i,boundaryRef:a,floating:l.setFloating}}var TL={tooltip:`m_1b3c8819`,arrow:`m_f898399f`},EL={refProp:`ref`,withinPortal:!0,offset:10,position:`right`,zIndex:aA(`popover`)},DL=CA((e,{radius:t,color:n})=>({tooltip:{"--tooltip-radius":t===void 0?void 0:cA(t),"--tooltip-bg":n?PA(n,e):void 0,"--tooltip-color":n?`var(--mantine-color-white)`:void 0}})),OL=Wj(e=>{let t=dj(`TooltipFloating`,EL,e),{children:n,refProp:r,withinPortal:i,style:a,className:o,classNames:s,styles:c,unstyled:l,radius:u,color:d,label:f,offset:p,position:m,multiline:h,zIndex:g,disabled:_,defaultOpened:v,variant:y,vars:b,portalProps:x,attributes:S,ref:C,...w}=t,T=tj(),E=_j({name:`TooltipFloating`,props:t,classes:TL,className:o,style:a,classNames:s,styles:c,unstyled:l,attributes:S,rootSelector:`tooltip`,vars:b,varsResolver:DL}),{handleMouseMove:D,x:O,y:k,opened:A,boundaryRef:ee,floating:te,setOpened:j}=wL({offset:p,position:m,defaultOpened:v}),M=SA(n);if(!M)throw Error(`[@mantine/core] Tooltip.Floating component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let ne=gA(ee,xA(M),C),N=M.props,P=e=>{N.onMouseEnter?.(e),D(e),j(!0)},F=e=>{N.onMouseLeave?.(e),j(!1)};return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($F,{...x,withinPortal:i,children:(0,G.jsx)(Qj,{...w,...E(`tooltip`,{style:{...Vj(a,T),zIndex:g,display:!_&&A?`block`:`none`,top:Number.isFinite(k)?Math.round(k):``,left:Number.isFinite(O)?Math.round(O):``}}),variant:y,ref:te,mod:{multiline:h},children:f})}),(0,W.cloneElement)(M,{...N,[r]:ne,onMouseEnter:P,onMouseLeave:F})]})});OL.classes=TL,OL.varsResolver=DL,OL.displayName=`@mantine/core/TooltipFloating`;var kL=(0,W.createContext)({withinGroup:!1}),AL={openDelay:0,closeDelay:0};function jL(e){let{openDelay:t,closeDelay:n,children:r}=dj(`TooltipGroup`,AL,e);return(0,G.jsx)(kL,{value:{withinGroup:!0},children:(0,G.jsx)(aae,{delay:{open:t,close:n},children:r})})}jL.displayName=`@mantine/core/TooltipGroup`,jL.extend=e=>e;function ML(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function NL(e){let t=ML(e.middlewares),n=[QP(e.offset)];return t.shift&&n.push($P(typeof t.shift==`boolean`?{padding:8}:{padding:8,...t.shift})),t.flip&&n.push(typeof t.flip==`boolean`?eF():eF(t.flip)),n.push(nF({element:e.arrowRef,padding:e.arrowOffset})),t.inline?n.push(typeof t.inline==`boolean`?tF():tF(t.inline)):e.inline&&n.push(tF()),n}function PL(e){let[t,n]=(0,W.useState)(e.defaultOpened),r=typeof e.opened==`boolean`?e.opened:t,i=(0,W.use)(kL).withinGroup,a=mA(),o=(0,W.useCallback)(e=>{n(e),e&&g(a)},[a]),{x:s,y:c,context:l,refs:u,placement:d,middlewareData:{arrow:{x:f,y:p}={}}}=PF({strategy:e.strategy,placement:e.position,open:r,onOpenChange:o,middleware:NL(e),whileElementsMounted:LP}),{delay:m,currentId:h,setCurrentId:g}=oae(l,{id:a}),{getReferenceProps:_,getFloatingProps:v}=pae([kF(l,{enabled:e.events?.hover,delay:i?m:{open:e.openDelay,close:e.closeDelay},mouseOnly:!e.events?.touch,handleClose:e.interactive?_ae():null}),fae(l,{enabled:e.events?.focus,visibleOnly:!0}),hae(l,{role:`tooltip`}),uae(l,{enabled:e.opened===void 0})]),y=(0,W.useRef)(d);pA(()=>{y.current!==d&&(y.current=d,e.onPositionChange?.(d))},[d]);let b=r&&h&&h!==a;return{x:s,y:c,arrowX:f,arrowY:p,reference:u.setReference,floating:u.setFloating,getFloatingProps:v,getReferenceProps:_,isGroupPhase:b,opened:r,placement:d}}var FL={position:`top`,refProp:`ref`,withinPortal:!0,arrowSize:4,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,offset:5,transitionProps:{duration:100,transition:`fade`},events:{hover:!0,focus:!1,touch:!1},zIndex:aA(`popover`),middlewares:{flip:!0,shift:!0,inline:!1}},IL=CA((e,{radius:t,color:n,variant:r,autoContrast:i})=>{let a=e.variantColorResolver({theme:e,color:n||e.primaryColor,autoContrast:i,variant:r||`filled`});return{tooltip:{"--tooltip-radius":t===void 0?void 0:cA(t),"--tooltip-bg":n?a.background:void 0,"--tooltip-color":n?a.color:void 0}}}),LL=Wj(e=>{let t=dj(`Tooltip`,FL,e),{children:n,position:r,refProp:i,label:a,openDelay:o,closeDelay:s,onPositionChange:c,opened:l,defaultOpened:u,withinPortal:d,radius:f,color:p,classNames:m,styles:h,unstyled:g,style:_,className:v,withArrow:y,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,offset:w,transitionProps:T,multiline:E,events:D,interactive:O,zIndex:k,disabled:A,onClick:ee,onMouseEnter:te,onMouseLeave:j,inline:M,variant:ne,keepMounted:N,vars:P,portalProps:F,mod:re,floatingStrategy:I,middlewares:ie,autoContrast:ae,attributes:oe,target:se,ref:L,...R}=t,{dir:ce}=eM(),le=(0,W.useRef)(null),ue=PL({position:Cae(ce,r),closeDelay:s,openDelay:o,onPositionChange:c,opened:l,defaultOpened:u,events:D,interactive:O,arrowRef:le,arrowOffset:x,offset:typeof w==`number`?w+(y?b/2:0):w,inline:M,strategy:I,middlewares:ie});(0,W.useEffect)(()=>{let e=se instanceof HTMLElement?se:typeof se==`string`?document.querySelector(se):se?.current||null;e&&ue.reference(e)},[se,ue]);let de=_j({name:`Tooltip`,props:t,classes:TL,className:v,style:_,classNames:m,styles:h,unstyled:g,attributes:oe,rootSelector:`tooltip`,vars:P,varsResolver:IL}),fe=SA(n);if(!se&&!fe)throw Error(`[@mantine/core] Tooltip component children should be an element or a component that accepts ref, fragments, strings, numbers and other primitive values are not supported`);let pe=de(`tooltip`),me=O&&!A&&!!ue.opened,z=C===`merge`&&y?Sae({position:ue.placement,dir:ce}):void 0;if(se){let e=aI(T,{duration:100,transition:`fade`});return(0,G.jsx)(G.Fragment,{children:(0,G.jsx)($F,{...F,withinPortal:d,children:(0,G.jsx)(iI,{...e,keepMounted:N,mounted:!A&&!!ue.opened,duration:ue.isGroupPhase?10:e.duration,children:e=>(0,G.jsxs)(Qj,{...R,"data-fixed":I===`fixed`||void 0,variant:ne,mod:[{multiline:E,interactive:me},re],...pe,...ue.getFloatingProps({ref:ue.floating,className:pe.className,style:{...pe.style,...e,...z,zIndex:k,top:ue.y??0,left:ue.x??0}}),children:[a,(0,G.jsx)(XF,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...de(`arrow`)})]})})})})}let he=fe.props,B=gA(ue.reference,xA(fe),L),ge=aI(T,{duration:100,transition:`fade`});return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)($F,{...F,withinPortal:d,children:(0,G.jsx)(iI,{...ge,keepMounted:N,mounted:!A&&!!ue.opened,duration:ue.isGroupPhase?10:ge.duration,children:e=>(0,G.jsxs)(Qj,{...R,"data-fixed":I===`fixed`||void 0,variant:ne,mod:[{multiline:E,interactive:me},re],...ue.getFloatingProps({ref:ue.floating,className:de(`tooltip`).className,style:{...de(`tooltip`).style,...e,...z,zIndex:k,top:ue.y??0,left:ue.x??0}}),children:[a,(0,G.jsx)(XF,{ref:le,arrowX:ue.arrowX,arrowY:ue.arrowY,visible:y,position:ue.placement,arrowSize:b,arrowOffset:x,arrowRadius:S,arrowPosition:C,...de(`arrow`)})]})})}),(0,W.cloneElement)(fe,ue.getReferenceProps({onClick:ee,onMouseEnter:te,onMouseLeave:j,onMouseMove:t.onMouseMove,onPointerDown:t.onPointerDown,onPointerEnter:t.onPointerEnter,...he,className:TA(v,he.className),[i]:B}))]})});LL.classes=TL,LL.varsResolver=IL,LL.displayName=`@mantine/core/Tooltip`,LL.Floating=OL,LL.Group=jL;var RL={root:`m_6d731127`},zL={gap:`md`,align:`stretch`,justify:`flex-start`},BL=CA((e,{gap:t,align:n,justify:r})=>({root:{"--stack-gap":sA(t),"--stack-align":n,"--stack-justify":r}})),VL=Wj(e=>{let t=dj(`Stack`,zL,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,align:c,justify:l,gap:u,variant:d,attributes:f,...p}=t;return(0,G.jsx)(Qj,{..._j({name:`Stack`,props:t,classes:RL,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:BL})(`root`),variant:d,...p})});VL.classes=RL,VL.varsResolver=BL,VL.displayName=`@mantine/core/Stack`;var[HL,UL]=eA(`Table component was not found in the tree`),WL={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`};function GL(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function KL(e,t){let n=`Table${e.charAt(0).toUpperCase()}${e.slice(1)}`,r=Wj(r=>{let i=dj(n,{},r),{classNames:a,className:o,style:s,styles:c,...l}=i,u=UL();return(0,G.jsx)(Qj,{component:e,...GL(u,t),...u.getStyles(e,{className:o,classNames:a,style:s,styles:c,props:i}),...l})});return r.displayName=`@mantine/core/${n}`,r.classes=WL,r}var qL=KL(`th`,{columnBorder:!0}),JL=KL(`td`,{columnBorder:!0}),YL=KL(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),XL=KL(`thead`,{stickyHeader:!0}),ZL=KL(`tbody`),QL=KL(`tfoot`),$L=KL(`caption`,{captionSide:!0}),eR={type:`scrollarea`},tR=CA((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":U(t),"--table-max-height":U(n),"--table-overflow":r===`native`?`auto`:void 0}})),nR=Wj(e=>{let t=dj(`TableScrollContainer`,eR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,children:c,minWidth:l,maxHeight:u,type:d,scrollAreaProps:f,attributes:p,...m}=t,h=_j({name:`TableScrollContainer`,classes:WL,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:tR,rootSelector:`scrollContainer`});return(0,G.jsx)(Qj,{component:d===`scrollarea`?VF:`div`,...d===`scrollarea`?u?{offsetScrollbars:`xy`,...f}:{offsetScrollbars:`x`,...f}:{},...h(`scrollContainer`),...m,children:(0,G.jsx)(`div`,{...h(`scrollContainerInner`),children:c})})});nR.classes=WL,nR.varsResolver=tR,nR.displayName=`@mantine/core/TableScrollContainer`;function rR({data:e}){return(0,G.jsxs)(G.Fragment,{children:[e.caption&&(0,G.jsx)($L,{children:e.caption}),e.head&&(0,G.jsx)(XL,{children:(0,G.jsx)(YL,{children:e.head.map((e,t)=>(0,G.jsx)(qL,{children:e},t))})}),e.body&&(0,G.jsx)(ZL,{children:e.body.map((e,t)=>(0,G.jsx)(YL,{children:e.map((e,t)=>(0,G.jsx)(JL,{children:e},t))},t))}),e.foot&&(0,G.jsx)(QL,{children:(0,G.jsx)(YL,{children:e.foot.map((e,t)=>(0,G.jsx)(qL,{children:e},t))})})]})}rR.displayName=`@mantine/core/TableDataRenderer`;var iR={withRowBorders:!0,verticalSpacing:7},aR=CA((e,{layout:t,captionSide:n,horizontalSpacing:r,verticalSpacing:i,borderColor:a,stripedColor:o,highlightOnHoverColor:s,striped:c,highlightOnHover:l,stickyHeaderOffset:u,stickyHeader:d})=>({table:{"--table-layout":t,"--table-caption-side":n,"--table-horizontal-spacing":sA(r),"--table-vertical-spacing":sA(i),"--table-border-color":a?PA(a,e):void 0,"--table-striped-color":c&&o?PA(o,e):void 0,"--table-highlight-on-hover-color":l&&s?PA(s,e):void 0,"--table-sticky-header-offset":d?U(u):void 0}})),oR=Wj(e=>{let t=dj(`Table`,iR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,horizontalSpacing:c,verticalSpacing:l,captionSide:u,stripedColor:d,highlightOnHoverColor:f,striped:p,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,withTableBorder:_,borderColor:v,layout:y,data:b,children:x,stickyHeader:S,stickyHeaderOffset:C,mod:w,tabularNums:T,attributes:E,...D}=t,O=_j({name:`Table`,props:t,className:r,style:i,classes:WL,classNames:n,styles:a,unstyled:o,attributes:E,rootSelector:`table`,vars:s,varsResolver:aR});return(0,G.jsx)(HL,{value:{getStyles:O,stickyHeader:S,striped:p===!0?`odd`:p||void 0,highlightOnHover:m,withColumnBorders:h,withRowBorders:g,captionSide:u||`bottom`},children:(0,G.jsx)(Qj,{component:`table`,mod:[{"data-with-table-border":_,"data-tabular-nums":T},w],...O(`table`),...D,children:x||!!b&&(0,G.jsx)(rR,{data:b})})})});oR.classes=WL,oR.varsResolver=aR,oR.displayName=`@mantine/core/Table`,oR.Td=JL,oR.Th=qL,oR.Tr=YL,oR.Thead=XL,oR.Tbody=ZL,oR.Tfoot=QL,oR.Caption=$L,oR.ScrollContainer=nR,oR.DataRenderer=rR;var[sR,cR]=eA(`Tabs component was not found in the tree`),lR={root:`m_89d60db1`,"list--default":`m_576c9d4`,list:`m_89d33d6d`,tab:`m_4ec4dce6`,panel:`m_b0c91715`,tabSection:`m_fc420b1f`,tabLabel:`m_42bbd1ae`,"tab--default":`m_539e827b`,"list--outline":`m_6772fbd5`,"tab--outline":`m_b59ab47c`,"tab--pills":`m_c3381914`},uR=Wj(e=>{let t=dj(`TabsList`,null,e),{children:n,className:r,grow:i,justify:a,classNames:o,styles:s,style:c,mod:l,...u}=t,d=cR();return(0,G.jsx)(Qj,{...d.getStyles(`list`,{className:r,style:c,classNames:o,styles:s,props:t,variant:d.variant}),role:`tablist`,variant:d.variant,mod:[{grow:i,orientation:d.orientation,placement:d.orientation===`vertical`&&d.placement,inverted:d.inverted},l],"aria-orientation":d.orientation,__vars:{"--tabs-justify":a},...u,children:n})});uR.classes=lR,uR.displayName=`@mantine/core/TabsList`;var dR=Wj(e=>{let t=dj(`TabsPanel`,null,e),{children:n,className:r,value:i,classNames:a,styles:o,style:s,mod:c,keepMounted:l,...u}=t,d=JA(),f=cR();(0,W.useEffect)(()=>(f.setMountedPanel(i,!0),()=>{f.setMountedPanel(i,!1)}),[i]);let p=f.value===i,m=f.keepMounted||l,h=f.keepMountedMode!==`display-none`,g=m&&h&&d!==`test`?(0,G.jsx)(W.Activity,{mode:p?`visible`:`hidden`,children:n}):m||p?n:null;return(0,G.jsx)(Qj,{...f.getStyles(`panel`,{className:r,classNames:a,styles:o,style:[s,p?void 0:{display:`none`}],props:t}),mod:[{orientation:f.orientation},c],role:`tabpanel`,id:f.getPanelId(i),"aria-labelledby":f.getTabId(i),...u,children:g})});dR.classes=lR,dR.displayName=`@mantine/core/TabsPanel`;var fR=Wj(e=>{let t=dj(`TabsTab`,null,e),{className:n,children:r,rightSection:i,leftSection:a,value:o,onClick:s,onKeyDown:c,disabled:l,color:u,style:d,classNames:f,styles:p,vars:m,mod:h,tabIndex:g,..._}=t,v=tj(),{dir:y}=eM(),b=cR(),x=o===b.value,S=e=>{b.onChange(b.allowTabDeactivation&&o===b.value?null:o),s?.(e)},C={classNames:f,styles:p,props:t};return(0,G.jsxs)(WF,{...b.getStyles(`tab`,{className:n,style:d,variant:b.variant,...C}),disabled:l,unstyled:b.unstyled,variant:b.variant,mod:[{active:x,disabled:l,orientation:b.orientation,inverted:b.inverted,placement:b.orientation===`vertical`&&b.placement},h],role:`tab`,id:b.getTabId(o),"aria-selected":x,tabIndex:g===void 0?x||b.value===null?0:-1:g,"aria-controls":b.mountedPanels.current.has(o)?b.getPanelId(o):void 0,onClick:S,__vars:{"--tabs-color":u?PA(u,v):void 0},onKeyDown:Jre({siblingSelector:`[role="tab"]`,parentSelector:`[role="tablist"]`,activateOnFocus:b.activateTabWithKeyboard,loop:b.loop,orientation:b.orientation||`horizontal`,dir:y,onKeyDown:c}),..._,children:[a&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`left`,children:a}),r&&(0,G.jsx)(`span`,{...b.getStyles(`tabLabel`,C),children:r}),i&&(0,G.jsx)(`span`,{...b.getStyles(`tabSection`,C),"data-position":`right`,children:i})]})});fR.classes=lR,fR.displayName=`@mantine/core/TabsTab`;var pR=`Tabs.Tab or Tabs.Panel component was rendered with invalid value or without value`,mR={keepMounted:!0,keepMountedMode:`activity`,orientation:`horizontal`,loop:!0,activateTabWithKeyboard:!0,variant:`default`,placement:`left`},hR=CA((e,{radius:t,color:n,autoContrast:r})=>({root:{"--tabs-radius":cA(t),"--tabs-color":PA(n,e),"--tabs-text-color":WA(r,e)?VA({color:n,theme:e,autoContrast:r}):void 0}})),gR=Wj(e=>{let t=dj(`Tabs`,mR,e),{defaultValue:n,value:r,onChange:i,orientation:a,children:o,loop:s,id:c,activateTabWithKeyboard:l,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,placement:h,keepMounted:g,keepMountedMode:_,classNames:v,styles:y,unstyled:b,className:x,style:S,vars:C,autoContrast:w,mod:T,attributes:E,...D}=t,O=mA(c),k=(0,W.useRef)(new Set),A=rie(),ee=(0,W.useCallback)((e,t)=>{let n=k.current;t&&!n.has(e)?(n.add(e),A()):!t&&n.has(e)&&(n.delete(e),A())},[]),[te,j]=_A({value:r,defaultValue:n,finalValue:null,onChange:i}),M=_j({name:`Tabs`,props:t,classes:lR,className:x,style:S,classNames:v,styles:y,unstyled:b,attributes:E,vars:C,varsResolver:hR});return(0,G.jsx)(sR,{value:{placement:h,value:te,orientation:a,id:O,loop:s,activateTabWithKeyboard:l,getTabId:tA(`${O}-tab`,pR),getPanelId:tA(`${O}-panel`,pR),onChange:j,allowTabDeactivation:u,variant:d,color:f,radius:p,inverted:m,keepMounted:g,keepMountedMode:_,unstyled:b,getStyles:M,mountedPanels:k,setMountedPanel:ee},children:(0,G.jsx)(Qj,{id:O,variant:d,mod:[{orientation:a,inverted:a===`horizontal`&&m,placement:a===`vertical`&&h},T],...M(`root`),...D,children:o})})});gR.classes=lR,gR.varsResolver=hR,gR.displayName=`@mantine/core/Tabs`,gR.Tab=fR,gR.Panel=dR,gR.List=uR;var _R={root:`m_7341320d`},vR=CA((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o})=>{let s=e.variantColorResolver({color:a||e.primaryColor,theme:e,gradient:i,variant:r||`filled`,autoContrast:o});return{root:{"--ti-size":oA(t,`ti-size`),"--ti-radius":n===void 0?void 0:cA(n),"--ti-bg":a||r?s.background:void 0,"--ti-color":a||r?s.color:void 0,"--ti-bd":a||r?s.border:void 0}}}),yR=Wj(e=>{let t=dj(`ThemeIcon`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,attributes:l,...u}=t;return(0,G.jsx)(Qj,{..._j({name:`ThemeIcon`,classes:_R,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:vR})(`root`),...u})});yR.classes=_R,yR.varsResolver=vR,yR.displayName=`@mantine/core/ThemeIcon`;var bR=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],xR=[`xs`,`sm`,`md`,`lg`,`xl`];function SR(e,t){let n=t===void 0?`h${e}`:t;return bR.includes(n)?{fontSize:`var(--mantine-${n}-font-size)`,fontWeight:`var(--mantine-${n}-font-weight)`,lineHeight:`var(--mantine-${n}-line-height)`}:xR.includes(n)?{fontSize:`var(--mantine-font-size-${n})`,fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}:{fontSize:U(n),fontWeight:`var(--mantine-h${e}-font-weight)`,lineHeight:`var(--mantine-h${e}-line-height)`}}var CR={root:`m_8a5d1357`},wR={order:1},TR=CA((e,{order:t,size:n,lineClamp:r,textWrap:i})=>{let a=SR(t||1,n);return{root:{"--title-fw":a.fontWeight,"--title-lh":a.lineHeight,"--title-fz":a.fontSize,"--title-line-clamp":typeof r==`number`?r.toString():void 0,"--title-text-wrap":i}}}),ER=Wj(e=>{let t=dj(`Title`,wR,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,order:s,vars:c,size:l,variant:u,lineClamp:d,textWrap:f,mod:p,attributes:m,...h}=t,g=_j({name:`Title`,props:t,classes:CR,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:m,vars:c,varsResolver:TR});return[1,2,3,4,5,6].includes(s)?(0,G.jsx)(Qj,{...g(`root`),component:`h${s}`,variant:u,mod:[{order:s,"data-line-clamp":typeof d==`number`},p],size:l,...h}):null});ER.classes=CR,ER.varsResolver=TR,ER.displayName=`@mantine/core/Title`;var DR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244,56v48a12,12,0,0,1-12,12H184a12,12,0,1,1,0-24H201.1l-19-17.38c-.13-.12-.26-.24-.38-.37A76,76,0,1,0,127,204h1a75.53,75.53,0,0,0,52.15-20.72,12,12,0,0,1,16.49,17.45A99.45,99.45,0,0,1,128,228h-1.37A100,100,0,1,1,198.51,57.06L220,76.72V56a12,12,0,0,1,24,0Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1-5.66-13.66l17-17-10.55-9.65-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,1,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60l10.93,10L226.34,50.3A8,8,0,0,1,240,56Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M238,56v48a6,6,0,0,1-6,6H184a6,6,0,0,1,0-12h32.55l-30.38-27.8c-.06-.06-.12-.13-.19-.19a82,82,0,1,0-1.7,117.65,6,6,0,0,1,8.24,8.73A93.46,93.46,0,0,1,128,222h-1.28A94,94,0,1,1,194.37,61.4L226,90.35V56a6,6,0,1,1,12,0Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M240,56v48a8,8,0,0,1-8,8H184a8,8,0,0,1,0-16H211.4L184.81,71.64l-.25-.24a80,80,0,1,0-1.67,114.78,8,8,0,0,1,11,11.63A95.44,95.44,0,0,1,128,224h-1.32A96,96,0,1,1,195.75,60L224,85.8V56a8,8,0,1,1,16,0Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M236,56v48a4,4,0,0,1-4,4H184a4,4,0,0,1,0-8h37.7L187.53,68.69l-.13-.12a84,84,0,1,0-1.75,120.51,4,4,0,0,1,5.5,5.82A91.43,91.43,0,0,1,128,220h-1.26A92,92,0,1,1,193,62.84l35,32.05V56a4,4,0,1,1,8,0Z`}))]]),OR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M248.49,71.51l-32-32a12,12,0,0,0-17,17L211,68h-3c-52,0-64.8,30.71-75.08,55.38-8.82,21.17-15.45,37.05-42.75,40.09a44,44,0,1,0,.28,24.08c43.34-3.87,55.07-32,64.63-54.93C164.9,109,172,92,208,92h3l-11.52,11.51a12,12,0,0,0,17,17l32-32A12,12,0,0,0,248.49,71.51ZM48,196a20,20,0,1,1,20-20A20,20,0,0,1,48,196Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M80,176a32,32,0,1,1-32-32A32,32,0,0,1,80,176Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H208c-49.33,0-61.05,28.12-71.38,52.92-9.38,22.51-16.92,40.59-49.48,42.84a40,40,0,1,0,.1,16c43.26-2.65,54.34-29.15,64.14-52.69C161.41,107,169.33,88,208,88h12.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M245.66,85.66l-32,32a8,8,0,0,1-11.32-11.32L220.69,88H208c-38.67,0-46.59,19-56.62,43.08C141.05,155.88,129.33,184,80,184H79a32,32,0,1,1,0-16h1c38.67,0,46.59-19,56.62-43.08C147,100.12,158.67,72,208,72h12.69L202.34,53.66a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,245.66,85.66Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M244.24,75.76l-32-32a6,6,0,0,0-8.48,8.48L225.51,74H208c-48,0-59.44,27.46-69.54,51.69-9.43,22.64-17.66,42.33-53,44.16a38,38,0,1,0,.06,12c43.34-2.06,54.29-28.29,64-51.55C159.44,106.53,168,86,208,86h17.51l-21.75,21.76a6,6,0,1,0,8.48,8.48l32-32A6,6,0,0,0,244.24,75.76ZM48,202a26,26,0,1,1,26-26A26,26,0,0,1,48,202Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M245.66,74.34l-32-32a8,8,0,0,0-11.32,11.32L220.69,72H208c-49.33,0-61.05,28.12-71.38,52.92-9.38,22.51-16.92,40.59-49.48,42.84a40,40,0,1,0,.1,16c43.26-2.65,54.34-29.15,64.14-52.69C161.41,107,169.33,88,208,88h12.69l-18.35,18.34a8,8,0,0,0,11.32,11.32l32-32A8,8,0,0,0,245.66,74.34ZM48,200a24,24,0,1,1,24-24A24,24,0,0,1,48,200Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M242.83,77.17l-32-32a4,4,0,0,0-5.66,5.66L230.34,76H208c-46.67,0-57.84,26.81-67.69,50.46-9.46,22.69-18.4,44.16-56.55,45.48a36,36,0,1,0,0,8c43.49-1.42,54.33-27.39,63.91-50.39C157.45,106.12,166.67,84,208,84h22.34l-25.17,25.17a4,4,0,0,0,5.66,5.66l32-32A4,4,0,0,0,242.83,77.17ZM48,204a28,28,0,1,1,28-28A28,28,0,0,1,48,204Z`}))]]),kR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),AR=new Map([[`bold`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,156a43.78,43.78,0,0,0-29.09,11L106.1,140.8a44.07,44.07,0,0,0,0-25.6L146.91,89a43.83,43.83,0,1,0-13-20.17L93.09,95a44,44,0,1,0,0,65.94L133.9,187.2A44,44,0,1,0,176,156Zm0-120a20,20,0,1,1-20,20A20,20,0,0,1,176,36ZM64,148a20,20,0,1,1,20-20A20,20,0,0,1,64,148Zm112,72a20,20,0,1,1,20-20A20,20,0,0,1,176,220Z`}))],[`duotone`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M208,200a32,32,0,1,1-32-32A32,32,0,0,1,208,200ZM176,88a32,32,0,1,0-32-32A32,32,0,0,0,176,88Z`,opacity:`0.2`}),W.createElement(`path`,{d:`M176,160a39.89,39.89,0,0,0-28.62,12.09l-46.1-29.63a39.8,39.8,0,0,0,0-28.92l46.1-29.63a40,40,0,1,0-8.66-13.45l-46.1,29.63a40,40,0,1,0,0,55.82l46.1,29.63A40,40,0,1,0,176,160Zm0-128a24,24,0,1,1-24,24A24,24,0,0,1,176,32ZM64,152a24,24,0,1,1,24-24A24,24,0,0,1,64,152Zm112,72a24,24,0,1,1,24-24A24,24,0,0,1,176,224Z`}))],[`fill`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M212,200a36,36,0,1,1-69.85-12.25l-53-34.05a36,36,0,1,1,0-51.4l53-34a36.09,36.09,0,1,1,8.67,13.45l-53,34.05a36,36,0,0,1,0,24.5l53,34.05A36,36,0,0,1,212,200Z`}))],[`light`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,162a37.91,37.91,0,0,0-28.3,12.67L98.8,143.24a37.89,37.89,0,0,0,0-30.48l48.9-31.43a38,38,0,1,0-6.5-10.09L92.3,102.67a38,38,0,1,0,0,50.66l48.9,31.43A38,38,0,1,0,176,162Zm0-132a26,26,0,1,1-26,26A26,26,0,0,1,176,30ZM64,154a26,26,0,1,1,26-26A26,26,0,0,1,64,154Zm112,72a26,26,0,1,1,26-26A26,26,0,0,1,176,226Z`}))],[`regular`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,160a39.89,39.89,0,0,0-28.62,12.09l-46.1-29.63a39.8,39.8,0,0,0,0-28.92l46.1-29.63a40,40,0,1,0-8.66-13.45l-46.1,29.63a40,40,0,1,0,0,55.82l46.1,29.63A40,40,0,1,0,176,160Zm0-128a24,24,0,1,1-24,24A24,24,0,0,1,176,32ZM64,152a24,24,0,1,1,24-24A24,24,0,0,1,64,152Zm112,72a24,24,0,1,1,24-24A24,24,0,0,1,176,224Z`}))],[`thin`,W.createElement(W.Fragment,null,W.createElement(`path`,{d:`M176,164a36,36,0,0,0-27.92,13.3L96.25,144a35.92,35.92,0,0,0,0-32L148.08,78.7A35.93,35.93,0,1,0,143.75,72L91.92,105.3a36,36,0,1,0,0,45.4L143.75,184A36,36,0,1,0,176,164Zm0-136a28,28,0,1,1-28,28A28,28,0,0,1,176,28ZM64,156a28,28,0,1,1,28-28A28,28,0,0,1,64,156Zm112,72a28,28,0,1,1,28-28A28,28,0,0,1,176,228Z`}))]]),jR=(0,W.createContext)({color:`currentColor`,size:`1em`,weight:`regular`,mirrored:!1}),MR=W.forwardRef((e,t)=>{let{alt:n,color:r,size:i,weight:a,mirrored:o,children:s,weights:c,...l}=e,{color:u=`currentColor`,size:d,weight:f=`regular`,mirrored:p=!1,...m}=W.useContext(jR);return W.createElement(`svg`,{ref:t,xmlns:`http://www.w3.org/2000/svg`,width:i??d,height:i??d,fill:r??u,viewBox:`0 0 256 256`,transform:o||p?`scale(-1, 1)`:void 0,...m,...l},!!n&&W.createElement(`title`,null,n),s,c.get(a??f))});MR.displayName=`IconBase`;var NR=W.forwardRef((e,t)=>W.createElement(MR,{ref:t,...e,weights:DR}));NR.displayName=`ArrowClockwiseIcon`;var PR=NR,FR=W.forwardRef((e,t)=>W.createElement(MR,{ref:t,...e,weights:OR}));FR.displayName=`FlowArrowIcon`;var IR=FR,LR=W.forwardRef((e,t)=>W.createElement(MR,{ref:t,...e,weights:kR}));LR.displayName=`MagnifyingGlassIcon`;var RR=LR,zR=W.forwardRef((e,t)=>W.createElement(MR,{ref:t,...e,weights:AR}));zR.displayName=`ShareNetworkIcon`;var BR=zR,VR=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&ee(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-Tt&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ee(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function ee(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ee(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),HR=s(((e,t)=>{t.exports=VR()})),UR=s((e=>{var t=HR(),n=$k(),r=bA();function i(e){var t=`https://react.dev/errors/`+e;if(1P||(e.current=N[P],N[P]=null,P--)}function I(e,t){P++,N[P]=e.current,e.current=t}var ie=F(null),ae=F(null),oe=F(null),se=F(null);function L(e,t){switch(I(oe,t),I(ae,e),I(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Zd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Zd(t),e=Qd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}re(ie),I(ie,e)}function R(){re(ie),re(ae),re(oe)}function ce(e){e.memoizedState!==null&&I(se,e);var t=ie.current,n=Qd(t,e.type);t!==n&&(I(ae,e),I(ie,n))}function le(e){ae.current===e&&(re(ie),re(ae)),se.current===e&&(re(se),cp._currentValue=ne)}var ue,de;function fe(e){if(ue===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ue=t&&t[1]||``,de=-1)`:-1`)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{pe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?fe(n):``}function z(e,t){switch(e.tag){case 26:case 27:case 5:return fe(e.type);case 16:return fe(`Lazy`);case 13:return e.child!==t&&t!==null?fe(`Suspense Fallback`):fe(`Suspense`);case 19:return fe(`SuspenseList`);case 0:case 15:return me(e.type,!1);case 11:return me(e.type.render,!1);case 1:return me(e.type,!0);case 31:return fe(`Activity`);default:return``}}function he(e){try{var t=``,n=null;do t+=z(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` `+e.stack}}var B=Object.prototype.hasOwnProperty,ge=t.unstable_scheduleCallback,_e=t.unstable_cancelCallback,ve=t.unstable_shouldYield,ye=t.unstable_requestPaint,be=t.unstable_now,xe=t.unstable_getCurrentPriorityLevel,Se=t.unstable_ImmediatePriority,Ce=t.unstable_UserBlockingPriority,we=t.unstable_NormalPriority,Te=t.unstable_LowPriority,Ee=t.unstable_IdlePriority,De=t.log,Oe=t.unstable_setDisableYieldValue,ke=null,Ae=null;function je(e){if(typeof De==`function`&&Oe(e),Ae&&typeof Ae.setStrictMode==`function`)try{Ae.setStrictMode(ke,e)}catch{}}var Me=Math.clz32?Math.clz32:Fe,Ne=Math.log,Pe=Math.LN2;function Fe(e){return e>>>=0,e===0?32:31-(Ne(e)/Pe|0)|0}var Ie=256,Le=262144,Re=4194304;function ze(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Be(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=ze(n))):i=ze(o):i=ze(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=ze(n))):i=ze(o)):i=ze(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Ve(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function He(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Ue(){var e=Re;return Re<<=1,!(Re&62914560)&&(Re=4194304),e}function We(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ge(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ke(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),an=!1;if(rn)try{var on={};Object.defineProperty(on,"passive",{get:function(){an=!0}}),window.addEventListener(`test`,on,on),window.removeEventListener(`test`,on,on)}catch{an=!1}var sn=null,cn=null,ln=null;function un(){if(ln)return ln;var e,t=cn,n=t.length,r,i=`value`in sn?sn.value:sn.textContent,a=i.length;for(e=0;e=Hn),Gn=` `,Kn=!1;function qn(e,t){switch(e){case`keyup`:return Bn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function Jn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var Yn=!1;function Xn(e,t){switch(e){case`compositionend`:return Jn(t);case`keypress`:return t.which===32?(Kn=!0,Gn):null;case`textInput`:return e=t.data,e===Gn&&Kn?null:e;default:return null}}function Zn(e,t){if(Yn)return e===`compositionend`||!Vn&&qn(e,t)?(e=un(),ln=cn=sn=null,Yn=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=yr(n)}}function xr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?xr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Sr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=jt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=jt(e.document)}return t}function Cr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var wr=rn&&`documentMode`in document&&11>=document.documentMode,Tr=null,Er=null,Dr=null,Or=!1;function kr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Or||Tr==null||Tr!==jt(r)||(r=Tr,`selectionStart`in r&&Cr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Dr&&vr(Dr,r)||(Dr=r,r=Fd(Er,`onSelect`),0>=o,i-=o,xi=1<<32-Me(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ai&&Ci(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ai&&Ci(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ai&&Ci(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ai&&Ci(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===T&&wa(l)===r.type){n(e,r.sibling),c=a(r,o.props),ja(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=ci(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=si(o.type,o.key,o.props,null,e.mode,c),ja(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=di(o,e.mode,c),c.return=e,e=c}return s(e);case T:return o=wa(o),x(e,r,o,c)}if(te(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Aa(o),c);if(o.$$typeof===b)return x(e,r,Qi(e,o),c);Ma(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=li(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ka=0;var i=x(e,t,n,r);return Oa=null,i}catch(t){if(t===va||t===ba)throw t;var a=ri(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Pa=Na(!0),Fa=Na(!1),Ia=!1;function La(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function za(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ba(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Vl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ei(e),$r(e,null,n),t}return Xr(e,r,t,n),ei(e)}function Va(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}function Ha(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ua=!1;function Wa(){if(Ua){var e=la;if(e!==null)throw e}}function Ga(e,t,n,r){Ua=!1;var i=e.updateQueue;Ia=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Wl&p)===p:(r&p)===p){p!==0&&p===ca&&(Ua=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Ia=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),Ql|=o,e.lanes=o,e.memoizedState=d}}function Ka(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function qa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=j.T,s={};j.T=s,Ps(e,!1,t,n);try{var c=i(),l=j.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Ns(e,t,fa(c,r),bu(e)):Ns(e,t,r,bu(e))}catch(n){Ns(e,t,{then:function(){},status:`rejected`,reason:n},bu())}finally{M.p=a,o!==null&&s.types!==null&&(o.types=s.types),j.T=o}}function Cs(){}function ws(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ts(e).queue;Ss(e,a,t,ne,n===null?Cs:function(){return Es(e),n(r)})}function Ts(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ne,baseState:ne,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:ne},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Fo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Es(e){var t=Ts(e);t.next===null&&(t=e.alternate.memoizedState),Ns(e,t.next.queue,{},bu())}function Ds(){return Zi(cp)}function Os(){return Ao().memoizedState}function ks(){return Ao().memoizedState}function As(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bu();e=za(n);var r=Ba(t,e,n);r!==null&&(Su(r,t,n),Va(r,t,n)),t={cache:ia()},e.payload=t;return}t=t.return}}function js(e,t,n){var r=bu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Fs(e)?Is(t,n):(n=Zr(e,t,n,r),n!==null&&(Su(n,e,r),Ls(n,t,r)))}function Ms(e,t,n){Ns(e,t,n,bu())}function Ns(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Fs(e))Is(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,_r(s,o))return Xr(e,t,i,0),Hl===null&&Yr(),!1}catch{}if(n=Zr(e,t,i,r),n!==null)return Su(n,e,r),Ls(n,t,r),!0}return!1}function Ps(e,t,n,r){if(r={lane:2,revertLane:yd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Fs(e)){if(t)throw Error(i(479))}else t=Zr(e,n,r,2),t!==null&&Su(t,e,2)}function Fs(e){var t=e.alternate;return e===lo||t!==null&&t===lo}function Is(e,t){mo=po=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ls(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Je(e,n)}}var Rs={readContext:Zi,use:No,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useLayoutEffect:bo,useInsertionEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useSyncExternalStore:bo,useId:bo,useHostTransitionStatus:bo,useFormState:bo,useActionState:bo,useOptimistic:bo,useMemoCache:bo,useCacheRefresh:bo};Rs.useEffectEvent=bo;var zs={readContext:Zi,use:No,useCallback:function(e,t){return ko().memoizedState=[e,t===void 0?null:t],e},useContext:Zi,useEffect:ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ss(4194308,4,hs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ss(4194308,4,e,t)},useInsertionEffect:function(e,t){ss(4,2,e,t)},useMemo:function(e,t){var n=ko();t=t===void 0?null:t;var r=e();if(ho){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ko();if(n!==void 0){var i=n(t);if(ho){je(!0);try{n(t)}finally{je(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=js.bind(null,lo,e),[r.memoizedState,e]},useRef:function(e){var t=ko();return e={current:e},t.memoizedState=e},useState:function(e){e=Go(e);var t=e.queue,n=Ms.bind(null,lo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:_s,useDeferredValue:function(e,t){return bs(ko(),e,t)},useTransition:function(){var e=Go(!1);return e=Ss.bind(null,lo,e.queue,!0,!1),ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=lo,a=ko();if(Ai){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Hl===null)throw Error(i(349));Wl&127||Bo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ls(Ho.bind(null,r,o,e),[e]),r.flags|=2048,as(9,{destroy:void 0},Vo.bind(null,r,o,n,t),null),n},useId:function(){var e=ko(),t=Hl.identifierPrefix;if(Ai){var n=Si,r=xi;n=(r&~(1<<32-Me(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=go++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[tt]=t,o[nt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Wd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Nc(t)}}return Rc(t),Pc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Nc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=oe.current,Li(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Oi,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Vd(e.nodeValue,n)),e||Pi(t,!0)}else e=Xd(e).createTextNode(r),e[tt]=t,t.stateNode=e}return Rc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Li(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[tt]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),e=!1}else n=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(ao(t),t):(ao(t),null);if(t.flags&128)throw Error(i(558))}return Rc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Li(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[tt]=t}else Ri(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Rc(t),a=!1}else a=zi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(ao(t),t):(ao(t),null)}return ao(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Ic(t,t.updateQueue),Rc(t),null);case 4:return R(),e===null&&jd(t.stateNode.containerInfo),Rc(t),null;case 10:return Gi(t.type),Rc(t),null;case 19:if(re(oo),r=t.memoizedState,r===null)return Rc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Lc(r,!1);else{if(Zl!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=so(e),o!==null){for(t.flags|=128,Lc(r,!1),e=o.updateQueue,t.updateQueue=e,Ic(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)oi(n,e),n=n.sibling;return I(oo,oo.current&1|2),Ai&&Ci(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&be()>cu&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=so(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ic(t,e),Lc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ai)return Rc(t),null}else 2*be()-r.renderingStartTime>cu&&n!==536870912&&(t.flags|=128,a=!0,Lc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Rc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=be(),e.sibling=null,n=oo.current,I(oo,a?n&1|2:n&1),Ai&&Ci(t,r.treeForkCount),e);case 22:case 23:return ao(t),Qa(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Rc(t),t.subtreeFlags&6&&(t.flags|=8192)):Rc(t),n=t.updateQueue,n!==null&&Ic(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&re(ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Gi(ra),Rc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Bc(e,t){switch(Ei(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Gi(ra),R(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return le(t),null;case 31:if(t.memoizedState!==null){if(ao(t),t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ao(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ri()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return re(oo),null;case 4:return R(),null;case 10:return Gi(t.type),null;case 22:case 23:return ao(t),Qa(),e!==null&&re(ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Gi(ra),null;case 25:return null;default:return null}}function Vc(e,t){switch(Ei(t),t.tag){case 3:Gi(ra),R();break;case 26:case 27:case 5:le(t);break;case 4:R();break;case 31:t.memoizedState!==null&&ao(t);break;case 13:ao(t);break;case 19:re(oo);break;case 10:Gi(t.type);break;case 22:case 23:ao(t),Qa(),e!==null&&re(ma);break;case 24:Gi(ra)}}function Hc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){Qu(t,t.return,e)}}function Uc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){Qu(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){Qu(t,t.return,e)}}function Wc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{qa(t,n)}catch(t){Qu(e,e.return,t)}}}function Gc(e,t,n){n.props=Ks(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){Qu(e,t,n)}}function Kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){Qu(e,t,n)}}function qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){Qu(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){Qu(e,t,n)}else n.current=null}}function Jc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){Qu(e,e.return,t)}}function Yc(e,t,n){try{var r=e.stateNode;Gd(r,e.type,n,t),r[nt]=t}catch(t){Qu(e,e.return,t)}}function Xc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&cf(e.type)||e.tag===4}function Zc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Xc(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&cf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Qc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Jt));else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Qc(e,t,n),e=e.sibling;e!==null;)Qc(e,t,n),e=e.sibling}function $c(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&cf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for($c(e,t,n),e=e.sibling;e!==null;)$c(e,t,n),e=e.sibling}function el(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Wd(t,r,n),t[tt]=e,t[nt]=n}catch(t){Qu(e,e.return,t)}}var tl=!1,nl=!1,rl=!1,il=typeof WeakSet==`function`?WeakSet:Set,al=null;function ol(e,t){if(e=e.containerInfo,Jd=_p,e=Sr(e),Cr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Yd={focusedElem:e,selectionRange:n},_p=!1,al=t;al!==null;)if(t=al,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,al=e;else for(;al!==null;){switch(t=al,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Wd(o,r,n),o[tt]=e,mt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=br(s,h),v=br(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,j.T=null,n=gu,gu=null;var o=fu,s=mu;if(du=0,pu=fu=null,mu=0,Vl&6)throw Error(i(331));var c=Vl;if(Vl|=4,Il(o.current),Ol(o,o.current,s,n),Vl=c,fd(0,!1),Ae&&typeof Ae.onPostCommitFiberRoot==`function`)try{Ae.onPostCommitFiberRoot(ke,o)}catch{}return!0}finally{M.p=a,j.T=r,Ju(e,t)}}function Zu(e,t,n){t=pi(n,t),t=Qs(e.stateNode,t,2),e=Ba(e,t,2),e!==null&&(Ge(e,2),dd(e))}function Qu(e,t,n){if(e.tag===3)Zu(e,e,n);else for(;t!==null;){if(t.tag===3){Zu(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(uu===null||!uu.has(r))){e=pi(n,e),n=$s(2),r=Ba(t,n,2),r!==null&&(ec(n,r,t,e),Ge(r,2),dd(r));break}}t=t.return}}function $u(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Bl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Yl=!0,i.add(n),e=ed.bind(null,e,t,n),t.then(e,e))}function ed(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Hl===e&&(Wl&n)===n&&(Zl===4||Zl===3&&(Wl&62914560)===Wl&&300>be()-ou?!(Vl&2)&&ku(e,0):eu|=n,nu===Wl&&(nu=0)),dd(e)}function td(e,t){t===0&&(t=Ue()),e=Qr(e,t),e!==null&&(Ge(e,t),dd(e))}function nd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),td(e,n)}function rd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),td(e,n)}function id(e,t){return ge(e,t)}var ad=null,od=null,sd=!1,cd=!1,ld=!1,ud=0;function dd(e){e!==od&&e.next===null&&(od===null?ad=od=e:od=od.next=e),cd=!0,sd||(sd=!0,vd())}function fd(e,t){if(!ld&&cd){ld=!0;do for(var n=!1,r=ad;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Me(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,_d(r,a))}else a=Wl,a=Be(r,r===Hl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Ve(r,a)||(n=!0,_d(r,a))}r=r.next}while(n);ld=!1}}function pd(){md()}function md(){cd=sd=!1;var e=0;ud!==0&&tf()&&(e=ud);for(var t=be(),n=null,r=ad;r!==null;){var i=r.next,a=hd(r,t);a===0?(r.next=null,n===null?ad=i:n.next=i,i===null&&(od=n)):(n=r,(e!==0||a&3)&&(cd=!0)),r=i}du!==0&&du!==5||fd(e,!1),ud!==0&&(ud=0)}function hd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Nt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Nt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Nt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Nt(n.imageSizes)+`"]`)):i+=`[href="`+Nt(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Nt(r)+`"][href="`+Nt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),mt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=pt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);mt(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=pt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),mt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=pt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),mt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=oe.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=pt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=pt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Nt(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),mt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Nt(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Nt(n.href)+`"]`);if(r)return t.instance=r,mt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),mt(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,mt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,mt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),mt(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,mt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=WR()}))(),KR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],qR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],JR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],YR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],XR=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],ZR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],QR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},$R={micro:11,small:12,body:14,title:16,section:22,page:32},ez={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},tz={brand:qR,ok:JR,warn:YR,bad:XR,info:ZR},nz={light:7,dark:5};function rz(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function iz(e){let t=rz(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function az(e){return Object.fromEntries(Object.entries(tz).map(([t,n])=>[`--fanout-color-${t}-contrast`,iz(n[nz[e]])]))}function oz(e){return t=>{let n=t.color??lz.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(tz,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var sz=.25,cz={xs:9,sm:10,md:11,lg:13,xl:16},lz={primaryColor:`brand`,primaryShade:nz,autoContrast:!0,luminanceThreshold:sz,colors:{dark:KR,brand:qR,ok:JR,warn:YR,bad:XR,info:ZR},defaultRadius:`md`,fontFamily:ez.body,fontFamilyMonospace:ez.display,headings:{fontFamily:ez.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:fz(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:fz(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:dz(t.size)})}}},uz=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":QR.light.muted,...az(`light`)},dark:az(`dark`)});function dz(e){let t=cz[e??`md`];return t===void 0||t>=$R.micro?{}:{"--badge-fz":`${$R.micro/16}rem`}}function fz(e,t){return!e||e===lz.primaryColor?{[t]:`var(--fanout-color-${lz.primaryColor}-contrast)`}:{}}var pz=Lie({...lz,variantColorResolver:oz(BA)});function mz({dark:e,children:t}){return(0,G.jsx)(uj,{theme:pz,cssVariablesResolver:uz,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(JF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function hz({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(AI,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)($j,{miw:0,children:[(0,G.jsx)(DR,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(RI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(RL,{label:`Refresh this view`,children:(0,G.jsx)(bI,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(FR,{size:15,weight:`bold`})})})]})}function gz({error:e,loading:t,retry:n}){return e?(0,G.jsx)(NI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(AI,{justify:`space-between`,children:[(0,G.jsx)(RI,{size:`sm`,children:e}),n&&(0,G.jsx)(XI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(QI,{mih:160,p:`xl`,children:[(0,G.jsx)(pI,{size:`sm`}),(0,G.jsx)(RI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function _z({active:e,items:t,onChange:n}){return(0,G.jsx)(HF,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(_R,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(_R.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(_R.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(VI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function vz({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(QI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(AI,{wrap:`nowrap`,children:[(0,G.jsx)(bR,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)($j,{children:[(0,G.jsx)(RI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(RI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function yz({left:e,right:t}){return(0,G.jsxs)(AI,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(RI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(RI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function bz(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function xz({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(AI,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(RI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(wL,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function Sz(e){return QR[e?`dark`:`light`]}function Cz(e){let t=e?5:7;return{ok:JR[t],warn:YR[t],bad:XR[t],info:ZR[t]}}function wz(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function Tz(e){return e===`unknown`?`dashed`:`solid`}function Ez(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}var Dz=Mc(),Oz=N,kz=pe,Az=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Xu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=me(jz,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}Fz(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Dy(r).w>o)return!0;if(a){var s=cD(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=Dz(e).pointerEl=new sf[i.type](Oz(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Dz(e).labelEl=new rs(Oz(t.label));e.add(i),Nz(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Dz(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Dz(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Nz(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=Mf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){mx(e.event)},onmousedown:kz(this._onHandleDragMove,this,0,0),drift:kz(this._onHandleDragMove,this),ondragend:kz(this._onHandleDragEnd,this)}),n.add(r)),Fz(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);z(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Zb(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){jz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Pz(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Pz(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Pz(r)),Dz(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Qb(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function jz(e,t,n,r){Mz(Dz(n).lastProp,r)||(Dz(n).lastProp=r,t?$d(n,r,e):(n.stopAnimation(),n.attr(r)))}function Mz(e,t){if(ve(e)&&ve(t)){var n=!0;return L(t,function(t,r){n&&=Mz(e[r],t)}),!!n}return e===t}function Nz(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function Pz(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Fz(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function Iz(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function Lz(e,t,n,r,i){var a=zz(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=mg(o.get(`padding`)||0),c=o.getFont(),l=Tn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),Rz(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:op(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function Rz(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function zz(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Wv(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):he(o)&&(a=o(s))}return a}function Bz(e,t,n){var r=vt();return Ct(r,r,n.rotation),St(r,r,n.position),Tf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function Vz(e,t,n,r,i,a){var o=db.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),Lz(t,r,i,a,{position:Bz(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Hz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function Uz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function Wz(e,t,n){return Dy(e,{fromStat:{sers:R(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function Gz(e,t,n){return[xs(bs(t[0],t[1]),e-n/2),bs(e+n/2,xs(t[0],t[1]))]}var Kz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=qz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=Iz(r),f=Jz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}Vz(t,e,Sb(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=Sb(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=Bz(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=qz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=bs(o[1],l[c]),l[c]=xs(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(Az);function qz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var Jz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:Hz([t,r[0]],[t,r[1]],Yz(e))}},shadow:function(e,t,n,r,i,a){var o=Wz(e,i,a),s=r[1]-r[0],c=Gz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:Uz([l,r[0]],[u-l,s],Yz(e))}}};function Yz(e){return e.dim===`x`?0:1}var Xz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:V.color.border,width:1,type:`dashed`},shadowStyle:{color:V.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:V.color.neutral00,padding:[5,7,5,7],backgroundColor:V.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:V.color.accent40,throttle:40}},t}(Lg),Zz=Mc(),Qz=L;function $z(e,t,n){if(!Ge.node){var r=t.getZr();Zz(r).records||(Zz(r).records={}),eB(r,t);var i=Zz(r).records[e]||(Zz(r).records[e]={});i.handler=n}}function eB(e,t){if(Zz(e).initialized)return;Zz(e).initialized=!0,n(`click`,me(rB,`click`)),n(`mousemove`,me(rB,`mousemove`)),n(`mousewheel`,me(rB,`mousewheel`)),n(`globalout`,nB);function n(n,r){e.on(n,function(n){var i=iB(t);Qz(Zz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),tB(i.pendings,t)})}}function tB(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function nB(e,t,n){e.handler(`leave`,null,n)}function rB(e,t,n,r){t.handler(e,n,r)}function iB(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function aB(e,t){if(!Ge.node){var n=t.getZr();(Zz(n).records||{})[e]&&(Zz(n).records[e]=null)}}var oB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;$z(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){aB(`axisPointer`,t)},t.prototype.dispose=function(e,t){aB(`axisPointer`,t)},t.type=`axisPointer`,t}(ZS);function sB(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=jc(a,e);if(o==null||o<0||z(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(R(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var cB=Mc();function lB(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||pe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){yB(i)&&(i=sB({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=yB(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||yB(i),f={},p={},m={list:[],map:{}},h={showPointer:me(fB,p),showTooltip:me(pB,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=_B(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&uB(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,vB(t),vB(e)))),g[e.key]=a}})}),L(g,function(e,t){uB(u[t],e,h,!0,f)}),mB(p,u,f),hB(m,i,e,o),gB(u,o,n),f}}function uB(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=dB(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function dB(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(nc(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function fB(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function pB(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=dD(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function mB(e,t,n){var r=n.axesInfo=[];L(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function hB(e,t,n,r){if(yB(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function gB(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=cB(r)[i]||{},o=cB(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}L(a,function(e,t){!o[t]&&c.push(l(e))}),L(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function _B(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function vB(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function yB(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function bB(e){pD.registerAxisPointerClass(`CartesianAxisPointer`,Kz),e.registerComponentModel(Xz),e.registerComponentView(oB),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=tD(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},lB)}function xB(e){vE(wD),vE(bB)}function SB(e,t){var n=mg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Qo({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var CB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:V.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:V.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:V.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:V.color.tertiary,fontSize:14}},t}(Lg);function wB(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function TB(e){if(Ge.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function FB(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ge.transformSupported?``+jB+i:`,left`+i+`,top`+i)),AB+`:`+a}function IB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ge.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ge.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+jB+`:`+o+`;`:[[`top`,0],[`left`,0],[EB,o]]}function LB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Te(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function RB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=P_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(FB(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=pg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(LB(d)),f!=null&&i.push(`padding:`+mg(f).join(`px `)+`px`),i.join(`;`)+`;`}function zB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&fh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var BB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ge.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(B(i)?document.querySelector(i):xe(i)?i:he(i)&&i(e.getDom()));zB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;ux(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=kB(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=MB+RB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+IB(i[0],i[1],!0)+(`border-color:`+bg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!wB(n)&&(o=PB(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,z(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ge.node&&n.getDom()){var i=JB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=$B(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=GB;c.x=r.x,c.y=r.y,c.update(),sl(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=sB(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(JB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&qB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(sl(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;IC(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(sl(e).dataIndex==null?sl(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=pe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=qB([t.tooltipOption],r),o=this._renderMode,s=[],c=b_(`section`,{blocks:[],noHeader:!0}),l=[],u=new F_;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=zz(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=b_(`section`,{header:f,noHeader:!Ae(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),L(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Wv(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,bg(m.color),o);var h=Jg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=qB([a],r).get(`valueFormatter`);p.blocks.push(_?F({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=E_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` - -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=sl(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=qB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new F_;h.marker=g.makeTooltipMarker(`item`,bg(h.color),d);var _=Jg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?E_(y?F({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=sl(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=N(a),a.content=_h(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=qB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new F_;this._showOrMove(d,function(){var n=N(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(B(u)){var p=e.ecModel.get(`useUTC`),m=z(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Xh(m.axisValue,d,p)),d=vg(d,n,!0)}else if(he(u)){var g=pe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||z(t))return{color:r||i};if(!z(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),he(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),z(t))n=Ms(t[0],s),r=Ms(t[1],c);else if(ve(t)){var p=t;p.width=l[0],p.height=l[1];var m=Dg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=ZB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=YB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=QB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=QB(d)?l[1]/2:d===`bottom`?l[1]:0),wB(e)){var h=XB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ge.node&&t.getDom()&&(Qb(this,`_updatePosition`),this._tooltipContent.dispose(),aB(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(ZS);function qB(e,t,n){var r=t.ecModel,i;n?(i=new Dp(n,r,r),i=new Dp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Dp&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new Dp(o,i,r)))}return i}function JB(e,t){return e.dispatchAction||pe(t.dispatchAction,t)}function YB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function XB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function ZB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function QB(e){return e===`center`||e===`middle`}function $B(e,t,n){var r=Fc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Lc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=sl(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function eV(e){vE(bB),e.registerComponentModel(CB),e.registerComponentView(KB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},He),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},He)}var tV=L;function nV(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function rV(e,t,n){var r={};return tV(t,function(t){var a=r[t]=i();tV(e[t],function(e,r){if(FO.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new FO(i),r===`opacity`&&(i=N(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new FO(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function iV(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&nV(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&nV(t[n])?e[n]=N(t[n]):delete e[n]})}function aV(e,t,n,r){var i={};return L(e,function(e){i[e]=FO.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return NC(a,l,e)}function c(e,t){FC(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var oV=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},sV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),z(t)&&L(t,function(e,r){B(e)&&(e={type:e}),t[r]=P(e,oV(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:V.size.m,align:`auto`,backgroundColor:V.color.transparent,borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:V.color.disabled,inactiveBorderColor:V.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:V.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:V.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:V.color.tertiary,borderWidth:1,borderColor:V.color.border},emphasis:{selectorLabel:{show:!0,color:V.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Lg),cV=me,lV=L,uV=Xu,dV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new uV),this.group.add(this._selectorGroup=new uV),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Ag(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Dg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Dg(I({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=SB(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Re(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),lV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new uV;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,cV(mV,f,null,r,d)).on(`mouseover`,cV(hV,m.name,null,r,d)).on(`mouseout`,cV(gV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=sl(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=$r(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:oi(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,cV(mV,null,f,r,d)).on(`mouseover`,cV(hV,null,f,r,d)).on(`mouseout`,cV(gV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=sl(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};sl(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();lV(e,function(e){var r=e.type,i=new rs({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),ip(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),hu(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=fV(c,r,o,s,d,m,u),y=new uV,b=r.getModel(`textStyle`);if(he(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(pV({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):he(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new rs({style:op(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Qo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Bf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),hu(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Tg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Tg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(ZS);function fV(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),lV(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Mw(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function pV(e){var t=e.icon||`roundRect`,n=J_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=V.color.neutral00,n.style.lineWidth=2),n}function mV(e,t,n,r){gV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),hV(e,t,n,r)}function hV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function gV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function _V(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),vV(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),vV(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function vV(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Ve(n,r)?n[r]&&i:i}}),n}function yV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,me(_V,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,me(_V,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,me(_V,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,me(_V,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,me(_V,`unSelect`))}var bV=ol(xV);function xV(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Te(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Qo({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&$d(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=EV[i],o=DV[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(dV);function kV(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function AV(e){vE(SV),e.registerComponentModel(CV),e.registerComponentView(OV),kV(e)}function jV(e){vE(SV),vE(AV)}var MV={get:function(e,t,n){var r=N((NV[e]||{})[t]);return n&&z(r)?r[r.length-1]:r}},NV={color:{active:[`#006edd`,`#e0ffff`],inactive:[V.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},PV=FO.mapVisual,FV=FO.eachVisual,IV=z,LV=L,RV=Rs,zV=js,BV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&iV(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=pe(e,this),this.controllerVisuals=rV(this.option.controller,t,e),this.targetVisuals=rV(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return LV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Lc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],z(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(he(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=RV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ue(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};P(r,n),P(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){IV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},LV(r,function(e,t){if(FO.isValidType(t)){var n=MV.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;LV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&N(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&N(n)||(a?s[0]:[s[0],s[0]])),c.symbol=PV(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;FV(l,function(e){e>u&&(u=e)}),c.symbolSize=PV(l,function(e){return zV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:V.color.transparent,borderColor:V.color.borderTint,contentColor:V.color.theme[0],inactiveColor:V.color.disabled,borderWidth:0,padding:V.size.m,textGap:10,precision:0,textStyle:{color:V.color.secondary}},t}(Lg),VV=[20,140],HV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=VV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=VV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):z(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Rs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=UV(this,`outOfRange`,this.getExtent()),n=UV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Xu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);YV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=JV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Tf(n.handleLabelPoints[l],wf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=JV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Tf(c.indicatorLabelPoint,wf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||rH(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Ac(u,d);this._dispatchHighDown(`downplay`,qV(f[0],n)),this._dispatchHighDown(`highlight`,qV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(IC(e.target,function(e){var n=sl(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function cH(e,t,n,r){for(var i=t.targetVisuals[r],a=FO.prepareVisualTypes(i),o={color:PC(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(aH,oH),L(sH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(uH))}function mH(e){e.registerComponentModel(HV),e.registerComponentView(eH),pH(e)}var hH=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],gH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=N(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=N(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=FO.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=MV.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=N(e)},t.prototype.getValueState=function(e){var t=FO.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){FO.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=sh(BV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(BV),gH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function _H(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var vH=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=we(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Xu;u.onclick=pe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new rs({style:op(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Te(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Tg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:qV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return KV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Xu,o=this.visualMapModel.textStyleModel;a.add(new rs({style:op(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=J_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=N(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(WV);function yH(e){e.registerComponentModel(hH),e.registerComponentView(vH),pH(e)}function bH(e){vE(mH),vE(yH)}var xH={label:{enabled:!0},decal:{show:!1}},SH=Mc(),CH=Mc(),wH=ol(TH);function TH(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=CH(e).scope||(CH(e).scope={}),i=N(xH);P(i.label,e.getLocaleModel().get(`aria`),!1),P(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Re();e.eachSeries(function(e){e.isColorBySeries()||(SH(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(he(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Hg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=SH(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Hg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=jH:-c>=jH),f=c>0?c%jH:c%jH+jH,p=!1;p=d?!0:!pi(u)&&f>=AH==!!l;var m=e+n*kH(a),h=t+r*OH(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*MH);if(d){var _=1/this._p,v=(l?1:-1)*(jH-_);this._add(`A`,n,r,g,1,+l,e+n*kH(a+v),t+r*OH(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*kH(o),b=t+r*OH(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function Rae(e){return``}function BH(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return Lae(i,a)+(i===`style`?o||``:_h(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+Rae(i)}return r(e)}function zae(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=R(de(e),function(t){return t+i+R(de(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(de(t),function(e){return`@keyframes `+e+i+R(de(t[e]),function(n){return n+i+R(de(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function VH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function HH(e,t,n,r){return zH(`svg`,`root`,{width:e,height:t,xmlns:IH,"xmlns:xlink":LH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var Bae=0;function UH(){return Bae++}var WH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},GH=`transform-origin`;function Vae(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new NH;return i.reset(Oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Hae(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[GH]=n+`px `+r+`px`)}var Uae={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function KH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Wae(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=VH(n.zrId);t.animation=!0,JH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=de(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=KH(i,n);return a.replace(o,s)}}function qH(e){return B(e)?WH[e]?`cubic-bezier(`+WH[e]+`)`:Rr(e)?e:``:``}function JH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Fd){var s=Wae(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return KH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+UH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function Gae(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};YH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=li(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),YH(r,t,n,!0)}}}function YH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+UH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var XH=Math.round;function ZH(e){return e&&B(e.src)}function QH(e){return e&&he(e.toDataURL)}function $H(e,t,n,r){Nae(function(i,a){var o=i===`fill`||i===`stroke`;o&&Ei(a)?sU(t,e,i,r):o&&Ci(a)?cU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),Qae(n,e,r)}function eU(e,t){var n=$te(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[Iae+`silent`]=`true`))}function tU(e){return pi(e[0]-1)&&pi(e[1])&&pi(e[2])&&pi(e[3]-1)}function Kae(e){return pi(e[4])&&pi(e[5])}function nU(e,t,n){if(t&&!(Kae(t)&&tU(t))){var r=n?10:1e4;e.transform=tU(t)?`translate(`+XH(t[4]*r)/r+` `+XH(t[5]*r)/r+`)`:gi(t)}}function rU(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ke(f,g),ke(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=ht(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=zH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=N(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ki(i);x&&(o.patternTransform=x);var S=zH(`pattern`,``,o,[d]),C=BH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=zH(`pattern`,T,o,[d])),t[n]=Di(T)}}function $ae(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=zH(`clipPath`,a,o,[aU(e,n)])}t[`clip-path`]=Di(a)}function lU(e){return document.createTextNode(e)}function uU(e,t,n){e.insertBefore(t,n)}function dU(e,t){e.removeChild(t)}function fU(e,t){e.appendChild(t)}function pU(e){return e.parentNode}function mU(e){return e.nextSibling}function hU(e,t){e.textContent=t}var gU=58,eoe=120,toe=zH(``,``);function _U(e){return e===void 0}function vU(e){return e!==void 0}function noe(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function yU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function bU(e){var t,n=e.children,r=e.tag;if(vU(r)){var i=e.elm=RH(r);if(CU(toe,e),z(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,xU(e,m,n,i,c)):SU(e,t,r,a))}function wU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(CU(e,t),_U(t.text)?vU(r)&&vU(i)?r!==i&&roe(n,r,i):vU(i)?(vU(e.text)&&hU(n,``),xU(n,null,i,0,i.length-1)):vU(r)?SU(n,r,0,r.length-1):vU(e.text)&&hU(n,``):e.text!==t.text&&(vU(r)&&SU(n,r,0,r.length-1),hU(n,t.text)))}function ioe(e,t){if(yU(e,t))wU(e,t);else{var n=e.elm,r=pU(n);bU(t),r!==null&&(uU(r,t.elm,mU(n)),SU(r,[e],0,0))}return t}var aoe=0,ooe=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=soe(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+aoe++,this._oldVNode=HH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=RH(`svg`);CU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,ioe(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return oU(e,VH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=VH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=coe(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=zH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(de(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(zH(`defs`,`defs`,{},c)),e.animation){var l=zae(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=zH(`style`,`stl`,{},[],l);a.push(u)}}return HH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},BH(this.renderToVNode({animation:Te(e.cssAnimation,!0),emphasis:Te(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Te(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=QT(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var EU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function DU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function OU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${OU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function kU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var AU=c({BIGINT_FORMAT_RANGES:()=>jW,CONSTANT_CATCH:()=>LW,Class:()=>NW,NUMBER_FORMAT_RANGES:()=>AW,aborted:()=>rW,allowsEval:()=>EW,assert:()=>moe,assertEqual:()=>uoe,assertIs:()=>foe,assertNever:()=>poe,assertNotEqual:()=>doe,assignProp:()=>zU,attachSchema:()=>sW,base64ToUint8Array:()=>mW,base64urlToUint8Array:()=>Coe,cached:()=>PU,captureStackTrace:()=>TW,cleanEnum:()=>Soe,cleanRegex:()=>IU,clone:()=>qU,cloneDef:()=>goe,codePointLength:()=>uW,constantCatch:()=>CW,createTransparentProxy:()=>xoe,defineLazy:()=>RU,defineLazyInternal:()=>xW,esc:()=>VU,escapeRegex:()=>KU,explicitlyAborted:()=>iW,extend:()=>QU,finalizeIssue:()=>cW,floatSafeRemainder:()=>LU,getElementAtPath:()=>_oe,getEnumValues:()=>MU,getLengthableOrigin:()=>dW,getParsedType:()=>DW,getSizableOrigin:()=>lW,hexToUint8Array:()=>Toe,hide:()=>vW,installLazyProp:()=>SW,isObject:()=>UU,isPlainObject:()=>WU,issue:()=>pW,joinValues:()=>K,jsonStringifyReplacer:()=>NU,members:()=>gW,merge:()=>eW,mergeDefs:()=>BU,normalizeParams:()=>q,nullish:()=>FU,numKeys:()=>boe,objectClone:()=>hoe,omit:()=>ZU,optionalKeys:()=>YU,own:()=>_W,parsedType:()=>fW,partial:()=>tW,pick:()=>XU,prefixIssues:()=>aW,primitiveTypes:()=>kW,promiseAllObject:()=>voe,propertyKeyTypes:()=>OW,randomString:()=>yoe,required:()=>nW,safeExtend:()=>$U,shallowClone:()=>GU,slugify:()=>HU,stringifyPrimitive:()=>JU,toZod:()=>jU,uint8ArrayToBase64:()=>hW,uint8ArrayToBase64url:()=>woe,uint8ArrayToHex:()=>Eoe,unwrapMessage:()=>oW});function uoe(e){return e}function doe(e){return e}function jU(){return e=>e}function foe(e){}function poe(e){throw Error(`Unexpected value in exhaustive check`)}function moe(e){}function MU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>JU(e)).join(t)}function NU(e,t){return typeof t==`bigint`?t.toString():t}function PU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function FU(e){return e==null}function IU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function LU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function voe(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function xoe(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function JU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function YU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function XU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&zU(e,r,n.shape[r])}return zU(this,`shape`,e),e},checks:[]}))}function ZU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return qU(e,BU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return zU(this,`shape`,r),r},checks:[]}))}function QU(e,t){if(!WU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function $U(e,t){if(!WU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return zU(this,`shape`,n),n}}))}function eW(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return qU(e,BU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return zU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function tW(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return zU(this,`shape`,i),i},checks:[]}))}function nW(e,t,n){return qU(t,BU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return zU(this,`shape`,i),i}}))}function rW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function oW(e){return typeof e==`string`?e:e?.message}function sW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function mW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function gW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):yW(e,n,r.value)}}function _W(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function vW(e,t,n){return _W(e,t,n,!1)}function yW(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:_W(this,t,n.bind(this))},set(e){_W(this,t,e)}})}function bW(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function xW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&PW!==e._zod){PW=void 0;return}PW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,IW);let e=FW;FW=!1;try{let r=n(this);return FW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),FW||=e,r}catch(n){throw delete this[t],FW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function SW(e,t,n,r){let i=bW(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function CW(e){let t=()=>e;return t[LW]=!0,t}var wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,IW,LW,J=o((()=>{JW(),wW=Symbol(`evaluating`),TW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},EW=PU(()=>{if(qW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),DW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},OW=new Set([`string`,`number`,`symbol`]),kW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),AW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},MW=/[\uD800-\uDBFF]/,NW=class{constructor(...e){}},FW=!1,IW={configurable:!0,get(){FW=!0}},LW=`~constantCatch`}));function RW(e){let t=UW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return UW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){HW.value=new a(r);try{Object.defineProperty(n,"_zod",HW)}finally{HW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),gW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?RW(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function zW(e){return e&&Object.assign(qW,e),qW}var BW,VW,HW,UW,WW,GW,KW,qW,JW=o((()=>{J(),VW=Object.freeze({status:`aborted`}),HW={value:void 0,enumerable:!1},UW=`captureStackTrace`in Error?Error:null,WW=Symbol(`zod_brand`),GW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},KW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(BW=globalThis).__zod_globalConfig??(BW.__zod_globalConfig={}),qW=globalThis.__zod_globalConfig}));function YW(){let e=this._zod;return e.message??=JSON.stringify(e.def,NU,2),e.message}function XW(e){this._zod.message=e}function ZW(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function QW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ZW(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function $W(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function nG(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${tG(e.path)}`);return t.join(` -`)}var rG,iG,aG,oG,sG,cG,lG,uG=o((()=>{JW(),J(),rG={get:YW,set:XW,enumerable:!0,configurable:!0},iG={value:void 0,enumerable:!1},aG={value:void 0,enumerable:!1},oG=new WeakSet([Object.prototype,Error.prototype]),sG=(e,t)=>{e.name=`$ZodError`,iG.value=e._zod,Object.defineProperty(e,"_zod",iG),aG.value=t,Object.defineProperty(e,"issues",aG),iG.value=void 0,aG.value=void 0,Object.defineProperty(e,"message",rG);let n=Object.getPrototypeOf(e);oG.has(n)||(oG.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},cG=Y(`$ZodError`,sG),lG=Y(`$ZodError`,sG,void 0,{Parent:Error})}));function dG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function fG(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[SG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new GW;return a.issues.length===0}var pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG,VG=o((()=>{JW(),uG(),J(),pG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new GW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cW(e,o,zW())));throw TW(n,a?.callee??t),n}return s.value};return t},mG=pG(lG),hG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>cW(e,o,zW())));throw TW(n,a?.callee??t),n}return s.value};return t},gG=hG(lG),_G=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new GW;return a.issues.length?{success:!1,error:new(e??cG)(a.issues.map(e=>cW(e,i,zW())))}:{success:!0,data:a.value}},vG=_G(lG),yG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>cW(e,i,zW())))}:{success:!0,data:a.value}},bG=yG(lG),xG=Symbol.for(`zod.compile.invalid`),SG=Symbol.for(`zod.compile.fallback`),CG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==xG||fG(e,t,n)}),wG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},TG=e=>{let t=pG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,dG(n,a))};return n},EG=TG(lG),DG=e=>{let t=pG(e),n=(e,r,i,a)=>t(e,r,i,dG(n,a));return n},OG=DG(lG),kG=e=>{let t=hG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,dG(n,a))};return n},AG=kG(lG),jG=e=>{let t=hG(e),n=async(e,r,i,a)=>await t(e,r,i,dG(n,a));return n},MG=jG(lG),NG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return _G(e)(t,n,i)},PG=NG(lG),FG=e=>(t,n,r)=>_G(e)(t,n,r),IG=FG(lG),LG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return yG(e)(t,n,i)},RG=LG(lG),zG=e=>async(t,n,r)=>yG(e)(t,n,r),BG=zG(lG)})),HG=c({base64:()=>SK,base64url:()=>CK,bigint:()=>MK,boolean:()=>FK,browserEmail:()=>hK,cidrv4:()=>bK,cidrv6:()=>xK,creditCard:()=>OK,cuid:()=>ZG,cuid2:()=>QG,date:()=>AK,datetime:()=>JG,domain:()=>TK,duration:()=>rK,e164:()=>DK,email:()=>uK,emoji:()=>WG,extendedDuration:()=>iK,guid:()=>aK,hex:()=>BK,hostname:()=>wK,html5Email:()=>dK,httpProtocol:()=>EK,idnEmail:()=>mK,integer:()=>NK,ipv4:()=>_K,ipv6:()=>vK,ksuid:()=>tK,lowercase:()=>RK,mac:()=>yK,md5_base64:()=>HK,md5_base64url:()=>UK,md5_hex:()=>VK,nanoid:()=>nK,nanoidOfLength:()=>UG,null:()=>IK,number:()=>PK,rfc5322Email:()=>fK,sha1_base64:()=>GK,sha1_base64url:()=>KK,sha1_hex:()=>WK,sha256_base64:()=>JK,sha256_base64url:()=>YK,sha256_hex:()=>qK,sha384_base64:()=>ZK,sha384_base64url:()=>QK,sha384_hex:()=>XK,sha512_base64:()=>eq,sha512_base64url:()=>tq,sha512_hex:()=>$K,string:()=>jK,time:()=>qG,ulid:()=>$G,undefined:()=>LK,unicodeEmail:()=>pK,uppercase:()=>zK,uuid:()=>oK,uuid4:()=>sK,uuid6:()=>cK,uuid7:()=>lK,xid:()=>eK});function UG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function WG(){return new RegExp(gK,`u`)}function GG(e){return RegExp(`^${e}$`)}function KG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function qG(e){return RegExp(`^${KG(e)}$`)}function JG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${KG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${KG({precision:e.precision})}`:n;return RegExp(`^${kK}T(?:${r})$`)}function YG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function XG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq,nq=o((()=>{J(),ZG=/^[cC][0-9a-z]{6,}$/,QG=/^[0-9a-z]+$/,$G=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,eK=/^[0-9a-vA-V]{20}$/,tK=/^[A-Za-z0-9]{27}$/,nK=/^[a-zA-Z0-9_-]{21}$/,rK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,iK=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,aK=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,oK=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,sK=oK(4),cK=oK(6),lK=oK(7),uK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,dK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,fK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,pK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,mK=pK,hK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,gK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,_K=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,yK=e=>{let t=KU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},bK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,xK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,SK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,CK=/^[A-Za-z0-9_-]*$/,wK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,TK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,EK=/^https?$/,DK=/^\+[1-9]\d{6,14}$/,OK=/^\d(?:[ -]?\d){11,18}$/,kK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,AK=GG(kK),jK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},MK=/^-?\d+n?$/,NK=/^-?\d+$/,PK=/^-?\d+(?:\.\d+)?$/,FK=/^(?:true|false)$/i,IK=/^null$/i,LK=/^undefined$/i,RK=/^[^A-Z]*$/,zK=/^[^a-z]*$/,BK=/^[0-9a-fA-F]*$/,VK=/^[0-9a-fA-F]{32}$/,HK=YG(22,`==`),UK=XG(22),WK=/^[0-9a-fA-F]{40}$/,GK=YG(27,`=`),KK=XG(27),qK=/^[0-9a-fA-F]{64}$/,JK=YG(43,`=`),YK=XG(43),XK=/^[0-9a-fA-F]{96}$/,ZK=YG(64,``),QK=XG(64),$K=/^[0-9a-fA-F]{128}$/,eq=YG(86,`==`),tq=XG(86)}));function rq(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues))}var iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq,kq=o((()=>{JW(),nq(),J(),iq=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),aq=e=>{let t=e.value;return!FU(t)&&t.size!==void 0},oq=e=>{let t=e.value;return!FU(t)&&t.length!==void 0},sq={number:`number`,bigint:`bigint`,object:`date`},cq=Y(`$ZodCheckLessThan`,(e,t)=>{iq.init(e,t);let n=sq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{iq.init(e,t);let n=sq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:sq[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),uq=Y(`$ZodCheckMultipleOf`,(e,t)=>{iq.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):LU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),dq=Y(`$ZodCheckNumberFormat`,(e,t)=>{iq.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=AW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=NK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),fq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{iq.init(e,t);let[n,r]=jW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:lW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:lW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:lW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=oq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?uW(r):i)<=t.maximum)return;let a=dW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_q=Y(`$ZodCheckMinLength`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=oq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=dW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),vq=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;iq.init(e,t),(n=e._zod.def).when??(n.when=oq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?uW(r):i;if(a===t.length)return;let o=dW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),yq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;iq.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),bq=Y(`$ZodCheckRegex`,(e,t)=>{yq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),xq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=RK,yq.init(e,t)}),Sq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=zK,yq.init(e,t)}),Cq=Y(`$ZodCheckIncludes`,(e,t)=>{iq.init(e,t);let n=KU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),wq=Y(`$ZodCheckStartsWith`,(e,t)=>{iq.init(e,t);let n=RegExp(`^${KU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Tq=Y(`$ZodCheckEndsWith`,(e,t)=>{iq.init(e,t);let n=RegExp(`.*${KU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Eq=Y(`$ZodCheckProperty`,(e,t)=>{iq.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>rq(n,e,t.property));rq(n,e,t.property)}}),Dq=Y(`$ZodCheckMimeType`,(e,t)=>{iq.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Oq=Y(`$ZodCheckOverwrite`,(e,t)=>{iq.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Aq,jq=o((()=>{Aq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`).replace(zd,``)}function Vd(e,t){return t=Bd(t),Bd(e)===t}function Hd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||Bt(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&Bt(e,``+r);break;case`className`:wt(e,`class`,r);break;case`tabIndex`:wt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:wt(e,n,r);break;case`style`:Ut(e,r,o);break;case`data`:if(t!==`object`){wt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&Hd(e,t,`name`,a.name,a,null),Hd(e,t,`formEncType`,a.formEncType,a,null),Hd(e,t,`formMethod`,a.formMethod,a,null),Hd(e,t,`formTarget`,a.formTarget,a,null)):(Hd(e,t,`encType`,a.encType,a,null),Hd(e,t,`method`,a.method,a,null),Hd(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=qt(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=Jt);break;case`onScroll`:r!=null&&Od(`scroll`,e);break;case`onScrollEnd`:r!=null&&Od(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=qt(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Od(`beforetoggle`,e),Od(`toggle`,e),Ct(e,`popover`,r);break;case`xlinkActuate`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Tt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Tt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Ct(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2s)break;var u=c.transferSize,d=c.initiatorType;u&&Kd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function jf(e,t,n){var r=Af;if(r&&typeof t==`string`&&t){var i=Nt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Tf.has(i)||(Tf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Wd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Mf(e){Df.D(e),jf(`dns-prefetch`,e,null)}function Nf(e,t){Df.C(e,t),jf(`preconnect`,e,t)}function Pf(e,t,n){Df.L(e,t,n);var r=Af;if(r&&e&&t){var i=`link[rel="preload"][as="`+Nt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Nt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Nt(n.imageSizes)+`"]`)):i+=`[href="`+Nt(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}wf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),wf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Wd(t,`link`,e),mt(t),r.head.appendChild(t)))}}function Ff(e,t){Df.m(e,t);var n=Af;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Nt(r)+`"][href="`+Nt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!wf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),wf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Wd(r,`link`,e),mt(r),n.head.appendChild(r)}}}function If(e,t,n){Df.S(e,t,n);var r=Af;if(r&&e){var i=pt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=wf.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);mt(c),Wd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Lf(e,t){Df.X(e,t);var n=Af;if(n&&e){var r=pt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),mt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){Df.M(e,t);var n=Af;if(n&&e){var r=pt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=wf.get(i))&&Yf(e,t),a=n.createElement(`script`),mt(a),Wd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=oe.current)?Ef(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=pt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),wf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},wf.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=pt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Nt(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Wd(t,`link`,n),mt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Nt(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Nt(n.href)+`"]`);if(r)return t.instance=r,mt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),mt(r),Wd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,mt(o),o;r=Hf(n),(a=wf.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Wd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,mt(a),a):(r=n,(a=wf.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),mt(a),Wd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,mt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=wf.get(i))&&Jf(r,i),a=a.createElement(`link`),mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Wd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=UR()}))(),GR=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],KR=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],qR=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],JR=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],YR=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],XR=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],ZR={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},QR={micro:11,small:12,body:14,title:16,section:22,page:32},$R={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},ez={brand:KR,ok:qR,warn:JR,bad:YR,info:XR},tz={light:7,dark:5};function nz(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function rz(e){let t=nz(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function iz(e){return Object.fromEntries(Object.entries(ez).map(([t,n])=>[`--fanout-color-${t}-contrast`,rz(n[tz[e]])]))}function az(e){return t=>{let n=t.color??cz.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(ez,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var oz=.25,sz={xs:9,sm:10,md:11,lg:13,xl:16},cz={primaryColor:`brand`,primaryShade:tz,autoContrast:!0,luminanceThreshold:oz,colors:{dark:GR,brand:KR,ok:qR,warn:JR,bad:YR,info:XR},defaultRadius:`md`,fontFamily:$R.body,fontFamilyMonospace:$R.display,headings:{fontFamily:$R.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:dz(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:dz(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:uz(t.size)})}}},lz=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":ZR.light.muted,...iz(`light`)},dark:iz(`dark`)});function uz(e){let t=sz[e??`md`];return t===void 0||t>=QR.micro?{}:{"--badge-fz":`${QR.micro/16}rem`}}function dz(e,t){return!e||e===cz.primaryColor?{[t]:`var(--fanout-color-${cz.primaryColor}-contrast)`}:{}}var fz=Lie({...cz,variantColorResolver:az(BA)});function pz({dark:e,children:t}){return(0,G.jsx)(uj,{theme:fz,cssVariablesResolver:lz,forceColorScheme:e?`dark`:`light`,children:(0,G.jsx)(qF,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function mz({title:e,summary:t,onRefresh:n,disabled:r}){return(0,G.jsxs)(kI,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,G.jsxs)(Qj,{miw:0,children:[(0,G.jsx)(ER,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,G.jsx)(LI,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,G.jsx)(LL,{label:`Refresh this view`,children:(0,G.jsx)(yI,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,G.jsx)(PR,{size:15,weight:`bold`})})})]})}function hz({error:e,loading:t,retry:n}){return e?(0,G.jsx)(MI,{color:`bad`,m:`md`,radius:`md`,children:(0,G.jsxs)(kI,{justify:`space-between`,children:[(0,G.jsx)(LI,{size:`sm`,children:e}),n&&(0,G.jsx)(YI,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,G.jsxs)(ZI,{mih:160,p:`xl`,children:[(0,G.jsx)(fI,{size:`sm`}),(0,G.jsx)(LI,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function gz({active:e,items:t,onChange:n}){return(0,G.jsx)(VF,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,G.jsx)(gR,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,G.jsx)(gR.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,G.jsx)(gR.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,G.jsx)(BI,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function _z({icon:e,title:t,children:n,tall:r=!1}){return(0,G.jsx)(ZI,{mih:r?220:130,p:`xl`,children:(0,G.jsxs)(kI,{wrap:`nowrap`,children:[(0,G.jsx)(yR,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,G.jsxs)(Qj,{children:[(0,G.jsx)(LI,{fw:700,size:`sm`,children:t}),(0,G.jsx)(LI,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function vz({left:e,right:t}){return(0,G.jsxs)(kI,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsx)(LI,{c:`dimmed`,size:`xs`,children:e}),(0,G.jsx)(LI,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function yz(e,t=8){let[n,r]=(0,W.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,W.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}var bz={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`};function xz({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,G.jsxs)(kI,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,G.jsxs)(LI,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,G.jsx)(CL,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`,getItemProps:e=>({"aria-label":`Page ${e}`}),getControlProps:e=>({"aria-label":bz[e]})})]})}function Sz(e){return ZR[e?`dark`:`light`]}function Cz(e){let t=e?5:7;return{ok:qR[t],warn:JR[t],bad:YR[t],info:XR[t]}}function wz(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function Tz(e){return e===`unknown`?`dashed`:`solid`}function Ez(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}var Dz=Mc(),Oz=N,kz=pe,Az=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Xu,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=me(jz,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}Fz(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&Ey(r).w>o)return!0;if(a){var s=cD(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=Dz(e).pointerEl=new sf[i.type](Oz(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=Dz(e).labelEl=new rs(Oz(t.label));e.add(i),Nz(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=Dz(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=Dz(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),Nz(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=Mf(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){px(e.event)},onmousedown:kz(this._onHandleDragMove,this,0,0),drift:kz(this._onHandleDragMove,this),ondragend:kz(this._onHandleDragEnd,this)}),n.add(r)),Fz(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);z(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Xb(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){jz(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Pz(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(Pz(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(Pz(r)),Dz(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Zb(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function jz(e,t,n,r){Mz(Dz(n).lastProp,r)||(Dz(n).lastProp=r,t?$d(n,r,e):(n.stopAnimation(),n.attr(r)))}function Mz(e,t){if(ve(e)&&ve(t)){var n=!0;return L(t,function(t,r){n&&=Mz(e[r],t)}),!!n}return e===t}function Nz(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function Pz(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function Fz(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function Iz(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function Lz(e,t,n,r,i){var a=zz(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=mg(o.get(`padding`)||0),c=o.getFont(),l=Tn(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),Rz(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:op(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function Rz(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function zz(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:Uv(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};L(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),B(o)?a=o.replace(`{value}`,a):he(o)&&(a=o(s))}return a}function Bz(e,t,n){var r=vt();return Ct(r,r,n.rotation),St(r,r,n.position),Tf([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function Vz(e,t,n,r,i,a){var o=ub.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),Lz(t,r,i,a,{position:Bz(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Hz(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function Uz(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function Wz(e,t,n){return Ey(e,{fromStat:{sers:R(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function Gz(e,t,n){return[xs(bs(t[0],t[1]),e-n/2),bs(e+n/2,xs(t[0],t[1]))]}var Kz=function(e){p(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=qz(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=Iz(r),f=Jz[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}Vz(t,e,xb(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=xb(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=Bz(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=qz(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=bs(o[1],l[c]),l[c]=xs(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(Az);function qz(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var Jz={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:Hz([t,r[0]],[t,r[1]],Yz(e))}},shadow:function(e,t,n,r,i,a){var o=Wz(e,i,a),s=r[1]-r[0],c=Gz(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:Uz([l,r[0]],[u-l,s],Yz(e))}}};function Yz(e){return e.dim===`x`?0:1}var Xz=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:V.color.border,width:1,type:`dashed`},shadowStyle:{color:V.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:V.color.neutral00,padding:[5,7,5,7],backgroundColor:V.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:V.color.accent40,throttle:40}},t}(Lg),Zz=Mc(),Qz=L;function $z(e,t,n){if(!Ge.node){var r=t.getZr();Zz(r).records||(Zz(r).records={}),eB(r,t);var i=Zz(r).records[e]||(Zz(r).records[e]={});i.handler=n}}function eB(e,t){if(Zz(e).initialized)return;Zz(e).initialized=!0,n(`click`,me(rB,`click`)),n(`mousemove`,me(rB,`mousemove`)),n(`mousewheel`,me(rB,`mousewheel`)),n(`globalout`,nB);function n(n,r){e.on(n,function(n){var i=iB(t);Qz(Zz(e).records,function(e){e&&r(e,n,i.dispatchAction)}),tB(i.pendings,t)})}}function tB(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function nB(e,t,n){e.handler(`leave`,null,n)}function rB(e,t,n,r){t.handler(e,n,r)}function iB(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function aB(e,t){if(!Ge.node){var n=t.getZr();(Zz(n).records||{})[e]&&(Zz(n).records[e]=null)}}var oB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;$z(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){aB(`axisPointer`,t)},t.prototype.dispose=function(e,t){aB(`axisPointer`,t)},t.type=`axisPointer`,t}(ZS);function sB(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=jc(a,e);if(o==null||o<0||z(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(R(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var cB=Mc();function lB(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||pe(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){yB(i)&&(i=sB({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=yB(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||yB(i),f={},p={},m={list:[],map:{}},h={showPointer:me(fB,p),showTooltip:me(pB,m)};L(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);L(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=_B(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&uB(e,o,h,!1,f)}})});var g={};return L(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&L(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,vB(t),vB(e)))),g[e.key]=a}})}),L(g,function(e,t){uB(u[t],e,h,!0,f)}),mB(p,u,f),hB(m,i,e,o),gB(u,o,n),f}}function uB(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=dB(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&F(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function dB(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return L(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(nc(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),L(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function fB(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function pB(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=dD(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function mB(e,t,n){var r=n.axesInfo=[];L(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function hB(e,t,n,r){if(yB(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function gB(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=cB(r)[i]||{},o=cB(r)[i]={};L(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&L(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}L(a,function(e,t){!o[t]&&c.push(l(e))}),L(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function _B(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function vB(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function yB(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function bB(e){pD.registerAxisPointerClass(`CartesianAxisPointer`,Kz),e.registerComponentModel(Xz),e.registerComponentView(oB),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=tD(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},lB)}function xB(e){vE(wD),vE(bB)}function SB(e,t){var n=mg(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new Qo({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var CB=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:V.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:V.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:V.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:V.color.tertiary,fontSize:14}},t}(Lg);function wB(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function TB(e){if(Ge.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function FB(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ge.transformSupported?``+jB+i:`,left`+i+`,top`+i)),AB+`:`+a}function IB(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ge.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ge.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+jB+`:`+o+`;`:[[`top`,0],[`left`,0],[EB,o]]}function LB(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Te(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),L([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function RB(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=P_(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(FB(a,n,r)),o&&i.push(`background-color:`+o),L([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=pg(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(LB(d)),f!=null&&i.push(`padding:`+mg(f).join(`px `)+`px`),i.join(`;`)+`;`}function zB(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&fh(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var BB=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ge.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(B(i)?document.querySelector(i):xe(i)?i:he(i)&&i(e.getDom()));zB(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;lx(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=kB(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=MB+RB(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+IB(i[0],i[1],!0)+(`border-color:`+bg(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(B(i)&&n.get(`trigger`)===`item`&&!wB(n)&&(o=PB(n,r,i)),B(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,z(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ge.node&&n.getDom()){var i=JB(r,n);this._ticket=``;var a=r.dataByCoordSys,o=$B(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=GB;c.x=r.x,c.y=r.y,c.update(),sl(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=sB(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(JB(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&qB([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(sl(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;IC(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(sl(e).dataIndex==null?sl(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=pe(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=qB([t.tooltipOption],r),o=this._renderMode,s=[],c=b_(`section`,{blocks:[],noHeader:!0}),l=[],u=new F_;L(e,function(e){L(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=zz(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=b_(`section`,{header:f,noHeader:!Ae(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),L(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=Uv(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,bg(m.color),o);var h=Jg(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=qB([a],r).get(`valueFormatter`);p.blocks.push(_?F({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=E_(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` + +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=sl(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=qB([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new F_;h.marker=g.makeTooltipMarker(`item`,bg(h.color),d);var _=Jg(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?E_(y?F({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=sl(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(B(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=N(a),a.content=_h(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=qB(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new F_;this._showOrMove(d,function(){var n=N(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(B(u)){var p=e.ecModel.get(`useUTC`),m=z(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=Xh(m.axisValue,d,p)),d=vg(d,n,!0)}else if(he(u)){var g=pe(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||z(t))return{color:r||i};if(!z(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),he(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),z(t))n=Ms(t[0],s),r=Ms(t[1],c);else if(ve(t)){var p=t;p.width=l[0],p.height=l[1];var m=Dg(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(B(t)&&o){var h=ZB(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=YB(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=QB(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=QB(d)?l[1]/2:d===`bottom`?l[1]:0),wB(e)){var h=XB(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&L(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&L(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&L(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&L(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ge.node&&t.getDom()&&(Zb(this,`_updatePosition`),this._tooltipContent.dispose(),aB(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(ZS);function qB(e,t,n){var r=t.ecModel,i;n?(i=new Dp(n,r,r),i=new Dp(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof Dp&&(o=o.get(`tooltip`,!0)),B(o)&&(o={formatter:o}),o&&(i=new Dp(o,i,r)))}return i}function JB(e,t){return e.dispatchAction||pe(t.dispatchAction,t)}function YB(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function XB(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function ZB(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function QB(e){return e===`center`||e===`middle`}function $B(e,t,n){var r=Fc(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Lc(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=sl(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function eV(e){vE(bB),e.registerComponentModel(CB),e.registerComponentView(KB),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},He),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},He)}var tV=L;function nV(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function rV(e,t,n){var r={};return tV(t,function(t){var a=r[t]=i();tV(e[t],function(e,r){if(FO.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new FO(i),r===`opacity`&&(i=N(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new FO(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function iV(e,t,n){var r;L(n,function(e){t.hasOwnProperty(e)&&nV(t[e])&&(r=!0)}),r&&L(n,function(n){t.hasOwnProperty(n)&&nV(t[n])?e[n]=N(t[n]):delete e[n]})}function aV(e,t,n,r){var i={};return L(e,function(e){i[e]=FO.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return NC(a,l,e)}function c(e,t){FC(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var oV=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},sV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),z(t)&&L(t,function(e,r){B(e)&&(e={type:e}),t[r]=P(e,oV(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:V.size.m,align:`auto`,backgroundColor:V.color.transparent,borderColor:V.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:V.color.disabled,inactiveBorderColor:V.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:V.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:V.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:V.color.tertiary,borderWidth:1,borderColor:V.color.border},emphasis:{selectorLabel:{show:!0,color:V.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(Lg),cV=me,lV=L,uV=Xu,dV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new uV),this.group.add(this._selectorGroup=new uV),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=Ag(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=Dg(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=Dg(I({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=SB(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=Re(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),lV(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new uV;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,cV(mV,f,null,r,d)).on(`mouseover`,cV(hV,m.name,null,r,d)).on(`mouseout`,cV(gV,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=sl(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=$r(h.fill);_&&_[3]===0&&(_[3]=.2,h=F(F({},h),{fill:oi(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,cV(mV,null,f,r,d)).on(`mouseover`,cV(hV,null,f,r,d)).on(`mouseout`,cV(gV,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=sl(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};sl(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();lV(e,function(e){var r=e.type,i=new rs({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),ip(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),hu(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=fV(c,r,o,s,d,m,u),y=new uV,b=r.getModel(`textStyle`);if(he(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(pV({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;B(w)&&w?T=w.replace(`{name}`,t??``):he(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new rs({style:op(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new Qo({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Bf({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),hu(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();Tg(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){Tg(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(ZS);function fV(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),lV(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:Mw(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function pV(e){var t=e.icon||`roundRect`,n=q_(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=V.color.neutral00,n.style.lineWidth=2),n}function mV(e,t,n,r){gV(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),hV(e,t,n,r)}function hV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function gV(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function _V(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),vV(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){L(i,function(t,n){e[t?`select`:`unSelect`](n)}),vV(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function vV(e,t){var n=t||{};return L(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=Ve(n,r)?n[r]&&i:i}}),n}function yV(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,me(_V,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,me(_V,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,me(_V,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,me(_V,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,me(_V,`unSelect`))}var bV=ol(xV);function xV(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Te(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new Qo({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&$d(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;L([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,B(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=EV[i],o=DV[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(dV);function kV(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function AV(e){vE(SV),e.registerComponentModel(CV),e.registerComponentView(OV),kV(e)}function jV(e){vE(SV),vE(AV)}var MV={get:function(e,t,n){var r=N((NV[e]||{})[t]);return n&&z(r)?r[r.length-1]:r}},NV={color:{active:[`#006edd`,`#e0ffff`],inactive:[V.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},PV=FO.mapVisual,FV=FO.eachVisual,IV=z,LV=L,RV=Rs,zV=js,BV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&iV(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=pe(e,this),this.controllerVisuals=rV(this.option.controller,t,e),this.targetVisuals=rV(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return LV(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Lc(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return R(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){L(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],z(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(B(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(he(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=RV([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=ue(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};P(r,n),P(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){IV(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},LV(r,function(e,t){if(FO.isValidType(t)){var n=MV.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;LV(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&N(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&N(n)||(a?s[0]:[s[0],s[0]])),c.symbol=PV(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;FV(l,function(e){e>u&&(u=e)}),c.symbolSize=PV(l,function(e){return zV(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:V.color.transparent,borderColor:V.color.borderTint,contentColor:V.color.theme[0],inactiveColor:V.color.disabled,borderWidth:0,padding:V.size.m,textGap:10,precision:0,textStyle:{color:V.color.secondary}},t}(Lg),VV=[20,140],HV=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=VV[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=VV[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):z(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),L(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Rs((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=UV(this,`outOfRange`,this.getExtent()),n=UV(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Xu(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);YV([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=JV(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=Tf(n.handleLabelPoints[l],wf(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=JV(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=Tf(c.indicatorLabelPoint,wf(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||rH(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=Ac(u,d);this._dispatchHighDown(`downplay`,qV(f[0],n)),this._dispatchHighDown(`highlight`,qV(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(IC(e.target,function(e){var n=sl(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function cH(e,t,n,r){for(var i=t.targetVisuals[r],a=FO.prepareVisualTypes(i),o={color:PC(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(aH,oH),L(sH,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(uH))}function mH(e){e.registerComponentModel(HV),e.registerComponentView(eH),pH(e)}var hH=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],gH[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=N(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=R(this._pieceList,function(e){return e=N(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=FO.listVisualTypes(),i=this.isCategory();L(t.pieces,function(e){L(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),L(n,function(e,n){var r=!1;L(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&L(this.stateList,function(e){(t[e]||(t[e]={}))[n]=MV.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,L(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;L(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=N(e)},t.prototype.getValueState=function(e){var t=FO.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){FO.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return L(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=sh(BV.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(BV),gH={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function _H(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var vH=function(e){p(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=we(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),L(o.viewPieceList,function(o){var s=o.piece,u=new Xu;u.onclick=pe(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new rs({style:op(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Te(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),Tg(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:qV(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return KV(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Xu,o=this.visualMapModel.textStyleModel;a.add(new rs({style:op(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=R(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=q_(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=N(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,L(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(WV);function yH(e){e.registerComponentModel(hH),e.registerComponentView(vH),pH(e)}function bH(e){vE(mH),vE(yH)}var xH={label:{enabled:!0},decal:{show:!1}},SH=Mc(),CH=Mc(),wH=ol(TH);function TH(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=CH(e).scope||(CH(e).scope={}),i=N(xH);P(i.label,e.getLocaleModel().get(`aria`),!1),P(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=Re();e.eachSeries(function(e){e.isColorBySeries()||(SH(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(he(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=Hg(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=SH(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=Hg(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?F(F({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=I(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=jH:-c>=jH),f=c>0?c%jH:c%jH+jH,p=!1;p=d?!0:!pi(u)&&f>=AH==!!l;var m=e+n*kH(a),h=t+r*OH(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*Aae);if(d){var _=1/this._p,v=(l?1:-1)*(jH-_);this._add(`A`,n,r,g,1,+l,e+n*kH(a+v),t+r*OH(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*kH(o),b=t+r*OH(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function Bae(e){return``}function zH(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return zae(i,a)+(i===`style`?o||``:_h(o))+(t?``+n+R(t,function(e){return r(e)}).join(n)+n:``)+Bae(i)}return r(e)}function Vae(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=R(de(e),function(t){return t+i+R(de(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=R(de(t),function(e){return`@keyframes `+e+i+R(de(t[e]),function(n){return n+i+R(de(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function BH(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function VH(e,t,n,r){return RH(`svg`,`root`,{width:e,height:t,xmlns:FH,"xmlns:xlink":IH,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var Hae=0;function HH(){return Hae++}var UH={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},WH=`transform-origin`;function Uae(e,t,n){var r=F({},e.shape);F(r,t),e.buildPath(n,r);var i=new MH;return i.reset(Oi(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function Wae(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[WH]=n+`px `+r+`px`)}var Gae={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function GH(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function Kae(e,t,n){var r=e.shape.paths,i={},a,o;if(L(r,function(e){var t=BH(n.zrId);t.animation=!0,qH(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=de(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=GH(i,n);return a.replace(o,s)}}function KH(e){return B(e)?UH[e]?`cubic-bezier(`+UH[e]+`)`:Rr(e)?e:``:``}function qH(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof Fd){var s=Kae(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return GH(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+HH();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function qae(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};JH(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=li(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),JH(r,t,n,!0)}}}function JH(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+HH(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var YH=Math.round;function XH(e){return e&&B(e.src)}function ZH(e){return e&&he(e.toDataURL)}function QH(e,t,n,r){Fae(function(i,a){var o=i===`fill`||i===`stroke`;o&&Ei(a)?oU(t,e,i,r):o&&Ci(a)?sU(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),eoe(n,e,r)}function $H(e,t){var n=ene(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[Rae+`silent`]=`true`))}function eU(e){return pi(e[0]-1)&&pi(e[1])&&pi(e[2])&&pi(e[3]-1)}function Jae(e){return pi(e[4])&&pi(e[5])}function tU(e,t,n){if(t&&!(Jae(t)&&eU(t))){var r=n?10:1e4;e.transform=eU(t)?`translate(`+YH(t[4]*r)/r+` `+YH(t[5]*r)/r+`)`:gi(t)}}function nU(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ke(f,g),ke(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=ht(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=RH(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=N(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=ki(i);x&&(o.patternTransform=x);var S=RH(`pattern`,``,o,[d]),C=zH(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=RH(`pattern`,T,o,[d])),t[n]=Di(T)}}function toe(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=RH(`clipPath`,a,o,[iU(e,n)])}t[`clip-path`]=Di(a)}function cU(e){return document.createTextNode(e)}function lU(e,t,n){e.insertBefore(t,n)}function uU(e,t){e.removeChild(t)}function dU(e,t){e.appendChild(t)}function fU(e){return e.parentNode}function pU(e){return e.nextSibling}function mU(e,t){e.textContent=t}var hU=58,noe=120,roe=RH(``,``);function gU(e){return e===void 0}function _U(e){return e!==void 0}function ioe(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function vU(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function yU(e){var t,n=e.children,r=e.tag;if(_U(r)){var i=e.elm=LH(r);if(SU(roe,e),z(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,bU(e,m,n,i,c)):xU(e,t,r,a))}function CU(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(SU(e,t),gU(t.text)?_U(r)&&_U(i)?r!==i&&aoe(n,r,i):_U(i)?(_U(e.text)&&mU(n,``),bU(n,null,i,0,i.length-1)):_U(r)?xU(n,r,0,r.length-1):_U(e.text)&&mU(n,``):e.text!==t.text&&(_U(r)&&xU(n,r,0,r.length-1),mU(n,t.text)))}function ooe(e,t){if(vU(e,t))CU(e,t);else{var n=e.elm,r=fU(n);yU(t),r!==null&&(lU(r,t.elm,pU(n)),xU(r,[e],0,0))}return t}var soe=0,coe=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=loe(`configLayer`),this.storage=t,this._opts=n=F({},n),this.root=e,this._id=`zr`+soe++,this._oldVNode=VH(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=LH(`svg`);SU(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,ooe(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return aU(e,BH(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=BH(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=uoe(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=RH(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=R(de(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(RH(`defs`,`defs`,{},c)),e.animation){var l=Vae(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=RH(`style`,`stl`,{},[],l);a.push(u)}}return VH(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},zH(this.renderToVNode({animation:Te(e.cssAnimation,!0),emphasis:Te(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Te(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!i.current)return;let e=QT(i.current,void 0,{renderer:`svg`});a.current=e,e.on(`click`,e=>o.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(i.current),()=>{t.disconnect(),e.dispose(),a.current=null}},[]),(0,W.useEffect)(()=>{a.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,G.jsx)(`div`,{ref:i,className:`echart`,style:{height:t},role:`img`,"aria-label":n})}var TU=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function EU(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function DU(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${DU(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function OU(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var kU=c({BIGINT_FORMAT_RANGES:()=>AW,CONSTANT_CATCH:()=>IW,Class:()=>MW,NUMBER_FORMAT_RANGES:()=>kW,aborted:()=>nW,allowsEval:()=>TW,assert:()=>goe,assertEqual:()=>foe,assertIs:()=>moe,assertNever:()=>hoe,assertNotEqual:()=>poe,assignProp:()=>RU,attachSchema:()=>oW,base64ToUint8Array:()=>pW,base64urlToUint8Array:()=>Toe,cached:()=>NU,captureStackTrace:()=>wW,cleanEnum:()=>woe,cleanRegex:()=>FU,clone:()=>KU,cloneDef:()=>voe,codePointLength:()=>lW,constantCatch:()=>SW,createTransparentProxy:()=>Coe,defineLazy:()=>LU,defineLazyInternal:()=>bW,esc:()=>BU,escapeRegex:()=>GU,explicitlyAborted:()=>rW,extend:()=>ZU,finalizeIssue:()=>sW,floatSafeRemainder:()=>IU,getElementAtPath:()=>yoe,getEnumValues:()=>jU,getLengthableOrigin:()=>uW,getParsedType:()=>EW,getSizableOrigin:()=>cW,hexToUint8Array:()=>Doe,hide:()=>_W,installLazyProp:()=>xW,isObject:()=>HU,isPlainObject:()=>UU,issue:()=>fW,joinValues:()=>K,jsonStringifyReplacer:()=>MU,members:()=>hW,merge:()=>$U,mergeDefs:()=>zU,normalizeParams:()=>q,nullish:()=>PU,numKeys:()=>Soe,objectClone:()=>_oe,omit:()=>XU,optionalKeys:()=>JU,own:()=>gW,parsedType:()=>dW,partial:()=>eW,pick:()=>YU,prefixIssues:()=>iW,primitiveTypes:()=>OW,promiseAllObject:()=>boe,propertyKeyTypes:()=>DW,randomString:()=>xoe,required:()=>tW,safeExtend:()=>QU,shallowClone:()=>WU,slugify:()=>VU,stringifyPrimitive:()=>qU,toZod:()=>AU,uint8ArrayToBase64:()=>mW,uint8ArrayToBase64url:()=>Eoe,uint8ArrayToHex:()=>Ooe,unwrapMessage:()=>aW});function foe(e){return e}function poe(e){return e}function AU(){return e=>e}function moe(e){}function hoe(e){throw Error(`Unexpected value in exhaustive check`)}function goe(e){}function jU(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function K(e,t=`|`){return e.map(e=>qU(e)).join(t)}function MU(e,t){return typeof t==`bigint`?t.toString():t}function NU(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function PU(e){return e==null}function FU(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function IU(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function boe(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Coe(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function qU(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function JU(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function YU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return KU(e,zU(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&RU(e,r,n.shape[r])}return RU(this,`shape`,e),e},checks:[]}))}function XU(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return KU(e,zU(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return RU(this,`shape`,r),r},checks:[]}))}function ZU(e,t){if(!UU(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return KU(e,zU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return RU(this,`shape`,n),n}}))}function QU(e,t){if(!UU(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return KU(e,zU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return RU(this,`shape`,n),n}}))}function $U(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return KU(e,zU(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return RU(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function eW(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return KU(t,zU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return RU(this,`shape`,i),i},checks:[]}))}function tW(e,t,n){return KU(t,zU(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return RU(this,`shape`,i),i}}))}function nW(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function aW(e){return typeof e==`string`?e:e?.message}function oW(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function pW(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function hW(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):vW(e,n,r.value)}}function gW(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function _W(e,t,n){return gW(e,t,n,!1)}function vW(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:gW(this,t,n.bind(this))},set(e){gW(this,t,e)}})}function yW(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function bW(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&NW!==e._zod){NW=void 0;return}NW=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,FW);let e=PW;PW=!1;try{let r=n(this);return PW?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),PW||=e,r}catch(n){throw delete this[t],PW||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function xW(e,t,n,r){let i=yW(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function SW(e){let t=()=>e;return t[IW]=!0,t}var CW,wW,TW,EW,DW,OW,kW,AW,jW,MW,NW,PW,FW,IW,J=o((()=>{qW(),CW=Symbol(`evaluating`),wW=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},TW=NU(()=>{if(KW.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),EW=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},DW=new Set([`string`,`number`,`symbol`]),OW=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),kW={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},AW={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},jW=/[\uD800-\uDBFF]/,MW=class{constructor(...e){}},PW=!1,FW={configurable:!0,get(){PW=!0}},IW=`~constantCatch`}));function LW(e){let t=HW;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return HW=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function Y(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){VW.value=new a(r);try{Object.defineProperty(n,"_zod",VW)}finally{VW.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),hW(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?LW(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function RW(e){return e&&Object.assign(KW,e),KW}var zW,BW,VW,HW,UW,WW,GW,KW,qW=o((()=>{J(),BW=Object.freeze({status:`aborted`}),VW={value:void 0,enumerable:!1},HW=`captureStackTrace`in Error?Error:null,UW=Symbol(`zod_brand`),WW=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},GW=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(zW=globalThis).__zod_globalConfig??(zW.__zod_globalConfig={}),KW=globalThis.__zod_globalConfig}));function JW(){let e=this._zod;return e.message??=JSON.stringify(e.def,MU,2),e.message}function YW(e){this._zod.message=e}function XW(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ZW(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?XW(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function QW(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function tG(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${eG(e.path)}`);return t.join(` +`)}var nG,rG,iG,aG,oG,sG,cG,lG=o((()=>{qW(),J(),nG={get:JW,set:YW,enumerable:!0,configurable:!0},rG={value:void 0,enumerable:!1},iG={value:void 0,enumerable:!1},aG=new WeakSet([Object.prototype,Error.prototype]),oG=(e,t)=>{e.name=`$ZodError`,rG.value=e._zod,Object.defineProperty(e,"_zod",rG),iG.value=t,Object.defineProperty(e,"issues",iG),rG.value=void 0,iG.value=void 0,Object.defineProperty(e,"message",nG);let n=Object.getPrototypeOf(e);aG.has(n)||(aG.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},sG=Y(`$ZodError`,oG),cG=Y(`$ZodError`,oG,void 0,{Parent:Error})}));function uG(e,t){return{callee:t?.callee??e,Err:t?.Err}}function dG(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[xG]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new WW;return a.issues.length===0}var fG,pG,mG,hG,gG,_G,vG,yG,bG,xG,SG,CG,wG,TG,EG,DG,OG,kG,AG,jG,MG,NG,PG,FG,IG,LG,RG,zG,BG=o((()=>{qW(),lG(),J(),fG=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new WW;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>sW(e,o,RW())));throw wW(n,a?.callee??t),n}return s.value};return t},pG=fG(cG),mG=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>sW(e,o,RW())));throw wW(n,a?.callee??t),n}return s.value};return t},hG=mG(cG),gG=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new WW;return a.issues.length?{success:!1,error:new(e??sG)(a.issues.map(e=>sW(e,i,RW())))}:{success:!0,data:a.value}},_G=gG(cG),vG=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>sW(e,i,RW())))}:{success:!0,data:a.value}},yG=vG(cG),bG=Symbol.for(`zod.compile.invalid`),xG=Symbol.for(`zod.compile.fallback`),SG=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==bG||dG(e,t,n)}),CG=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},wG=e=>{let t=fG(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,uG(n,a))};return n},TG=wG(cG),EG=e=>{let t=fG(e),n=(e,r,i,a)=>t(e,r,i,uG(n,a));return n},DG=EG(cG),OG=e=>{let t=mG(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,uG(n,a))};return n},kG=OG(cG),AG=e=>{let t=mG(e),n=async(e,r,i,a)=>await t(e,r,i,uG(n,a));return n},jG=AG(cG),MG=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gG(e)(t,n,i)},NG=MG(cG),PG=e=>(t,n,r)=>gG(e)(t,n,r),FG=PG(cG),IG=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vG(e)(t,n,i)},LG=IG(cG),RG=e=>async(t,n,r)=>vG(e)(t,n,r),zG=RG(cG)})),VG=c({base64:()=>xK,base64url:()=>SK,bigint:()=>jK,boolean:()=>PK,browserEmail:()=>mK,cidrv4:()=>yK,cidrv6:()=>bK,creditCard:()=>DK,cuid:()=>XG,cuid2:()=>ZG,date:()=>kK,datetime:()=>qG,domain:()=>wK,duration:()=>nK,e164:()=>EK,email:()=>lK,emoji:()=>UG,extendedDuration:()=>rK,guid:()=>iK,hex:()=>zK,hostname:()=>CK,html5Email:()=>uK,httpProtocol:()=>TK,idnEmail:()=>pK,integer:()=>MK,ipv4:()=>gK,ipv6:()=>_K,ksuid:()=>eK,lowercase:()=>LK,mac:()=>vK,md5_base64:()=>VK,md5_base64url:()=>HK,md5_hex:()=>BK,nanoid:()=>tK,nanoidOfLength:()=>HG,null:()=>FK,number:()=>NK,rfc5322Email:()=>dK,sha1_base64:()=>WK,sha1_base64url:()=>GK,sha1_hex:()=>UK,sha256_base64:()=>qK,sha256_base64url:()=>JK,sha256_hex:()=>KK,sha384_base64:()=>XK,sha384_base64url:()=>ZK,sha384_hex:()=>YK,sha512_base64:()=>$K,sha512_base64url:()=>eq,sha512_hex:()=>QK,string:()=>AK,time:()=>KG,ulid:()=>QG,undefined:()=>IK,unicodeEmail:()=>fK,uppercase:()=>RK,uuid:()=>aK,uuid4:()=>oK,uuid6:()=>sK,uuid7:()=>cK,xid:()=>$G});function HG(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function UG(){return new RegExp(hK,`u`)}function WG(e){return RegExp(`^${e}$`)}function GG(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function KG(e){return RegExp(`^${GG(e)}$`)}function qG(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${GG({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${GG({precision:e.precision})}`:n;return RegExp(`^${OK}T(?:${r})$`)}function JG(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function YG(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var XG,ZG,QG,$G,eK,tK,nK,rK,iK,aK,oK,sK,cK,lK,uK,dK,fK,pK,mK,hK,gK,_K,vK,yK,bK,xK,SK,CK,wK,TK,EK,DK,OK,kK,AK,jK,MK,NK,PK,FK,IK,LK,RK,zK,BK,VK,HK,UK,WK,GK,KK,qK,JK,YK,XK,ZK,QK,$K,eq,tq=o((()=>{J(),XG=/^[cC][0-9a-z]{6,}$/,ZG=/^[0-9a-z]+$/,QG=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,$G=/^[0-9a-vA-V]{20}$/,eK=/^[A-Za-z0-9]{27}$/,tK=/^[a-zA-Z0-9_-]{21}$/,nK=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rK=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,iK=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,aK=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,oK=aK(4),sK=aK(6),cK=aK(7),lK=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,uK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dK=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,fK=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,pK=fK,mK=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hK=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,gK=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_K=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,vK=e=>{let t=GU(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},yK=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bK=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xK=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,SK=/^[A-Za-z0-9_-]*$/,CK=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,wK=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,TK=/^https?$/,EK=/^\+[1-9]\d{6,14}$/,DK=/^\d(?:[ -]?\d){11,18}$/,OK=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,kK=WG(OK),AK=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},jK=/^-?\d+n?$/,MK=/^-?\d+$/,NK=/^-?\d+(?:\.\d+)?$/,PK=/^(?:true|false)$/i,FK=/^null$/i,IK=/^undefined$/i,LK=/^[^A-Z]*$/,RK=/^[^a-z]*$/,zK=/^[0-9a-fA-F]*$/,BK=/^[0-9a-fA-F]{32}$/,VK=JG(22,`==`),HK=YG(22),UK=/^[0-9a-fA-F]{40}$/,WK=JG(27,`=`),GK=YG(27),KK=/^[0-9a-fA-F]{64}$/,qK=JG(43,`=`),JK=YG(43),YK=/^[0-9a-fA-F]{96}$/,XK=JG(64,``),ZK=YG(64),QK=/^[0-9a-fA-F]{128}$/,$K=JG(86,`==`),eq=YG(86)}));function nq(e,t,n){e.issues.length&&t.issues.push(...iW(n,e.issues))}var rq,iq,aq,oq,sq,cq,lq,uq,dq,fq,pq,mq,hq,gq,_q,vq,yq,bq,xq,Sq,Cq,wq,Tq,Eq,Dq,Oq=o((()=>{qW(),tq(),J(),rq=Y(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),iq=e=>{let t=e.value;return!PU(t)&&t.size!==void 0},aq=e=>{let t=e.value;return!PU(t)&&t.length!==void 0},oq={number:`number`,bigint:`bigint`,object:`date`},sq=Y(`$ZodCheckLessThan`,(e,t)=>{rq.init(e,t);let n=oq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{rq.init(e,t);let n=oq[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:oq[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lq=Y(`$ZodCheckMultipleOf`,(e,t)=>{rq.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):IU(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),uq=Y(`$ZodCheckNumberFormat`,(e,t)=>{rq.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=kW[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=MK)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),dq=Y(`$ZodCheckBigIntFormat`,(e,t)=>{rq.init(e,t);let[n,r]=AW[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),fq=Y(`$ZodCheckMaxSize`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:cW(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),pq=Y(`$ZodCheckMinSize`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:cW(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mq=Y(`$ZodCheckSizeEquals`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=iq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:cW(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hq=Y(`$ZodCheckMaxLength`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?lW(r):i)<=t.maximum)return;let a=uW(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gq=Y(`$ZodCheckMinLength`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=uW(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_q=Y(`$ZodCheckLengthEquals`,(e,t)=>{var n;rq.init(e,t),(n=e._zod.def).when??(n.when=aq),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?lW(r):i;if(a===t.length)return;let o=uW(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vq=Y(`$ZodCheckStringFormat`,(e,t)=>{var n,r;rq.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),yq=Y(`$ZodCheckRegex`,(e,t)=>{vq.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bq=Y(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=LK,vq.init(e,t)}),xq=Y(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=RK,vq.init(e,t)}),Sq=Y(`$ZodCheckIncludes`,(e,t)=>{rq.init(e,t);let n=GU(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Cq=Y(`$ZodCheckStartsWith`,(e,t)=>{rq.init(e,t);let n=RegExp(`^${GU(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),wq=Y(`$ZodCheckEndsWith`,(e,t)=>{rq.init(e,t);let n=RegExp(`.*${GU(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Tq=Y(`$ZodCheckProperty`,(e,t)=>{rq.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>nq(n,e,t.property));nq(n,e,t.property)}}),Eq=Y(`$ZodCheckMimeType`,(e,t)=>{rq.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Dq=Y(`$ZodCheckOverwrite`,(e,t)=>{rq.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),kq,Aq=o((()=>{kq=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` -`)}\n};`)(...Object.values(this.closed))}}})),Mq,Nq=o((()=>{Mq={major:4,minor:5,patch:4}}));function Pq(e){return{validate:t=>{try{return gJ(vG(e,t))}catch{return bG(e,t).then(gJ)}},vendor:`zod`,version:1}}function Fq(e,t){if(!t.normalize&&t.protocol?.source===EK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Iq(e){return e.replace(SJ,``)}function Lq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Rq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function zq(e){if(!IJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Bq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:zq(n)}function Vq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Hq(e){if(!CK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Vq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Uq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Wq(e){return OK.test(e)?Uq(e.replace(WJ,``)):!1}function Gq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Kq(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues)),t.value[n]=e.value}function qq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...aW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Jq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:cY,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=YU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Yq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>qq(e,n,i,t,u,d))):qq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Xq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!rW(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>cW(e,r,zW())))}),t)}function Zq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>cW(e,r,zW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Qq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function $q(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(WU(e)&&WU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=$q(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=$q(t.value,n.value);if(!c.valid){if(rW(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function tJ(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function nJ(e,t,n){e.issues.length&&t.issues.push(...aW(n,e.issues)),t.value[n]=e.value}function rJ(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...aW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function iJ(e,t,n,r,i,a,o){e.issues.length&&(OW.has(typeof r)?n.issues.push(...aW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>cW(e,o,zW()))})),t.issues.length&&(OW.has(typeof r)?n.issues.push(...aW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>cW(e,o,zW()))})),n.value.set(e.value,t.value)}function aJ(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function oJ(e,t){return e.value=t.issues.length?void 0:t.value,e}function sJ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function cJ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function lJ(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>cW(e,r,zW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function uJ(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function dJ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>fJ(e,r,t.out,n)):fJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>fJ(e,r,t.in,n)):fJ(e,r,t.in,n)}}function fJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function pJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function mJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(pW(e))}}var hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY,HY=o((()=>{kq(),JW(),jq(),VG(),nq(),J(),Nq(),hJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Mq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=rW(t),a;for(let o of n){if(o._zod.def.when){if(iW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new GW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(sW(t.issues,n,e),i||=rW(t,n))});else{if(t.issues.length===n)continue;sW(t.issues,n,e),i||=rW(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(rW(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new GW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new GW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return vW(this,`~standard`,Pq(this))},set"~standard"(e){_W(this,`~standard`,e)}}),gJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},_J=Y(`$ZodString`,(e,t)=>{hJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??jK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),vJ=Y(`$ZodStringFormat`,(e,t)=>{yq.init(e,t),_J.init(e,t)}),yJ=Y(`$ZodGUID`,(e,t)=>{t.pattern??=aK,vJ.init(e,t)}),bJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=oK(e)}else t.pattern??=oK();vJ.init(e,t)}),xJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=uK,vJ.init(e,t)}),SJ=/[\t\n\r]/g,CJ=Y(`$ZodURL`,(e,t)=>{vJ.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Fq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Lq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Rq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Iq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),wJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=WG(),vJ.init(e,t)}),TJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?nK:UG(t.length),vJ.init(e,t)}),EJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=ZG,vJ.init(e,t)}),DJ=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=QG,vJ.init(e,t)}),OJ=Y(`$ZodULID`,(e,t)=>{t.pattern??=$G,vJ.init(e,t)}),kJ=Y(`$ZodXID`,(e,t)=>{t.pattern??=eK,vJ.init(e,t)}),AJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=tK,vJ.init(e,t)}),jJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=JG(t),vJ.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),MJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=AK,vJ.init(e,t)}),NJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=qG(t),vJ.init(e,t)}),PJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=rK,vJ.init(e,t)}),FJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=_K,vJ.init(e,t),e._zod.bag.format=`ipv4`}),IJ=/^[0-9a-fA-F:.]+$/,LJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=vK,vJ.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{zq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),RJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=yK(t.delimiter),vJ.init(e,t),e._zod.bag.format=`mac`}),zJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=bK,vJ.init(e,t)}),BJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=xK,vJ.init(e,t),e._zod.check=n=>{Bq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),VJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=SK,vJ.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Vq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),HJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=CK,vJ.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Hq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),UJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=DK,vJ.init(e,t)}),WJ=/[- ]/g,GJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=OK,vJ.init(e,t),e._zod.check=n=>{Wq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),KJ=Y(`$ZodJWT`,(e,t)=>{vJ.init(e,t),e._zod.check=n=>{Gq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),qJ=Y(`$ZodCustomStringFormat`,(e,t)=>{vJ.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),JJ=Y(`$ZodNumber`,(e,t)=>{hJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??PK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),YJ=Y(`$ZodNumberFormat`,(e,t)=>{dq.init(e,t),JJ.init(e,t)}),XJ=Y(`$ZodBoolean`,(e,t)=>{hJ.init(e,t),e._zod.pattern=FK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),ZJ=Y(`$ZodBigInt`,(e,t)=>{hJ.init(e,t),e._zod.pattern=MK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),QJ=Y(`$ZodBigIntFormat`,(e,t)=>{fq.init(e,t),ZJ.init(e,t)}),$J=Y(`$ZodSymbol`,(e,t)=>{hJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),eY=Y(`$ZodUndefined`,(e,t)=>{hJ.init(e,t),e._zod.pattern=LK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),tY=Y(`$ZodNull`,(e,t)=>{hJ.init(e,t),e._zod.pattern=IK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),nY=Y(`$ZodAny`,(e,t)=>{hJ.init(e,t),e._zod.parse=e=>e}),rY=Y(`$ZodUnknown`,(e,t)=>{hJ.init(e,t),e._zod.parse=e=>e}),iY=Y(`$ZodNever`,(e,t)=>{hJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),aY=Y(`$ZodVoid`,(e,t)=>{hJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),oY=Y(`$ZodDate`,(e,t)=>{hJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),sY=Y(`$ZodArray`,(e,t)=>{hJ.init(e,t);let n=qW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eKq(t,r,e))):Kq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),cY=[],lY=new WeakMap,uY=Y(`$ZodObject`,(e,t)=>{if(hJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;lY.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),lY.set(t,n),n}})}let n=PU(()=>Jq(t));xW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||zU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=UU,i=t.catchall,a,o=qW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>qq(n,t,e,c,r,i))):qq(a,t,e,c,r,i)}return i?Yq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),dY=Y(`$ZodObjectJIT`,(e,t)=>{uY.init(e,t);let n=e._zod.parse,r=PU(()=>Jq(t)),i=qW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Aq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` +`)}\n};`)(...Object.values(this.closed))}}})),jq,Mq=o((()=>{jq={major:4,minor:5,patch:4}}));function Nq(e){return{validate:t=>{try{return hJ(_G(e,t))}catch{return yG(e,t).then(hJ)}},vendor:`zod`,version:1}}function Pq(e,t){if(!t.normalize&&t.protocol?.source===TK.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Fq(e){return e.replace(xJ,``)}function Iq(e,t){return t.lastIndex=0,t.test(e.hostname)}function Lq(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Rq(e){if(!FJ.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function zq(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Rq(n)}function Bq(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Vq(e){if(!SK.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Bq(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Hq(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Uq(e){return DK.test(e)?Hq(e.replace(UJ,``)):!1}function Wq(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Gq(e,t,n){e.issues.length&&t.issues.push(...iW(n,e.issues)),t.value[n]=e.value}function Kq(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...iW(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function qq(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:sY,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=JU(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Jq(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Kq(e,n,i,t,u,d))):Kq(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Yq(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!nW(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>sW(e,r,RW())))}),t)}function Xq(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>sW(e,r,RW())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Zq(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Qq(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(UU(e)&&UU(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Qq(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Qq(t.value,n.value);if(!c.valid){if(nW(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function eJ(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function tJ(e,t,n){e.issues.length&&t.issues.push(...iW(n,e.issues)),t.value[n]=e.value}function nJ(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...iW(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function rJ(e,t,n,r,i,a,o){e.issues.length&&(DW.has(typeof r)?n.issues.push(...iW(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>sW(e,o,RW()))})),t.issues.length&&(DW.has(typeof r)?n.issues.push(...iW(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>sW(e,o,RW()))})),n.value.set(e.value,t.value)}function iJ(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function aJ(e,t){return e.value=t.issues.length?void 0:t.value,e}function oJ(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function sJ(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function cJ(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>sW(e,r,RW()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function lJ(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function uJ(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>dJ(e,r,t.out,n)):dJ(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>dJ(e,r,t.in,n)):dJ(e,r,t.in,n)}}function dJ(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function fJ(e){return e.memo||(e.value=Object.freeze(e.value)),e}function pJ(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(fW(e))}}var mJ,hJ,gJ,_J,vJ,yJ,bJ,xJ,SJ,CJ,wJ,TJ,EJ,DJ,OJ,kJ,AJ,jJ,MJ,NJ,PJ,FJ,IJ,LJ,RJ,zJ,BJ,VJ,HJ,UJ,WJ,GJ,KJ,qJ,JJ,YJ,XJ,ZJ,QJ,$J,eY,tY,nY,rY,iY,aY,oY,sY,cY,lY,uY,dY,fY,pY,mY,hY,gY,_Y,vY,yY,bY,xY,SY,CY,wY,TY,EY,DY,OY,kY,AY,jY,MY,NY,PY,FY,IY,LY,RY,zY,BY,VY=o((()=>{Oq(),qW(),Aq(),BG(),tq(),J(),Mq(),mJ=Y(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jq;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=nW(t),a;for(let o of n){if(o._zod.def.when){if(rW(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new WW;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(oW(t.issues,n,e),i||=nW(t,n))});else{if(t.issues.length===n)continue;oW(t.issues,n,e),i||=nW(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(nW(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new WW;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new WW;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return _W(this,`~standard`,Nq(this))},set"~standard"(e){gW(this,`~standard`,e)}}),hJ=e=>e.success?{value:e.data}:{issues:e.error?.issues},gJ=Y(`$ZodString`,(e,t)=>{mJ.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??AK(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),_J=Y(`$ZodStringFormat`,(e,t)=>{vq.init(e,t),gJ.init(e,t)}),vJ=Y(`$ZodGUID`,(e,t)=>{t.pattern??=iK,_J.init(e,t)}),yJ=Y(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=aK(e)}else t.pattern??=aK();_J.init(e,t)}),bJ=Y(`$ZodEmail`,(e,t)=>{t.pattern??=lK,_J.init(e,t)}),xJ=/[\t\n\r]/g,SJ=Y(`$ZodURL`,(e,t)=>{_J.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Pq(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Iq(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Lq(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Fq(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),CJ=Y(`$ZodEmoji`,(e,t)=>{t.pattern??=UG(),_J.init(e,t)}),wJ=Y(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?tK:HG(t.length),_J.init(e,t)}),TJ=Y(`$ZodCUID`,(e,t)=>{t.pattern??=XG,_J.init(e,t)}),EJ=Y(`$ZodCUID2`,(e,t)=>{t.pattern??=ZG,_J.init(e,t)}),DJ=Y(`$ZodULID`,(e,t)=>{t.pattern??=QG,_J.init(e,t)}),OJ=Y(`$ZodXID`,(e,t)=>{t.pattern??=$G,_J.init(e,t)}),kJ=Y(`$ZodKSUID`,(e,t)=>{t.pattern??=eK,_J.init(e,t)}),AJ=Y(`$ZodISODateTime`,(e,t)=>{t.pattern??=qG(t),_J.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),jJ=Y(`$ZodISODate`,(e,t)=>{t.pattern??=kK,_J.init(e,t)}),MJ=Y(`$ZodISOTime`,(e,t)=>{t.pattern??=KG(t),_J.init(e,t)}),NJ=Y(`$ZodISODuration`,(e,t)=>{t.pattern??=nK,_J.init(e,t)}),PJ=Y(`$ZodIPv4`,(e,t)=>{t.pattern??=gK,_J.init(e,t),e._zod.bag.format=`ipv4`}),FJ=/^[0-9a-fA-F:.]+$/,IJ=Y(`$ZodIPv6`,(e,t)=>{t.pattern??=_K,_J.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Rq(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),LJ=Y(`$ZodMAC`,(e,t)=>{t.pattern??=vK(t.delimiter),_J.init(e,t),e._zod.bag.format=`mac`}),RJ=Y(`$ZodCIDRv4`,(e,t)=>{t.pattern??=yK,_J.init(e,t)}),zJ=Y(`$ZodCIDRv6`,(e,t)=>{t.pattern??=bK,_J.init(e,t),e._zod.check=n=>{zq(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),BJ=Y(`$ZodBase64`,(e,t)=>{t.pattern??=xK,_J.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Bq(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),VJ=Y(`$ZodBase64URL`,(e,t)=>{t.pattern??=SK,_J.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Vq(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),HJ=Y(`$ZodE164`,(e,t)=>{t.pattern??=EK,_J.init(e,t)}),UJ=/[- ]/g,WJ=Y(`$ZodCreditCard`,(e,t)=>{t.pattern??=DK,_J.init(e,t),e._zod.check=n=>{Uq(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),GJ=Y(`$ZodJWT`,(e,t)=>{_J.init(e,t),e._zod.check=n=>{Wq(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),KJ=Y(`$ZodCustomStringFormat`,(e,t)=>{_J.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),qJ=Y(`$ZodNumber`,(e,t)=>{mJ.init(e,t),e._zod.pattern=e._zod.bag.pattern??NK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),JJ=Y(`$ZodNumberFormat`,(e,t)=>{uq.init(e,t),qJ.init(e,t)}),YJ=Y(`$ZodBoolean`,(e,t)=>{mJ.init(e,t),e._zod.pattern=PK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),XJ=Y(`$ZodBigInt`,(e,t)=>{mJ.init(e,t),e._zod.pattern=jK,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),ZJ=Y(`$ZodBigIntFormat`,(e,t)=>{dq.init(e,t),XJ.init(e,t)}),QJ=Y(`$ZodSymbol`,(e,t)=>{mJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),$J=Y(`$ZodUndefined`,(e,t)=>{mJ.init(e,t),e._zod.pattern=IK,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),eY=Y(`$ZodNull`,(e,t)=>{mJ.init(e,t),e._zod.pattern=FK,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),tY=Y(`$ZodAny`,(e,t)=>{mJ.init(e,t),e._zod.parse=e=>e}),nY=Y(`$ZodUnknown`,(e,t)=>{mJ.init(e,t),e._zod.parse=e=>e}),rY=Y(`$ZodNever`,(e,t)=>{mJ.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),iY=Y(`$ZodVoid`,(e,t)=>{mJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),aY=Y(`$ZodDate`,(e,t)=>{mJ.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),oY=Y(`$ZodArray`,(e,t)=>{mJ.init(e,t);let n=KW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eGq(t,r,e))):Gq(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),sY=[],cY=new WeakMap,lY=Y(`$ZodObject`,(e,t)=>{if(mJ.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;cY.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),cY.set(t,n),n}})}let n=NU(()=>qq(t));bW(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||RU(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=HU,i=t.catchall,a,o=KW.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Kq(n,t,e,c,r,i))):Kq(a,t,e,c,r,i)}return i?Jq(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),uY=Y(`$ZodObjectJIT`,(e,t)=>{lY.init(e,t);let n=e._zod.parse,r=NU(()=>qq(t)),i=KW.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new kq([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; payload.issues.push(iss); - }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:VU(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` + }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:BU(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` const ${n}_present = ${i}; if (!${n}.issues.length || ${n}_present) { if (${n}.issues.length) {${c(n,r)} @@ -75,16 +75,16 @@ newResult[${r}] = ${n}.value; } - `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=UU,c=!qW.jitless,l=c&&EW.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Yq([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),fY=Y(`$ZodUnion`,(e,t)=>{hJ.init(e,t),xW(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),xW(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),xW(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),xW(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>IU(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Xq(t,r,e,i)):Xq(o,r,e,i)}}),pY=Y(`$ZodXor`,(e,t)=>{fY.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Zq(t,r,e,i)):Zq(o,r,e,i)}}),mY=Y(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,fY.init(e,t);let n=e._zod.parse;xW(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||zU(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=lY.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=PU(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!UU(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),hY=Y(`$ZodIntersection`,(e,t)=>{hJ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>eJ(e,t,n)):eJ(e,i,a)}}),gY=Y(`$ZodTuple`,(e,t)=>{hJ.init(e,t);let n=t.items,r=qW.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=tJ(n,`optin`),l=tJ(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>nJ(t,i,e))):nJ(r,i,e)}}return s.length?Promise.all(s).then(()=>rJ(u,i,n,o,l)):rJ(u,i,n,o,l)}}),_Y=Y(`$ZodRecord`,(e,t)=>{hJ.init(e,t);let n=qW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!WU(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>cW(e,i,zW())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...aW(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...aW(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&PK.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>cW(e,i,zW())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...aW(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...aW(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),vY=Y(`$ZodMap`,(e,t)=>{hJ.init(e,t);let n=qW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{iJ(t,o,r,n,a,e,i)})):iJ(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),yY=Y(`$ZodSet`,(e,t)=>{hJ.init(e,t);let n=qW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>aJ(e,r))):aJ(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),bY=Y(`$ZodEnum`,(e,t)=>{hJ.init(e,t);let n=MU(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>OW.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>KU(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),xY=Y(`$ZodLiteral`,(e,t)=>{hJ.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?KU(e):e?KU(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),SY=Y(`$ZodFile`,(e,t)=>{hJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),CY=Y(`$ZodTransform`,(e,t)=>{hJ.init(e,t),e._zod.optin=`optional`,qW.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new KW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new GW;return n.value=i,n}}),wY=Y(`$ZodOptional`,(e,t)=>{hJ.init(e,t),xW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,xW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),xW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${IU(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>oJ(e,t)):oJ(e,r)}return t.innerType._zod.run(e,n)}}),TY=Y(`$ZodExactOptional`,(e,t)=>{wY.init(e,t),xW(e,`values`,e=>e.def.innerType._zod.values),xW(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),EY=Y(`$ZodNullable`,(e,t)=>{hJ.init(e,t),xW(e,`optin`,e=>e.def.innerType._zod.optin),xW(e,`optout`,e=>e.def.innerType._zod.optout),xW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${IU(t.source)}|null)$`):void 0}),xW(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),DY=Y(`$ZodDefault`,(e,t)=>{hJ.init(e,t),e._zod.optin=`defaulted`,xW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>sJ(e,t)):sJ(r,t)}}),OY=Y(`$ZodPrefault`,(e,t)=>{hJ.init(e,t),e._zod.optin=`defaulted`,xW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),kY=Y(`$ZodNonOptional`,(e,t)=>{hJ.init(e,t),xW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>cJ(t,e)):cJ(i,e)}}),AY=Y(`$ZodSuccess`,(e,t)=>{hJ.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new KW(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),jY=Y(`$ZodCatch`,(e,t)=>{hJ.init(e,t),xW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),xW(e,`optout`,e=>e.def.innerType._zod.optout),xW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>lJ(e,r,t,n)):lJ(e,r,t,n)}}),MY=Y(`$ZodNaN`,(e,t)=>{hJ.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),NY=Y(`$ZodPipe`,(e,t)=>{hJ.init(e,t),xW(e,`values`,e=>e.def.in._zod.values),xW(e,`optin`,e=>e.def.in._zod.optin),xW(e,`optout`,e=>e.def.out._zod.optout),xW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>uJ(e,t.in,n)):uJ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>uJ(e,t.out,n)):uJ(r,t.out,n)}}),PY=Y(`$ZodCodec`,(e,t)=>{hJ.init(e,t),xW(e,`values`,e=>e.def.in._zod.values),xW(e,`optin`,e=>e.def.in._zod.optin),xW(e,`optout`,e=>e.def.out._zod.optout),xW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>dJ(e,t,n)):dJ(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>dJ(e,t,n)):dJ(r,t,n)}}}),FY=Y(`$ZodPreprocess`,(e,t)=>{NY.init(e,t)}),IY=Y(`$ZodReadonly`,(e,t)=>{hJ.init(e,t),xW(e,`propValues`,e=>e.def.innerType._zod.propValues),xW(e,`values`,e=>e.def.innerType._zod.values),xW(e,`optin`,e=>e.def.innerType?._zod?.optin),xW(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(pJ):pJ(r)}}),LY=Y(`$ZodTemplateLiteral`,(e,t)=>{hJ.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||kW.has(typeof e))n.push(KU(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),RY=Y(`$ZodFunction`,(e,t)=>(hJ.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?mG(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?mG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await gG(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await gG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new gY({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),zY=Y(`$ZodPromise`,(e,t)=>{hJ.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),BY=Y(`$ZodLazy`,(e,t)=>{hJ.init(e,t),RU(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),xW(e,`pattern`,e=>e.innerType?._zod?.pattern),xW(e,`propValues`,e=>e.innerType?._zod?.propValues),xW(e,`optin`,e=>e.innerType?._zod?.optin??void 0),xW(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),VY=Y(`$ZodCustom`,(e,t)=>{iq.init(e,t),hJ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>mJ(t,n,r,e));mJ(i,n,r,e)}})}));function UY(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function WY(e,t){let n=QY.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&WY(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),QY.set(e,r),r}function GY(e){return WY(e,new Set)}function KY(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function qY(){return tX}function JY(e,t){let n=e[XY]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var YY,XY,ZY,QY,$Y,eX,tX,nX=o((()=>{YY=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},XY=`~memo`,ZY=[],QY=new WeakMap,eX=[],tX={alloc(e,t,n){let r=$Y;if(!r)return n;$Y=void 0;let i={value:n,issues:null};return r.set(t.value,i),eX.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&JY(n,e.value))throw new YY;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=WY(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[XY];l||(l={buckets:new Map,backEdges:void 0},s[XY]=l);let u;r===s?u=i:(u=KY(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...UY(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;$Y=u;let f=eX.length,p=t(o,s);$Y=void 0;let m=eX.length>f?eX.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?UY(e.issues):ZY),e)):(m&&(m.issues=p.issues.length?UY(p.issues):ZY),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function rX(){return{localeError:iX()}}var iX,aX=o((()=>{J(),iX=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${JU(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function oX(){return{localeError:sX()}}var sX,cX=o((()=>{J(),sX=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${JU(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function lX(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function uX(){return{localeError:dX()}}var dX,fX=o((()=>{J(),dX=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${JU(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=lX(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=lX(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function pX(){return{localeError:mX()}}var mX,hX=o((()=>{J(),mX=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${JU(e.values[0])}`:`Невалидна опция: очаквано едно от ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function gX(){return{localeError:_X()}}var _X,vX=o((()=>{J(),_X=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${JU(e.values[0])}`:`অবৈধ অপশন: ${K(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function yX(){return{localeError:bX()}}var bX,xX=o((()=>{J(),bX=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${JU(e.values[0])}`:`Opció invàlida: s'esperava una de ${K(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function SX(){return{localeError:CX()}}var CX,wX=o((()=>{J(),CX=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${JU(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${K(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function TX(){return{localeError:EX()}}var EX,DX=o((()=>{J(),EX=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${JU(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function OX(){return{localeError:kX()}}var kX,AX=o((()=>{J(),kX=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${JU(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function jX(){return{localeError:MX()}}var MX,NX=o((()=>{J(),MX=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${JU(e.values[0])}`:`Ungültige Option: erwartet eine von ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function PX(){return{localeError:FX()}}var FX,IX=o((()=>{J(),FX=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${JU(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function LX(){return{localeError:RX()}}var RX,zX=o((()=>{J(),RX=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(fW(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${JU(e.values[0])}`:`Invalid option: expected one of ${K(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function BX(){return{localeError:VX()}}var VX,HX=o((()=>{J(),VX=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${JU(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function UX(){return{localeError:WX()}}var WX,GX=o((()=>{J(),WX=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${JU(e.values[0])}`:`Opción inválida: se esperaba una de ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function KX(){return{localeError:qX()}}var qX,JX=o((()=>{J(),qX=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${JU(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${K(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function YX(){return{localeError:XX()}}var XX,ZX=o((()=>{J(),XX=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${JU(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function QX(){return{localeError:$X()}}var $X,eZ=o((()=>{J(),$X=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${JU(e.values[0])} attendu`:`Option invalide : une valeur parmi ${K(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function tZ(){return{localeError:nZ()}}var nZ,rZ=o((()=>{J(),nZ=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${JU(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function iZ(){return{localeError:aZ()}}var aZ,oZ=o((()=>{J(),aZ=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${JU(e.values[0])}`:`અમાન્ય વિકલ્પ: ${K(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function sZ(){return{localeError:cZ()}}var cZ,lZ=o((()=>{J(),cZ=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=fW(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${JU(t.values[0])}`;let e=t.values.map(e=>JU(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${K(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function uZ(){return{localeError:dZ()}}var dZ,fZ=o((()=>{J(),dZ=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${JU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function pZ(){return{localeError:mZ()}}var mZ,hZ=o((()=>{J(),mZ=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${JU(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function gZ(){return{localeError:_Z()}}var _Z,vZ=o((()=>{J(),_Z=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${JU(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function yZ(e,t,n){return Math.abs(e)===1?t:n}function bZ(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function xZ(){return{localeError:SZ()}}var SZ,CZ=o((()=>{J(),SZ=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${JU(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=yZ(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bZ(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${bZ(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=yZ(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bZ(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${bZ(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${K(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${bZ(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${bZ(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function wZ(){return{localeError:TZ()}}var TZ,EZ=o((()=>{J(),TZ=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${JU(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function DZ(){return{localeError:OZ()}}var OZ,kZ=o((()=>{J(),OZ=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${JU(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function AZ(){return{localeError:jZ()}}var jZ,MZ=o((()=>{J(),jZ=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${JU(e.values[0])}`:`Opzione non valida: atteso uno tra ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function NZ(){return{localeError:PZ()}}var PZ,FZ=o((()=>{J(),PZ=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${JU(e.values[0])}が期待されました`:`無効な選択: ${K(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function IZ(){return{localeError:LZ()}}var LZ,RZ=o((()=>{J(),LZ=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${JU(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${K(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function zZ(){return{localeError:BZ()}}var BZ,VZ=o((()=>{J(),BZ=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${JU(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${K(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function HZ(){return zZ()}var UZ=o((()=>{VZ()}));function WZ(){return{localeError:GZ()}}var GZ,KZ=o((()=>{J(),GZ=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${JU(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function qZ(){return{localeError:JZ()}}var JZ,YZ=o((()=>{J(),JZ=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${JU(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${K(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${K(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function XZ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function ZZ(){return{localeError:$Z()}}var QZ,$Z,eQ=o((()=>{J(),QZ=e=>e.charAt(0).toUpperCase()+e.slice(1),$Z=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${JU(e.values[0])}`:`Privalo būti vienas iš ${K(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,XZ(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${QZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${QZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,XZ(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${QZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${QZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${QZ(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function tQ(){return{localeError:nQ()}}var nQ,rQ=o((()=>{J(),nQ=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${JU(e.values[0])}`:`Грешана опција: се очекува една ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function iQ(){return{localeError:aQ()}}var aQ,oQ=o((()=>{J(),aQ=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${JU(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function sQ(){return{localeError:cQ()}}var cQ,lQ=o((()=>{J(),cQ=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${JU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function uQ(){return{localeError:dQ()}}var dQ,fQ=o((()=>{J(),dQ=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${JU(e.values[0])}`:`Ongeldige optie: verwacht één van ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function pQ(){return{localeError:mQ()}}var mQ,hQ=o((()=>{J(),mQ=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${JU(e.values[0])}`:`Ugyldig val: forventa eitt av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function gQ(){return{localeError:_Q()}}var _Q,vQ=o((()=>{J(),_Q=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${JU(e.values[0])}`:`Ugyldig valg: forventet en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function yQ(){return{localeError:bQ()}}var bQ,xQ=o((()=>{J(),bQ=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${JU(e.values[0])}`:`Fâsit tercih: mûteberler ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function SQ(){return{localeError:CQ()}}var CQ,wQ=o((()=>{J(),CQ=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${JU(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${K(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function TQ(){return{localeError:EQ()}}var EQ,DQ=o((()=>{J(),EQ=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${JU(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function OQ(){return{localeError:kQ()}}var kQ,AQ=o((()=>{J(),kQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(fW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${JU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function jQ(){return{localeError:MQ()}}var MQ,NQ=o((()=>{J(),MQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(fW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${JU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function PQ(){return{localeError:FQ()}}var FQ,IQ=o((()=>{J(),FQ=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${JU(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${K(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function LQ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function RQ(){return{localeError:zQ()}}var zQ,BQ=o((()=>{J(),zQ=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${JU(e.values[0])}`:`Неверный вариант: ожидалось одно из ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=LQ(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=LQ(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function VQ(){return{localeError:HQ()}}var HQ,UQ=o((()=>{J(),HQ=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${JU(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function WQ(){return{localeError:GQ()}}var GQ,KQ=o((()=>{J(),GQ=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${JU(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function qQ(){return{localeError:JQ()}}var JQ,YQ=o((()=>{J(),JQ=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${JU(e.values[0])}`:`Ogiltigt val: förväntade en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function XQ(){return{localeError:ZQ()}}var ZQ,QQ=o((()=>{J(),ZQ=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${JU(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${K(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function $Q(){return{localeError:e$()}}var e$,t$=o((()=>{J(),e$=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${JU(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${K(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function n$(){return{localeError:r$()}}var r$,i$=o((()=>{J(),r$=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${JU(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function a$(){return{localeError:o$()}}var o$,s$=o((()=>{J(),o$=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${JU(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function c$(){return{localeError:l$()}}var l$,u$=o((()=>{J(),l$=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${JU(e.values[0])}`:`Неправильна опція: очікується одне з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function d$(){return c$()}var f$=o((()=>{u$()}));function p$(){return{localeError:m$()}}var m$,h$=o((()=>{J(),m$=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${JU(e.values[0])} متوقع تھا`:`غلط آپشن: ${K(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function g$(){return{localeError:_$()}}var _$,v$=o((()=>{J(),_$=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${JU(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function y$(){return{localeError:b$()}}var b$,x$=o((()=>{J(),b$=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${JU(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${K(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function S$(){return{localeError:C$()}}var C$,w$=o((()=>{J(),C$=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${JU(e.values[0])}`:`无效选项:期望以下之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function T$(){return{localeError:E$()}}var E$,D$=o((()=>{J(),E$=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${JU(e.values[0])}`:`無效的選項:預期為以下其中之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function O$(){return{localeError:k$()}}var k$,A$=o((()=>{J(),k$=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=fW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${JU(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${K(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),j$=c({ar:()=>rX,az:()=>oX,be:()=>uX,bg:()=>pX,bn:()=>gX,ca:()=>yX,ckb:()=>SX,cs:()=>TX,da:()=>OX,de:()=>jX,el:()=>PX,en:()=>LX,eo:()=>BX,es:()=>UX,fa:()=>KX,fi:()=>YX,fr:()=>QX,frCA:()=>tZ,gu:()=>iZ,he:()=>sZ,hi:()=>uZ,hr:()=>pZ,hu:()=>gZ,hy:()=>xZ,id:()=>wZ,is:()=>DZ,it:()=>AZ,ja:()=>NZ,ka:()=>IZ,kh:()=>HZ,km:()=>zZ,kn:()=>WZ,ko:()=>qZ,lt:()=>ZZ,mk:()=>tQ,ms:()=>iQ,ne:()=>sQ,nl:()=>uQ,nn:()=>pQ,no:()=>gQ,ota:()=>yQ,pl:()=>TQ,ps:()=>SQ,pt:()=>OQ,ptBR:()=>jQ,ro:()=>PQ,ru:()=>RQ,sk:()=>VQ,sl:()=>WQ,sv:()=>qQ,ta:()=>XQ,th:()=>$Q,tk:()=>n$,tr:()=>a$,ua:()=>d$,uk:()=>c$,ur:()=>p$,uz:()=>g$,vi:()=>y$,yo:()=>O$,zhCN:()=>S$,zhTW:()=>T$}),M$=o((()=>{aX(),cX(),fX(),hX(),vX(),xX(),wX(),DX(),AX(),NX(),IX(),zX(),HX(),GX(),JX(),ZX(),eZ(),rZ(),oZ(),lZ(),fZ(),hZ(),vZ(),CZ(),EZ(),kZ(),MZ(),FZ(),RZ(),UZ(),VZ(),KZ(),YZ(),eQ(),rQ(),oQ(),lQ(),fQ(),hQ(),vQ(),xQ(),wQ(),DQ(),AQ(),NQ(),IQ(),BQ(),UQ(),KQ(),YQ(),QQ(),t$(),i$(),s$(),f$(),u$(),h$(),v$(),x$(),w$(),D$(),A$()}));function N$(){return new L$}var P$,F$,I$,L$,R$,z$=o((()=>{F$=Symbol(`ZodOutput`),I$=Symbol(`ZodInput`),L$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(P$=globalThis).__zod_globalRegistry??(P$.__zod_globalRegistry=N$()),R$=globalThis.__zod_globalRegistry}));function B$(e,t){try{return U$(e,{assertOnly:!0})}catch{return t}}function V$(e,t){try{let t=U$(e),n=qU(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[n0]||n&&JY(n,e.value))return i(e,n);let r=t(e.value);return r===t0?(n&&(n[n0]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=B$(e,t),n._zod.run=a,r.__originalRun||H$(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function H$(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===t0?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===t0?e(t,r):i}}}function U$(e,t){let n=!0;try{n=GY(e)}catch{}if(n)throw new i0(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new Aq([`input`]),a=d1(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[t0,...r.constants.values()],c=i.content.join(` -`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new i0(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function W$(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function G$(e){return`v${e.varCounter++}`}function K$(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return t0;let r=n;return r.issues.length===0?r.value:t0}function q$(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return d1(e,t,n,r,i)}catch(i){if(!(i instanceof i0)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,J$(e,t,n,r)}}function J$(e,t,n,r){let i=W$(t,n),a=W$(t,K$),o=G$(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function Y$(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!a0.has(r.check))throw new i0(`check with a custom "when" condition`);switch(r.check){case`greater_than`:$$(e,t,r,a);break;case`less_than`:e1(e,t,r,a);break;case`multiple_of`:t1(e,t,r,a);break;case`number_format`:n1(e,r,a);break;case`min_length`:{let n=Z$(r.minimum,`min_length`),i=X$(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=Z$(r.maximum,`max_length`),i=X$(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=Z$(r.length,`length_equals`),i=X$(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${Z$(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${Z$(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${Z$(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=u1(e,t,r,a);break;case`custom`:a=l1(e,t,n,a);break;case`bigint_format`:r1(e,r,a);break;case`mime_type`:i1(e,t,r,a);break;case`property`:a1(e,t,r,a);break;case`overwrite`:{let r=G$(t);o1(e,t,n,a,r),a=r;break}default:throw new i0(`check type ${r.check}`)}}return a}function X$(e,t,n,r){let i=W$(t,uW),a=G$(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function Z$(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new i0(`${t} bound of type ${typeof e}`);return`${e}`}function Q$(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new i0(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new i0(`comparison check with Invalid Date bound`);return W$(e,t)}throw new i0(`comparison check bound of type ${typeof t}`)}function $$(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${Q$(t,n.value)}) return INVALID;`)}function e1(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${Q$(t,n.value)}) return INVALID;`)}function t1(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new i0(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=W$(t,LU);e.write(`if (${i}(${r}, ${Z$(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function n1(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new i0(`number format ${r}`)}}function r1(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new i0(`bigint format ${r}`)}}function i1(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=W$(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function a1(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;d1(e,t,n.schema,i)}function o1(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new i0(`overwrite check without a transform function`);if(X1(a))throw new r0(`z.compile: async overwrite transforms are not supported`);let o=W$(t,a);e.write(`const ${i} = ${o}(${r});`)}function s1(){throw new GW}function c1(e){this.issues.push(e)}function l1(e,t,n,r){let i=n._zod.def;if(i.fn){if(X1(i.fn))throw new r0(`z.compile: async .refine() predicates are not supported`);let n=W$(t,i.fn),a=W$(t,s1),o=G$(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(X1(n._zod.check))throw new r0(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=W$(t,e=>{let t={value:e,issues:[],addIssue:c1};return i(t)instanceof Promise&&s1(),t.issues.length===0?t.value:t0}),o=G$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new i0(`custom check without a predicate or check function`)}function u1(e,t,n,r){let i=n.format;if(i===`base64`){let n=W$(t,Vq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=W$(t,Hq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=W$(t,Gq),a=W$(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=W$(t,zq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=W$(t,Bq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=W$(t,Wq);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=W$(t,Fq),o=W$(t,n),s=G$(t),c=G$(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=W$(t,Lq);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=W$(t,Rq);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=G$(t),u=a.normalize?`${c}.href`:`${W$(t,Iq)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(X1(o))throw new i0(`async string format ${i}`);let n=W$(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(o0.has(i)&&n.pattern){let i=W$(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new i0(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${VU(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${VU(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${VU(t)}) return INVALID;`);break}default:throw new i0(`string format ${s}`)}return r}function d1(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new i0(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=f1(e,t,n,r);break;case`number`:c=p1(e,n,r);break;case`boolean`:c=m1(e,r);break;case`bigint`:c=h1(e,n,r);break;case`symbol`:c=g1(e,r);break;case`undefined`:c=_1(e,r);break;case`null`:c=v1(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=y1(e,r);break;case`nan`:c=b1(e,r);break;case`date`:c=x1(e,r);break;case`object`:c=S1(e,t,n,r,s);break;case`optional`:c=C1(e,t,n,r,s);break;case`nullable`:c=k1(e,t,n,r,s);break;case`array`:c=A1(e,t,n,r,s);break;case`literal`:c=j1(e,t,n,r);break;case`enum`:c=M1(e,t,n,r);break;case`readonly`:{let i=N1(e,t,n,r),a=G$(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:N1(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=P1(e,t,n,r);break;case`nonoptional`:c=F1(e,t,n,r);break;case`tuple`:c=I1(e,t,n,r);break;case`union`:c=R1(e,t,n,r);break;case`intersection`:c=V1(e,t,n,r);break;case`record`:c=H1(e,t,n,r);break;case`map`:c=W1(e,t,n,r);break;case`set`:c=G1(e,t,n,r);break;case`file`:c=K1(e,r);break;case`template_literal`:c=q1(e,t,n,r);break;case`lazy`:c=J1(e,t,n,r);break;case`pipe`:c=Y1(e,t,n,r);break;case`custom`:c=Z1(e,t,n,r);break;case`transform`:c=e0(e,t,n,r);break;case`catch`:c=$1(e,t,n,r);break;default:throw new i0(`schema type ${o}`)}return c===null?null:Y$(e,t,n,c)}function f1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:u1(e,t,i,r)}function p1(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&n1(e,{format:r.format},n),n}function m1(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function h1(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function g1(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function _1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function v1(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function y1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function b1(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function x1(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function S1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?W$(t,e):VU(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:VU(e),f=o;if(s.includes(`__proto__`))throw new i0(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=G$(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=G$(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=q$(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{T1(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=q$(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${VU(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=G$(t),_=l.some(e=>O1(f[e])||D1(f[e]));if(!i){if(h===`schema`){let n=s.length>0?W$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=G$(t);e.write(`const ${i} = ${r}[k];`),q$(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);D1(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):O1(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?W$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=G$(t);e.write(`const ${n} = ${r}[k];`);let i=q$(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function C1(e,t,n,r,i=!0){let a=n._zod.def;if(w1(n))return d1(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=G$(t),i=G$(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=d1(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=d1(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?G$(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=d1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function w1(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function T1(e){return e._zod.optin===void 0&&E1(e)}function E1(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?E1(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||E1(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(E1);case`intersection`:return!t.left||!t.right||E1(t.left)&&E1(t.right);case`pipe`:return!t.in||E1(t.in);default:return!0}}function D1(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function O1(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||O1(t.innerType);case`union`:return!t.options||t.options.some(O1);case`intersection`:return!t.left||!t.right||O1(t.left)||O1(t.right);case`pipe`:return!t.out||O1(t.out);default:return!0}}function k1(e,t,n,r,i=!0){let a=n._zod.def,o=i?G$(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=d1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function A1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?G$(t):null,s=G$(t),c=G$(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=q$(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function j1(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=W$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=W$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${VU(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new i0(`literal type ${typeof a}`);return r}function M1(e,t,n,r){let i=n._zod.values;if(!i)throw new i0(`enum schema without enumerated values`);let a=W$(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function N1(e,t,n,r){let i=n._zod.def;return d1(e,t,i.innerType,r)}function P1(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return d1(e,t,i.innerType,r);let n=W$(t,a),o=G$(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),d1(e,t,i.innerType,o)}let o=G$(t);if(a){let n=W$(t,a),s=W$(t,GU);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=d1(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=d1(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function F1(e,t,n,r){let i=n._zod.def,a=d1(e,t,i.innerType,r),o=G$(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function I1(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=L1(a,`optin`),c=L1(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=G$(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=G$(t);e.write(`const ${a} = ${r}[${n}];`);let o=q$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(D1(i)){e.write(`${l}.length = ${n};`);return}let r=G$(t),a=G$(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=q$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=G$(t);e.write(`const ${a} = ${r}[${n}];`);let o=q$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=G$(t),i=G$(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=q$(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function L1(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function R1(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return z1(e,t,i,r);if(i.inclusive===!1)throw new i0(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return d1(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=W$(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=G$(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=d1(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function z1(e,t,n,r){if(n.unionFallback)throw new i0(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=G$(t),a=G$(t);e.write(`const ${i} = ${r}?.[${VU(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new i0(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new i0(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>B1(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=d1(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function B1(e,t,n){if(typeof n==`string`)return`${t} === ${VU(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${W$(e,n)}`;throw new i0(`literal discriminator value ${String(n)}`)}function V1(e,t,n,r){let i=n._zod.def,a=q$(e,t,i.left,r),o=q$(e,t,i.right,r),s=W$(t,$q),c=G$(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function H1(e,t,n,r){let i=n._zod.def,a=W$(t,WU);e.write(`if (!${a}(${r})) return INVALID;`);let o=G$(t),s=G$(t),c=G$(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new i0(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new i0(`record key "__proto__"`);n.push(s);let c=W$(t,a),l=d1(e,t,i.keyType,c),u=G$(t);e.write(`const ${u} = ${r}[${U1(t,s)}];`);let d=q$(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=W$(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=W$(t,U$(i.keyType)),c=W$(t,PK),l=W$(t,Object.prototype.propertyIsEnumerable),u=G$(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=G$(t);e.write(`const ${d} = ${r}[${s}];`);let f=q$(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=W$(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=q$(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function U1(e,t){return typeof t==`string`?VU(t):W$(e,t)}function W1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=G$(t),o=G$(t),s=G$(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=d1(e,t,i.keyType,o),r=d1(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function G1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=G$(t),o=G$(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=d1(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function K1(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function q1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=W$(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function J1(e,t,n,r){let i=n._zod.def,a=W$(t,i.getter),o=W$(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=G$(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function Y1(e,t,n,r){let i=n._zod.def,a=d1(e,t,i.in,r);if(i.transform){if(X1(i.transform))throw new r0(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=W$(t,e=>{let t={value:e,issues:[],addIssue:c1},r=n(e,t);return r instanceof Promise?t0:t.issues.length===0?r:t0}),o=G$(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),d1(e,t,i.out,o)}return d1(e,t,i.out,a)}function X1(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function Z1(e,t,n,r){let i=n._zod.def;if(i.fn){if(X1(i.fn))throw new r0(`z.compile: async custom predicates are not supported`);let n=W$(t,i.fn),a=W$(t,s1),o=G$(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new i0(`custom schema without a predicate function`);return r}function Q1(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return t0;let i=r;return i.issues.length===0?i.value:t()}function $1(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new i0(`catch with a callback (only a constant catch value compiles)`,!1);let a=G$(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=q$(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=W$(t,i.innerType),s=W$(t,i.catchValue),c=W$(t,Q1);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function e0(e,t,n,r){let i=n._zod.def;if(i.transform){if(X1(i.transform))throw new r0(`z.compile: async transforms are not supported`);let n=i.transform,a=W$(t,e=>{let t={value:e,issues:[],addIssue:c1},r=n(e,t);return r instanceof Promise?t0:t.issues.length===0?r:t0}),o=G$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var t0,n0,r0,i0,a0,o0,s0=o((()=>{JW(),jq(),nX(),nq(),HY(),J(),t0=Symbol.for(`zod.compile.invalid`),n0=Symbol.for(`zod.compile.fallback`),r0=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},i0=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},a0=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),o0=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function c0(e,t){return new e({type:`string`,...q(t)})}function l0(e,t){return new e({type:`string`,coerce:!0,...q(t)})}function u0(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function d0(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function f0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function p0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function m0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function h0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function g0(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function _0(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function v0(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function y0(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function b0(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function x0(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function S0(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function C0(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function w0(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function T0(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function E0(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...q(t)})}function D0(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function O0(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function k0(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function A0(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function j0(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function M0(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...q(t)})}function N0(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function P0(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function F0(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function I0(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function L0(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function R0(e,t){return new e({type:`number`,checks:[],...q(t)})}function z0(e,t){return new e({type:`number`,coerce:!0,checks:[],...q(t)})}function B0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function V0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...q(t)})}function H0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...q(t)})}function U0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...q(t)})}function W0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...q(t)})}function G0(e,t){return new e({type:`boolean`,...q(t)})}function K0(e,t){return new e({type:`boolean`,coerce:!0,...q(t)})}function q0(e,t){return new e({type:`bigint`,...q(t)})}function J0(e,t){return new e({type:`bigint`,coerce:!0,...q(t)})}function Y0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...q(t)})}function X0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...q(t)})}function Z0(e,t){return new e({type:`symbol`,...q(t)})}function Q0(e,t){return new e({type:`undefined`,...q(t)})}function $0(e,t){return new e({type:`null`,...q(t)})}function e2(e){return new e({type:`any`})}function t2(e){return new e({type:`unknown`})}function n2(e,t){return new e({type:`never`,...q(t)})}function r2(e,t){return new e({type:`void`,...q(t)})}function i2(e,t){return new e({type:`date`,...q(t)})}function a2(e,t){return new e({type:`date`,coerce:!0,...q(t)})}function o2(e,t){return new e({type:`nan`,...q(t)})}function s2(e,t){return new cq({check:`less_than`,...q(t),value:e,inclusive:!1})}function c2(e,t){return new cq({check:`less_than`,...q(t),value:e,inclusive:!0})}function l2(e,t){return new lq({check:`greater_than`,...q(t),value:e,inclusive:!1})}function u2(e,t){return new lq({check:`greater_than`,...q(t),value:e,inclusive:!0})}function d2(e){return l2(0,e)}function f2(e){return s2(0,e)}function p2(e){return c2(0,e)}function m2(e){return u2(0,e)}function h2(e,t){return new uq({check:`multiple_of`,...q(t),value:e})}function g2(e,t){return new pq({check:`max_size`,...q(t),maximum:e})}function _2(e,t){return new mq({check:`min_size`,...q(t),minimum:e})}function v2(e,t){return new hq({check:`size_equals`,...q(t),size:e})}function y2(e,t){return new gq({check:`max_length`,...q(t),maximum:e})}function b2(e,t){return new _q({check:`min_length`,...q(t),minimum:e})}function x2(e,t){return new vq({check:`length_equals`,...q(t),length:e})}function S2(e,t){return new bq({check:`string_format`,format:`regex`,...q(t),pattern:e})}function C2(e){return new xq({check:`string_format`,format:`lowercase`,...q(e)})}function w2(e){return new Sq({check:`string_format`,format:`uppercase`,...q(e)})}function T2(e,t){return new Cq({check:`string_format`,format:`includes`,...q(t),includes:e})}function E2(e,t){return new wq({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function D2(e,t){return new Tq({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function O2(e,t,n){return new Eq({check:`property`,property:e,schema:t,...q(n)})}function k2(e){return Object.entries(e).map(([e,t])=>new Eq({check:`property`,property:e,schema:t}))}function A2(e,t){return new Dq({check:`mime_type`,mime:e,...q(t)})}function j2(e){return new Oq({check:`overwrite`,tx:e})}function M2(e){return j2(t=>t.normalize(e))}function N2(){return j2(e=>e.trim())}function P2(){return j2(e=>e.toLowerCase())}function F2(){return j2(e=>e.toUpperCase())}function I2(){return j2(e=>HU(e))}function L2(e,t,n){return new e({type:`array`,element:t,...q(n)})}function R2(e,t,n){return new e({type:`union`,options:t,...q(n)})}function z2(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...q(n)})}function B2(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...q(r)})}function V2(e,t,n){return new e({type:`intersection`,left:t,right:n})}function H2(e,t,n,r){let i=n instanceof hJ;return new e({type:`tuple`,items:t,rest:i?n:null,...q(i?r:n)})}function U2(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...q(r)})}function W2(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...q(r)})}function G2(e,t,n){return new e({type:`set`,valueType:t,...q(n)})}function K2(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...q(n)})}function q2(e,t,n){return new e({type:`enum`,entries:t,...q(n)})}function J2(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...q(n)})}function Y2(e,t){return new e({type:`file`,...q(t)})}function X2(e,t){return new e({type:`transform`,transform:t})}function Z2(e,t){return new e({type:`optional`,innerType:t})}function Q2(e,t){return new e({type:`nullable`,innerType:t})}function $2(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():GU(n)}})}function e4(e,t,n){return new e({type:`nonoptional`,innerType:t,...q(n)})}function t4(e,t){return new e({type:`success`,innerType:t})}function n4(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:CW(n)})}function r4(e,t,n){return new e({type:`pipe`,in:t,out:n})}function i4(e,t){return new e({type:`readonly`,innerType:t})}function a4(e,t,n){return new e({type:`template_literal`,parts:t,...q(n)})}function Doe(e,t){return new e({type:`lazy`,getter:t})}function o4(e,t){return new e({type:`promise`,innerType:t})}function s4(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function c4(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function l4(e,t){let n=u4(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(pW(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(pW(r))}},e(t.value,t)),t);return n}function u4(e,t){let n=new iq({check:`custom`,...q(t)});return n._zod.check=e,n}function d4(e){let t=new iq({check:`describe`});return t._zod.onattach=[t=>{let n=R$.get(t)??{};R$.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function f4(e){let t=new iq({check:`meta`});return t._zod.onattach=[t=>{let n=R$.get(t)??{};R$.add(t,{...n,...e})}],t._zod.check=()=>{},t}function p4(e,t){let n=q(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??PY,c=e.Boolean??XJ,l=new s({type:`pipe`,in:new(e.String??_J)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function m4(e,t,n,r={}){let i=q(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var h4,g4=o((()=>{kq(),z$(),HY(),J(),h4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function _4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&zU(e,t,n[t]);return e}function v4(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??R$,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function y4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function b4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,b4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&_4(o.schema,c),t.io===`input`&&O4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function x4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function S4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${x4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+x4(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ + `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=HU,c=!KW.jitless,l=c&&TW.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Jq([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),dY=Y(`$ZodUnion`,(e,t)=>{mJ.init(e,t),bW(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),bW(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),bW(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),bW(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>FU(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Yq(t,r,e,i)):Yq(o,r,e,i)}}),fY=Y(`$ZodXor`,(e,t)=>{dY.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Xq(t,r,e,i)):Xq(o,r,e,i)}}),pY=Y(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,dY.init(e,t);let n=e._zod.parse;bW(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||RU(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=cY.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=NU(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!HU(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),mY=Y(`$ZodIntersection`,(e,t)=>{mJ.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>$q(e,t,n)):$q(e,i,a)}}),hY=Y(`$ZodTuple`,(e,t)=>{mJ.init(e,t);let n=t.items,r=KW.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=eJ(n,`optin`),l=eJ(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>tJ(t,i,e))):tJ(r,i,e)}}return s.length?Promise.all(s).then(()=>nJ(u,i,n,o,l)):nJ(u,i,n,o,l)}}),gY=Y(`$ZodRecord`,(e,t)=>{mJ.init(e,t);let n=KW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!UU(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>sW(e,i,RW())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...iW(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...iW(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&NK.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>sW(e,i,RW())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...iW(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...iW(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),_Y=Y(`$ZodMap`,(e,t)=>{mJ.init(e,t);let n=KW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{rJ(t,o,r,n,a,e,i)})):rJ(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),vY=Y(`$ZodSet`,(e,t)=>{mJ.init(e,t);let n=KW.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>iJ(e,r))):iJ(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),yY=Y(`$ZodEnum`,(e,t)=>{mJ.init(e,t);let n=jU(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>DW.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>GU(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),bY=Y(`$ZodLiteral`,(e,t)=>{mJ.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?GU(e):e?GU(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),xY=Y(`$ZodFile`,(e,t)=>{mJ.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),SY=Y(`$ZodTransform`,(e,t)=>{mJ.init(e,t),e._zod.optin=`optional`,KW.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new GW(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new WW;return n.value=i,n}}),CY=Y(`$ZodOptional`,(e,t)=>{mJ.init(e,t),bW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,bW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),bW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${FU(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>aJ(e,t)):aJ(e,r)}return t.innerType._zod.run(e,n)}}),wY=Y(`$ZodExactOptional`,(e,t)=>{CY.init(e,t),bW(e,`values`,e=>e.def.innerType._zod.values),bW(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),TY=Y(`$ZodNullable`,(e,t)=>{mJ.init(e,t),bW(e,`optin`,e=>e.def.innerType._zod.optin),bW(e,`optout`,e=>e.def.innerType._zod.optout),bW(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${FU(t.source)}|null)$`):void 0}),bW(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),EY=Y(`$ZodDefault`,(e,t)=>{mJ.init(e,t),e._zod.optin=`defaulted`,bW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>oJ(e,t)):oJ(r,t)}}),DY=Y(`$ZodPrefault`,(e,t)=>{mJ.init(e,t),e._zod.optin=`defaulted`,bW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),OY=Y(`$ZodNonOptional`,(e,t)=>{mJ.init(e,t),bW(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>sJ(t,e)):sJ(i,e)}}),kY=Y(`$ZodSuccess`,(e,t)=>{mJ.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new GW(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),AY=Y(`$ZodCatch`,(e,t)=>{mJ.init(e,t),bW(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),bW(e,`optout`,e=>e.def.innerType._zod.optout),bW(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>cJ(e,r,t,n)):cJ(e,r,t,n)}}),jY=Y(`$ZodNaN`,(e,t)=>{mJ.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),MY=Y(`$ZodPipe`,(e,t)=>{mJ.init(e,t),bW(e,`values`,e=>e.def.in._zod.values),bW(e,`optin`,e=>e.def.in._zod.optin),bW(e,`optout`,e=>e.def.out._zod.optout),bW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>lJ(e,t.in,n)):lJ(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>lJ(e,t.out,n)):lJ(r,t.out,n)}}),NY=Y(`$ZodCodec`,(e,t)=>{mJ.init(e,t),bW(e,`values`,e=>e.def.in._zod.values),bW(e,`optin`,e=>e.def.in._zod.optin),bW(e,`optout`,e=>e.def.out._zod.optout),bW(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>uJ(e,t,n)):uJ(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>uJ(e,t,n)):uJ(r,t,n)}}}),PY=Y(`$ZodPreprocess`,(e,t)=>{MY.init(e,t)}),FY=Y(`$ZodReadonly`,(e,t)=>{mJ.init(e,t),bW(e,`propValues`,e=>e.def.innerType._zod.propValues),bW(e,`values`,e=>e.def.innerType._zod.values),bW(e,`optin`,e=>e.def.innerType?._zod?.optin),bW(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fJ):fJ(r)}}),IY=Y(`$ZodTemplateLiteral`,(e,t)=>{mJ.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||OW.has(typeof e))n.push(GU(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),LY=Y(`$ZodFunction`,(e,t)=>(mJ.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?pG(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?pG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await hG(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await hG(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new hY({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),RY=Y(`$ZodPromise`,(e,t)=>{mJ.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),zY=Y(`$ZodLazy`,(e,t)=>{mJ.init(e,t),LU(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),bW(e,`pattern`,e=>e.innerType?._zod?.pattern),bW(e,`propValues`,e=>e.innerType?._zod?.propValues),bW(e,`optin`,e=>e.innerType?._zod?.optin??void 0),bW(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),BY=Y(`$ZodCustom`,(e,t)=>{rq.init(e,t),mJ.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>pJ(t,n,r,e));pJ(i,n,r,e)}})}));function HY(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function UY(e,t){let n=ZY.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&UY(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),ZY.set(e,r),r}function WY(e){return UY(e,new Set)}function GY(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function KY(){return eX}function qY(e,t){let n=e[YY]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var JY,YY,XY,ZY,QY,$Y,eX,tX=o((()=>{JY=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},YY=`~memo`,XY=[],ZY=new WeakMap,$Y=[],eX={alloc(e,t,n){let r=QY;if(!r)return n;QY=void 0;let i={value:n,issues:null};return r.set(t.value,i),$Y.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&qY(n,e.value))throw new JY;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=UY(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[YY];l||(l={buckets:new Map,backEdges:void 0},s[YY]=l);let u;r===s?u=i:(u=GY(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...HY(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;QY=u;let f=$Y.length,p=t(o,s);QY=void 0;let m=$Y.length>f?$Y.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?HY(e.issues):XY),e)):(m&&(m.issues=p.issues.length?HY(p.issues):XY),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function nX(){return{localeError:rX()}}var rX,iX=o((()=>{J(),rX=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${qU(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function aX(){return{localeError:oX()}}var oX,sX=o((()=>{J(),oX=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${qU(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function cX(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function lX(){return{localeError:uX()}}var uX,dX=o((()=>{J(),uX=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${qU(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=cX(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=cX(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function fX(){return{localeError:pX()}}var pX,mX=o((()=>{J(),pX=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${qU(e.values[0])}`:`Невалидна опция: очаквано едно от ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function hX(){return{localeError:gX()}}var gX,_X=o((()=>{J(),gX=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${qU(e.values[0])}`:`অবৈধ অপশন: ${K(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function vX(){return{localeError:yX()}}var yX,bX=o((()=>{J(),yX=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${qU(e.values[0])}`:`Opció invàlida: s'esperava una de ${K(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function xX(){return{localeError:SX()}}var SX,CX=o((()=>{J(),SX=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${qU(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${K(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function wX(){return{localeError:TX()}}var TX,EX=o((()=>{J(),TX=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${qU(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function DX(){return{localeError:OX()}}var OX,kX=o((()=>{J(),OX=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${qU(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function AX(){return{localeError:jX()}}var jX,MX=o((()=>{J(),jX=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${qU(e.values[0])}`:`Ungültige Option: erwartet eine von ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function NX(){return{localeError:PX()}}var PX,FX=o((()=>{J(),PX=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${qU(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function IX(){return{localeError:LX()}}var LX,RX=o((()=>{J(),LX=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(dW(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${qU(e.values[0])}`:`Invalid option: expected one of ${K(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function zX(){return{localeError:BX()}}var BX,VX=o((()=>{J(),BX=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${qU(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function HX(){return{localeError:UX()}}var UX,WX=o((()=>{J(),UX=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${qU(e.values[0])}`:`Opción inválida: se esperaba una de ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function GX(){return{localeError:KX()}}var KX,qX=o((()=>{J(),KX=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${qU(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${K(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${K(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function JX(){return{localeError:YX()}}var YX,XX=o((()=>{J(),YX=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${qU(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function ZX(){return{localeError:QX()}}var QX,$X=o((()=>{J(),QX=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${qU(e.values[0])} attendu`:`Option invalide : une valeur parmi ${K(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function eZ(){return{localeError:tZ()}}var tZ,nZ=o((()=>{J(),tZ=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${qU(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${K(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function rZ(){return{localeError:iZ()}}var iZ,aZ=o((()=>{J(),iZ=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${qU(e.values[0])}`:`અમાન્ય વિકલ્પ: ${K(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function oZ(){return{localeError:sZ()}}var sZ,cZ=o((()=>{J(),sZ=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=dW(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${qU(t.values[0])}`;let e=t.values.map(e=>qU(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${K(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function lZ(){return{localeError:uZ()}}var uZ,dZ=o((()=>{J(),uZ=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${qU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function fZ(){return{localeError:pZ()}}var pZ,mZ=o((()=>{J(),pZ=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${qU(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function hZ(){return{localeError:gZ()}}var gZ,_Z=o((()=>{J(),gZ=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${qU(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function vZ(e,t,n){return Math.abs(e)===1?t:n}function yZ(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function bZ(){return{localeError:xZ()}}var xZ,SZ=o((()=>{J(),xZ=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${qU(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=vZ(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${yZ(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${yZ(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=vZ(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${yZ(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${yZ(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${K(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${yZ(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${yZ(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function CZ(){return{localeError:wZ()}}var wZ,TZ=o((()=>{J(),wZ=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${qU(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function EZ(){return{localeError:DZ()}}var DZ,OZ=o((()=>{J(),DZ=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${qU(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function kZ(){return{localeError:AZ()}}var AZ,jZ=o((()=>{J(),AZ=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${qU(e.values[0])}`:`Opzione non valida: atteso uno tra ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function MZ(){return{localeError:NZ()}}var NZ,PZ=o((()=>{J(),NZ=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${qU(e.values[0])}が期待されました`:`無効な選択: ${K(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function FZ(){return{localeError:IZ()}}var IZ,LZ=o((()=>{J(),IZ=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${qU(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${K(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function RZ(){return{localeError:zZ()}}var zZ,BZ=o((()=>{J(),zZ=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${qU(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${K(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function VZ(){return RZ()}var HZ=o((()=>{BZ()}));function UZ(){return{localeError:WZ()}}var WZ,GZ=o((()=>{J(),WZ=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${qU(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function KZ(){return{localeError:qZ()}}var qZ,JZ=o((()=>{J(),qZ=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${qU(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${K(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${K(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function YZ(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function XZ(){return{localeError:QZ()}}var ZZ,QZ,$Z=o((()=>{J(),ZZ=e=>e.charAt(0).toUpperCase()+e.slice(1),QZ=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${qU(e.values[0])}`:`Privalo būti vienas iš ${K(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,YZ(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${ZZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${ZZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,YZ(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${ZZ(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${ZZ(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${ZZ(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function eQ(){return{localeError:tQ()}}var tQ,nQ=o((()=>{J(),tQ=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${qU(e.values[0])}`:`Грешана опција: се очекува една ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function rQ(){return{localeError:iQ()}}var iQ,aQ=o((()=>{J(),iQ=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${qU(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${K(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function oQ(){return{localeError:sQ()}}var sQ,cQ=o((()=>{J(),sQ=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${qU(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function lQ(){return{localeError:uQ()}}var uQ,dQ=o((()=>{J(),uQ=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${qU(e.values[0])}`:`Ongeldige optie: verwacht één van ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function fQ(){return{localeError:pQ()}}var pQ,mQ=o((()=>{J(),pQ=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${qU(e.values[0])}`:`Ugyldig val: forventa eitt av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function hQ(){return{localeError:gQ()}}var gQ,_Q=o((()=>{J(),gQ=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${qU(e.values[0])}`:`Ugyldig valg: forventet en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function vQ(){return{localeError:yQ()}}var yQ,bQ=o((()=>{J(),yQ=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${qU(e.values[0])}`:`Fâsit tercih: mûteberler ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function xQ(){return{localeError:SQ()}}var SQ,CQ=o((()=>{J(),SQ=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${qU(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${K(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function wQ(){return{localeError:TQ()}}var TQ,EQ=o((()=>{J(),TQ=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${qU(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function DQ(){return{localeError:OQ()}}var OQ,kQ=o((()=>{J(),OQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(dW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${qU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function AQ(){return{localeError:jQ()}}var jQ,MQ=o((()=>{J(),jQ=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(dW(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${qU(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${K(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function NQ(){return{localeError:PQ()}}var PQ,FQ=o((()=>{J(),PQ=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${qU(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${K(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function IQ(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function LQ(){return{localeError:RQ()}}var RQ,zQ=o((()=>{J(),RQ=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${qU(e.values[0])}`:`Неверный вариант: ожидалось одно из ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=IQ(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=IQ(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function BQ(){return{localeError:VQ()}}var VQ,HQ=o((()=>{J(),VQ=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${qU(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function UQ(){return{localeError:WQ()}}var WQ,GQ=o((()=>{J(),WQ=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${qU(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function KQ(){return{localeError:qQ()}}var qQ,JQ=o((()=>{J(),qQ=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${qU(e.values[0])}`:`Ogiltigt val: förväntade en av ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function YQ(){return{localeError:XQ()}}var XQ,ZQ=o((()=>{J(),XQ=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${qU(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${K(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function QQ(){return{localeError:$Q()}}var $Q,e$=o((()=>{J(),$Q=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${qU(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${K(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function t$(){return{localeError:n$()}}var n$,r$=o((()=>{J(),n$=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${qU(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function i$(){return{localeError:a$()}}var a$,o$=o((()=>{J(),a$=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${qU(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function s$(){return{localeError:c$()}}var c$,l$=o((()=>{J(),c$=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${qU(e.values[0])}`:`Неправильна опція: очікується одне з ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function u$(){return s$()}var d$=o((()=>{l$()}));function f$(){return{localeError:p$()}}var p$,m$=o((()=>{J(),p$=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${qU(e.values[0])} متوقع تھا`:`غلط آپشن: ${K(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${K(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function h$(){return{localeError:g$()}}var g$,_$=o((()=>{J(),g$=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${qU(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function v$(){return{localeError:y$()}}var y$,b$=o((()=>{J(),y$=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${qU(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${K(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function x$(){return{localeError:S$()}}var S$,C$=o((()=>{J(),S$=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${qU(e.values[0])}`:`无效选项:期望以下之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${K(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function w$(){return{localeError:T$()}}var T$,E$=o((()=>{J(),T$=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${qU(e.values[0])}`:`無效的選項:預期為以下其中之一 ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${K(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function D$(){return{localeError:O$()}}var O$,k$=o((()=>{J(),O$=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=dW(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${qU(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${K(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${K(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),A$=c({ar:()=>nX,az:()=>aX,be:()=>lX,bg:()=>fX,bn:()=>hX,ca:()=>vX,ckb:()=>xX,cs:()=>wX,da:()=>DX,de:()=>AX,el:()=>NX,en:()=>IX,eo:()=>zX,es:()=>HX,fa:()=>GX,fi:()=>JX,fr:()=>ZX,frCA:()=>eZ,gu:()=>rZ,he:()=>oZ,hi:()=>lZ,hr:()=>fZ,hu:()=>hZ,hy:()=>bZ,id:()=>CZ,is:()=>EZ,it:()=>kZ,ja:()=>MZ,ka:()=>FZ,kh:()=>VZ,km:()=>RZ,kn:()=>UZ,ko:()=>KZ,lt:()=>XZ,mk:()=>eQ,ms:()=>rQ,ne:()=>oQ,nl:()=>lQ,nn:()=>fQ,no:()=>hQ,ota:()=>vQ,pl:()=>wQ,ps:()=>xQ,pt:()=>DQ,ptBR:()=>AQ,ro:()=>NQ,ru:()=>LQ,sk:()=>BQ,sl:()=>UQ,sv:()=>KQ,ta:()=>YQ,th:()=>QQ,tk:()=>t$,tr:()=>i$,ua:()=>u$,uk:()=>s$,ur:()=>f$,uz:()=>h$,vi:()=>v$,yo:()=>D$,zhCN:()=>x$,zhTW:()=>w$}),j$=o((()=>{iX(),sX(),dX(),mX(),_X(),bX(),CX(),EX(),kX(),MX(),FX(),RX(),VX(),WX(),qX(),XX(),$X(),nZ(),aZ(),cZ(),dZ(),mZ(),_Z(),SZ(),TZ(),OZ(),jZ(),PZ(),LZ(),HZ(),BZ(),GZ(),JZ(),$Z(),nQ(),aQ(),cQ(),dQ(),mQ(),_Q(),bQ(),CQ(),EQ(),kQ(),MQ(),FQ(),zQ(),HQ(),GQ(),JQ(),ZQ(),e$(),r$(),o$(),d$(),l$(),m$(),_$(),b$(),C$(),E$(),k$()}));function M$(){return new I$}var N$,P$,F$,I$,L$,R$=o((()=>{P$=Symbol(`ZodOutput`),F$=Symbol(`ZodInput`),I$=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(N$=globalThis).__zod_globalRegistry??(N$.__zod_globalRegistry=M$()),L$=globalThis.__zod_globalRegistry}));function z$(e,t){try{return H$(e,{assertOnly:!0})}catch{return t}}function B$(e,t){try{let t=H$(e),n=KU(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[t0]||n&&qY(n,e.value))return i(e,n);let r=t(e.value);return r===e0?(n&&(n[t0]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=z$(e,t),n._zod.run=a,r.__originalRun||V$(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function V$(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===e0?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===e0?e(t,r):i}}}function H$(e,t){let n=!0;try{n=WY(e)}catch{}if(n)throw new r0(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new kq([`input`]),a=u1(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[e0,...r.constants.values()],c=i.content.join(` +`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new r0(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function U$(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function W$(e){return`v${e.varCounter++}`}function G$(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return e0;let r=n;return r.issues.length===0?r.value:e0}function K$(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return u1(e,t,n,r,i)}catch(i){if(!(i instanceof r0)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,q$(e,t,n,r)}}function q$(e,t,n,r){let i=U$(t,n),a=U$(t,G$),o=W$(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function J$(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!i0.has(r.check))throw new r0(`check with a custom "when" condition`);switch(r.check){case`greater_than`:Q$(e,t,r,a);break;case`less_than`:$$(e,t,r,a);break;case`multiple_of`:e1(e,t,r,a);break;case`number_format`:t1(e,r,a);break;case`min_length`:{let n=X$(r.minimum,`min_length`),i=Y$(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=X$(r.maximum,`max_length`),i=Y$(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=X$(r.length,`length_equals`),i=Y$(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${X$(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${X$(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${X$(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=l1(e,t,r,a);break;case`custom`:a=c1(e,t,n,a);break;case`bigint_format`:n1(e,r,a);break;case`mime_type`:r1(e,t,r,a);break;case`property`:i1(e,t,r,a);break;case`overwrite`:{let r=W$(t);a1(e,t,n,a,r),a=r;break}default:throw new r0(`check type ${r.check}`)}}return a}function Y$(e,t,n,r){let i=U$(t,lW),a=W$(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function X$(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new r0(`${t} bound of type ${typeof e}`);return`${e}`}function Z$(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new r0(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new r0(`comparison check with Invalid Date bound`);return U$(e,t)}throw new r0(`comparison check bound of type ${typeof t}`)}function Q$(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${Z$(t,n.value)}) return INVALID;`)}function $$(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${Z$(t,n.value)}) return INVALID;`)}function e1(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new r0(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=U$(t,IU);e.write(`if (${i}(${r}, ${X$(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function t1(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new r0(`number format ${r}`)}}function n1(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new r0(`bigint format ${r}`)}}function r1(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=U$(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function i1(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;u1(e,t,n.schema,i)}function a1(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new r0(`overwrite check without a transform function`);if(Y1(a))throw new n0(`z.compile: async overwrite transforms are not supported`);let o=U$(t,a);e.write(`const ${i} = ${o}(${r});`)}function o1(){throw new WW}function s1(e){this.issues.push(e)}function c1(e,t,n,r){let i=n._zod.def;if(i.fn){if(Y1(i.fn))throw new n0(`z.compile: async .refine() predicates are not supported`);let n=U$(t,i.fn),a=U$(t,o1),o=W$(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(Y1(n._zod.check))throw new n0(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=U$(t,e=>{let t={value:e,issues:[],addIssue:s1};return i(t)instanceof Promise&&o1(),t.issues.length===0?t.value:e0}),o=W$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new r0(`custom check without a predicate or check function`)}function l1(e,t,n,r){let i=n.format;if(i===`base64`){let n=U$(t,Bq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=U$(t,Vq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=U$(t,Wq),a=U$(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=U$(t,Rq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=U$(t,zq);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=U$(t,Uq);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=U$(t,Pq),o=U$(t,n),s=W$(t),c=W$(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=U$(t,Iq);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=U$(t,Lq);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=W$(t),u=a.normalize?`${c}.href`:`${U$(t,Fq)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(Y1(o))throw new r0(`async string format ${i}`);let n=U$(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(a0.has(i)&&n.pattern){let i=U$(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new r0(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${BU(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${BU(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${BU(t)}) return INVALID;`);break}default:throw new r0(`string format ${s}`)}return r}function u1(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new r0(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=d1(e,t,n,r);break;case`number`:c=f1(e,n,r);break;case`boolean`:c=p1(e,r);break;case`bigint`:c=m1(e,n,r);break;case`symbol`:c=h1(e,r);break;case`undefined`:c=g1(e,r);break;case`null`:c=_1(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=v1(e,r);break;case`nan`:c=y1(e,r);break;case`date`:c=b1(e,r);break;case`object`:c=x1(e,t,n,r,s);break;case`optional`:c=S1(e,t,n,r,s);break;case`nullable`:c=O1(e,t,n,r,s);break;case`array`:c=k1(e,t,n,r,s);break;case`literal`:c=A1(e,t,n,r);break;case`enum`:c=j1(e,t,n,r);break;case`readonly`:{let i=M1(e,t,n,r),a=W$(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:M1(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=N1(e,t,n,r);break;case`nonoptional`:c=P1(e,t,n,r);break;case`tuple`:c=F1(e,t,n,r);break;case`union`:c=L1(e,t,n,r);break;case`intersection`:c=B1(e,t,n,r);break;case`record`:c=V1(e,t,n,r);break;case`map`:c=U1(e,t,n,r);break;case`set`:c=W1(e,t,n,r);break;case`file`:c=G1(e,r);break;case`template_literal`:c=K1(e,t,n,r);break;case`lazy`:c=q1(e,t,n,r);break;case`pipe`:c=J1(e,t,n,r);break;case`custom`:c=X1(e,t,n,r);break;case`transform`:c=$1(e,t,n,r);break;case`catch`:c=Q1(e,t,n,r);break;default:throw new r0(`schema type ${o}`)}return c===null?null:J$(e,t,n,c)}function d1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:l1(e,t,i,r)}function f1(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&t1(e,{format:r.format},n),n}function p1(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function m1(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function h1(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function g1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function _1(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function v1(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function y1(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function b1(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function x1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?U$(t,e):BU(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:BU(e),f=o;if(s.includes(`__proto__`))throw new r0(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=W$(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=W$(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=K$(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{w1(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=K$(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${BU(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=W$(t),_=l.some(e=>D1(f[e])||E1(f[e]));if(!i){if(h===`schema`){let n=s.length>0?U$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=W$(t);e.write(`const ${i} = ${r}[k];`),K$(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);E1(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):D1(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?U$(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=W$(t);e.write(`const ${n} = ${r}[k];`);let i=K$(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function S1(e,t,n,r,i=!0){let a=n._zod.def;if(C1(n))return u1(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=W$(t),i=W$(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=u1(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=u1(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?W$(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=u1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function C1(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function w1(e){return e._zod.optin===void 0&&T1(e)}function T1(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?T1(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||T1(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(T1);case`intersection`:return!t.left||!t.right||T1(t.left)&&T1(t.right);case`pipe`:return!t.in||T1(t.in);default:return!0}}function E1(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function D1(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||D1(t.innerType);case`union`:return!t.options||t.options.some(D1);case`intersection`:return!t.left||!t.right||D1(t.left)||D1(t.right);case`pipe`:return!t.out||D1(t.out);default:return!0}}function O1(e,t,n,r,i=!0){let a=n._zod.def,o=i?W$(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=u1(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function k1(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?W$(t):null,s=W$(t),c=W$(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=K$(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function A1(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=U$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=U$(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${BU(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new r0(`literal type ${typeof a}`);return r}function j1(e,t,n,r){let i=n._zod.values;if(!i)throw new r0(`enum schema without enumerated values`);let a=U$(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function M1(e,t,n,r){let i=n._zod.def;return u1(e,t,i.innerType,r)}function N1(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return u1(e,t,i.innerType,r);let n=U$(t,a),o=W$(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),u1(e,t,i.innerType,o)}let o=W$(t);if(a){let n=U$(t,a),s=U$(t,WU);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=u1(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=u1(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function P1(e,t,n,r){let i=n._zod.def,a=u1(e,t,i.innerType,r),o=W$(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function F1(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=I1(a,`optin`),c=I1(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=W$(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=W$(t);e.write(`const ${a} = ${r}[${n}];`);let o=K$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(E1(i)){e.write(`${l}.length = ${n};`);return}let r=W$(t),a=W$(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=K$(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=W$(t);e.write(`const ${a} = ${r}[${n}];`);let o=K$(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=W$(t),i=W$(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=K$(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function I1(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function L1(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return R1(e,t,i,r);if(i.inclusive===!1)throw new r0(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return u1(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=U$(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=W$(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=u1(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function R1(e,t,n,r){if(n.unionFallback)throw new r0(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=W$(t),a=W$(t);e.write(`const ${i} = ${r}?.[${BU(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new r0(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new r0(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>z1(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=u1(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function z1(e,t,n){if(typeof n==`string`)return`${t} === ${BU(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${U$(e,n)}`;throw new r0(`literal discriminator value ${String(n)}`)}function B1(e,t,n,r){let i=n._zod.def,a=K$(e,t,i.left,r),o=K$(e,t,i.right,r),s=U$(t,Qq),c=W$(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function V1(e,t,n,r){let i=n._zod.def,a=U$(t,UU);e.write(`if (!${a}(${r})) return INVALID;`);let o=W$(t),s=W$(t),c=W$(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new r0(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new r0(`record key "__proto__"`);n.push(s);let c=U$(t,a),l=u1(e,t,i.keyType,c),u=W$(t);e.write(`const ${u} = ${r}[${H1(t,s)}];`);let d=K$(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=U$(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=U$(t,H$(i.keyType)),c=U$(t,NK),l=U$(t,Object.prototype.propertyIsEnumerable),u=W$(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=W$(t);e.write(`const ${d} = ${r}[${s}];`);let f=K$(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=U$(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=K$(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function H1(e,t){return typeof t==`string`?BU(t):U$(e,t)}function U1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=W$(t),o=W$(t),s=W$(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=u1(e,t,i.keyType,o),r=u1(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function W1(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=W$(t),o=W$(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=u1(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function G1(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function K1(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=U$(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function q1(e,t,n,r){let i=n._zod.def,a=U$(t,i.getter),o=U$(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=W$(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function J1(e,t,n,r){let i=n._zod.def,a=u1(e,t,i.in,r);if(i.transform){if(Y1(i.transform))throw new n0(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=U$(t,e=>{let t={value:e,issues:[],addIssue:s1},r=n(e,t);return r instanceof Promise?e0:t.issues.length===0?r:e0}),o=W$(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),u1(e,t,i.out,o)}return u1(e,t,i.out,a)}function Y1(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function X1(e,t,n,r){let i=n._zod.def;if(i.fn){if(Y1(i.fn))throw new n0(`z.compile: async custom predicates are not supported`);let n=U$(t,i.fn),a=U$(t,o1),o=W$(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new r0(`custom schema without a predicate function`);return r}function Z1(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return e0;let i=r;return i.issues.length===0?i.value:t()}function Q1(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new r0(`catch with a callback (only a constant catch value compiles)`,!1);let a=W$(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=K$(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=U$(t,i.innerType),s=U$(t,i.catchValue),c=U$(t,Z1);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function $1(e,t,n,r){let i=n._zod.def;if(i.transform){if(Y1(i.transform))throw new n0(`z.compile: async transforms are not supported`);let n=i.transform,a=U$(t,e=>{let t={value:e,issues:[],addIssue:s1},r=n(e,t);return r instanceof Promise?e0:t.issues.length===0?r:e0}),o=W$(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var e0,t0,n0,r0,i0,a0,o0=o((()=>{qW(),Aq(),tX(),tq(),VY(),J(),e0=Symbol.for(`zod.compile.invalid`),t0=Symbol.for(`zod.compile.fallback`),n0=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},r0=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},i0=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),a0=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function s0(e,t){return new e({type:`string`,...q(t)})}function c0(e,t){return new e({type:`string`,coerce:!0,...q(t)})}function l0(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...q(t)})}function u0(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...q(t)})}function d0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...q(t)})}function f0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...q(t)})}function p0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...q(t)})}function m0(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...q(t)})}function h0(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...q(t)})}function g0(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...q(t)})}function _0(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...q(t)})}function v0(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...q(t)})}function y0(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...q(t)})}function b0(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...q(t)})}function x0(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...q(t)})}function S0(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...q(t)})}function C0(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...q(t)})}function w0(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...q(t)})}function T0(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...q(t)})}function E0(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...q(t)})}function D0(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...q(t)})}function O0(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...q(t)})}function k0(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...q(t)})}function A0(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...q(t)})}function j0(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...q(t)})}function M0(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...q(t)})}function N0(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...q(t)})}function P0(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...q(t)})}function F0(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...q(t)})}function I0(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...q(t)})}function L0(e,t){return new e({type:`number`,checks:[],...q(t)})}function R0(e,t){return new e({type:`number`,coerce:!0,checks:[],...q(t)})}function z0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...q(t)})}function B0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...q(t)})}function V0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...q(t)})}function H0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...q(t)})}function U0(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...q(t)})}function W0(e,t){return new e({type:`boolean`,...q(t)})}function G0(e,t){return new e({type:`boolean`,coerce:!0,...q(t)})}function K0(e,t){return new e({type:`bigint`,...q(t)})}function q0(e,t){return new e({type:`bigint`,coerce:!0,...q(t)})}function J0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...q(t)})}function Y0(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...q(t)})}function X0(e,t){return new e({type:`symbol`,...q(t)})}function Z0(e,t){return new e({type:`undefined`,...q(t)})}function Q0(e,t){return new e({type:`null`,...q(t)})}function $0(e){return new e({type:`any`})}function e2(e){return new e({type:`unknown`})}function t2(e,t){return new e({type:`never`,...q(t)})}function n2(e,t){return new e({type:`void`,...q(t)})}function r2(e,t){return new e({type:`date`,...q(t)})}function i2(e,t){return new e({type:`date`,coerce:!0,...q(t)})}function a2(e,t){return new e({type:`nan`,...q(t)})}function o2(e,t){return new sq({check:`less_than`,...q(t),value:e,inclusive:!1})}function s2(e,t){return new sq({check:`less_than`,...q(t),value:e,inclusive:!0})}function c2(e,t){return new cq({check:`greater_than`,...q(t),value:e,inclusive:!1})}function l2(e,t){return new cq({check:`greater_than`,...q(t),value:e,inclusive:!0})}function u2(e){return c2(0,e)}function d2(e){return o2(0,e)}function f2(e){return s2(0,e)}function p2(e){return l2(0,e)}function m2(e,t){return new lq({check:`multiple_of`,...q(t),value:e})}function h2(e,t){return new fq({check:`max_size`,...q(t),maximum:e})}function g2(e,t){return new pq({check:`min_size`,...q(t),minimum:e})}function _2(e,t){return new mq({check:`size_equals`,...q(t),size:e})}function v2(e,t){return new hq({check:`max_length`,...q(t),maximum:e})}function y2(e,t){return new gq({check:`min_length`,...q(t),minimum:e})}function b2(e,t){return new _q({check:`length_equals`,...q(t),length:e})}function x2(e,t){return new yq({check:`string_format`,format:`regex`,...q(t),pattern:e})}function S2(e){return new bq({check:`string_format`,format:`lowercase`,...q(e)})}function C2(e){return new xq({check:`string_format`,format:`uppercase`,...q(e)})}function w2(e,t){return new Sq({check:`string_format`,format:`includes`,...q(t),includes:e})}function T2(e,t){return new Cq({check:`string_format`,format:`starts_with`,...q(t),prefix:e})}function E2(e,t){return new wq({check:`string_format`,format:`ends_with`,...q(t),suffix:e})}function D2(e,t,n){return new Tq({check:`property`,property:e,schema:t,...q(n)})}function O2(e){return Object.entries(e).map(([e,t])=>new Tq({check:`property`,property:e,schema:t}))}function k2(e,t){return new Eq({check:`mime_type`,mime:e,...q(t)})}function A2(e){return new Dq({check:`overwrite`,tx:e})}function j2(e){return A2(t=>t.normalize(e))}function M2(){return A2(e=>e.trim())}function N2(){return A2(e=>e.toLowerCase())}function P2(){return A2(e=>e.toUpperCase())}function F2(){return A2(e=>VU(e))}function I2(e,t,n){return new e({type:`array`,element:t,...q(n)})}function L2(e,t,n){return new e({type:`union`,options:t,...q(n)})}function R2(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...q(n)})}function z2(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...q(r)})}function B2(e,t,n){return new e({type:`intersection`,left:t,right:n})}function V2(e,t,n,r){let i=n instanceof mJ;return new e({type:`tuple`,items:t,rest:i?n:null,...q(i?r:n)})}function H2(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...q(r)})}function U2(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...q(r)})}function W2(e,t,n){return new e({type:`set`,valueType:t,...q(n)})}function G2(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...q(n)})}function K2(e,t,n){return new e({type:`enum`,entries:t,...q(n)})}function q2(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...q(n)})}function J2(e,t){return new e({type:`file`,...q(t)})}function Y2(e,t){return new e({type:`transform`,transform:t})}function X2(e,t){return new e({type:`optional`,innerType:t})}function Z2(e,t){return new e({type:`nullable`,innerType:t})}function Q2(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():WU(n)}})}function $2(e,t,n){return new e({type:`nonoptional`,innerType:t,...q(n)})}function e4(e,t){return new e({type:`success`,innerType:t})}function t4(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:SW(n)})}function n4(e,t,n){return new e({type:`pipe`,in:t,out:n})}function r4(e,t){return new e({type:`readonly`,innerType:t})}function koe(e,t,n){return new e({type:`template_literal`,parts:t,...q(n)})}function i4(e,t){return new e({type:`lazy`,getter:t})}function a4(e,t){return new e({type:`promise`,innerType:t})}function o4(e,t,n){let r=q(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function s4(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...q(n)})}function c4(e,t){let n=l4(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(fW(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(fW(r))}},e(t.value,t)),t);return n}function l4(e,t){let n=new rq({check:`custom`,...q(t)});return n._zod.check=e,n}function u4(e){let t=new rq({check:`describe`});return t._zod.onattach=[t=>{let n=L$.get(t)??{};L$.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function d4(e){let t=new rq({check:`meta`});return t._zod.onattach=[t=>{let n=L$.get(t)??{};L$.add(t,{...n,...e})}],t._zod.check=()=>{},t}function f4(e,t){let n=q(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??NY,c=e.Boolean??YJ,l=new s({type:`pipe`,in:new(e.String??gJ)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function p4(e,t,n,r={}){let i=q(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var m4,h4=o((()=>{Oq(),R$(),VY(),J(),m4={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function g4(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&RU(e,t,n[t]);return e}function _4(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??L$,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function v4(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function y4(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,y4(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&g4(o.schema,c),t.io===`input`&&D4(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function b4(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function x4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${b4(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+b4(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function C4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;C4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function w4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function T4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!k4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??w4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}zU(n,r,e.length===1?e[0]:T4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=w4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function E4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of k4)if(t in e)return;let n=t.filter(e=>A4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=T4(t);else{let e=n[0],i=A4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>T4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,_4(e,r))}function D4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):_4(i,s),_4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())C4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])E4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}_4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,zU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:M4(t,`input`,e.processors),output:M4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function O4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return O4(r.element,n);if(r.type===`set`)return O4(r.valueType,n);if(r.type===`lazy`)return O4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return O4(r.innerType,n);if(r.type===`intersection`)return O4(r.left,n)||O4(r.right,n);if(r.type===`record`||r.type===`map`)return O4(r.keyType,n)||O4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:O4(r.in,n)||O4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(O4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(O4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(O4(e,n))return!0;return!!(r.rest&&O4(r.rest,n))}return!1}var k4,A4,j4,M4,N4=o((()=>{z$(),J(),k4=new Set([`type`,`properties`,`required`,`additionalProperties`]),A4=[`oneOf`,`anyOf`],j4=(e,t={})=>n=>{let r=v4({...n,processors:t});return b4(e,r),S4(r,e),D4(r,e)},M4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=v4({...i??{},target:a,io:t,processors:n});return b4(e,o),S4(o,e),D4(o,e)}}));function P4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?P4(t.out):t.type===`catch`?P4(t.innerType):e._zod.optin}function F4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=F4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>F4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?PK:NK).source),p):p}function Ooe(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of p3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=F4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function I4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(y4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),_3):JSON.parse(o)}function L4(e,t){if(`_idmap`in e){let n=e,r=v4({...t,processors:E3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;b4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;S4(r,n),zU(a,t,D4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=v4({...t,processors:E3});return b4(e,n),S4(n,e),D4(n,e)}var R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3,y3,b3,x3,S3,C3,w3,T3,E3,D3=o((()=>{nq(),N4(),J(),R4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},z4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=R4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},B4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):y4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},V4=(e,t,n,r)=>{n.type=`boolean`},H4=(e,t,n,r)=>{y4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{y4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},W4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},G4=(e,t,n,r)=>{y4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},K4=(e,t,n,r)=>{y4(e,t,n,r,`Void cannot be represented in JSON Schema`)},q4=(e,t,n,r)=>{n.not={}},J4=(e,t,n,r)=>{},Y4=(e,t,n,r)=>{},X4=(e,t,n,r)=>{y4(e,t,n,r,`Date cannot be represented in JSON Schema`)},Z4=(e,t,n,r)=>{let i=e._zod.def,a=MU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Q4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(y4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(y4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},$4=(e,t,n,r)=>{y4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},e3=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},t3=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},n3=(e,t,n,r)=>{n.type=`boolean`},r3=(e,t,n,r)=>{y4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},i3=(e,t,n,r)=>{y4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},a3=(e,t,n,r)=>{y4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},o3=(e,t,n,r)=>{y4(e,t,n,r,`Map cannot be represented in JSON Schema`)},s3=(e,t,n,r)=>{y4(e,t,n,r,`Set cannot be represented in JSON Schema`)},c3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=b4(a.element,t,{...r,path:[...r.path,`items`]})},l3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&y4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)zU(i.properties,e,b4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?P4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=b4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},u3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>b4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},d3=(e,t,n,r)=>{let i=e._zod.def,a=b4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=b4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},f3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>b4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?b4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?P4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},p3=new WeakMap,m3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=b4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)zU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=b4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=p3.get(t);n||(n=[],p3.set(t,n),t.deferred.push(()=>Ooe(t))),n.push(e)}i.additionalProperties=b4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&P4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},h3=(e,t,n,r)=>{let i=e._zod.def,a=b4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},g3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},_3=Symbol(),v3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=I4(i.defaultValue,e,t,n,r);o!==_3&&(n.default=o)},y3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=I4(i.defaultValue,e,t,n,r);o!==_3&&(n._prefault=o)},b3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{y4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},x3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;b4(o,t,r);let s=t.seen.get(e);s.ref=o},S3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},C3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},w3=(e,t,n,r)=>{let i=e._zod.def;b4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},T3=(e,t,n,r)=>{let i=e._zod.innerType;b4(i,t,r);let a=t.seen.get(e);a.ref=i},E3={string:z4,number:B4,boolean:V4,bigint:H4,symbol:U4,null:W4,undefined:G4,void:K4,never:q4,any:J4,unknown:Y4,date:X4,enum:Z4,literal:Q4,nan:$4,template_literal:e3,file:t3,success:n3,custom:r3,function:i3,transform:a3,map:o3,set:s3,array:c3,object:l3,union:u3,intersection:d3,tuple:f3,record:m3,nullable:h3,nonoptional:g3,default:v3,prefault:y3,catch:b3,pipe:x3,readonly:S3,promise:C3,optional:w3,lazy:T3}})),O3,koe=o((()=>{D3(),N4(),O3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=v4({processors:E3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return b4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,S4(this.ctx,e);let{"~standard":n,...r}=D4(this.ctx,e);return r}}})),Aoe=c({}),joe=o((()=>{})),k3=c({$ZodAny:()=>nY,$ZodArray:()=>sY,$ZodAsyncError:()=>GW,$ZodBase64:()=>VJ,$ZodBase64URL:()=>HJ,$ZodBigInt:()=>ZJ,$ZodBigIntFormat:()=>QJ,$ZodBoolean:()=>XJ,$ZodCIDRv4:()=>zJ,$ZodCIDRv6:()=>BJ,$ZodCUID:()=>EJ,$ZodCUID2:()=>DJ,$ZodCatch:()=>jY,$ZodCheck:()=>iq,$ZodCheckBigIntFormat:()=>fq,$ZodCheckEndsWith:()=>Tq,$ZodCheckGreaterThan:()=>lq,$ZodCheckIncludes:()=>Cq,$ZodCheckLengthEquals:()=>vq,$ZodCheckLessThan:()=>cq,$ZodCheckLowerCase:()=>xq,$ZodCheckMaxLength:()=>gq,$ZodCheckMaxSize:()=>pq,$ZodCheckMimeType:()=>Dq,$ZodCheckMinLength:()=>_q,$ZodCheckMinSize:()=>mq,$ZodCheckMultipleOf:()=>uq,$ZodCheckNumberFormat:()=>dq,$ZodCheckOverwrite:()=>Oq,$ZodCheckProperty:()=>Eq,$ZodCheckRegex:()=>bq,$ZodCheckSizeEquals:()=>hq,$ZodCheckStartsWith:()=>wq,$ZodCheckStringFormat:()=>yq,$ZodCheckUpperCase:()=>Sq,$ZodCodec:()=>PY,$ZodCreditCard:()=>GJ,$ZodCustom:()=>VY,$ZodCustomStringFormat:()=>qJ,$ZodCyclicError:()=>YY,$ZodDate:()=>oY,$ZodDefault:()=>DY,$ZodDiscriminatedUnion:()=>mY,$ZodE164:()=>UJ,$ZodEmail:()=>xJ,$ZodEmoji:()=>wJ,$ZodEncodeError:()=>KW,$ZodEnum:()=>bY,$ZodError:()=>cG,$ZodExactOptional:()=>TY,$ZodFile:()=>SY,$ZodFunction:()=>RY,$ZodGUID:()=>yJ,$ZodIPv4:()=>FJ,$ZodIPv6:()=>LJ,$ZodISODate:()=>MJ,$ZodISODateTime:()=>jJ,$ZodISODuration:()=>PJ,$ZodISOTime:()=>NJ,$ZodIntersection:()=>hY,$ZodJWT:()=>KJ,$ZodKSUID:()=>AJ,$ZodLazy:()=>BY,$ZodLiteral:()=>xY,$ZodMAC:()=>RJ,$ZodMap:()=>vY,$ZodNaN:()=>MY,$ZodNanoID:()=>TJ,$ZodNever:()=>iY,$ZodNonOptional:()=>kY,$ZodNull:()=>tY,$ZodNullable:()=>EY,$ZodNumber:()=>JJ,$ZodNumberFormat:()=>YJ,$ZodObject:()=>uY,$ZodObjectJIT:()=>dY,$ZodOptional:()=>wY,$ZodPipe:()=>NY,$ZodPrefault:()=>OY,$ZodPreprocess:()=>FY,$ZodPromise:()=>zY,$ZodReadonly:()=>IY,$ZodRealError:()=>lG,$ZodRecord:()=>_Y,$ZodRegistry:()=>L$,$ZodSet:()=>yY,$ZodString:()=>_J,$ZodStringFormat:()=>vJ,$ZodSuccess:()=>AY,$ZodSymbol:()=>$J,$ZodTemplateLiteral:()=>LY,$ZodTransform:()=>CY,$ZodTuple:()=>gY,$ZodType:()=>hJ,$ZodULID:()=>OJ,$ZodURL:()=>CJ,$ZodUUID:()=>bJ,$ZodUndefined:()=>eY,$ZodUnion:()=>fY,$ZodUnknown:()=>rY,$ZodVoid:()=>aY,$ZodXID:()=>kJ,$ZodXor:()=>pY,$brand:()=>WW,$constructor:()=>Y,$input:()=>I$,$output:()=>F$,Doc:()=>Aq,INVALID:()=>t0,JSONSchema:()=>Aoe,JSONSchemaGenerator:()=>O3,NEVER:()=>VW,TimePrecision:()=>h4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>r0,ZodCompileUnsupportedError:()=>i0,_any:()=>e2,_array:()=>L2,_base64:()=>k0,_base64url:()=>A0,_bigint:()=>q0,_boolean:()=>G0,_catch:()=>n4,_check:()=>u4,_cidrv4:()=>D0,_cidrv6:()=>O0,_coercedBigint:()=>J0,_coercedBoolean:()=>K0,_coercedDate:()=>a2,_coercedNumber:()=>z0,_coercedString:()=>l0,_creditCard:()=>M0,_cuid:()=>y0,_cuid2:()=>b0,_custom:()=>s4,_date:()=>i2,_decode:()=>DG,_decodeAsync:()=>jG,_default:()=>$2,_discriminatedUnion:()=>B2,_e164:()=>j0,_email:()=>u0,_emoji:()=>_0,_encode:()=>TG,_encodeAsync:()=>kG,_endsWith:()=>D2,_enum:()=>K2,_file:()=>Y2,_float32:()=>V0,_float64:()=>H0,_gt:()=>l2,_gte:()=>u2,_guid:()=>d0,_includes:()=>T2,_int:()=>B0,_int32:()=>U0,_int64:()=>Y0,_intersection:()=>V2,_ipv4:()=>w0,_ipv6:()=>T0,_isoDate:()=>F0,_isoDateTime:()=>P0,_isoDuration:()=>L0,_isoTime:()=>I0,_jwt:()=>N0,_ksuid:()=>C0,_lazy:()=>Doe,_length:()=>x2,_literal:()=>J2,_lowercase:()=>C2,_lt:()=>s2,_lte:()=>c2,_mac:()=>E0,_map:()=>W2,_max:()=>c2,_maxLength:()=>y2,_maxSize:()=>g2,_mime:()=>A2,_min:()=>u2,_minLength:()=>b2,_minSize:()=>_2,_multipleOf:()=>h2,_nan:()=>o2,_nanoid:()=>v0,_nativeEnum:()=>q2,_negative:()=>f2,_never:()=>n2,_nonnegative:()=>m2,_nonoptional:()=>e4,_nonpositive:()=>p2,_normalize:()=>M2,_null:()=>$0,_nullable:()=>Q2,_number:()=>R0,_optional:()=>Z2,_overwrite:()=>j2,_parse:()=>pG,_parseAsync:()=>hG,_pipe:()=>r4,_positive:()=>d2,_promise:()=>o4,_properties:()=>k2,_property:()=>O2,_readonly:()=>i4,_record:()=>U2,_refine:()=>c4,_regex:()=>S2,_safeDecode:()=>FG,_safeDecodeAsync:()=>zG,_safeEncode:()=>NG,_safeEncodeAsync:()=>LG,_safeParse:()=>_G,_safeParseAsync:()=>yG,_set:()=>G2,_size:()=>v2,_slugify:()=>I2,_startsWith:()=>E2,_string:()=>c0,_stringFormat:()=>m4,_stringbool:()=>p4,_success:()=>t4,_superRefine:()=>l4,_symbol:()=>Z0,_templateLiteral:()=>a4,_toLowerCase:()=>P2,_toUpperCase:()=>F2,_transform:()=>X2,_trim:()=>N2,_tuple:()=>H2,_uint32:()=>W0,_uint64:()=>X0,_ulid:()=>x0,_undefined:()=>Q0,_union:()=>R2,_unknown:()=>t2,_uppercase:()=>w2,_url:()=>g0,_uuid:()=>f0,_uuidv4:()=>p0,_uuidv6:()=>m0,_uuidv7:()=>h0,_void:()=>r2,_xid:()=>S0,_xor:()=>z2,clone:()=>qU,compile:()=>V$,compileFn:()=>U$,config:()=>zW,createStandardJSONSchemaMethod:()=>M4,createToJSONSchemaMethod:()=>j4,decode:()=>OG,decodeAsync:()=>MG,describe:()=>d4,encode:()=>EG,encodeAsync:()=>AG,extractDefs:()=>S4,finalize:()=>D4,flattenError:()=>QW,formatError:()=>$W,getDiscriminatedOption:()=>Qq,globalConfig:()=>qW,globalRegistry:()=>R$,handleUnrepresentable:()=>y4,initializeContext:()=>v4,isBackEdge:()=>JY,isRecursiveSchema:()=>GY,isValidBase64:()=>Vq,isValidBase64URL:()=>Hq,isValidCIDRv6:()=>Bq,isValidCreditCard:()=>Wq,isValidIPv6:()=>zq,isValidJWT:()=>Gq,locales:()=>j$,memoizer:()=>qY,mergeValues:()=>$q,meta:()=>f4,parse:()=>mG,parseAsync:()=>gG,parseURLObject:()=>Fq,prettifyError:()=>nG,process:()=>b4,regexes:()=>HG,registry:()=>N$,safeDecode:()=>IG,safeDecodeAsync:()=>BG,safeEncode:()=>PG,safeEncodeAsync:()=>RG,safeParse:()=>vG,safeParseAsync:()=>bG,standardProps:()=>Pq,stripTabAndNewline:()=>Iq,toDotPath:()=>tG,toJSONSchema:()=>L4,toZod:()=>jU,treeifyError:()=>eG,urlHostnameOk:()=>Lq,urlProtocolOk:()=>Rq,util:()=>AU,validate:()=>CG,validateAsync:()=>wG,version:()=>Mq}),A3=o((()=>{JW(),VG(),uG(),HY(),nX(),kq(),Nq(),J(),nq(),M$(),z$(),jq(),s0(),g4(),N4(),D3(),koe(),joe()}));function j3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===M3)return new BY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,M3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?qU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:qU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?qU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:qU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:qU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?qU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:qU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:qU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:qU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:qU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return qU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var M3,N3=o((()=>{HY(),J(),M3=Symbol(`z.visit/resolving`)}));VG();function P3(e){return!!e._zod}function F3(e,t){return P3(e)?vG(e,t):e.safeParse(t)}function Moe(e){if(!e)return;let t;if(t=P3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Noe(e){if(P3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var Poe=c({endsWith:()=>D2,gt:()=>l2,gte:()=>u2,includes:()=>T2,length:()=>x2,lowercase:()=>C2,lt:()=>s2,lte:()=>c2,maxLength:()=>y2,maxSize:()=>g2,mime:()=>A2,minLength:()=>b2,minSize:()=>_2,multipleOf:()=>h2,negative:()=>f2,nonnegative:()=>m2,nonpositive:()=>p2,normalize:()=>M2,overwrite:()=>j2,positive:()=>d2,properties:()=>k2,property:()=>O2,regex:()=>S2,size:()=>v2,slugify:()=>I2,startsWith:()=>E2,toLowerCase:()=>P2,toUpperCase:()=>F2,trim:()=>N2,uppercase:()=>w2}),I3=o((()=>{A3()}));function L3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var R3,z3,B3,V3,H3=o((()=>{A3(),J(),R3=new WeakSet([Object.prototype,Error.prototype]),z3=(e,t)=>{cG.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);R3.has(n)||(R3.add(n),L3(n,`format`,e=>t=>$W(e,t)),L3(n,`flatten`,e=>t=>QW(e,t)),L3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,NU,2)}),L3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,NU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},B3=Y(`ZodError`,z3),V3=Y(`ZodError`,z3,void 0,{Parent:Error})})),U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3,$3,e6,t6=o((()=>{A3(),H3(),U3=pG(V3),W3=hG(V3),G3=_G(V3),K3=yG(V3),q3=TG(V3),J3=DG(V3),Y3=kG(V3),X3=jG(V3),Z3=NG(V3),Q3=FG(V3),$3=LG(V3),e6=zG(V3)})),Foe=c({ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,codec:()=>T8,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,float32:()=>P6,float64:()=>F6,function:()=>j8,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,literal:()=>Q,looseObject:()=>$6,looseRecord:()=>s8,mac:()=>y6,map:()=>c8,meta:()=>s7,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,never:()=>q6,nonoptional:()=>b8,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,partialRecord:()=>o8,pipe:()=>w8,prefault:()=>y8,preprocess:()=>R8,promise:()=>A8,readonly:()=>D8,record:()=>a8,refine:()=>P8,set:()=>l8,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,transform:()=>p8,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,url:()=>l6,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,void:()=>J6,xid:()=>g6,xor:()=>t8});function Ioe(){qW.localeError||zW(LX())}function n6(){qW.memoizer||zW({memoizer:qY()})}function X(e){return c0(V8,e)}function r6(e){return u0(q8,e)}function i6(e){return d0(J8,e)}function a6(e){return f0(Y8,e)}function o6(e){return p0(Y8,e)}function s6(e){return m0(Y8,e)}function c6(e){return h0(Y8,e)}function l6(e){return g0(X8,e)}function u6(e){return g0(X8,{protocol:EK,hostname:TK,...q(e)})}function d6(e){return _0(Z8,e)}function f6(e){return v0(Q8,e)}function p6(e){return y0($8,e)}function m6(e){return b0(e5,e)}function h6(e){return x0(t5,e)}function g6(e){return S0(n5,e)}function _6(e){return C0(r5,e)}function v6(e){return w0(i5,e)}function y6(e){return E0(a5,e)}function b6(e){return T0(o5,e)}function x6(e){return D0(s5,e)}function S6(e){return O0(c5,e)}function C6(e){return k0(l5,e)}function w6(e){return A0(u5,e)}function T6(e){return j0(d5,e)}function E6(e){return M0(f5,e)}function D6(e){return N0(p5,e)}function O6(e,t,n={}){return m4(m5,e,t,n)}function k6(e){return m4(m5,`hostname`,wK,e)}function A6(e){return m4(m5,`hex`,BK,e)}function j6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=HG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return m4(m5,n,r,t)}function M6(e){return R0(h5,e)}function N6(e){return B0(g5,e)}function P6(e){return V0(g5,e)}function F6(e){return H0(g5,e)}function I6(e){return U0(g5,e)}function L6(e){return W0(g5,e)}function R6(e){return G0(_5,e)}function z6(e){return q0(v5,e)}function B6(e){return Y0(y5,e)}function V6(e){return X0(y5,e)}function H6(e){return Z0(b5,e)}function U6(e){return Q0(x5,e)}function W6(e){return $0(S5,e)}function G6(){return e2(C5)}function K6(){return t2(w5)}function q6(e){return n2(T5,e)}function J6(e){return r2(E5,e)}function Y6(e){return i2(D5,e)}function X6(e,t){return L2(O5,e,t)}function Z6(e){let t=e._zod.def.shape;return u8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new k5(n)}function Q6(e,t){return new k5({type:`object`,shape:e,catchall:q6(),...q(t)})}function $6(e,t){return new k5({type:`object`,shape:e,catchall:K6(),...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,...q(t)})}function t8(e,t){return new j5({type:`union`,options:e,inclusive:!1,...q(t)})}function n8(e,t,n){return new M5({type:`union`,options:t,discriminator:e,...q(n)})}function r8(e,t){return new N5({type:`intersection`,left:e,right:t})}function i8(e,t,n){let r=t instanceof hJ;return new P5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function a8(e,t,n){return!t||!t._zod?new F5({type:`record`,keyType:X(),valueType:e,...q(t)}):new F5({type:`record`,keyType:e,valueType:t,...q(n)})}function o8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function s8(e,t,n){return new F5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function c8(e,t,n){return new I5({type:`map`,keyType:e,valueType:t,...q(n)})}function l8(e,t){return new L5({type:`set`,valueType:e,...q(t)})}function u8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new R5({type:`enum`,entries:n,...q(t)})}function d8(e,t){return new R5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new z5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function f8(e){return Y2(B5,e)}function p8(e){return new V5({type:`transform`,transform:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`optional`,innerType:e})}function g8(e){return new W5({type:`nullable`,innerType:e})}function _8(e){return m8(g8(e))}function v8(e,t){return new G5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():GU(t)}})}function y8(e,t){return new K5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():GU(t)}})}function b8(e,t){return new q5({type:`nonoptional`,innerType:e,...q(t)})}function x8(e){return new J5({type:`success`,innerType:e})}function S8(e,t){return new Y5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:CW(t)})}function C8(e){return o2(X5,e)}function w8(e,t){return new Z5({type:`pipe`,in:e,out:t})}function T8(e,t,n){return new Q5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function E8(e){let t=e._zod.def;return new Q5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function D8(e){return new e7({type:`readonly`,innerType:e})}function O8(e,t){return new t7({type:`template_literal`,parts:e,...q(t)})}function k8(e){return new n7({type:`lazy`,getter:e})}function A8(e){return new r7({type:`promise`,innerType:e})}function j8(e){return new i7({type:`function`,input:Array.isArray(e?.input)?i8(e?.input):e?.input??X6(K6()),output:e?.output??K6()})}function M8(e){let t=new iq({check:`custom`});return t._zod.check=e,t}function N8(e,t){return s4(a7,e??(()=>!0),t)}function P8(e,t={}){return c4(a7,e,t)}function F8(e,t){return l4(e,t)}function I8(e,t={}){let n=new a7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function L8(e){let t=k8(()=>e8([X(e),M6(),R6(),W6(),X6(t),a8(X(),t)]));return t}function R8(e,t){return new $5({type:`pipe`,in:p8(e),out:t})}var z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7,l7=o((()=>{A3(),D3(),N4(),zX(),I3(),t6(),z8=Y(`ZodType`,(e,t)=>(Ioe(),hJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(BU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return qU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(P8(e,t))},superRefine(e,t){return this.check(F8(e,t))},overwrite(e){return this.check(j2(e))},optional(){return m8(this)},exactOptional(){return h8(this)},nullable(){return g8(this)},nullish(){return m8(g8(this))},nonoptional(e){return b8(this,e)},array(){return X6(this)},or(e){return e8([this,e])},and(e){return r8(this,e)},transform(e){return w8(this,p8(e))},default(e){return v8(this,e)},prefault(e){return y8(this,e)},catch(e){return S8(this,e)},pipe(e){return w8(this,e)},readonly(){return D8(this)},describe(e){let t=this.clone();return R$.add(t,{description:e}),t},meta(...e){if(e.length===0)return R$.get(this);let t=this.clone();return R$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return vW(this,`~standard`,{...Pq(this),jsonSchema:{input:M4(this,`input`),output:M4(this,`output`)}})},set"~standard"(e){_W(this,`~standard`,e)},parse:function e(t,n){return U3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await W3(this,t,n,{callee:e})},safeParse(e,t){return G3(this,e,t)},async safeParseAsync(e,t){return K3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){_W(this,`spa`,e)},encode:function e(t,n){return q3(this,t,n,{callee:e})},decode:function e(t,n){return J3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Y3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await X3(this,t,n,{callee:e})},safeEncode(e,t){return Z3(this,e,t)},safeDecode(e,t){return Q3(this,e,t)},async safeEncodeAsync(e,t){return $3(this,e,t)},async safeDecodeAsync(e,t){return e6(this,e,t)},toJSONSchema(e){return j4(this,{})(e)},get description(){return R$.get(this)?.description},get _def(){return this._zod.def}}),B8=Y(`_ZodString`,(e,t)=>{_J.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(S2(...e))},includes(...e){return this.check(T2(...e))},startsWith(...e){return this.check(E2(...e))},endsWith(...e){return this.check(D2(...e))},min(...e){return this.check(b2(...e))},max(...e){return this.check(y2(...e))},length(...e){return this.check(x2(...e))},nonempty(...e){return this.check(b2(1,...e))},lowercase(e){return this.check(C2(e))},uppercase(e){return this.check(w2(e))},trim(){return this.check(N2())},normalize(...e){return this.check(M2(...e))},toLowerCase(){return this.check(P2())},toUpperCase(){return this.check(F2())},slugify(){return this.check(I2())}}),V8=Y(`ZodString`,(e,t)=>{_J.init(e,t),B8.init(e,t)},{email(e){return this.check(u0(q8,e))},url(e){return this.check(g0(X8,e))},jwt(e){return this.check(N0(p5,e))},emoji(e){return this.check(_0(Z8,e))},guid(e){return this.check(d0(J8,e))},uuid(e){return this.check(f0(Y8,e))},uuidv4(e){return this.check(p0(Y8,e))},uuidv6(e){return this.check(m0(Y8,e))},uuidv7(e){return this.check(h0(Y8,e))},nanoid(e){return this.check(v0(Q8,e))},cuid(e){return this.check(y0($8,e))},cuid2(e){return this.check(b0(e5,e))},ulid(e){return this.check(x0(t5,e))},base64(e){return this.check(k0(l5,e))},base64url(e){return this.check(A0(u5,e))},xid(e){return this.check(S0(n5,e))},ksuid(e){return this.check(C0(r5,e))},ipv4(e){return this.check(w0(i5,e))},ipv6(e){return this.check(T0(o5,e))},cidrv4(e){return this.check(D0(s5,e))},cidrv6(e){return this.check(O0(c5,e))},e164(e){return this.check(j0(d5,e))},datetime(e){return this.check(P0(U8,e))},date(e){return this.check(F0(W8,e))},time(e){return this.check(I0(G8,e))},duration(e){return this.check(L0(K8,e))}}),H8=Y(`ZodStringFormat`,(e,t)=>{vJ.init(e,t),B8.init(e,t)}),U8=Y(`ZodISODateTime`,(e,t)=>{jJ.init(e,t),H8.init(e,t)}),W8=Y(`ZodISODate`,(e,t)=>{MJ.init(e,t),H8.init(e,t)}),G8=Y(`ZodISOTime`,(e,t)=>{NJ.init(e,t),H8.init(e,t)}),K8=Y(`ZodISODuration`,(e,t)=>{PJ.init(e,t),H8.init(e,t)}),q8=Y(`ZodEmail`,(e,t)=>{xJ.init(e,t),H8.init(e,t)}),J8=Y(`ZodGUID`,(e,t)=>{yJ.init(e,t),H8.init(e,t)}),Y8=Y(`ZodUUID`,(e,t)=>{bJ.init(e,t),H8.init(e,t)}),X8=Y(`ZodURL`,(e,t)=>{CJ.init(e,t),H8.init(e,t)}),Z8=Y(`ZodEmoji`,(e,t)=>{wJ.init(e,t),H8.init(e,t)}),Q8=Y(`ZodNanoID`,(e,t)=>{TJ.init(e,t),H8.init(e,t)}),$8=Y(`ZodCUID`,(e,t)=>{EJ.init(e,t),H8.init(e,t)}),e5=Y(`ZodCUID2`,(e,t)=>{DJ.init(e,t),H8.init(e,t)}),t5=Y(`ZodULID`,(e,t)=>{OJ.init(e,t),H8.init(e,t)}),n5=Y(`ZodXID`,(e,t)=>{kJ.init(e,t),H8.init(e,t)}),r5=Y(`ZodKSUID`,(e,t)=>{AJ.init(e,t),H8.init(e,t)}),i5=Y(`ZodIPv4`,(e,t)=>{FJ.init(e,t),H8.init(e,t)}),a5=Y(`ZodMAC`,(e,t)=>{RJ.init(e,t),H8.init(e,t)}),o5=Y(`ZodIPv6`,(e,t)=>{LJ.init(e,t),H8.init(e,t)}),s5=Y(`ZodCIDRv4`,(e,t)=>{zJ.init(e,t),H8.init(e,t)}),c5=Y(`ZodCIDRv6`,(e,t)=>{BJ.init(e,t),H8.init(e,t)}),l5=Y(`ZodBase64`,(e,t)=>{VJ.init(e,t),H8.init(e,t)}),u5=Y(`ZodBase64URL`,(e,t)=>{HJ.init(e,t),H8.init(e,t)}),d5=Y(`ZodE164`,(e,t)=>{UJ.init(e,t),H8.init(e,t)}),f5=Y(`ZodCreditCard`,(e,t)=>{GJ.init(e,t),H8.init(e,t)}),p5=Y(`ZodJWT`,(e,t)=>{KJ.init(e,t),H8.init(e,t)}),m5=Y(`ZodCustomStringFormat`,(e,t)=>{qJ.init(e,t),H8.init(e,t)}),h5=Y(`ZodNumber`,(e,t)=>{JJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(l2(e,t))},gte(e,t){return this.check(u2(e,t))},min(e,t){return this.check(u2(e,t))},lt(e,t){return this.check(s2(e,t))},lte(e,t){return this.check(c2(e,t))},max(e,t){return this.check(c2(e,t))},int(e){return this.check(N6(e))},safe(e){return this.check(N6(e))},positive(e){return this.check(l2(0,e))},nonnegative(e){return this.check(u2(0,e))},negative(e){return this.check(s2(0,e))},nonpositive(e){return this.check(c2(0,e))},multipleOf(e,t){return this.check(h2(e,t))},step(e,t){return this.check(h2(e,t))},finite(){return this}}),g5=Y(`ZodNumberFormat`,(e,t)=>{YJ.init(e,t),h5.init(e,t)}),_5=Y(`ZodBoolean`,(e,t)=>{XJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r)}),v5=Y(`ZodBigInt`,(e,t)=>{ZJ.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(u2(e,t))},min(e,t){return this.check(u2(e,t))},gt(e,t){return this.check(l2(e,t))},lt(e,t){return this.check(s2(e,t))},lte(e,t){return this.check(c2(e,t))},max(e,t){return this.check(c2(e,t))},positive(e){return this.check(l2(BigInt(0),e))},negative(e){return this.check(s2(BigInt(0),e))},nonpositive(e){return this.check(c2(BigInt(0),e))},nonnegative(e){return this.check(u2(BigInt(0),e))},multipleOf(e,t){return this.check(h2(e,t))}}),y5=Y(`ZodBigIntFormat`,(e,t)=>{QJ.init(e,t),v5.init(e,t)}),b5=Y(`ZodSymbol`,(e,t)=>{$J.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r)}),x5=Y(`ZodUndefined`,(e,t)=>{eY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),S5=Y(`ZodNull`,(e,t)=>{tY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),C5=Y(`ZodAny`,(e,t)=>{nY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),w5=Y(`ZodUnknown`,(e,t)=>{rY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r)}),T5=Y(`ZodNever`,(e,t)=>{iY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r)}),E5=Y(`ZodVoid`,(e,t)=>{aY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r)}),D5=Y(`ZodDate`,(e,t)=>{oY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.min=(t,n)=>e.check(u2(t,n)),e.max=(t,n)=>e.check(c2(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),O5=Y(`ZodArray`,(e,t)=>{n6(),sY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(b2(e,t))},nonempty(e){return this.check(b2(1,e))},max(e,t){return this.check(y2(e,t))},length(e,t){return this.check(x2(e,t))},unwrap(){return this.element}}),k5=Y(`ZodObject`,(e,t)=>{n6(),dY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),SW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return u8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:K6()})},loose(){return this.clone({...this._zod.def,catchall:K6()})},strict(){return this.clone({...this._zod.def,catchall:q6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return QU(this,e)},safeExtend(e){return $U(this,e)},merge(e){return eW(this,e)},pick(e){return XU(this,e)},omit(e){return ZU(this,e)},partial(...e){return tW(H5,this,e[0])},exactPartial(...e){return tW(U5,this,e[0],`exactPartial`)},required(...e){return nW(q5,this,e[0])}}),A5=Y(`ZodUnion`,(e,t)=>{fY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.options=t.options}),j5=Y(`ZodXor`,(e,t)=>{A5.init(e,t),pY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r),e.options=t.options}),M5=Y(`ZodDiscriminatedUnion`,(e,t)=>{A5.init(e,t),mY.init(e,t)}),N5=Y(`ZodIntersection`,(e,t)=>{hY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r)}),P5=Y(`ZodTuple`,(e,t)=>{n6(),gY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>f3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new H5({type:`optional`,innerType:e}))})}}),F5=Y(`ZodRecord`,(e,t)=>{n6(),_Y.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),I5=Y(`ZodMap`,(e,t)=>{n6(),vY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(_2(...t)),e.nonempty=t=>e.check(_2(1,t)),e.max=(...t)=>e.check(g2(...t)),e.size=(...t)=>e.check(v2(...t))}),L5=Y(`ZodSet`,(e,t)=>{n6(),yY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.min=(...t)=>e.check(_2(...t)),e.nonempty=t=>e.check(_2(1,t)),e.max=(...t)=>e.check(g2(...t)),e.size=(...t)=>e.check(v2(...t))}),R5=Y(`ZodEnum`,(e,t)=>{bY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new R5({...t,checks:[],...q(r),entries:i})}}),z5=Y(`ZodLiteral`,(e,t)=>{xY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),B5=Y(`ZodFile`,(e,t)=>{SY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.min=(t,n)=>e.check(_2(t,n)),e.max=(t,n)=>e.check(g2(t,n)),e.mime=(t,n)=>e.check(A2(Array.isArray(t)?t:[t],n))}),V5=Y(`ZodTransform`,(e,t)=>{n6(),CY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new KW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(pW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(pW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),H5=Y(`ZodOptional`,(e,t)=>{wY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodExactOptional`,(e,t)=>{TY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodNullable`,(e,t)=>{EY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),G5=Y(`ZodDefault`,(e,t)=>{DY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),K5=Y(`ZodPrefault`,(e,t)=>{OY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodNonOptional`,(e,t)=>{kY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>g3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodSuccess`,(e,t)=>{AY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Y5=Y(`ZodCatch`,(e,t)=>{jY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),X5=Y(`ZodNaN`,(e,t)=>{MY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r)}),Z5=Y(`ZodPipe`,(e,t)=>{NY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x3(e,t,n,r),e.in=t.in,e.out=t.out}),Q5=Y(`ZodCodec`,(e,t)=>{Z5.init(e,t),PY.init(e,t)}),$5=Y(`ZodPreprocess`,(e,t)=>{Z5.init(e,t),FY.init(e,t)}),e7=Y(`ZodReadonly`,(e,t)=>{IY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),t7=Y(`ZodTemplateLiteral`,(e,t)=>{LY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r)}),n7=Y(`ZodLazy`,(e,t)=>{BY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>T3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),r7=Y(`ZodPromise`,(e,t)=>{zY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),i7=Y(`ZodFunction`,(e,t)=>{RY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r)}),a7=Y(`ZodCustom`,(e,t)=>{VY.init(e,t),z8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)}),o7=d4,s7=f4,c7=(...e)=>p4({Codec:Q5,Boolean:_5,String:V8},...e)}));function u7(e){zW({customError:e})}function d7(){return zW().customError}var f7,p7,Loe=o((()=>{A3(),f7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},p7||={}})),m7=c({ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,date:()=>Roe,datetime:()=>h7,duration:()=>Boe,time:()=>zoe});function h7(e){return P0(U8,e)}function Roe(e){return F0(W8,e)}function zoe(e){return I0(G8,e)}function Boe(e){return L0(K8,e)}var g7=o((()=>{A3(),l7()}));function Voe(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function _7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function v7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():b7(e,t)}function y7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=b7(Uoe(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>y7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(C7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?b7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=b7(r,t);zU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=b7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!WU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=Woe(r,b7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=_7(n.map(e=>b7(e,t)),a),s=Array.isArray(i)?void 0:v7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=_7(i.map(e=>b7(e,t)),n),o=v7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=b7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=y7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>b7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>b7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:b7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function x7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Voe(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??R$};return b7(n,r)}var $,S7,C7,Goe=o((()=>{z$(),J(),I3(),g7(),l7(),$={...Foe,...Poe,iso:m7},S7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),C7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function w7(e){return j3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:e8(t.options)}})}var Koe=o((()=>{N3(),l7()}));function qoe(e,t){if(!t?.length)return e;let n=e._zod.def;return qU(e,BU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function T7(e){return qoe(e.out,e.checks)}function Joe(e){return e.in._zod.traits.has(`$ZodTransform`)?T7(e):e.in}function E7(e){return j3(e,{pipe:e=>Joe(e._zod.def),default:(e,t)=>t?m8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function D7(e){return j3(e,{pipe:e=>T7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Yoe=o((()=>{J(),N3(),l7()})),O7=c({bigint:()=>$oe,boolean:()=>Qoe,date:()=>ese,number:()=>Zoe,string:()=>Xoe});function Xoe(e){return l0(V8,e)}function Zoe(e){return z0(h5,e)}function Qoe(e){return K0(_5,e)}function $oe(e){return J0(v5,e)}function ese(e){return a2(D5,e)}var tse=o((()=>{A3(),l7()})),k7=c({$brand:()=>WW,$input:()=>I$,$output:()=>F$,NEVER:()=>VW,TimePrecision:()=>h4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>r0,ZodCompileUnsupportedError:()=>i0,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>B3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>V3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>qU,codec:()=>T8,coerce:()=>O7,compile:()=>V$,config:()=>zW,core:()=>k3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>J3,decodeAsync:()=>X3,deepPartial:()=>w7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>q3,encodeAsync:()=>Y3,endsWith:()=>D2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>QW,float32:()=>P6,float64:()=>F6,formatError:()=>$W,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Qq,getErrorMap:()=>d7,globalRegistry:()=>R$,gt:()=>l2,gte:()=>u2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>T2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>x2,literal:()=>Q,locales:()=>j$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>C2,lt:()=>s2,lte:()=>c2,mac:()=>y6,map:()=>c8,maxLength:()=>y2,maxSize:()=>g2,memoizer:()=>qY,meta:()=>s7,mime:()=>A2,minLength:()=>b2,minSize:()=>_2,multipleOf:()=>h2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>f2,never:()=>q6,nonnegative:()=>m2,nonoptional:()=>b8,nonpositive:()=>p2,normalize:()=>M2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>j2,parse:()=>U3,parseAsync:()=>W3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>d2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>nG,promise:()=>A8,properties:()=>k2,property:()=>O2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>S2,regexes:()=>HG,registry:()=>N$,safeDecode:()=>Q3,safeDecodeAsync:()=>e6,safeEncode:()=>Z3,safeEncodeAsync:()=>$3,safeParse:()=>G3,safeParseAsync:()=>K3,set:()=>l8,setErrorMap:()=>u7,size:()=>v2,slugify:()=>I2,startsWith:()=>E2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>L4,toLowerCase:()=>P2,toUpperCase:()=>F2,toZod:()=>jU,transform:()=>p8,treeifyError:()=>eG,trim:()=>N2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>w2,url:()=>l6,util:()=>AU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>CG,validateAsync:()=>wG,void:()=>J6,xid:()=>g6,xor:()=>t8}),A7=o((()=>{A3(),l7(),I3(),H3(),t6(),Loe(),D3(),Goe(),Koe(),Yoe(),M$(),g7(),tse()})),nse=o((()=>{A7(),A7()})),rse=c({$brand:()=>WW,$input:()=>I$,$output:()=>F$,NEVER:()=>VW,TimePrecision:()=>h4,ZodAny:()=>C5,ZodArray:()=>O5,ZodBase64:()=>l5,ZodBase64URL:()=>u5,ZodBigInt:()=>v5,ZodBigIntFormat:()=>y5,ZodBoolean:()=>_5,ZodCIDRv4:()=>s5,ZodCIDRv6:()=>c5,ZodCUID:()=>$8,ZodCUID2:()=>e5,ZodCatch:()=>Y5,ZodCodec:()=>Q5,ZodCompileAsyncError:()=>r0,ZodCompileUnsupportedError:()=>i0,ZodCreditCard:()=>f5,ZodCustom:()=>a7,ZodCustomStringFormat:()=>m5,ZodDate:()=>D5,ZodDefault:()=>G5,ZodDiscriminatedUnion:()=>M5,ZodE164:()=>d5,ZodEmail:()=>q8,ZodEmoji:()=>Z8,ZodEnum:()=>R5,ZodError:()=>B3,ZodExactOptional:()=>U5,ZodFile:()=>B5,ZodFirstPartyTypeKind:()=>p7,ZodFunction:()=>i7,ZodGUID:()=>J8,ZodIPv4:()=>i5,ZodIPv6:()=>o5,ZodISODate:()=>W8,ZodISODateTime:()=>U8,ZodISODuration:()=>K8,ZodISOTime:()=>G8,ZodIntersection:()=>N5,ZodIssueCode:()=>f7,ZodJWT:()=>p5,ZodKSUID:()=>r5,ZodLazy:()=>n7,ZodLiteral:()=>z5,ZodMAC:()=>a5,ZodMap:()=>I5,ZodNaN:()=>X5,ZodNanoID:()=>Q8,ZodNever:()=>T5,ZodNonOptional:()=>q5,ZodNull:()=>S5,ZodNullable:()=>W5,ZodNumber:()=>h5,ZodNumberFormat:()=>g5,ZodObject:()=>k5,ZodOptional:()=>H5,ZodPipe:()=>Z5,ZodPrefault:()=>K5,ZodPreprocess:()=>$5,ZodPromise:()=>r7,ZodReadonly:()=>e7,ZodRealError:()=>V3,ZodRecord:()=>F5,ZodSet:()=>L5,ZodString:()=>V8,ZodStringFormat:()=>H8,ZodSuccess:()=>J5,ZodSymbol:()=>b5,ZodTemplateLiteral:()=>t7,ZodTransform:()=>V5,ZodTuple:()=>P5,ZodType:()=>z8,ZodULID:()=>t5,ZodURL:()=>X8,ZodUUID:()=>Y8,ZodUndefined:()=>x5,ZodUnion:()=>A5,ZodUnknown:()=>w5,ZodVoid:()=>E5,ZodXID:()=>n5,ZodXor:()=>j5,_ZodString:()=>B8,_default:()=>v8,_function:()=>j8,any:()=>G6,array:()=>X6,base64:()=>C6,base64url:()=>w6,bigint:()=>z6,boolean:()=>R6,catch:()=>S8,check:()=>M8,cidrv4:()=>x6,cidrv6:()=>S6,clone:()=>qU,codec:()=>T8,coerce:()=>O7,compile:()=>V$,config:()=>zW,core:()=>k3,creditCard:()=>E6,cuid:()=>p6,cuid2:()=>m6,custom:()=>N8,date:()=>Y6,decode:()=>J3,decodeAsync:()=>X3,deepPartial:()=>w7,default:()=>k7,describe:()=>o7,discriminatedUnion:()=>n8,e164:()=>T6,email:()=>r6,emoji:()=>d6,encode:()=>q3,encodeAsync:()=>Y3,endsWith:()=>D2,enum:()=>u8,exactOptional:()=>h8,file:()=>f8,flattenError:()=>QW,float32:()=>P6,float64:()=>F6,formatError:()=>$W,fromJSONSchema:()=>x7,function:()=>j8,getDiscriminatedOption:()=>Qq,getErrorMap:()=>d7,globalRegistry:()=>R$,gt:()=>l2,gte:()=>u2,guid:()=>i6,hash:()=>j6,hex:()=>A6,hostname:()=>k6,httpUrl:()=>u6,includes:()=>T2,input:()=>E7,instanceof:()=>I8,int:()=>N6,int32:()=>I6,int64:()=>B6,intersection:()=>r8,invertCodec:()=>E8,ipv4:()=>v6,ipv6:()=>b6,iso:()=>m7,json:()=>L8,jwt:()=>D6,keyof:()=>Z6,ksuid:()=>_6,lazy:()=>k8,length:()=>x2,literal:()=>Q,locales:()=>j$,looseObject:()=>$6,looseRecord:()=>s8,lowercase:()=>C2,lt:()=>s2,lte:()=>c2,mac:()=>y6,map:()=>c8,maxLength:()=>y2,maxSize:()=>g2,memoizer:()=>qY,meta:()=>s7,mime:()=>A2,minLength:()=>b2,minSize:()=>_2,multipleOf:()=>h2,nan:()=>C8,nanoid:()=>f6,nativeEnum:()=>d8,negative:()=>f2,never:()=>q6,nonnegative:()=>m2,nonoptional:()=>b8,nonpositive:()=>p2,normalize:()=>M2,null:()=>W6,nullable:()=>g8,nullish:()=>_8,number:()=>M6,object:()=>Z,optional:()=>m8,output:()=>D7,overwrite:()=>j2,parse:()=>U3,parseAsync:()=>W3,partialRecord:()=>o8,pipe:()=>w8,positive:()=>d2,prefault:()=>y8,preprocess:()=>R8,prettifyError:()=>nG,promise:()=>A8,properties:()=>k2,property:()=>O2,readonly:()=>D8,record:()=>a8,refine:()=>P8,regex:()=>S2,regexes:()=>HG,registry:()=>N$,safeDecode:()=>Q3,safeDecodeAsync:()=>e6,safeEncode:()=>Z3,safeEncodeAsync:()=>$3,safeParse:()=>G3,safeParseAsync:()=>K3,set:()=>l8,setErrorMap:()=>u7,size:()=>v2,slugify:()=>I2,startsWith:()=>E2,strictObject:()=>Q6,string:()=>X,stringFormat:()=>O6,stringbool:()=>c7,success:()=>x8,superRefine:()=>F8,symbol:()=>H6,templateLiteral:()=>O8,toJSONSchema:()=>L4,toLowerCase:()=>P2,toUpperCase:()=>F2,toZod:()=>jU,transform:()=>p8,treeifyError:()=>eG,trim:()=>N2,tuple:()=>i8,uint32:()=>L6,uint64:()=>V6,ulid:()=>h6,undefined:()=>U6,union:()=>e8,unknown:()=>K6,uppercase:()=>w2,url:()=>l6,util:()=>AU,uuid:()=>a6,uuidv4:()=>o6,uuidv6:()=>s6,uuidv7:()=>c6,validate:()=>CG,validateAsync:()=>wG,void:()=>J6,xid:()=>g6,xor:()=>t8,z:()=>k7}),j7=o((()=>{A7(),nse()}));j7();var M7=`io.modelcontextprotocol/related-task`,N7=N8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),P7=e8([X(),M6().int()]),F7=X();$6({ttl:M6().optional(),pollInterval:M6().optional()});var ise=Z({ttl:M6().optional()}),ase=Z({taskId:X()}),I7=$6({progressToken:P7.optional(),[M7]:ase.optional()}),L7=Z({_meta:I7.optional()}),R7=L7.extend({task:ise.optional()}),ose=e=>R7.safeParse(e).success,z7=Z({method:X(),params:L7.loose().optional()}),B7=Z({_meta:I7.optional()}),V7=Z({method:X(),params:B7.loose().optional()}),H7=$6({_meta:I7.optional()}),U7=e8([X(),M6().int()]),W7=Z({jsonrpc:Q(`2.0`),id:U7,...z7.shape}).strict(),G7=e=>W7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),...V7.shape}).strict(),sse=e=>K7.safeParse(e).success,q7=Z({jsonrpc:Q(`2.0`),id:U7,result:H7}).strict(),J7=e=>q7.safeParse(e).success,Y7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Y7||={});var X7=Z({jsonrpc:Q(`2.0`),id:U7.optional(),error:Z({code:M6().int(),message:X(),data:K6().optional()})}).strict(),cse=e=>X7.safeParse(e).success,lse=e8([W7,K7,q7,X7]);e8([q7,X7]);var Z7=H7.strict(),use=B7.extend({requestId:U7.optional(),reason:X().optional()}),Q7=V7.extend({method:Q(`notifications/cancelled`),params:use}),$7=Z({icons:X6(Z({src:X(),mimeType:X().optional(),sizes:X6(X()).optional(),theme:u8([`light`,`dark`]).optional()})).optional()}),e9=Z({name:X(),title:X().optional()}),t9=e9.extend({...e9.shape,...$7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),dse=R8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,r8(Z({form:r8(Z({applyDefaults:R6().optional()}),a8(X(),K6())).optional(),url:N7.optional()}),a8(X(),K6()).optional())),fse=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({sampling:$6({createMessage:N7.optional()}).optional(),elicitation:$6({create:N7.optional()}).optional()}).optional()}),pse=$6({list:N7.optional(),cancel:N7.optional(),requests:$6({tools:$6({call:N7.optional()}).optional()}).optional()}),mse=Z({experimental:a8(X(),N7).optional(),sampling:Z({context:N7.optional(),tools:N7.optional()}).optional(),elicitation:dse.optional(),roots:Z({listChanged:R6().optional()}).optional(),tasks:fse.optional(),extensions:a8(X(),N7).optional()}),hse=L7.extend({protocolVersion:X(),capabilities:mse,clientInfo:t9}),gse=z7.extend({method:Q(`initialize`),params:hse}),_se=Z({experimental:a8(X(),N7).optional(),logging:N7.optional(),completions:N7.optional(),prompts:Z({listChanged:R6().optional()}).optional(),resources:Z({subscribe:R6().optional(),listChanged:R6().optional()}).optional(),tools:Z({listChanged:R6().optional()}).optional(),tasks:pse.optional(),extensions:a8(X(),N7).optional()}),vse=H7.extend({protocolVersion:X(),capabilities:_se,serverInfo:t9,instructions:X().optional()}),yse=V7.extend({method:Q(`notifications/initialized`),params:B7.optional()}),n9=z7.extend({method:Q(`ping`),params:L7.optional()}),bse=Z({progress:M6(),total:m8(M6()),message:m8(X())}),xse=Z({...B7.shape,...bse.shape,progressToken:P7}),r9=V7.extend({method:Q(`notifications/progress`),params:xse}),Sse=L7.extend({cursor:F7.optional()}),i9=z7.extend({params:Sse.optional()}),a9=H7.extend({nextCursor:F7.optional()}),Cse=u8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),o9=Z({taskId:X(),status:Cse,ttl:e8([M6(),W6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:m8(M6()),statusMessage:m8(X())}),s9=H7.extend({task:o9}),wse=B7.merge(o9),c9=V7.extend({method:Q(`notifications/tasks/status`),params:wse}),l9=z7.extend({method:Q(`tasks/get`),params:L7.extend({taskId:X()})}),u9=H7.merge(o9),d9=z7.extend({method:Q(`tasks/result`),params:L7.extend({taskId:X()})});H7.loose();var f9=i9.extend({method:Q(`tasks/list`)}),p9=a9.extend({tasks:X6(o9)}),m9=z7.extend({method:Q(`tasks/cancel`),params:L7.extend({taskId:X()})}),Tse=H7.merge(o9),h9=Z({uri:X(),mimeType:m8(X()),_meta:a8(X(),K6()).optional()}),g9=h9.extend({text:X()}),_9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),v9=h9.extend({blob:_9}),y9=u8([`user`,`assistant`]),b9=Z({audience:X6(y9).optional(),priority:M6().min(0).max(1).optional(),lastModified:h7({offset:!0}).optional()}),x9=Z({...e9.shape,...$7.shape,uri:X(),description:m8(X()),mimeType:m8(X()),size:m8(M6()),annotations:b9.optional(),_meta:m8($6({}))}),Ese=Z({...e9.shape,...$7.shape,uriTemplate:X(),description:m8(X()),mimeType:m8(X()),annotations:b9.optional(),_meta:m8($6({}))}),Dse=i9.extend({method:Q(`resources/list`)}),S9=a9.extend({resources:X6(x9)}),Ose=i9.extend({method:Q(`resources/templates/list`)}),kse=a9.extend({resourceTemplates:X6(Ese)}),C9=L7.extend({uri:X()}),Ase=C9,jse=z7.extend({method:Q(`resources/read`),params:Ase}),w9=H7.extend({contents:X6(e8([g9,v9]))}),Mse=V7.extend({method:Q(`notifications/resources/list_changed`),params:B7.optional()}),Nse=C9,Pse=z7.extend({method:Q(`resources/subscribe`),params:Nse}),Fse=C9,Ise=z7.extend({method:Q(`resources/unsubscribe`),params:Fse}),Lse=B7.extend({uri:X()}),Rse=V7.extend({method:Q(`notifications/resources/updated`),params:Lse}),zse=Z({name:X(),description:m8(X()),required:m8(R6())}),Bse=Z({...e9.shape,...$7.shape,description:m8(X()),arguments:m8(X6(zse)),_meta:m8($6({}))}),Vse=i9.extend({method:Q(`prompts/list`)}),Hse=a9.extend({prompts:X6(Bse)}),Use=L7.extend({name:X(),arguments:a8(X(),X()).optional()}),Wse=z7.extend({method:Q(`prompts/get`),params:Use}),T9=Z({type:Q(`text`),text:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),E9=Z({type:Q(`image`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),D9=Z({type:Q(`audio`),data:_9,mimeType:X(),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),Gse=Z({type:Q(`tool_use`),name:X(),id:X(),input:a8(X(),K6()),_meta:a8(X(),K6()).optional()}),O9=Z({type:Q(`resource`),resource:e8([g9,v9]),annotations:b9.optional(),_meta:a8(X(),K6()).optional()}),k9=x9.extend({type:Q(`resource_link`)}),A9=e8([T9,E9,D9,k9,O9]),Kse=Z({role:y9,content:A9}),qse=H7.extend({description:X().optional(),messages:X6(Kse)}),Jse=V7.extend({method:Q(`notifications/prompts/list_changed`),params:B7.optional()}),Yse=Z({title:X().optional(),readOnlyHint:R6().optional(),destructiveHint:R6().optional(),idempotentHint:R6().optional(),openWorldHint:R6().optional()}),Xse=Z({taskSupport:u8([`required`,`optional`,`forbidden`]).optional()}),j9=Z({...e9.shape,...$7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()),outputSchema:Z({type:Q(`object`),properties:a8(X(),N7).optional(),required:X6(X()).optional()}).catchall(K6()).optional(),annotations:Yse.optional(),execution:Xse.optional(),_meta:a8(X(),K6()).optional()}),M9=i9.extend({method:Q(`tools/list`)}),Zse=a9.extend({tools:X6(j9)}),N9=H7.extend({content:X6(A9).default([]),structuredContent:a8(X(),K6()).optional(),isError:R6().optional()});N9.or(H7.extend({toolResult:K6()}));var Qse=R7.extend({name:X(),arguments:a8(X(),K6()).optional()}),P9=z7.extend({method:Q(`tools/call`),params:Qse}),$se=V7.extend({method:Q(`notifications/tools/list_changed`),params:B7.optional()});Z({autoRefresh:R6().default(!0),debounceMs:M6().int().nonnegative().default(300)});var F9=u8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),ece=L7.extend({level:F9}),tce=z7.extend({method:Q(`logging/setLevel`),params:ece}),nce=B7.extend({level:F9,logger:X().optional(),data:K6()}),rce=V7.extend({method:Q(`notifications/message`),params:nce}),ice=Z({hints:X6(Z({name:X().optional()})).optional(),costPriority:M6().min(0).max(1).optional(),speedPriority:M6().min(0).max(1).optional(),intelligencePriority:M6().min(0).max(1).optional()}),ace=Z({mode:u8([`auto`,`required`,`none`]).optional()}),oce=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:X6(A9).default([]),structuredContent:Z({}).loose().optional(),isError:R6().optional(),_meta:a8(X(),K6()).optional()}),sce=n8(`type`,[T9,E9,D9]),I9=n8(`type`,[T9,E9,D9,Gse,oce]),cce=Z({role:y9,content:e8([I9,X6(I9)]),_meta:a8(X(),K6()).optional()}),lce=R7.extend({messages:X6(cce),modelPreferences:ice.optional(),systemPrompt:X().optional(),includeContext:u8([`none`,`thisServer`,`allServers`]).optional(),temperature:M6().optional(),maxTokens:M6().int(),stopSequences:X6(X()).optional(),metadata:N7.optional(),tools:X6(j9).optional(),toolChoice:ace.optional()}),uce=z7.extend({method:Q(`sampling/createMessage`),params:lce}),L9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:y9,content:sce}),R9=H7.extend({model:X(),stopReason:m8(u8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:y9,content:e8([I9,X6(I9)])}),dce=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:R6().optional()}),fce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:M6().optional(),maxLength:M6().optional(),format:u8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),pce=Z({type:u8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:M6().optional(),maximum:M6().optional(),default:M6().optional()}),mce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),default:X().optional()}),hce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:X6(Z({const:X(),title:X()})),default:X().optional()}),gce=e8([e8([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:X6(X()),enumNames:X6(X()).optional(),default:X().optional()}),e8([mce,hce]),e8([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({type:Q(`string`),enum:X6(X())}),default:X6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:M6().optional(),maxItems:M6().optional(),items:Z({anyOf:X6(Z({const:X(),title:X()}))}),default:X6(X()).optional()})])]),dce,fce,pce]),_ce=e8([R7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:a8(X(),gce),required:X6(X()).optional()})}),R7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),vce=z7.extend({method:Q(`elicitation/create`),params:_ce}),yce=B7.extend({elicitationId:X()}),bce=V7.extend({method:Q(`notifications/elicitation/complete`),params:yce}),xce=H7.extend({action:u8([`accept`,`decline`,`cancel`]),content:R8(e=>e===null?void 0:e,a8(X(),e8([X(),M6(),R6(),X6(X())])).optional())}),Sce=Z({type:Q(`ref/resource`),uri:X()}),Cce=Z({type:Q(`ref/prompt`),name:X()}),wce=L7.extend({ref:e8([Cce,Sce]),argument:Z({name:X(),value:X()}),context:Z({arguments:a8(X(),X()).optional()}).optional()}),Tce=z7.extend({method:Q(`completion/complete`),params:wce}),Ece=H7.extend({completion:$6({values:X6(X()).max(100),total:m8(M6().int()),hasMore:m8(R6())})}),Dce=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:a8(X(),K6()).optional()}),Oce=z7.extend({method:Q(`roots/list`),params:L7.optional()}),kce=H7.extend({roots:X6(Dce)}),Ace=V7.extend({method:Q(`notifications/roots/list_changed`),params:B7.optional()});e8([n9,gse,Tce,tce,Wse,Vse,Dse,Ose,jse,Pse,Ise,P9,M9,l9,d9,f9,m9]),e8([Q7,r9,yse,Ace,c9]),e8([Z7,L9,R9,xce,kce,u9,p9,s9]),e8([n9,uce,vce,Oce,l9,d9,f9,m9]),e8([Q7,r9,rce,Rse,Mse,$se,Jse,c9,bce]),e8([Z7,vse,Ece,qse,Hse,S9,kse,w9,N9,Zse,u9,p9,s9]);var z9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Y7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new jce(e.elicitations,n)}return new e(t,n,r)}},jce=class extends z9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Y7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function B9(e){return e===`completed`||e===`failed`||e===`cancelled`}function V9(e){let t=Moe(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Noe(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function H9(e,t){let n=F3(e,t);if(!n.success)throw n.error;return n.data}var Mce=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Q7,e=>{this._oncancel(e)}),this.setNotificationHandler(r9,e=>{this._onprogress(e)}),this.setRequestHandler(n9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(l9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new z9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(d9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new z9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new z9(Y7.InvalidParams,`Task not found: ${r}`);if(!B9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(B9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[M7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(f9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new z9(Y7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(m9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new z9(Y7.InvalidParams,`Task not found: ${e.params.taskId}`);if(B9(n.status))throw new z9(Y7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new z9(Y7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof z9?e:new z9(Y7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),z9.fromError(Y7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),J7(e)||cse(e)?this._onresponse(e):G7(e)?this._onrequest(e,t):sse(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=z9.fromError(Y7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[M7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Y7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=ose(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new z9(Y7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Y7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),J7(e)?n(e):n(new z9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(J7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),J7(e)?r(e):r(z9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof z9?e:new z9(Y7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,s9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new z9(Y7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},B9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new z9(Y7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new z9(Y7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof z9?e:new z9(Y7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[M7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof z9?e:new z9(Y7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=F3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(z9.fromError(Y7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},u9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},p9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Tse,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[M7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[M7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[M7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=V9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=H9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=V9(e);this._notificationHandlers.set(n,n=>{let r=H9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&G7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new z9(Y7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new z9(Y7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new z9(Y7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new z9(Y7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=c9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),B9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new z9(Y7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(B9(a.status))throw new z9(Y7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=c9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),B9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function U9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Nce(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=U9(a)&&U9(i)?{...a,...i}:i}return n}var Pce=`modulepreload`,Fce=function(e,t){return new URL(e,t).href},W9={},Ice=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Fce(t,n),t=s(t),t in W9)return;W9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Pce,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};j7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var Lce=class extends Mce{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},Rce=`2026-01-26`,G9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=lse.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},zce=e8([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),K9=e8([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),Bce=a8(e8([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function S4(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;S4(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function C4(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function w4(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!O4.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??C4(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}RU(n,r,e.length===1?e[0]:w4(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=C4(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function T4(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of O4)if(t in e)return;let n=t.filter(e=>k4.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=w4(t);else{let e=n[0],i=k4.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>w4([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,g4(e,r))}function E4(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):g4(i,s),g4(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())S4(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])T4(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}g4(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,RU(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:j4(t,`input`,e.processors),output:j4(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function D4(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return D4(r.element,n);if(r.type===`set`)return D4(r.valueType,n);if(r.type===`lazy`)return D4(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return D4(r.innerType,n);if(r.type===`intersection`)return D4(r.left,n)||D4(r.right,n);if(r.type===`record`||r.type===`map`)return D4(r.keyType,n)||D4(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:D4(r.in,n)||D4(r.out,n);if(r.type===`object`){for(let e in r.shape)if(D4(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(D4(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(D4(e,n))return!0;return!!(r.rest&&D4(r.rest,n))}return!1}var O4,k4,A4,j4,M4=o((()=>{R$(),J(),O4=new Set([`type`,`properties`,`required`,`additionalProperties`]),k4=[`oneOf`,`anyOf`],A4=(e,t={})=>n=>{let r=_4({...n,processors:t});return y4(e,r),x4(r,e),E4(r,e)},j4=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=_4({...i??{},target:a,io:t,processors:n});return y4(e,o),x4(o,e),E4(o,e)}}));function N4(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?N4(t.out):t.type===`catch`?N4(t.innerType):e._zod.optin}function P4(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=P4(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>P4(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?NK:MK).source),p):p}function Aoe(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of f3.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=P4(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function F4(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(v4(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),g3):JSON.parse(o)}function I4(e,t){if(`_idmap`in e){let n=e,r=_4({...t,processors:T3}),i={};for(let e of n._idmap.entries()){let[t,n]=e;y4(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;x4(r,n),RU(a,t,E4(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=_4({...t,processors:T3});return y4(e,n),x4(n,e),E4(n,e)}var L4,R4,z4,B4,V4,H4,U4,W4,G4,K4,q4,J4,Y4,X4,Z4,Q4,$4,e3,t3,n3,r3,i3,a3,o3,s3,c3,l3,u3,d3,f3,p3,m3,h3,g3,_3,v3,y3,b3,x3,S3,C3,w3,T3,E3=o((()=>{tq(),M4(),J(),L4={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},R4=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=L4[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},z4=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):v4(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},B4=(e,t,n,r)=>{n.type=`boolean`},V4=(e,t,n,r)=>{v4(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},H4=(e,t,n,r)=>{v4(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},U4=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},W4=(e,t,n,r)=>{v4(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},G4=(e,t,n,r)=>{v4(e,t,n,r,`Void cannot be represented in JSON Schema`)},K4=(e,t,n,r)=>{n.not={}},q4=(e,t,n,r)=>{},J4=(e,t,n,r)=>{},Y4=(e,t,n,r)=>{v4(e,t,n,r,`Date cannot be represented in JSON Schema`)},X4=(e,t,n,r)=>{let i=e._zod.def,a=jU(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Z4=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(v4(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(v4(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},Q4=(e,t,n,r)=>{v4(e,t,n,r,`NaN cannot be represented in JSON Schema`)},$4=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},e3=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},t3=(e,t,n,r)=>{n.type=`boolean`},n3=(e,t,n,r)=>{v4(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},r3=(e,t,n,r)=>{v4(e,t,n,r,`Function types cannot be represented in JSON Schema`)},i3=(e,t,n,r)=>{v4(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},a3=(e,t,n,r)=>{v4(e,t,n,r,`Map cannot be represented in JSON Schema`)},o3=(e,t,n,r)=>{v4(e,t,n,r,`Set cannot be represented in JSON Schema`)},s3=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=y4(a.element,t,{...r,path:[...r.path,`items`]})},c3=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&v4(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)RU(i.properties,e,y4(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?N4(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=y4(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},l3=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>y4(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},u3=(e,t,n,r)=>{let i=e._zod.def,a=y4(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=y4(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},d3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>y4(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?y4(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?N4(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},f3=new WeakMap,p3=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=y4(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)RU(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=y4(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=f3.get(t);n||(n=[],f3.set(t,n),t.deferred.push(()=>Aoe(t))),n.push(e)}i.additionalProperties=y4(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&N4(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},m3=(e,t,n,r)=>{let i=e._zod.def,a=y4(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},h3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},g3=Symbol(),_3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=F4(i.defaultValue,e,t,n,r);o!==g3&&(n.default=o)},v3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=F4(i.defaultValue,e,t,n,r);o!==g3&&(n._prefault=o)},y3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{v4(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},b3=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;y4(o,t,r);let s=t.seen.get(e);s.ref=o},x3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},S3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},C3=(e,t,n,r)=>{let i=e._zod.def;y4(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},w3=(e,t,n,r)=>{let i=e._zod.innerType;y4(i,t,r);let a=t.seen.get(e);a.ref=i},T3={string:R4,number:z4,boolean:B4,bigint:V4,symbol:H4,null:U4,undefined:W4,void:G4,never:K4,any:q4,unknown:J4,date:Y4,enum:X4,literal:Z4,nan:Q4,template_literal:$4,file:e3,success:t3,custom:n3,function:r3,transform:i3,map:a3,set:o3,array:s3,object:c3,union:l3,intersection:u3,tuple:d3,record:p3,nullable:m3,nonoptional:h3,default:_3,prefault:v3,catch:y3,pipe:b3,readonly:x3,promise:S3,optional:C3,lazy:w3}})),D3,joe=o((()=>{E3(),M4(),D3=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=_4({processors:T3,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return y4(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,x4(this.ctx,e);let{"~standard":n,...r}=E4(this.ctx,e);return r}}})),Moe=c({}),Noe=o((()=>{})),O3=c({$ZodAny:()=>tY,$ZodArray:()=>oY,$ZodAsyncError:()=>WW,$ZodBase64:()=>BJ,$ZodBase64URL:()=>VJ,$ZodBigInt:()=>XJ,$ZodBigIntFormat:()=>ZJ,$ZodBoolean:()=>YJ,$ZodCIDRv4:()=>RJ,$ZodCIDRv6:()=>zJ,$ZodCUID:()=>TJ,$ZodCUID2:()=>EJ,$ZodCatch:()=>AY,$ZodCheck:()=>rq,$ZodCheckBigIntFormat:()=>dq,$ZodCheckEndsWith:()=>wq,$ZodCheckGreaterThan:()=>cq,$ZodCheckIncludes:()=>Sq,$ZodCheckLengthEquals:()=>_q,$ZodCheckLessThan:()=>sq,$ZodCheckLowerCase:()=>bq,$ZodCheckMaxLength:()=>hq,$ZodCheckMaxSize:()=>fq,$ZodCheckMimeType:()=>Eq,$ZodCheckMinLength:()=>gq,$ZodCheckMinSize:()=>pq,$ZodCheckMultipleOf:()=>lq,$ZodCheckNumberFormat:()=>uq,$ZodCheckOverwrite:()=>Dq,$ZodCheckProperty:()=>Tq,$ZodCheckRegex:()=>yq,$ZodCheckSizeEquals:()=>mq,$ZodCheckStartsWith:()=>Cq,$ZodCheckStringFormat:()=>vq,$ZodCheckUpperCase:()=>xq,$ZodCodec:()=>NY,$ZodCreditCard:()=>WJ,$ZodCustom:()=>BY,$ZodCustomStringFormat:()=>KJ,$ZodCyclicError:()=>JY,$ZodDate:()=>aY,$ZodDefault:()=>EY,$ZodDiscriminatedUnion:()=>pY,$ZodE164:()=>HJ,$ZodEmail:()=>bJ,$ZodEmoji:()=>CJ,$ZodEncodeError:()=>GW,$ZodEnum:()=>yY,$ZodError:()=>sG,$ZodExactOptional:()=>wY,$ZodFile:()=>xY,$ZodFunction:()=>LY,$ZodGUID:()=>vJ,$ZodIPv4:()=>PJ,$ZodIPv6:()=>IJ,$ZodISODate:()=>jJ,$ZodISODateTime:()=>AJ,$ZodISODuration:()=>NJ,$ZodISOTime:()=>MJ,$ZodIntersection:()=>mY,$ZodJWT:()=>GJ,$ZodKSUID:()=>kJ,$ZodLazy:()=>zY,$ZodLiteral:()=>bY,$ZodMAC:()=>LJ,$ZodMap:()=>_Y,$ZodNaN:()=>jY,$ZodNanoID:()=>wJ,$ZodNever:()=>rY,$ZodNonOptional:()=>OY,$ZodNull:()=>eY,$ZodNullable:()=>TY,$ZodNumber:()=>qJ,$ZodNumberFormat:()=>JJ,$ZodObject:()=>lY,$ZodObjectJIT:()=>uY,$ZodOptional:()=>CY,$ZodPipe:()=>MY,$ZodPrefault:()=>DY,$ZodPreprocess:()=>PY,$ZodPromise:()=>RY,$ZodReadonly:()=>FY,$ZodRealError:()=>cG,$ZodRecord:()=>gY,$ZodRegistry:()=>I$,$ZodSet:()=>vY,$ZodString:()=>gJ,$ZodStringFormat:()=>_J,$ZodSuccess:()=>kY,$ZodSymbol:()=>QJ,$ZodTemplateLiteral:()=>IY,$ZodTransform:()=>SY,$ZodTuple:()=>hY,$ZodType:()=>mJ,$ZodULID:()=>DJ,$ZodURL:()=>SJ,$ZodUUID:()=>yJ,$ZodUndefined:()=>$J,$ZodUnion:()=>dY,$ZodUnknown:()=>nY,$ZodVoid:()=>iY,$ZodXID:()=>OJ,$ZodXor:()=>fY,$brand:()=>UW,$constructor:()=>Y,$input:()=>F$,$output:()=>P$,Doc:()=>kq,INVALID:()=>e0,JSONSchema:()=>Moe,JSONSchemaGenerator:()=>D3,NEVER:()=>BW,TimePrecision:()=>m4,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>n0,ZodCompileUnsupportedError:()=>r0,_any:()=>$0,_array:()=>I2,_base64:()=>O0,_base64url:()=>k0,_bigint:()=>K0,_boolean:()=>W0,_catch:()=>t4,_check:()=>l4,_cidrv4:()=>E0,_cidrv6:()=>D0,_coercedBigint:()=>q0,_coercedBoolean:()=>G0,_coercedDate:()=>i2,_coercedNumber:()=>R0,_coercedString:()=>c0,_creditCard:()=>j0,_cuid:()=>v0,_cuid2:()=>y0,_custom:()=>o4,_date:()=>r2,_decode:()=>EG,_decodeAsync:()=>AG,_default:()=>Q2,_discriminatedUnion:()=>z2,_e164:()=>A0,_email:()=>l0,_emoji:()=>g0,_encode:()=>wG,_encodeAsync:()=>OG,_endsWith:()=>E2,_enum:()=>G2,_file:()=>J2,_float32:()=>B0,_float64:()=>V0,_gt:()=>c2,_gte:()=>l2,_guid:()=>u0,_includes:()=>w2,_int:()=>z0,_int32:()=>H0,_int64:()=>J0,_intersection:()=>B2,_ipv4:()=>C0,_ipv6:()=>w0,_isoDate:()=>P0,_isoDateTime:()=>N0,_isoDuration:()=>I0,_isoTime:()=>F0,_jwt:()=>M0,_ksuid:()=>S0,_lazy:()=>i4,_length:()=>b2,_literal:()=>q2,_lowercase:()=>S2,_lt:()=>o2,_lte:()=>s2,_mac:()=>T0,_map:()=>U2,_max:()=>s2,_maxLength:()=>v2,_maxSize:()=>h2,_mime:()=>k2,_min:()=>l2,_minLength:()=>y2,_minSize:()=>g2,_multipleOf:()=>m2,_nan:()=>a2,_nanoid:()=>_0,_nativeEnum:()=>K2,_negative:()=>d2,_never:()=>t2,_nonnegative:()=>p2,_nonoptional:()=>$2,_nonpositive:()=>f2,_normalize:()=>j2,_null:()=>Q0,_nullable:()=>Z2,_number:()=>L0,_optional:()=>X2,_overwrite:()=>A2,_parse:()=>fG,_parseAsync:()=>mG,_pipe:()=>n4,_positive:()=>u2,_promise:()=>a4,_properties:()=>O2,_property:()=>D2,_readonly:()=>r4,_record:()=>H2,_refine:()=>s4,_regex:()=>x2,_safeDecode:()=>PG,_safeDecodeAsync:()=>RG,_safeEncode:()=>MG,_safeEncodeAsync:()=>IG,_safeParse:()=>gG,_safeParseAsync:()=>vG,_set:()=>W2,_size:()=>_2,_slugify:()=>F2,_startsWith:()=>T2,_string:()=>s0,_stringFormat:()=>p4,_stringbool:()=>f4,_success:()=>e4,_superRefine:()=>c4,_symbol:()=>X0,_templateLiteral:()=>koe,_toLowerCase:()=>N2,_toUpperCase:()=>P2,_transform:()=>Y2,_trim:()=>M2,_tuple:()=>V2,_uint32:()=>U0,_uint64:()=>Y0,_ulid:()=>b0,_undefined:()=>Z0,_union:()=>L2,_unknown:()=>e2,_uppercase:()=>C2,_url:()=>h0,_uuid:()=>d0,_uuidv4:()=>f0,_uuidv6:()=>p0,_uuidv7:()=>m0,_void:()=>n2,_xid:()=>x0,_xor:()=>R2,clone:()=>KU,compile:()=>B$,compileFn:()=>H$,config:()=>RW,createStandardJSONSchemaMethod:()=>j4,createToJSONSchemaMethod:()=>A4,decode:()=>DG,decodeAsync:()=>jG,describe:()=>u4,encode:()=>TG,encodeAsync:()=>kG,extractDefs:()=>x4,finalize:()=>E4,flattenError:()=>ZW,formatError:()=>QW,getDiscriminatedOption:()=>Zq,globalConfig:()=>KW,globalRegistry:()=>L$,handleUnrepresentable:()=>v4,initializeContext:()=>_4,isBackEdge:()=>qY,isRecursiveSchema:()=>WY,isValidBase64:()=>Bq,isValidBase64URL:()=>Vq,isValidCIDRv6:()=>zq,isValidCreditCard:()=>Uq,isValidIPv6:()=>Rq,isValidJWT:()=>Wq,locales:()=>A$,memoizer:()=>KY,mergeValues:()=>Qq,meta:()=>d4,parse:()=>pG,parseAsync:()=>hG,parseURLObject:()=>Pq,prettifyError:()=>tG,process:()=>y4,regexes:()=>VG,registry:()=>M$,safeDecode:()=>FG,safeDecodeAsync:()=>zG,safeEncode:()=>NG,safeEncodeAsync:()=>LG,safeParse:()=>_G,safeParseAsync:()=>yG,standardProps:()=>Nq,stripTabAndNewline:()=>Fq,toDotPath:()=>eG,toJSONSchema:()=>I4,toZod:()=>AU,treeifyError:()=>$W,urlHostnameOk:()=>Iq,urlProtocolOk:()=>Lq,util:()=>kU,validate:()=>SG,validateAsync:()=>CG,version:()=>jq}),k3=o((()=>{qW(),BG(),lG(),VY(),tX(),Oq(),Mq(),J(),tq(),j$(),R$(),Aq(),o0(),h4(),M4(),E3(),joe(),Noe()}));function A3(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===j3)return new zY({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,j3);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?KU(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:KU(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?KU(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:KU(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:KU(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?KU(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:KU(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:KU(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:KU(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:KU(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return KU(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var j3,M3=o((()=>{VY(),J(),j3=Symbol(`z.visit/resolving`)}));BG();function N3(e){return!!e._zod}function P3(e,t){return N3(e)?_G(e,t):e.safeParse(t)}function Poe(e){if(!e)return;let t;if(t=N3(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function Foe(e){if(N3(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var Ioe=c({endsWith:()=>E2,gt:()=>c2,gte:()=>l2,includes:()=>w2,length:()=>b2,lowercase:()=>S2,lt:()=>o2,lte:()=>s2,maxLength:()=>v2,maxSize:()=>h2,mime:()=>k2,minLength:()=>y2,minSize:()=>g2,multipleOf:()=>m2,negative:()=>d2,nonnegative:()=>p2,nonpositive:()=>f2,normalize:()=>j2,overwrite:()=>A2,positive:()=>u2,properties:()=>O2,property:()=>D2,regex:()=>x2,size:()=>_2,slugify:()=>F2,startsWith:()=>T2,toLowerCase:()=>N2,toUpperCase:()=>P2,trim:()=>M2,uppercase:()=>C2}),F3=o((()=>{k3()}));function I3(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var L3,R3,z3,B3,V3=o((()=>{k3(),J(),L3=new WeakSet([Object.prototype,Error.prototype]),R3=(e,t)=>{sG.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);L3.has(n)||(L3.add(n),I3(n,`format`,e=>t=>QW(e,t)),I3(n,`flatten`,e=>t=>ZW(e,t)),I3(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,MU,2)}),I3(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,MU,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},z3=Y(`ZodError`,R3),B3=Y(`ZodError`,R3,void 0,{Parent:Error})})),H3,U3,W3,G3,K3,q3,J3,Y3,X3,Z3,Q3,$3,e6=o((()=>{k3(),V3(),H3=fG(B3),U3=mG(B3),W3=gG(B3),G3=vG(B3),K3=wG(B3),q3=EG(B3),J3=OG(B3),Y3=AG(B3),X3=MG(B3),Z3=PG(B3),Q3=IG(B3),$3=RG(B3)})),Loe=c({ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,codec:()=>w8,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,float32:()=>N6,float64:()=>P6,function:()=>A8,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,literal:()=>Q,looseObject:()=>Q6,looseRecord:()=>o8,mac:()=>v6,map:()=>s8,meta:()=>o7,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,never:()=>K6,nonoptional:()=>y8,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,partialRecord:()=>a8,pipe:()=>C8,prefault:()=>v8,preprocess:()=>L8,promise:()=>k8,readonly:()=>E8,record:()=>i8,refine:()=>N8,set:()=>c8,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,transform:()=>f8,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,url:()=>c6,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,void:()=>q6,xid:()=>h6,xor:()=>e8});function Roe(){KW.localeError||RW(IX())}function t6(){KW.memoizer||RW({memoizer:KY()})}function X(e){return s0(B8,e)}function n6(e){return l0(K8,e)}function r6(e){return u0(q8,e)}function i6(e){return d0(J8,e)}function a6(e){return f0(J8,e)}function o6(e){return p0(J8,e)}function s6(e){return m0(J8,e)}function c6(e){return h0(Y8,e)}function l6(e){return h0(Y8,{protocol:TK,hostname:wK,...q(e)})}function u6(e){return g0(X8,e)}function d6(e){return _0(Z8,e)}function f6(e){return v0(Q8,e)}function p6(e){return y0($8,e)}function m6(e){return b0(e5,e)}function h6(e){return x0(t5,e)}function g6(e){return S0(n5,e)}function _6(e){return C0(r5,e)}function v6(e){return T0(i5,e)}function y6(e){return w0(a5,e)}function b6(e){return E0(o5,e)}function x6(e){return D0(s5,e)}function S6(e){return O0(c5,e)}function C6(e){return k0(l5,e)}function w6(e){return A0(u5,e)}function T6(e){return j0(d5,e)}function E6(e){return M0(f5,e)}function D6(e,t,n={}){return p4(p5,e,t,n)}function O6(e){return p4(p5,`hostname`,CK,e)}function k6(e){return p4(p5,`hex`,zK,e)}function A6(e,t){let n=`${e}_${t?.enc??`hex`}`,r=VG[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return p4(p5,n,r,t)}function j6(e){return L0(m5,e)}function M6(e){return z0(h5,e)}function N6(e){return B0(h5,e)}function P6(e){return V0(h5,e)}function F6(e){return H0(h5,e)}function I6(e){return U0(h5,e)}function L6(e){return W0(g5,e)}function R6(e){return K0(_5,e)}function z6(e){return J0(v5,e)}function B6(e){return Y0(v5,e)}function V6(e){return X0(y5,e)}function H6(e){return Z0(b5,e)}function U6(e){return Q0(x5,e)}function W6(){return $0(S5)}function G6(){return e2(C5)}function K6(e){return t2(w5,e)}function q6(e){return n2(T5,e)}function J6(e){return r2(E5,e)}function Y6(e,t){return I2(D5,e,t)}function X6(e){let t=e._zod.def.shape;return l8(Object.keys(t))}function Z(e,t){let n={type:`object`,shape:e??{},...q(t)};return new O5(n)}function Z6(e,t){return new O5({type:`object`,shape:e,catchall:K6(),...q(t)})}function Q6(e,t){return new O5({type:`object`,shape:e,catchall:G6(),...q(t)})}function $6(e,t){return new k5({type:`union`,options:e,...q(t)})}function e8(e,t){return new A5({type:`union`,options:e,inclusive:!1,...q(t)})}function t8(e,t,n){return new j5({type:`union`,options:t,discriminator:e,...q(n)})}function n8(e,t){return new M5({type:`intersection`,left:e,right:t})}function r8(e,t,n){let r=t instanceof mJ;return new N5({type:`tuple`,items:e,rest:r?t:null,...q(r?n:t)})}function i8(e,t,n){return!t||!t._zod?new P5({type:`record`,keyType:X(),valueType:e,...q(t)}):new P5({type:`record`,keyType:e,valueType:t,...q(n)})}function a8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,...q(n),partial:!0})}function o8(e,t,n){return new P5({type:`record`,keyType:e,valueType:t,mode:`loose`,...q(n)})}function s8(e,t,n){return new F5({type:`map`,keyType:e,valueType:t,...q(n)})}function c8(e,t){return new I5({type:`set`,valueType:e,...q(t)})}function l8(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new L5({type:`enum`,entries:n,...q(t)})}function u8(e,t){return new L5({type:`enum`,entries:e,...q(t)})}function Q(e,t){return new R5({type:`literal`,values:Array.isArray(e)?e:[e],...q(t)})}function d8(e){return J2(z5,e)}function f8(e){return new B5({type:`transform`,transform:e})}function p8(e){return new V5({type:`optional`,innerType:e})}function m8(e){return new H5({type:`optional`,innerType:e})}function h8(e){return new U5({type:`nullable`,innerType:e})}function g8(e){return p8(h8(e))}function _8(e,t){return new W5({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():WU(t)}})}function v8(e,t){return new G5({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():WU(t)}})}function y8(e,t){return new K5({type:`nonoptional`,innerType:e,...q(t)})}function b8(e){return new q5({type:`success`,innerType:e})}function x8(e,t){return new J5({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:SW(t)})}function S8(e){return a2(Y5,e)}function C8(e,t){return new X5({type:`pipe`,in:e,out:t})}function w8(e,t,n){return new Z5({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function T8(e){let t=e._zod.def;return new Z5({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function E8(e){return new $5({type:`readonly`,innerType:e})}function D8(e,t){return new e7({type:`template_literal`,parts:e,...q(t)})}function O8(e){return new t7({type:`lazy`,getter:e})}function k8(e){return new n7({type:`promise`,innerType:e})}function A8(e){return new r7({type:`function`,input:Array.isArray(e?.input)?r8(e?.input):e?.input??Y6(G6()),output:e?.output??G6()})}function j8(e){let t=new rq({check:`custom`});return t._zod.check=e,t}function M8(e,t){return o4(i7,e??(()=>!0),t)}function N8(e,t={}){return s4(i7,e,t)}function P8(e,t){return c4(e,t)}function F8(e,t={}){let n=new i7({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...q(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function I8(e){let t=O8(()=>$6([X(e),j6(),L6(),U6(),Y6(t),i8(X(),t)]));return t}function L8(e,t){return new Q5({type:`pipe`,in:f8(e),out:t})}var R8,z8,B8,V8,H8,U8,W8,G8,K8,q8,J8,Y8,X8,Z8,Q8,$8,e5,t5,n5,r5,i5,a5,o5,s5,c5,l5,u5,d5,f5,p5,m5,h5,g5,_5,v5,y5,b5,x5,S5,C5,w5,T5,E5,D5,O5,k5,A5,j5,M5,N5,P5,F5,I5,L5,R5,z5,B5,V5,H5,U5,W5,G5,K5,q5,J5,Y5,X5,Z5,Q5,$5,e7,t7,n7,r7,i7,a7,o7,s7,c7=o((()=>{k3(),E3(),M4(),RX(),F3(),e6(),R8=Y(`ZodType`,(e,t)=>(Roe(),mJ.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(zU(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return KU(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(N8(e,t))},superRefine(e,t){return this.check(P8(e,t))},overwrite(e){return this.check(A2(e))},optional(){return p8(this)},exactOptional(){return m8(this)},nullable(){return h8(this)},nullish(){return p8(h8(this))},nonoptional(e){return y8(this,e)},array(){return Y6(this)},or(e){return $6([this,e])},and(e){return n8(this,e)},transform(e){return C8(this,f8(e))},default(e){return _8(this,e)},prefault(e){return v8(this,e)},catch(e){return x8(this,e)},pipe(e){return C8(this,e)},readonly(){return E8(this)},describe(e){let t=this.clone();return L$.add(t,{description:e}),t},meta(...e){if(e.length===0)return L$.get(this);let t=this.clone();return L$.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return _W(this,`~standard`,{...Nq(this),jsonSchema:{input:j4(this,`input`),output:j4(this,`output`)}})},set"~standard"(e){gW(this,`~standard`,e)},parse:function e(t,n){return H3(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await U3(this,t,n,{callee:e})},safeParse(e,t){return W3(this,e,t)},async safeParseAsync(e,t){return G3(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){gW(this,`spa`,e)},encode:function e(t,n){return K3(this,t,n,{callee:e})},decode:function e(t,n){return q3(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await J3(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Y3(this,t,n,{callee:e})},safeEncode(e,t){return X3(this,e,t)},safeDecode(e,t){return Z3(this,e,t)},async safeEncodeAsync(e,t){return Q3(this,e,t)},async safeDecodeAsync(e,t){return $3(this,e,t)},toJSONSchema(e){return A4(this,{})(e)},get description(){return L$.get(this)?.description},get _def(){return this._zod.def}}),z8=Y(`_ZodString`,(e,t)=>{gJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>R4(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(x2(...e))},includes(...e){return this.check(w2(...e))},startsWith(...e){return this.check(T2(...e))},endsWith(...e){return this.check(E2(...e))},min(...e){return this.check(y2(...e))},max(...e){return this.check(v2(...e))},length(...e){return this.check(b2(...e))},nonempty(...e){return this.check(y2(1,...e))},lowercase(e){return this.check(S2(e))},uppercase(e){return this.check(C2(e))},trim(){return this.check(M2())},normalize(...e){return this.check(j2(...e))},toLowerCase(){return this.check(N2())},toUpperCase(){return this.check(P2())},slugify(){return this.check(F2())}}),B8=Y(`ZodString`,(e,t)=>{gJ.init(e,t),z8.init(e,t)},{email(e){return this.check(l0(K8,e))},url(e){return this.check(h0(Y8,e))},jwt(e){return this.check(M0(f5,e))},emoji(e){return this.check(g0(X8,e))},guid(e){return this.check(u0(q8,e))},uuid(e){return this.check(d0(J8,e))},uuidv4(e){return this.check(f0(J8,e))},uuidv6(e){return this.check(p0(J8,e))},uuidv7(e){return this.check(m0(J8,e))},nanoid(e){return this.check(_0(Z8,e))},cuid(e){return this.check(v0(Q8,e))},cuid2(e){return this.check(y0($8,e))},ulid(e){return this.check(b0(e5,e))},base64(e){return this.check(O0(c5,e))},base64url(e){return this.check(k0(l5,e))},xid(e){return this.check(x0(t5,e))},ksuid(e){return this.check(S0(n5,e))},ipv4(e){return this.check(C0(r5,e))},ipv6(e){return this.check(w0(a5,e))},cidrv4(e){return this.check(E0(o5,e))},cidrv6(e){return this.check(D0(s5,e))},e164(e){return this.check(A0(u5,e))},datetime(e){return this.check(N0(H8,e))},date(e){return this.check(P0(U8,e))},time(e){return this.check(F0(W8,e))},duration(e){return this.check(I0(G8,e))}}),V8=Y(`ZodStringFormat`,(e,t)=>{_J.init(e,t),z8.init(e,t)}),H8=Y(`ZodISODateTime`,(e,t)=>{AJ.init(e,t),V8.init(e,t)}),U8=Y(`ZodISODate`,(e,t)=>{jJ.init(e,t),V8.init(e,t)}),W8=Y(`ZodISOTime`,(e,t)=>{MJ.init(e,t),V8.init(e,t)}),G8=Y(`ZodISODuration`,(e,t)=>{NJ.init(e,t),V8.init(e,t)}),K8=Y(`ZodEmail`,(e,t)=>{bJ.init(e,t),V8.init(e,t)}),q8=Y(`ZodGUID`,(e,t)=>{vJ.init(e,t),V8.init(e,t)}),J8=Y(`ZodUUID`,(e,t)=>{yJ.init(e,t),V8.init(e,t)}),Y8=Y(`ZodURL`,(e,t)=>{SJ.init(e,t),V8.init(e,t)}),X8=Y(`ZodEmoji`,(e,t)=>{CJ.init(e,t),V8.init(e,t)}),Z8=Y(`ZodNanoID`,(e,t)=>{wJ.init(e,t),V8.init(e,t)}),Q8=Y(`ZodCUID`,(e,t)=>{TJ.init(e,t),V8.init(e,t)}),$8=Y(`ZodCUID2`,(e,t)=>{EJ.init(e,t),V8.init(e,t)}),e5=Y(`ZodULID`,(e,t)=>{DJ.init(e,t),V8.init(e,t)}),t5=Y(`ZodXID`,(e,t)=>{OJ.init(e,t),V8.init(e,t)}),n5=Y(`ZodKSUID`,(e,t)=>{kJ.init(e,t),V8.init(e,t)}),r5=Y(`ZodIPv4`,(e,t)=>{PJ.init(e,t),V8.init(e,t)}),i5=Y(`ZodMAC`,(e,t)=>{LJ.init(e,t),V8.init(e,t)}),a5=Y(`ZodIPv6`,(e,t)=>{IJ.init(e,t),V8.init(e,t)}),o5=Y(`ZodCIDRv4`,(e,t)=>{RJ.init(e,t),V8.init(e,t)}),s5=Y(`ZodCIDRv6`,(e,t)=>{zJ.init(e,t),V8.init(e,t)}),c5=Y(`ZodBase64`,(e,t)=>{BJ.init(e,t),V8.init(e,t)}),l5=Y(`ZodBase64URL`,(e,t)=>{VJ.init(e,t),V8.init(e,t)}),u5=Y(`ZodE164`,(e,t)=>{HJ.init(e,t),V8.init(e,t)}),d5=Y(`ZodCreditCard`,(e,t)=>{WJ.init(e,t),V8.init(e,t)}),f5=Y(`ZodJWT`,(e,t)=>{GJ.init(e,t),V8.init(e,t)}),p5=Y(`ZodCustomStringFormat`,(e,t)=>{KJ.init(e,t),V8.init(e,t)}),m5=Y(`ZodNumber`,(e,t)=>{qJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>z4(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(c2(e,t))},gte(e,t){return this.check(l2(e,t))},min(e,t){return this.check(l2(e,t))},lt(e,t){return this.check(o2(e,t))},lte(e,t){return this.check(s2(e,t))},max(e,t){return this.check(s2(e,t))},int(e){return this.check(M6(e))},safe(e){return this.check(M6(e))},positive(e){return this.check(c2(0,e))},nonnegative(e){return this.check(l2(0,e))},negative(e){return this.check(o2(0,e))},nonpositive(e){return this.check(s2(0,e))},multipleOf(e,t){return this.check(m2(e,t))},step(e,t){return this.check(m2(e,t))},finite(){return this}}),h5=Y(`ZodNumberFormat`,(e,t)=>{JJ.init(e,t),m5.init(e,t)}),g5=Y(`ZodBoolean`,(e,t)=>{YJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>B4(e,t,n,r)}),_5=Y(`ZodBigInt`,(e,t)=>{XJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>V4(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(l2(e,t))},min(e,t){return this.check(l2(e,t))},gt(e,t){return this.check(c2(e,t))},lt(e,t){return this.check(o2(e,t))},lte(e,t){return this.check(s2(e,t))},max(e,t){return this.check(s2(e,t))},positive(e){return this.check(c2(BigInt(0),e))},negative(e){return this.check(o2(BigInt(0),e))},nonpositive(e){return this.check(s2(BigInt(0),e))},nonnegative(e){return this.check(l2(BigInt(0),e))},multipleOf(e,t){return this.check(m2(e,t))}}),v5=Y(`ZodBigIntFormat`,(e,t)=>{ZJ.init(e,t),_5.init(e,t)}),y5=Y(`ZodSymbol`,(e,t)=>{QJ.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>H4(e,t,n,r)}),b5=Y(`ZodUndefined`,(e,t)=>{$J.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>W4(e,t,n,r)}),x5=Y(`ZodNull`,(e,t)=>{eY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>U4(e,t,n,r)}),S5=Y(`ZodAny`,(e,t)=>{tY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>q4(e,t,n,r)}),C5=Y(`ZodUnknown`,(e,t)=>{nY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>J4(e,t,n,r)}),w5=Y(`ZodNever`,(e,t)=>{rY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>K4(e,t,n,r)}),T5=Y(`ZodVoid`,(e,t)=>{iY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>G4(e,t,n,r)}),E5=Y(`ZodDate`,(e,t)=>{aY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Y4(e,t,n,r),e.min=(t,n)=>e.check(l2(t,n)),e.max=(t,n)=>e.check(s2(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),D5=Y(`ZodArray`,(e,t)=>{t6(),oY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>s3(e,t,n,r),e.element=t.element},{min(e,t){return this.check(y2(e,t))},nonempty(e){return this.check(y2(1,e))},max(e,t){return this.check(v2(e,t))},length(e,t){return this.check(b2(e,t))},unwrap(){return this.element}}),O5=Y(`ZodObject`,(e,t)=>{t6(),uY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>c3(e,t,n,r),xW(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return l8(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:G6()})},loose(){return this.clone({...this._zod.def,catchall:G6()})},strict(){return this.clone({...this._zod.def,catchall:K6()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return ZU(this,e)},safeExtend(e){return QU(this,e)},merge(e){return $U(this,e)},pick(e){return YU(this,e)},omit(e){return XU(this,e)},partial(...e){return eW(V5,this,e[0])},exactPartial(...e){return eW(H5,this,e[0],`exactPartial`)},required(...e){return tW(K5,this,e[0])}}),k5=Y(`ZodUnion`,(e,t)=>{dY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.options=t.options}),A5=Y(`ZodXor`,(e,t)=>{k5.init(e,t),fY.init(e,t),e._zod.processJSONSchema=(t,n,r)=>l3(e,t,n,r),e.options=t.options}),j5=Y(`ZodDiscriminatedUnion`,(e,t)=>{k5.init(e,t),pY.init(e,t)}),M5=Y(`ZodIntersection`,(e,t)=>{mY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>u3(e,t,n,r)}),N5=Y(`ZodTuple`,(e,t)=>{t6(),hY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>d3(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new V5({type:`optional`,innerType:e}))})}}),P5=Y(`ZodRecord`,(e,t)=>{t6(),gY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>p3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),F5=Y(`ZodMap`,(e,t)=>{t6(),_Y.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>a3(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(g2(...t)),e.nonempty=t=>e.check(g2(1,t)),e.max=(...t)=>e.check(h2(...t)),e.size=(...t)=>e.check(_2(...t))}),I5=Y(`ZodSet`,(e,t)=>{t6(),vY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>o3(e,t,n,r),e.min=(...t)=>e.check(g2(...t)),e.nonempty=t=>e.check(g2(1,t)),e.max=(...t)=>e.check(h2(...t)),e.size=(...t)=>e.check(_2(...t))}),L5=Y(`ZodEnum`,(e,t)=>{yY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>X4(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new L5({...t,checks:[],...q(r),entries:i})}}),R5=Y(`ZodLiteral`,(e,t)=>{bY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Z4(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),z5=Y(`ZodFile`,(e,t)=>{xY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>e3(e,t,n,r),e.min=(t,n)=>e.check(g2(t,n)),e.max=(t,n)=>e.check(h2(t,n)),e.mime=(t,n)=>e.check(k2(Array.isArray(t)?t:[t],n))}),B5=Y(`ZodTransform`,(e,t)=>{t6(),SY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>i3(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new GW(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(fW(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(fW(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),V5=Y(`ZodOptional`,(e,t)=>{CY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),H5=Y(`ZodExactOptional`,(e,t)=>{wY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>C3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),U5=Y(`ZodNullable`,(e,t)=>{TY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>m3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),W5=Y(`ZodDefault`,(e,t)=>{EY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),G5=Y(`ZodPrefault`,(e,t)=>{DY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>v3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),K5=Y(`ZodNonOptional`,(e,t)=>{OY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>h3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),q5=Y(`ZodSuccess`,(e,t)=>{kY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>t3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),J5=Y(`ZodCatch`,(e,t)=>{AY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>y3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),Y5=Y(`ZodNaN`,(e,t)=>{jY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Q4(e,t,n,r)}),X5=Y(`ZodPipe`,(e,t)=>{MY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>b3(e,t,n,r),e.in=t.in,e.out=t.out}),Z5=Y(`ZodCodec`,(e,t)=>{X5.init(e,t),NY.init(e,t)}),Q5=Y(`ZodPreprocess`,(e,t)=>{X5.init(e,t),PY.init(e,t)}),$5=Y(`ZodReadonly`,(e,t)=>{FY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>x3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),e7=Y(`ZodTemplateLiteral`,(e,t)=>{IY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$4(e,t,n,r)}),t7=Y(`ZodLazy`,(e,t)=>{zY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>w3(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),n7=Y(`ZodPromise`,(e,t)=>{RY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>S3(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),r7=Y(`ZodFunction`,(e,t)=>{LY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>r3(e,t,n,r)}),i7=Y(`ZodCustom`,(e,t)=>{BY.init(e,t),R8.init(e,t),e._zod.processJSONSchema=(t,n,r)=>n3(e,t,n,r)}),a7=u4,o7=d4,s7=(...e)=>f4({Codec:Z5,Boolean:g5,String:B8},...e)}));function l7(e){RW({customError:e})}function u7(){return RW().customError}var d7,f7,zoe=o((()=>{k3(),d7={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},f7||={}})),p7=c({ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,date:()=>Boe,datetime:()=>m7,duration:()=>Hoe,time:()=>Voe});function m7(e){return N0(H8,e)}function Boe(e){return P0(U8,e)}function Voe(e){return F0(W8,e)}function Hoe(e){return I0(G8,e)}var h7=o((()=>{k3(),c7()}));function Uoe(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function g7(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function _7(e,t){if(e!==!1)return e===void 0||e===!0?$.any():y7(e,t)}function v7(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=y7(Goe(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>v7({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(S7)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?y7(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=y7(r,t);RU(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=y7(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!UU(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=Koe(r,y7(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=g7(n.map(e=>y7(e,t)),a),s=Array.isArray(i)?void 0:_7(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=g7(i.map(e=>y7(e,t)),n),o=_7(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=y7(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function y7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=v7(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>y7(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>y7(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:y7(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function b7(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:Uoe(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??L$};return y7(n,r)}var $,x7,S7,qoe=o((()=>{R$(),J(),F3(),h7(),c7(),$={...Loe,...Ioe,iso:p7},x7=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),S7=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function C7(e){return A3(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:$6(t.options)}})}var Joe=o((()=>{M3(),c7()}));function Yoe(e,t){if(!t?.length)return e;let n=e._zod.def;return KU(e,zU(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function w7(e){return Yoe(e.out,e.checks)}function Xoe(e){return e.in._zod.traits.has(`$ZodTransform`)?w7(e):e.in}function T7(e){return A3(e,{pipe:e=>Xoe(e._zod.def),default:(e,t)=>t?p8(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function E7(e){return A3(e,{pipe:e=>w7(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var Zoe=o((()=>{J(),M3(),c7()})),D7=c({bigint:()=>tse,boolean:()=>ese,date:()=>nse,number:()=>$oe,string:()=>Qoe});function Qoe(e){return c0(B8,e)}function $oe(e){return R0(m5,e)}function ese(e){return G0(g5,e)}function tse(e){return q0(_5,e)}function nse(e){return i2(E5,e)}var rse=o((()=>{k3(),c7()})),O7=c({$brand:()=>UW,$input:()=>F$,$output:()=>P$,NEVER:()=>BW,TimePrecision:()=>m4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>n0,ZodCompileUnsupportedError:()=>r0,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>z3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>B3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>KU,codec:()=>w8,coerce:()=>D7,compile:()=>B$,config:()=>RW,core:()=>O3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>q3,decodeAsync:()=>Y3,deepPartial:()=>C7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>K3,encodeAsync:()=>J3,endsWith:()=>E2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>ZW,float32:()=>N6,float64:()=>P6,formatError:()=>QW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Zq,getErrorMap:()=>u7,globalRegistry:()=>L$,gt:()=>c2,gte:()=>l2,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>w2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>b2,literal:()=>Q,locales:()=>A$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>S2,lt:()=>o2,lte:()=>s2,mac:()=>v6,map:()=>s8,maxLength:()=>v2,maxSize:()=>h2,memoizer:()=>KY,meta:()=>o7,mime:()=>k2,minLength:()=>y2,minSize:()=>g2,multipleOf:()=>m2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>d2,never:()=>K6,nonnegative:()=>p2,nonoptional:()=>y8,nonpositive:()=>f2,normalize:()=>j2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>A2,parse:()=>H3,parseAsync:()=>U3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>u2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>tG,promise:()=>k8,properties:()=>O2,property:()=>D2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>x2,regexes:()=>VG,registry:()=>M$,safeDecode:()=>Z3,safeDecodeAsync:()=>$3,safeEncode:()=>X3,safeEncodeAsync:()=>Q3,safeParse:()=>W3,safeParseAsync:()=>G3,set:()=>c8,setErrorMap:()=>l7,size:()=>_2,slugify:()=>F2,startsWith:()=>T2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>I4,toLowerCase:()=>N2,toUpperCase:()=>P2,toZod:()=>AU,transform:()=>f8,treeifyError:()=>$W,trim:()=>M2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>C2,url:()=>c6,util:()=>kU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>SG,validateAsync:()=>CG,void:()=>q6,xid:()=>h6,xor:()=>e8}),k7=o((()=>{k3(),c7(),F3(),V3(),e6(),zoe(),E3(),qoe(),Joe(),Zoe(),j$(),h7(),rse()})),ise=o((()=>{k7(),k7()})),ase=c({$brand:()=>UW,$input:()=>F$,$output:()=>P$,NEVER:()=>BW,TimePrecision:()=>m4,ZodAny:()=>S5,ZodArray:()=>D5,ZodBase64:()=>c5,ZodBase64URL:()=>l5,ZodBigInt:()=>_5,ZodBigIntFormat:()=>v5,ZodBoolean:()=>g5,ZodCIDRv4:()=>o5,ZodCIDRv6:()=>s5,ZodCUID:()=>Q8,ZodCUID2:()=>$8,ZodCatch:()=>J5,ZodCodec:()=>Z5,ZodCompileAsyncError:()=>n0,ZodCompileUnsupportedError:()=>r0,ZodCreditCard:()=>d5,ZodCustom:()=>i7,ZodCustomStringFormat:()=>p5,ZodDate:()=>E5,ZodDefault:()=>W5,ZodDiscriminatedUnion:()=>j5,ZodE164:()=>u5,ZodEmail:()=>K8,ZodEmoji:()=>X8,ZodEnum:()=>L5,ZodError:()=>z3,ZodExactOptional:()=>H5,ZodFile:()=>z5,ZodFirstPartyTypeKind:()=>f7,ZodFunction:()=>r7,ZodGUID:()=>q8,ZodIPv4:()=>r5,ZodIPv6:()=>a5,ZodISODate:()=>U8,ZodISODateTime:()=>H8,ZodISODuration:()=>G8,ZodISOTime:()=>W8,ZodIntersection:()=>M5,ZodIssueCode:()=>d7,ZodJWT:()=>f5,ZodKSUID:()=>n5,ZodLazy:()=>t7,ZodLiteral:()=>R5,ZodMAC:()=>i5,ZodMap:()=>F5,ZodNaN:()=>Y5,ZodNanoID:()=>Z8,ZodNever:()=>w5,ZodNonOptional:()=>K5,ZodNull:()=>x5,ZodNullable:()=>U5,ZodNumber:()=>m5,ZodNumberFormat:()=>h5,ZodObject:()=>O5,ZodOptional:()=>V5,ZodPipe:()=>X5,ZodPrefault:()=>G5,ZodPreprocess:()=>Q5,ZodPromise:()=>n7,ZodReadonly:()=>$5,ZodRealError:()=>B3,ZodRecord:()=>P5,ZodSet:()=>I5,ZodString:()=>B8,ZodStringFormat:()=>V8,ZodSuccess:()=>q5,ZodSymbol:()=>y5,ZodTemplateLiteral:()=>e7,ZodTransform:()=>B5,ZodTuple:()=>N5,ZodType:()=>R8,ZodULID:()=>e5,ZodURL:()=>Y8,ZodUUID:()=>J8,ZodUndefined:()=>b5,ZodUnion:()=>k5,ZodUnknown:()=>C5,ZodVoid:()=>T5,ZodXID:()=>t5,ZodXor:()=>A5,_ZodString:()=>z8,_default:()=>_8,_function:()=>A8,any:()=>W6,array:()=>Y6,base64:()=>S6,base64url:()=>C6,bigint:()=>R6,boolean:()=>L6,catch:()=>x8,check:()=>j8,cidrv4:()=>b6,cidrv6:()=>x6,clone:()=>KU,codec:()=>w8,coerce:()=>D7,compile:()=>B$,config:()=>RW,core:()=>O3,creditCard:()=>T6,cuid:()=>f6,cuid2:()=>p6,custom:()=>M8,date:()=>J6,decode:()=>q3,decodeAsync:()=>Y3,deepPartial:()=>C7,default:()=>O7,describe:()=>a7,discriminatedUnion:()=>t8,e164:()=>w6,email:()=>n6,emoji:()=>u6,encode:()=>K3,encodeAsync:()=>J3,endsWith:()=>E2,enum:()=>l8,exactOptional:()=>m8,file:()=>d8,flattenError:()=>ZW,float32:()=>N6,float64:()=>P6,formatError:()=>QW,fromJSONSchema:()=>b7,function:()=>A8,getDiscriminatedOption:()=>Zq,getErrorMap:()=>u7,globalRegistry:()=>L$,gt:()=>c2,gte:()=>l2,guid:()=>r6,hash:()=>A6,hex:()=>k6,hostname:()=>O6,httpUrl:()=>l6,includes:()=>w2,input:()=>T7,instanceof:()=>F8,int:()=>M6,int32:()=>F6,int64:()=>z6,intersection:()=>n8,invertCodec:()=>T8,ipv4:()=>_6,ipv6:()=>y6,iso:()=>p7,json:()=>I8,jwt:()=>E6,keyof:()=>X6,ksuid:()=>g6,lazy:()=>O8,length:()=>b2,literal:()=>Q,locales:()=>A$,looseObject:()=>Q6,looseRecord:()=>o8,lowercase:()=>S2,lt:()=>o2,lte:()=>s2,mac:()=>v6,map:()=>s8,maxLength:()=>v2,maxSize:()=>h2,memoizer:()=>KY,meta:()=>o7,mime:()=>k2,minLength:()=>y2,minSize:()=>g2,multipleOf:()=>m2,nan:()=>S8,nanoid:()=>d6,nativeEnum:()=>u8,negative:()=>d2,never:()=>K6,nonnegative:()=>p2,nonoptional:()=>y8,nonpositive:()=>f2,normalize:()=>j2,null:()=>U6,nullable:()=>h8,nullish:()=>g8,number:()=>j6,object:()=>Z,optional:()=>p8,output:()=>E7,overwrite:()=>A2,parse:()=>H3,parseAsync:()=>U3,partialRecord:()=>a8,pipe:()=>C8,positive:()=>u2,prefault:()=>v8,preprocess:()=>L8,prettifyError:()=>tG,promise:()=>k8,properties:()=>O2,property:()=>D2,readonly:()=>E8,record:()=>i8,refine:()=>N8,regex:()=>x2,regexes:()=>VG,registry:()=>M$,safeDecode:()=>Z3,safeDecodeAsync:()=>$3,safeEncode:()=>X3,safeEncodeAsync:()=>Q3,safeParse:()=>W3,safeParseAsync:()=>G3,set:()=>c8,setErrorMap:()=>l7,size:()=>_2,slugify:()=>F2,startsWith:()=>T2,strictObject:()=>Z6,string:()=>X,stringFormat:()=>D6,stringbool:()=>s7,success:()=>b8,superRefine:()=>P8,symbol:()=>V6,templateLiteral:()=>D8,toJSONSchema:()=>I4,toLowerCase:()=>N2,toUpperCase:()=>P2,toZod:()=>AU,transform:()=>f8,treeifyError:()=>$W,trim:()=>M2,tuple:()=>r8,uint32:()=>I6,uint64:()=>B6,ulid:()=>m6,undefined:()=>H6,union:()=>$6,unknown:()=>G6,uppercase:()=>C2,url:()=>c6,util:()=>kU,uuid:()=>i6,uuidv4:()=>a6,uuidv6:()=>o6,uuidv7:()=>s6,validate:()=>SG,validateAsync:()=>CG,void:()=>q6,xid:()=>h6,xor:()=>e8,z:()=>O7}),A7=o((()=>{k7(),ise()}));A7();var j7=`io.modelcontextprotocol/related-task`,M7=M8(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),N7=$6([X(),j6().int()]),P7=X();Q6({ttl:j6().optional(),pollInterval:j6().optional()});var ose=Z({ttl:j6().optional()}),sse=Z({taskId:X()}),F7=Q6({progressToken:N7.optional(),[j7]:sse.optional()}),I7=Z({_meta:F7.optional()}),L7=I7.extend({task:ose.optional()}),cse=e=>L7.safeParse(e).success,R7=Z({method:X(),params:I7.loose().optional()}),z7=Z({_meta:F7.optional()}),B7=Z({method:X(),params:z7.loose().optional()}),V7=Q6({_meta:F7.optional()}),H7=$6([X(),j6().int()]),U7=Z({jsonrpc:Q(`2.0`),id:H7,...R7.shape}).strict(),W7=e=>U7.safeParse(e).success,G7=Z({jsonrpc:Q(`2.0`),...B7.shape}).strict(),lse=e=>G7.safeParse(e).success,K7=Z({jsonrpc:Q(`2.0`),id:H7,result:V7}).strict(),q7=e=>K7.safeParse(e).success,J7;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(J7||={});var Y7=Z({jsonrpc:Q(`2.0`),id:H7.optional(),error:Z({code:j6().int(),message:X(),data:G6().optional()})}).strict(),use=e=>Y7.safeParse(e).success,dse=$6([U7,G7,K7,Y7]);$6([K7,Y7]);var X7=V7.strict(),fse=z7.extend({requestId:H7.optional(),reason:X().optional()}),Z7=B7.extend({method:Q(`notifications/cancelled`),params:fse}),Q7=Z({icons:Y6(Z({src:X(),mimeType:X().optional(),sizes:Y6(X()).optional(),theme:l8([`light`,`dark`]).optional()})).optional()}),$7=Z({name:X(),title:X().optional()}),e9=$7.extend({...$7.shape,...Q7.shape,version:X(),websiteUrl:X().optional(),description:X().optional()}),pse=L8(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,n8(Z({form:n8(Z({applyDefaults:L6().optional()}),i8(X(),G6())).optional(),url:M7.optional()}),i8(X(),G6()).optional())),mse=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({sampling:Q6({createMessage:M7.optional()}).optional(),elicitation:Q6({create:M7.optional()}).optional()}).optional()}),hse=Q6({list:M7.optional(),cancel:M7.optional(),requests:Q6({tools:Q6({call:M7.optional()}).optional()}).optional()}),gse=Z({experimental:i8(X(),M7).optional(),sampling:Z({context:M7.optional(),tools:M7.optional()}).optional(),elicitation:pse.optional(),roots:Z({listChanged:L6().optional()}).optional(),tasks:mse.optional(),extensions:i8(X(),M7).optional()}),_se=I7.extend({protocolVersion:X(),capabilities:gse,clientInfo:e9}),vse=R7.extend({method:Q(`initialize`),params:_se}),yse=Z({experimental:i8(X(),M7).optional(),logging:M7.optional(),completions:M7.optional(),prompts:Z({listChanged:L6().optional()}).optional(),resources:Z({subscribe:L6().optional(),listChanged:L6().optional()}).optional(),tools:Z({listChanged:L6().optional()}).optional(),tasks:hse.optional(),extensions:i8(X(),M7).optional()}),bse=V7.extend({protocolVersion:X(),capabilities:yse,serverInfo:e9,instructions:X().optional()}),xse=B7.extend({method:Q(`notifications/initialized`),params:z7.optional()}),t9=R7.extend({method:Q(`ping`),params:I7.optional()}),Sse=Z({progress:j6(),total:p8(j6()),message:p8(X())}),Cse=Z({...z7.shape,...Sse.shape,progressToken:N7}),n9=B7.extend({method:Q(`notifications/progress`),params:Cse}),wse=I7.extend({cursor:P7.optional()}),r9=R7.extend({params:wse.optional()}),i9=V7.extend({nextCursor:P7.optional()}),Tse=l8([`working`,`input_required`,`completed`,`failed`,`cancelled`]),a9=Z({taskId:X(),status:Tse,ttl:$6([j6(),U6()]),createdAt:X(),lastUpdatedAt:X(),pollInterval:p8(j6()),statusMessage:p8(X())}),o9=V7.extend({task:a9}),Ese=z7.merge(a9),s9=B7.extend({method:Q(`notifications/tasks/status`),params:Ese}),c9=R7.extend({method:Q(`tasks/get`),params:I7.extend({taskId:X()})}),l9=V7.merge(a9),u9=R7.extend({method:Q(`tasks/result`),params:I7.extend({taskId:X()})});V7.loose();var d9=r9.extend({method:Q(`tasks/list`)}),f9=i9.extend({tasks:Y6(a9)}),p9=R7.extend({method:Q(`tasks/cancel`),params:I7.extend({taskId:X()})}),Dse=V7.merge(a9),m9=Z({uri:X(),mimeType:p8(X()),_meta:i8(X(),G6()).optional()}),h9=m9.extend({text:X()}),g9=X().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),_9=m9.extend({blob:g9}),v9=l8([`user`,`assistant`]),y9=Z({audience:Y6(v9).optional(),priority:j6().min(0).max(1).optional(),lastModified:m7({offset:!0}).optional()}),b9=Z({...$7.shape,...Q7.shape,uri:X(),description:p8(X()),mimeType:p8(X()),size:p8(j6()),annotations:y9.optional(),_meta:p8(Q6({}))}),Ose=Z({...$7.shape,...Q7.shape,uriTemplate:X(),description:p8(X()),mimeType:p8(X()),annotations:y9.optional(),_meta:p8(Q6({}))}),kse=r9.extend({method:Q(`resources/list`)}),x9=i9.extend({resources:Y6(b9)}),Ase=r9.extend({method:Q(`resources/templates/list`)}),jse=i9.extend({resourceTemplates:Y6(Ose)}),S9=I7.extend({uri:X()}),Mse=S9,Nse=R7.extend({method:Q(`resources/read`),params:Mse}),C9=V7.extend({contents:Y6($6([h9,_9]))}),Pse=B7.extend({method:Q(`notifications/resources/list_changed`),params:z7.optional()}),Fse=S9,Ise=R7.extend({method:Q(`resources/subscribe`),params:Fse}),Lse=S9,Rse=R7.extend({method:Q(`resources/unsubscribe`),params:Lse}),zse=z7.extend({uri:X()}),Bse=B7.extend({method:Q(`notifications/resources/updated`),params:zse}),Vse=Z({name:X(),description:p8(X()),required:p8(L6())}),Hse=Z({...$7.shape,...Q7.shape,description:p8(X()),arguments:p8(Y6(Vse)),_meta:p8(Q6({}))}),Use=r9.extend({method:Q(`prompts/list`)}),w9=i9.extend({prompts:Y6(Hse)}),Wse=I7.extend({name:X(),arguments:i8(X(),X()).optional()}),Gse=R7.extend({method:Q(`prompts/get`),params:Wse}),T9=Z({type:Q(`text`),text:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),E9=Z({type:Q(`image`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),D9=Z({type:Q(`audio`),data:g9,mimeType:X(),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),Kse=Z({type:Q(`tool_use`),name:X(),id:X(),input:i8(X(),G6()),_meta:i8(X(),G6()).optional()}),O9=Z({type:Q(`resource`),resource:$6([h9,_9]),annotations:y9.optional(),_meta:i8(X(),G6()).optional()}),k9=b9.extend({type:Q(`resource_link`)}),A9=$6([T9,E9,D9,k9,O9]),qse=Z({role:v9,content:A9}),Jse=V7.extend({description:X().optional(),messages:Y6(qse)}),Yse=B7.extend({method:Q(`notifications/prompts/list_changed`),params:z7.optional()}),Xse=Z({title:X().optional(),readOnlyHint:L6().optional(),destructiveHint:L6().optional(),idempotentHint:L6().optional(),openWorldHint:L6().optional()}),Zse=Z({taskSupport:l8([`required`,`optional`,`forbidden`]).optional()}),j9=Z({...$7.shape,...Q7.shape,description:X().optional(),inputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()),outputSchema:Z({type:Q(`object`),properties:i8(X(),M7).optional(),required:Y6(X()).optional()}).catchall(G6()).optional(),annotations:Xse.optional(),execution:Zse.optional(),_meta:i8(X(),G6()).optional()}),M9=r9.extend({method:Q(`tools/list`)}),Qse=i9.extend({tools:Y6(j9)}),N9=V7.extend({content:Y6(A9).default([]),structuredContent:i8(X(),G6()).optional(),isError:L6().optional()});N9.or(V7.extend({toolResult:G6()}));var $se=L7.extend({name:X(),arguments:i8(X(),G6()).optional()}),P9=R7.extend({method:Q(`tools/call`),params:$se}),ece=B7.extend({method:Q(`notifications/tools/list_changed`),params:z7.optional()});Z({autoRefresh:L6().default(!0),debounceMs:j6().int().nonnegative().default(300)});var F9=l8([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),tce=I7.extend({level:F9}),nce=R7.extend({method:Q(`logging/setLevel`),params:tce}),rce=z7.extend({level:F9,logger:X().optional(),data:G6()}),ice=B7.extend({method:Q(`notifications/message`),params:rce}),ace=Z({hints:Y6(Z({name:X().optional()})).optional(),costPriority:j6().min(0).max(1).optional(),speedPriority:j6().min(0).max(1).optional(),intelligencePriority:j6().min(0).max(1).optional()}),oce=Z({mode:l8([`auto`,`required`,`none`]).optional()}),sce=Z({type:Q(`tool_result`),toolUseId:X().describe(`The unique identifier for the corresponding tool call.`),content:Y6(A9).default([]),structuredContent:Z({}).loose().optional(),isError:L6().optional(),_meta:i8(X(),G6()).optional()}),cce=t8(`type`,[T9,E9,D9]),I9=t8(`type`,[T9,E9,D9,Kse,sce]),lce=Z({role:v9,content:$6([I9,Y6(I9)]),_meta:i8(X(),G6()).optional()}),uce=L7.extend({messages:Y6(lce),modelPreferences:ace.optional(),systemPrompt:X().optional(),includeContext:l8([`none`,`thisServer`,`allServers`]).optional(),temperature:j6().optional(),maxTokens:j6().int(),stopSequences:Y6(X()).optional(),metadata:M7.optional(),tools:Y6(j9).optional(),toolChoice:oce.optional()}),dce=R7.extend({method:Q(`sampling/createMessage`),params:uce}),L9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`]).or(X())),role:v9,content:cce}),R9=V7.extend({model:X(),stopReason:p8(l8([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(X())),role:v9,content:$6([I9,Y6(I9)])}),fce=Z({type:Q(`boolean`),title:X().optional(),description:X().optional(),default:L6().optional()}),pce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),minLength:j6().optional(),maxLength:j6().optional(),format:l8([`email`,`uri`,`date`,`date-time`]).optional(),default:X().optional()}),mce=Z({type:l8([`number`,`integer`]),title:X().optional(),description:X().optional(),minimum:j6().optional(),maximum:j6().optional(),default:j6().optional()}),hce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),default:X().optional()}),gce=Z({type:Q(`string`),title:X().optional(),description:X().optional(),oneOf:Y6(Z({const:X(),title:X()})),default:X().optional()}),_ce=$6([$6([Z({type:Q(`string`),title:X().optional(),description:X().optional(),enum:Y6(X()),enumNames:Y6(X()).optional(),default:X().optional()}),$6([hce,gce]),$6([Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({type:Q(`string`),enum:Y6(X())}),default:Y6(X()).optional()}),Z({type:Q(`array`),title:X().optional(),description:X().optional(),minItems:j6().optional(),maxItems:j6().optional(),items:Z({anyOf:Y6(Z({const:X(),title:X()}))}),default:Y6(X()).optional()})])]),fce,pce,mce]),vce=$6([L7.extend({mode:Q(`form`).optional(),message:X(),requestedSchema:Z({type:Q(`object`),properties:i8(X(),_ce),required:Y6(X()).optional()})}),L7.extend({mode:Q(`url`),message:X(),elicitationId:X(),url:X().url()})]),yce=R7.extend({method:Q(`elicitation/create`),params:vce}),bce=z7.extend({elicitationId:X()}),xce=B7.extend({method:Q(`notifications/elicitation/complete`),params:bce}),Sce=V7.extend({action:l8([`accept`,`decline`,`cancel`]),content:L8(e=>e===null?void 0:e,i8(X(),$6([X(),j6(),L6(),Y6(X())])).optional())}),Cce=Z({type:Q(`ref/resource`),uri:X()}),wce=Z({type:Q(`ref/prompt`),name:X()}),Tce=I7.extend({ref:$6([wce,Cce]),argument:Z({name:X(),value:X()}),context:Z({arguments:i8(X(),X()).optional()}).optional()}),Ece=R7.extend({method:Q(`completion/complete`),params:Tce}),Dce=V7.extend({completion:Q6({values:Y6(X()).max(100),total:p8(j6().int()),hasMore:p8(L6())})}),Oce=Z({uri:X().startsWith(`file://`),name:X().optional(),_meta:i8(X(),G6()).optional()}),kce=R7.extend({method:Q(`roots/list`),params:I7.optional()}),Ace=V7.extend({roots:Y6(Oce)}),jce=B7.extend({method:Q(`notifications/roots/list_changed`),params:z7.optional()});$6([t9,vse,Ece,nce,Gse,Use,kse,Ase,Nse,Ise,Rse,P9,M9,c9,u9,d9,p9]),$6([Z7,n9,xse,jce,s9]),$6([X7,L9,R9,Sce,Ace,l9,f9,o9]),$6([t9,dce,yce,kce,c9,u9,d9,p9]),$6([Z7,n9,ice,Bse,Pse,ece,Yse,s9,xce]),$6([X7,bse,Dce,Jse,w9,x9,jse,C9,N9,Qse,l9,f9,o9]);var z9=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===J7.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Mce(e.elicitations,n)}return new e(t,n,r)}},Mce=class extends z9{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(J7.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function B9(e){return e===`completed`||e===`failed`||e===`cancelled`}function V9(e){let t=Poe(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=Foe(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function H9(e,t){let n=P3(e,t);if(!n.success)throw n.error;return n.data}var Nce=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Z7,e=>{this._oncancel(e)}),this.setNotificationHandler(n9,e=>{this._onprogress(e)}),this.setRequestHandler(t9,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(c9,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new z9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(u9,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new z9(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new z9(J7.InvalidParams,`Task not found: ${r}`);if(!B9(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(B9(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[j7]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(d9,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new z9(J7.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(p9,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new z9(J7.InvalidParams,`Task not found: ${e.params.taskId}`);if(B9(n.status))throw new z9(J7.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new z9(J7.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof z9?e:new z9(J7.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),z9.fromError(J7.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),q7(e)||use(e)?this._onresponse(e):W7(e)?this._onrequest(e,t):lse(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=z9.fromError(J7.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[j7]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:J7.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=cse(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new z9(J7.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:J7.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),q7(e)?n(e):n(new z9(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(q7(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),q7(e)?r(e):r(z9.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof z9?e:new z9(J7.InternalError,String(e))}}return}let i;try{let r=await this.request(e,o9,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new z9(J7.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},B9(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new z9(J7.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new z9(J7.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof z9?e:new z9(J7.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[j7]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof z9?e:new z9(J7.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=P3(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(z9.fromError(J7.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},l9,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},f9,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},Dse,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[j7]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[j7]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[j7]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=V9(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=H9(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=V9(e);this._notificationHandlers.set(n,n=>{let r=H9(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&W7(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new z9(J7.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new z9(J7.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new z9(J7.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new z9(J7.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=s9.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),B9(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new z9(J7.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(B9(a.status))throw new z9(J7.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=s9.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),B9(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function U9(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Pce(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=U9(a)&&U9(i)?{...a,...i}:i}return n}var Fce=`modulepreload`,Ice=function(e,t){return new URL(e,t).href},W9={},Lce=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Ice(t,n),t=s(t),t in W9)return;W9[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Fce,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};A7(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var Rce=class extends Nce{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},zce=`2026-01-26`,G9=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=dse.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Bce=$6([Q(`light`),Q(`dark`)]).describe(`Color theme preference for the host environment.`),K9=$6([Q(`inline`),Q(`fullscreen`),Q(`pip`)]).describe(`Display mode for UI presentation.`),Vce=i8($6([Q(`--color-background-primary`),Q(`--color-background-secondary`),Q(`--color-background-tertiary`),Q(`--color-background-inverse`),Q(`--color-background-ghost`),Q(`--color-background-info`),Q(`--color-background-danger`),Q(`--color-background-success`),Q(`--color-background-warning`),Q(`--color-background-disabled`),Q(`--color-text-primary`),Q(`--color-text-secondary`),Q(`--color-text-tertiary`),Q(`--color-text-inverse`),Q(`--color-text-ghost`),Q(`--color-text-info`),Q(`--color-text-danger`),Q(`--color-text-success`),Q(`--color-text-warning`),Q(`--color-text-disabled`),Q(`--color-border-primary`),Q(`--color-border-secondary`),Q(`--color-border-tertiary`),Q(`--color-border-inverse`),Q(`--color-border-ghost`),Q(`--color-border-info`),Q(`--color-border-danger`),Q(`--color-border-success`),Q(`--color-border-warning`),Q(`--color-border-disabled`),Q(`--color-ring-primary`),Q(`--color-ring-secondary`),Q(`--color-ring-inverse`),Q(`--color-ring-info`),Q(`--color-ring-danger`),Q(`--color-ring-success`),Q(`--color-ring-warning`),Q(`--font-sans`),Q(`--font-mono`),Q(`--font-weight-normal`),Q(`--font-weight-medium`),Q(`--font-weight-semibold`),Q(`--font-weight-bold`),Q(`--font-text-xs-size`),Q(`--font-text-sm-size`),Q(`--font-text-md-size`),Q(`--font-text-lg-size`),Q(`--font-heading-xs-size`),Q(`--font-heading-sm-size`),Q(`--font-heading-md-size`),Q(`--font-heading-lg-size`),Q(`--font-heading-xl-size`),Q(`--font-heading-2xl-size`),Q(`--font-heading-3xl-size`),Q(`--font-text-xs-line-height`),Q(`--font-text-sm-line-height`),Q(`--font-text-md-line-height`),Q(`--font-text-lg-line-height`),Q(`--font-heading-xs-line-height`),Q(`--font-heading-sm-line-height`),Q(`--font-heading-md-line-height`),Q(`--font-heading-lg-line-height`),Q(`--font-heading-xl-line-height`),Q(`--font-heading-2xl-line-height`),Q(`--font-heading-3xl-line-height`),Q(`--border-radius-xs`),Q(`--border-radius-sm`),Q(`--border-radius-md`),Q(`--border-radius-lg`),Q(`--border-radius-xl`),Q(`--border-radius-full`),Q(`--border-width-regular`),Q(`--shadow-hairline`),Q(`--shadow-sm`),Q(`--shadow-md`),Q(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),e8([X(),U6()]).describe(`Style variables for theming MCP apps. +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),$6([X(),H6()]).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -96,10 +96,10 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var Vce=Z({isError:R6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Hce=Z({isError:R6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Uce=Z({isError:R6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var q9=Z({connectDomains:X6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);Z({method:Q(`ui/open-link`),params:Z({url:X().describe(`URL to open in the host's browser`)})});var Hce=Z({isError:L6().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),Uce=Z({isError:L6().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),Wce=Z({isError:L6().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();Z({method:Q(`ui/notifications/sandbox-proxy-ready`),params:Z({})});var q9=Z({connectDomains:Y6(X()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive -- Empty or omitted → no network connections (secure default)`),resourceDomains:X6(X()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:X6(X()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:X6(X()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),J9=Z({camera:Z({}).optional().describe(`Request camera access. +- Empty or omitted → no network connections (secure default)`),resourceDomains:Y6(X()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y6(X()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y6(X()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),J9=Z({camera:Z({}).optional().describe(`Request camera access. Maps to Permission Policy \`camera\` feature.`),microphone:Z({}).optional().describe(`Request microphone access. @@ -107,7 +107,7 @@ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:Z({}).optional().describe(`Request clipboard write access. -Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:M6().optional().describe(`New width in pixels.`),height:M6().optional().describe(`New height in pixels.`)})});var Wce=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:a8(X(),K6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Gce=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:a8(X(),K6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),Kce=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),qce=Z({fonts:X().optional()}),Jce=Z({variables:Bce.optional().describe(`CSS variables for theming the app.`),css:qce.optional().describe(`CSS blocks that apps can inject.`)}),Yce=Z({method:Q(`ui/resource-teardown`),params:Z({})});a8(X(),K6());var Y9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var Xce=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:R6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:R6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:J9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:q9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Y9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Y9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Zce=Z({experimental:a8(X(),a8(X(),G6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:R6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:X6(K9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:q9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:J9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. +Maps to Permission Policy \`clipboard-write\` feature.`)});Z({method:Q(`ui/notifications/size-changed`),params:Z({width:j6().optional().describe(`New width in pixels.`),height:j6().optional().describe(`New height in pixels.`)})});var Gce=Z({method:Q(`ui/notifications/tool-input`),params:Z({arguments:i8(X(),G6().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),Kce=Z({method:Q(`ui/notifications/tool-input-partial`),params:Z({arguments:i8(X(),G6().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),qce=Z({method:Q(`ui/notifications/tool-cancelled`),params:Z({reason:X().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),Jce=Z({fonts:X().optional()}),Yce=Z({variables:Vce.optional().describe(`CSS variables for theming the app.`),css:Jce.optional().describe(`CSS blocks that apps can inject.`)}),Xce=Z({method:Q(`ui/resource-teardown`),params:Z({})});i8(X(),G6());var Y9=Z({text:Z({}).optional().describe(`Host supports text content blocks.`),image:Z({}).optional().describe(`Host supports image content blocks.`),audio:Z({}).optional().describe(`Host supports audio content blocks.`),resource:Z({}).optional().describe(`Host supports resource content blocks.`),resourceLink:Z({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:Z({}).optional().describe(`Host supports structured content.`)});Z({method:Q(`ui/notifications/request-teardown`),params:Z({}).optional()});var Zce=Z({experimental:i8(X(),i8(X(),W6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:Z({}).optional().describe(`Host supports opening external URLs.`),downloadFile:Z({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:Z({listChanged:L6().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:Z({listChanged:L6().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:Z({}).optional().describe(`Host accepts log messages.`),sandbox:Z({permissions:J9.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:q9.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:Y9.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:Y9.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:Z({tools:Z({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),Qce=Z({experimental:i8(X(),i8(X(),W6()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:Z({listChanged:L6().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y6(K9).optional().describe(`Display modes the app supports.`)});Z({method:Q(`ui/notifications/initialized`),params:Z({}).optional()}),Z({csp:q9.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:J9.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:X().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. @@ -115,16 +115,16 @@ - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) -If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:R6().optional().describe(`Visual boundary preference - true if view prefers a visible border. +If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:L6().optional().describe(`Visual boundary preference - true if view prefers a visible border. Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. - \`true\`: request visible border + background - \`false\`: request no visible border + background -- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:K9.describe(`The display mode being requested.`)})});var Qce=Z({mode:K9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),$ce=e8([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:X6($ce).optional().describe(`Who can access this tool. Default: ["model", "app"] +- omitted: host decides border`)}),Z({method:Q(`ui/request-display-mode`),params:Z({mode:K9.describe(`The display mode being requested.`)})});var $ce=Z({mode:K9.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),ele=$6([Q(`model`),Q(`app`)]).describe(`Tool visibility scope - who can access the tool.`);Z({resourceUri:X().optional(),visibility:Y6(ele).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:q6().optional(),permissions:q6().optional()}),Z({mimeTypes:X6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:X6(e8([O9,k9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:X6(A9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:q9.optional().describe(`CSP configuration from resource metadata.`),permissions:J9.optional().describe(`Sandbox permissions from resource metadata.`)})});var ele=Z({method:Q(`ui/notifications/tool-result`),params:N9.describe(`Standard MCP tool execution result.`)}),X9=Z({toolInfo:Z({id:U7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:j9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:zce.optional().describe(`Current color theme preference.`),styles:Jce.optional().describe(`Style configuration for theming the app.`),displayMode:K9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:X6(K9).optional().describe(`Display modes the host supports.`),containerDimensions:e8([Z({height:M6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:e8([M6(),U6()]).optional().describe(`Maximum container height in pixels.`)})]).and(e8([Z({width:M6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:e8([M6(),U6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:e8([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:R6().optional().describe(`Whether the device supports touch input.`),hover:R6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:M6().describe(`Top safe area inset in pixels.`),right:M6().describe(`Right safe area inset in pixels.`),bottom:M6().describe(`Bottom safe area inset in pixels.`),left:M6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),tle=Z({method:Q(`ui/notifications/host-context-changed`),params:X9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:X6(A9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:a8(X(),K6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:t9.describe(`App identification (name and version).`),appCapabilities:Zce.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var nle=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:t9.describe(`Host application identification and version.`),hostCapabilities:Xce.describe(`Features and capabilities provided by the host.`),hostContext:X9.describe(`Rich context about the host environment.`)}).passthrough(),rle={target:`draft-2020-12`};async function Z9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](rle);if(n.vendor===`zod`){let{z:n}=await Ice(async()=>{let{z:e}=await Promise.resolve().then(()=>(j7(),rse));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Q9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var ile=class e extends Lce{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Wce,toolinputpartial:Gce,toolresult:ele,toolcancelled:Kce,hostcontextchanged:tle};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||zW({jitless:!0}),this.setRequestHandler(n9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Nce(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Q9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Q9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Z9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Z9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Yce,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(P9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(M9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},N9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},w9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},S9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?R9:L9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Uce,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Z7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Vce,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Hce,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},Qce,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new G9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Rce}},nle,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function ale({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new G9(window.parent,window.parent);if(s=new ile(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function ole(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=ale({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function sle(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}vE([sre,Pre,Vre]);function cle(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=ole(`Fanout service topology`),[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(`graph`),u=r?.theme===`dark`;return(0,G.jsxs)(mz,{dark:u,children:[(0,G.jsx)(hz,{title:`Service map`,summary:i?`${i.data.nodes.length} services connected by ${i.data.edges.length} routes`:void 0,onRefresh:()=>t(`service_topology`),disabled:!e}),(0,G.jsx)(gz,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading service relationships…`:void 0,retry:()=>void t(`service_topology`)}),i&&i.data.nodes.length===0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(vz,{tall:!0,icon:(0,G.jsx)(VR,{size:20,weight:`duotone`}),title:`No service relationships yet`,children:`Connections will appear as services communicate.`}),(0,G.jsx)(yz,{left:kU(i.provenance.window),right:`No routes found`})]}),i&&i.data.nodes.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(_z,{active:c,onChange:l,items:[{id:`graph`,label:`Graph`},{id:`flow`,label:`Traffic flow`},{id:`matrix`,label:`Matrix`}]}),(0,G.jsx)(lle,{data:i.data,view:c,selected:o,dark:u,onSelect:s,onInvestigate:t=>sle(e,`Investigate dependencies and failures around ${t}.`)}),(0,G.jsx)(yz,{left:kU(i.provenance.window),right:`${i.data.nodes.length} services · ${i.data.edges.length} routes`})]})]})}function lle({data:e,view:t,selected:n,dark:r,onSelect:i,onInvestigate:a}){let o=n?e.edges.filter(e=>e.caller===n||e.callee===n):e.edges;return(0,G.jsxs)(HL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(JF,{withBorder:!0,radius:`md`,p:`xs`,pos:`relative`,children:[t===`graph`&&(0,G.jsx)(ule,{data:e,selected:n,dark:r,onSelect:i}),t===`flow`&&(0,G.jsx)(dle,{data:e,dark:r,onSelect:i}),t===`matrix`&&(0,G.jsx)(fle,{data:e,dark:r}),n&&(0,G.jsxs)(XI,{pos:`absolute`,top:`sm`,right:`sm`,size:`xs`,variant:`default`,leftSection:(0,G.jsx)(zR,{size:14,weight:`bold`}),onClick:()=>a(n),children:[`Investigate `,n]})]}),(0,G.jsx)(ple,{edges:o,onSelect:i})]})}function ule({data:e,selected:t,dark:n,onSelect:r}){let i=(0,W.useMemo)(()=>{let r=Sz(n),i=Cz(n);return{tooltip:{backgroundColor:r.surface,borderColor:r.border,textStyle:{color:r.text,fontSize:$R.micro}},series:[{type:`graph`,layout:`force`,roam:!0,draggable:!0,force:{repulsion:220,edgeLength:[80,150],gravity:.08},label:{show:!0,position:`bottom`,color:r.text,fontSize:$R.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:e.nodes.map(e=>({id:e.service,name:e.service,value:e.spans,symbol:wz(e.health),symbolSize:Ez(e.health)*Math.min(46,24+Math.log10(Math.max(e.spans,1))*5),itemStyle:{color:r.surface,borderColor:$9(e.health,n),borderWidth:t===e.service?5:3,borderType:Tz(e.health),opacity:t&&t!==e.service?.45:1}})),links:e.edges.map(e=>{let n=e.error_rate>=.05,a=t&&e.caller!==t&&e.callee!==t;return{source:e.caller,target:e.callee,value:e.calls,lineStyle:{width:n?4:Math.min(3.5,1+Math.log10(Math.max(e.calls,1))),color:n?i.bad:r.muted,opacity:a?.1:n?.95:.3,curveness:.08}}}),emphasis:{focus:`adjacency`,lineStyle:{opacity:.85}}}]}},[n,e,t]);return(0,G.jsx)(TU,{option:i,height:350,label:`Interactive service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(t.data.id)}})}function dle({data:e,dark:t,onSelect:n}){let r=(0,W.useMemo)(()=>mle(e.edges),[e.edges]),i=(0,W.useMemo)(()=>{let n=Sz(t);return{tooltip:{trigger:`item`,backgroundColor:n.surface,borderColor:n.border,textStyle:{color:n.text,fontSize:$R.micro}},series:[{type:`sankey`,left:20,right:30,top:20,bottom:20,nodeWidth:14,nodeGap:12,draggable:!0,emphasis:{focus:`adjacency`},label:{color:n.text,fontSize:$R.micro},lineStyle:{color:`gradient`,opacity:.28,curveness:.55},data:e.nodes.map(e=>({name:e.service,itemStyle:{color:$9(e.health,t),borderColor:n.surface,borderWidth:2}})),links:r.map(e=>({source:e.caller,target:e.callee,value:Math.max(e.calls,1)}))}]}},[t,e.nodes,r]);return r.length===0?(0,G.jsx)(vz,{tall:!0,icon:(0,G.jsx)(LR,{size:20,weight:`duotone`}),title:`No traffic routes observed`,children:`Services are visible, but this window contains no direct service-to-service calls.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(TU,{option:i,height:350,label:`Primary service traffic flow`,onClick:e=>{let t=e;t.dataType===`node`&&t.name&&n(t.name)}}),(0,G.jsxs)(RI,{c:`dimmed`,size:`xs`,ta:`center`,children:[`Showing `,r.length,` primary routes from `,e.edges.length,` observed connections`]})]})}function fle({data:e,dark:t}){let n=e.nodes.map(e=>e.service),r=Math.max(...e.edges.map(e=>e.error_rate),.01),i=(0,W.useMemo)(()=>{let i=Sz(t),a=Cz(t);return{grid:{left:100,right:25,top:15,bottom:80},tooltip:{backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:$R.micro},formatter:e=>`${n[e.data[1]]} → ${n[e.data[0]]}
${EU.format(e.data[3])} calls · ${OU(e.data[4])}
${DU(e.data[2])} errors`},xAxis:{type:`category`,data:n,splitArea:{show:!0},axisLabel:{color:i.muted,rotate:35,fontSize:$R.micro},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:n,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:$R.micro},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r,calculable:!0,orient:`horizontal`,left:`center`,bottom:8,textStyle:{color:i.muted,fontSize:$R.micro},inRange:{color:[i.grid,a.warn,a.bad]}},series:[{type:`heatmap`,data:e.edges.map(e=>[n.indexOf(e.callee),n.indexOf(e.caller),e.error_rate,e.calls,e.average_ms])}]}},[t,e,r,n]);return(0,G.jsx)(TU,{option:i,height:380,label:`Service dependency error matrix`})}function ple({edges:e,onSelect:t}){let n=bz(e,6);return e.length===0?null:(0,G.jsxs)(JF,{withBorder:!0,radius:`md`,style:{overflow:`hidden`},children:[(0,G.jsx)(sR.ScrollContainer,{minWidth:520,children:(0,G.jsxs)(sR,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(sR.Thead,{children:(0,G.jsxs)(sR.Tr,{children:[(0,G.jsx)(sR.Th,{children:`Route`}),(0,G.jsx)(sR.Th,{children:`Calls`}),(0,G.jsx)(sR.Th,{children:`Latency`}),(0,G.jsx)(sR.Th,{children:`Errors`})]})}),(0,G.jsx)(sR.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(sR.Tr,{tabIndex:0,onClick:()=>t(e.caller),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e.caller)},style:{cursor:`pointer`},children:[(0,G.jsx)(sR.Td,{children:(0,G.jsxs)(RI,{component:`span`,ff:`monospace`,size:`sm`,children:[e.caller,` → `,e.callee]})}),(0,G.jsx)(sR.Td,{children:EU.format(e.calls)}),(0,G.jsx)(sR.Td,{children:OU(e.average_ms)}),(0,G.jsx)(sR.Td,{children:DU(e.error_rate)})]},`${e.caller}-${e.callee}-${e.type}`))})]})}),(0,G.jsx)(xz,{...n,onChange:n.setPage})]})}function $9(e,t){let n=Cz(t);return e===`unhealthy`?n.bad:e===`degraded`?n.warn:e===`unknown`?Sz(t).muted:n.ok}function mle(e){let t=[],n=new Map,r=(e,t,i=new Set)=>{if(e===t)return!0;if(i.has(e))return!1;i.add(e);for(let a of n.get(e)??[])if(r(a,t,i))return!0;return!1};for(let i of[...e].sort((e,t)=>t.calls-e.calls||e.caller.localeCompare(t.caller)||e.callee.localeCompare(t.callee))){if(i.caller===i.callee||r(i.callee,i.caller))continue;let e=n.get(i.caller)??new Set;e.add(i.callee),n.set(i.caller,e),t.push(i)}return t}(0,GR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(cle,{})})); +- "app": Tool callable by the app from this server only`),csp:K6().optional(),permissions:K6().optional()}),Z({mimeTypes:Y6(X()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),Z({method:Q(`ui/download-file`),params:Z({contents:Y6($6([O9,k9])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),Z({method:Q(`ui/message`),params:Z({role:Q(`user`).describe(`Message role, currently only "user" is supported.`),content:Y6(A9).describe(`Message content blocks (text, image, etc.).`)})}),Z({method:Q(`ui/notifications/sandbox-resource-ready`),params:Z({html:X().describe(`HTML content to load into the inner iframe.`),sandbox:X().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:q9.optional().describe(`CSP configuration from resource metadata.`),permissions:J9.optional().describe(`Sandbox permissions from resource metadata.`)})});var tle=Z({method:Q(`ui/notifications/tool-result`),params:N9.describe(`Standard MCP tool execution result.`)}),X9=Z({toolInfo:Z({id:H7.optional().describe(`JSON-RPC id of the tools/call request.`),tool:j9.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Bce.optional().describe(`Current color theme preference.`),styles:Yce.optional().describe(`Style configuration for theming the app.`),displayMode:K9.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y6(K9).optional().describe(`Display modes the host supports.`),containerDimensions:$6([Z({height:j6().describe(`Fixed container height in pixels.`)}),Z({maxHeight:$6([j6(),H6()]).optional().describe(`Maximum container height in pixels.`)})]).and($6([Z({width:j6().describe(`Fixed container width in pixels.`)}),Z({maxWidth:$6([j6(),H6()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:X().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:X().optional().describe(`User's timezone in IANA format.`),userAgent:X().optional().describe(`Host application identifier.`),platform:$6([Q(`web`),Q(`desktop`),Q(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:Z({touch:L6().optional().describe(`Whether the device supports touch input.`),hover:L6().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:Z({top:j6().describe(`Top safe area inset in pixels.`),right:j6().describe(`Right safe area inset in pixels.`),bottom:j6().describe(`Bottom safe area inset in pixels.`),left:j6().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),nle=Z({method:Q(`ui/notifications/host-context-changed`),params:X9.describe(`Partial context update containing only changed fields.`)});Z({method:Q(`ui/update-model-context`),params:Z({content:Y6(A9).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:i8(X(),G6().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),Z({method:Q(`ui/initialize`),params:Z({appInfo:e9.describe(`App identification (name and version).`),appCapabilities:Qce.describe(`Features and capabilities this app provides.`),protocolVersion:X().describe(`Protocol version this app supports.`)})});var rle=Z({protocolVersion:X().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:e9.describe(`Host application identification and version.`),hostCapabilities:Zce.describe(`Features and capabilities provided by the host.`),hostContext:X9.describe(`Rich context about the host environment.`)}).passthrough(),ile={target:`draft-2020-12`};async function Z9(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](ile);if(n.vendor===`zod`){let{z:n}=await Lce(async()=>{let{z:e}=await Promise.resolve().then(()=>(A7(),ase));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Q9(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var ale=class e extends Rce{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Gce,toolinputpartial:Kce,toolresult:tle,toolcancelled:qce,hostcontextchanged:nle};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||RW({jitless:!0}),this.setRequestHandler(t9,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=Pce(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Q9(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Q9(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await Z9(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await Z9(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Xce,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(P9,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(M9,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},N9,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},C9,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},x9,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?R9:L9;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Wce,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},X7,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Hce,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Uce,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},$ce,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new G9(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:zce}},rle,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function ole({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(!1),[l,u]=(0,W.useState)(null);return(0,W.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new G9(window.parent,window.parent);if(s=new ale(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function sle(e){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)({}),[a,o]=(0,W.useState)(),[s,c]=(0,W.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=ole({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,W.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function cle(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}vE([sre,Pre,Vre]);function lle(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=sle(`Fanout service topology`),[o,s]=(0,W.useState)(null),[c,l]=(0,W.useState)(`graph`),u=r?.theme===`dark`;return(0,G.jsxs)(pz,{dark:u,children:[(0,G.jsx)(mz,{title:`Service map`,summary:i?`${i.data.nodes.length} services connected by ${i.data.edges.length} routes`:void 0,onRefresh:()=>t(`service_topology`),disabled:!e}),(0,G.jsx)(hz,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Loading service relationships…`:void 0,retry:()=>void t(`service_topology`)}),i&&i.data.nodes.length===0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(_z,{tall:!0,icon:(0,G.jsx)(BR,{size:20,weight:`duotone`}),title:`No service relationships yet`,children:`Connections will appear as services communicate.`}),(0,G.jsx)(vz,{left:OU(i.provenance.window),right:`No routes found`})]}),i&&i.data.nodes.length>0&&(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(gz,{active:c,onChange:l,items:[{id:`graph`,label:`Graph`},{id:`flow`,label:`Traffic flow`},{id:`matrix`,label:`Matrix`}]}),(0,G.jsx)(ule,{data:i.data,view:c,selected:o,dark:u,onSelect:s,onInvestigate:t=>cle(e,`Investigate dependencies and failures around ${t}.`)}),(0,G.jsx)(vz,{left:OU(i.provenance.window),right:`${i.data.nodes.length} services · ${i.data.edges.length} routes`})]})]})}function ule({data:e,view:t,selected:n,dark:r,onSelect:i,onInvestigate:a}){let o=n?e.edges.filter(e=>e.caller===n||e.callee===n):e.edges;return(0,G.jsxs)(VL,{px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,G.jsxs)(qF,{withBorder:!0,radius:`md`,p:`xs`,pos:`relative`,children:[t===`graph`&&(0,G.jsx)(dle,{data:e,selected:n,dark:r,onSelect:i}),t===`flow`&&(0,G.jsx)(fle,{data:e,dark:r,onSelect:i}),t===`matrix`&&(0,G.jsx)(ple,{data:e,dark:r}),n&&(0,G.jsxs)(YI,{pos:`absolute`,top:`sm`,right:`sm`,size:`xs`,variant:`default`,leftSection:(0,G.jsx)(RR,{size:14,weight:`bold`}),onClick:()=>a(n),children:[`Investigate `,n]})]}),(0,G.jsx)(mle,{edges:o,onSelect:i})]})}function dle({data:e,selected:t,dark:n,onSelect:r}){let i=(0,W.useMemo)(()=>{let r=Sz(n),i=Cz(n);return{tooltip:{backgroundColor:r.surface,borderColor:r.border,textStyle:{color:r.text,fontSize:QR.micro}},series:[{type:`graph`,layout:`force`,roam:!0,draggable:!0,force:{repulsion:220,edgeLength:[80,150],gravity:.08},label:{show:!0,position:`bottom`,color:r.text,fontSize:QR.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:e.nodes.map(e=>({id:e.service,name:e.service,value:e.spans,symbol:wz(e.health),symbolSize:Ez(e.health)*Math.min(46,24+Math.log10(Math.max(e.spans,1))*5),itemStyle:{color:r.surface,borderColor:$9(e.health,n),borderWidth:t===e.service?5:3,borderType:Tz(e.health),opacity:t&&t!==e.service?.45:1}})),links:e.edges.map(e=>{let n=e.error_rate>=.05,a=t&&e.caller!==t&&e.callee!==t;return{source:e.caller,target:e.callee,value:e.calls,lineStyle:{width:n?4:Math.min(3.5,1+Math.log10(Math.max(e.calls,1))),color:n?i.bad:r.muted,opacity:a?.1:n?.95:.3,curveness:.08}}}),emphasis:{focus:`adjacency`,lineStyle:{opacity:.85}}}]}},[n,e,t]);return(0,G.jsx)(wU,{option:i,height:350,label:`Interactive service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(t.data.id)}})}function fle({data:e,dark:t,onSelect:n}){let r=(0,W.useMemo)(()=>hle(e.edges),[e.edges]),i=(0,W.useMemo)(()=>{let n=Sz(t);return{tooltip:{trigger:`item`,backgroundColor:n.surface,borderColor:n.border,textStyle:{color:n.text,fontSize:QR.micro}},series:[{type:`sankey`,left:20,right:30,top:20,bottom:20,nodeWidth:14,nodeGap:12,draggable:!0,emphasis:{focus:`adjacency`},label:{color:n.text,fontSize:QR.micro},lineStyle:{color:`gradient`,opacity:.28,curveness:.55},data:e.nodes.map(e=>({name:e.service,itemStyle:{color:$9(e.health,t),borderColor:n.surface,borderWidth:2}})),links:r.map(e=>({source:e.caller,target:e.callee,value:Math.max(e.calls,1)}))}]}},[t,e.nodes,r]);return r.length===0?(0,G.jsx)(_z,{tall:!0,icon:(0,G.jsx)(IR,{size:20,weight:`duotone`}),title:`No traffic routes observed`,children:`Services are visible, but this window contains no direct service-to-service calls.`}):(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(wU,{option:i,height:350,label:`Primary service traffic flow`,onClick:e=>{let t=e;t.dataType===`node`&&t.name&&n(t.name)}}),(0,G.jsxs)(LI,{c:`dimmed`,size:`xs`,ta:`center`,children:[`Showing `,r.length,` primary routes from `,e.edges.length,` observed connections`]})]})}function ple({data:e,dark:t}){let n=e.nodes.map(e=>e.service),r=Math.max(...e.edges.map(e=>e.error_rate),.01),i=(0,W.useMemo)(()=>{let i=Sz(t),a=Cz(t);return{grid:{left:100,right:25,top:15,bottom:80},tooltip:{backgroundColor:i.surface,borderColor:i.border,textStyle:{color:i.text,fontSize:QR.micro},formatter:e=>`${n[e.data[1]]} → ${n[e.data[0]]}
${TU.format(e.data[3])} calls · ${DU(e.data[4])}
${EU(e.data[2])} errors`},xAxis:{type:`category`,data:n,splitArea:{show:!0},axisLabel:{color:i.muted,rotate:35,fontSize:QR.micro},axisLine:{lineStyle:{color:i.border}}},yAxis:{type:`category`,data:n,splitArea:{show:!0},axisLabel:{color:i.text,fontSize:QR.micro},axisLine:{lineStyle:{color:i.border}}},visualMap:{min:0,max:r,calculable:!0,orient:`horizontal`,left:`center`,bottom:8,textStyle:{color:i.muted,fontSize:QR.micro},inRange:{color:[i.grid,a.warn,a.bad]}},series:[{type:`heatmap`,data:e.edges.map(e=>[n.indexOf(e.callee),n.indexOf(e.caller),e.error_rate,e.calls,e.average_ms])}]}},[t,e,r,n]);return(0,G.jsx)(wU,{option:i,height:380,label:`Service dependency error matrix`})}function mle({edges:e,onSelect:t}){let n=yz(e,6);return e.length===0?null:(0,G.jsxs)(qF,{withBorder:!0,radius:`md`,style:{overflow:`hidden`},children:[(0,G.jsx)(oR.ScrollContainer,{minWidth:520,children:(0,G.jsxs)(oR,{striped:!0,highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,G.jsx)(oR.Thead,{children:(0,G.jsxs)(oR.Tr,{children:[(0,G.jsx)(oR.Th,{children:`Route`}),(0,G.jsx)(oR.Th,{children:`Calls`}),(0,G.jsx)(oR.Th,{children:`Latency`}),(0,G.jsx)(oR.Th,{children:`Errors`})]})}),(0,G.jsx)(oR.Tbody,{children:n.pageItems.map(e=>(0,G.jsxs)(oR.Tr,{tabIndex:0,onClick:()=>t(e.caller),onKeyDown:n=>{(n.key===`Enter`||n.key===` `)&&t(e.caller)},style:{cursor:`pointer`},children:[(0,G.jsx)(oR.Td,{children:(0,G.jsxs)(LI,{component:`span`,ff:`monospace`,size:`sm`,children:[e.caller,` → `,e.callee]})}),(0,G.jsx)(oR.Td,{children:TU.format(e.calls)}),(0,G.jsx)(oR.Td,{children:DU(e.average_ms)}),(0,G.jsx)(oR.Td,{children:EU(e.error_rate)})]},`${e.caller}-${e.callee}-${e.type}`))})]})}),(0,G.jsx)(xz,{...n,onChange:n.setPage})]})}function $9(e,t){let n=Cz(t);return e===`unhealthy`?n.bad:e===`degraded`?n.warn:e===`unknown`?Sz(t).muted:n.ok}function hle(e){let t=[],n=new Map,r=(e,t,i=new Set)=>{if(e===t)return!0;if(i.has(e))return!1;i.add(e);for(let a of n.get(e)??[])if(r(a,t,i))return!0;return!1};for(let i of[...e].sort((e,t)=>t.calls-e.calls||e.caller.localeCompare(t.caller)||e.callee.localeCompare(t.callee))){if(i.caller===i.callee||r(i.callee,i.caller))continue;let e=n.get(i.caller)??new Set;e.add(i.callee),n.set(i.caller,e),t.push(i)}return t}(0,WR.createRoot)(document.getElementById(`root`)).render((0,G.jsx)(W.StrictMode,{children:(0,G.jsx)(lle,{})})); diff --git a/internal/mcp/apps/trace.html b/internal/mcp/apps/trace.html index ea9597b4e..a6c65134a 100644 --- a/internal/mcp/apps/trace.html +++ b/internal/mcp/apps/trace.html @@ -5,16 +5,16 @@ `);for(i=r=0;ri||c[r]!==l[i]){var u=` `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{xe=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?be(n):``}function Ce(e,t){switch(e.tag){case 26:case 27:case 5:return be(e.type);case 16:return be(`Lazy`);case 13:return e.child!==t&&t!==null?be(`Suspense Fallback`):be(`Suspense`);case 19:return be(`SuspenseList`);case 0:case 15:return Se(e.type,!1);case 11:return Se(e.type.render,!1);case 1:return Se(e.type,!0);case 31:return be(`Activity`);default:return``}}function we(e){try{var t=``,n=null;do t+=Ce(e,n),n=e,e=e.return;while(e);return t}catch(e){return` Error generating stack: `+e.message+` -`+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var P=!1;function ir(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function ar(e,t){if(P)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,P=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=pn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==Vt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=Vd(Pr,`onSelect`),0>=o,i-=o,ki=1<<32-Ue(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ri&&ji(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ri&&ji(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ri&&ji(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ri&&ji(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ma(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ra(o),c);if(o.$$typeof===b)return x(e,r,oa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=x(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Xl&p)===p:(r&p)===p){p!==0&&p===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Wa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};A.T=s,Vs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Bs(e,t,ba(c,r),Eu(e)):Bs(e,t,r,Eu(e))}catch(n){Bs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function As(){}function js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ms(e).queue;ks(e,a,t,ie,n===null?As:function(){return Ns(e),n(r)})}function Ms(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ns(e){var t=Ms(e);t.next===null&&(t=e.alternate.memoizedState),Bs(e,t.next.queue,{},Eu())}function Ps(){return aa(cp)}function Fs(){return Lo().memoizedState}function Is(){return Lo().memoizedState}function Ls(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=qa(n);var r=Ja(t,e,n);r!==null&&(ku(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Rs(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hs(e)?Us(t,n):(n=ai(e,t,n,r),n!==null&&(ku(n,e,r),Ws(n,t,r)))}function zs(e,t,n){Bs(e,t,n,Eu())}function Bs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))Us(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),Yl===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return ku(n,e,r),Ws(n,t,r),!0}return!1}function Vs(e,t,n,r){if(r={lane:2,revertLane:Td(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&ku(t,e,2)}function Hs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Us(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ws(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var Gs={readContext:aa,use:Bo,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Gs.useEffectEvent=Do;var Ks={readContext:aa,use:Bo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:gs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ms(4194308,4,Ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){ms(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(So){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(So){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Rs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Qo(e);var t=e.queue,n=zs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(e,t){return Ds(Io(),e,t)},useTransition:function(){var e=Qo(!1);return e=ks.bind(null,F,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Io();if(Ri){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yl===null)throw Error(i(349));Xl&127||qo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,gs(Yo.bind(null,r,o,e),[e]),r.flags|=2048,fs(9,{destroy:void 0},Jo.bind(null,r,o,n,t),null),n},useId:function(){var e=Io(),t=Yl.identifierPrefix;if(Ri){var n=Ai,r=ki;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Bc(t)}}return Gc(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Hi(t,!0)}else e=ef(e).createTextNode(r),e[ft]=t,t.stateNode=e}return Gc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(i(558))}return Gc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Uc(t,t.updateQueue),Gc(t),null);case 4:return he(),e===null&&Ld(t.stateNode.containerInfo),Gc(t),null;case 10:return $i(t.type),Gc(t),null;case 19:if(ce(ho),r=t.memoizedState,r===null)return Gc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Wc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,Wc(r,!1),e=o.updateQueue,t.updateQueue=e,Uc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return le(ho,ho.current&1|2),Ri&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Uc(t,e),Wc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ri)return Gc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Gc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=ho.current,le(ho,a?n&1|2:n&1),Ri&&ji(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Gc(t),t.subtreeFlags&6&&(t.flags|=8192)):Gc(t),n=t.updateQueue,n!==null&&Uc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),Gc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function qc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ho),null;case 4:return he(),null;case 10:return $i(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&ce(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Jc(e,t){switch(Pi(t),t.tag){case 3:$i(da),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:ce(ho);break;case 10:$i(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&ce(Sa);break;case 24:$i(da)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ad(t,t.return,e)}}function Xc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ad(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ad(t,t.return,e)}}function Zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){ad(e,e.return,t)}}}function Qc(e,t,n){n.props=$s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ad(e,t,n)}}function $c(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ad(e,t,n)}}function el(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ad(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ad(e,t,n)}else n.current=null}}function tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ad(e,e.return,t)}}function nl(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[pt]=t}catch(t){ad(e,e.return,t)}}function rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[ft]=e,t[pt]=n}catch(t){ad(e,e.return,t)}}var cl=!1,ll=!1,ul=!1,dl=typeof WeakSet==`function`?WeakSet:Set,fl=null;function pl(e,t){if(e=e.containerInfo,Qd=_p,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},_p=!1,fl=t;fl!==null;)if(t=fl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,fl=e;else for(;fl!==null;){switch(t=fl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Jd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,Jl&6)throw Error(i(331));var c=Jl;if(Jl|=4,Ul(o.current),Fl(o,o.current,s,n),Jl=c,yd(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{j.p=a,A.T=r,td(e,t)}}function id(e,t,n){t=xi(n,t),t=ac(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(nt(e,2),vd(e))}function ad(e,t,n){if(e.tag===3)id(e,e,n);else for(;t!==null;){if(t.tag===3){id(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=xi(n,e),n=oc(2),r=Ja(t,n,2),r!==null&&(sc(n,r,t,e),nt(r,2),vd(r));break}}t=t.return}}function od(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(tu=!0,i.add(n),e=sd.bind(null,e,t,n),t.then(e,e))}function sd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yl===e&&(Xl&n)===n&&(ru===4||ru===3&&(Xl&62914560)===Xl&&300>Ae()-fu?!(Jl&2)&&Iu(e,0):ou|=n,cu===Xl&&(cu=0)),vd(e)}function cd(e,t){t===0&&(t=et()),e=oi(e,t),e!==null&&(nt(e,t),vd(e))}function ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cd(e,n)}function ud(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),cd(e,n)}function dd(e,t){return Ee(e,t)}var fd=null,pd=null,md=!1,hd=!1,gd=!1,_d=0;function vd(e){e!==pd&&e.next===null&&(pd===null?fd=pd=e:pd=pd.next=e),hd=!0,md||(md=!0,wd())}function yd(e,t){if(!gd&&hd){gd=!0;do for(var n=!1,r=fd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Cd(r,a))}else a=Xl,a=Ze(r,r===Yl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,Cd(r,a))}r=r.next}while(n);gd=!1}}function bd(){xd()}function xd(){hd=md=!1;var e=0;_d!==0&&of()&&(e=_d);for(var t=Ae(),n=null,r=fd;r!==null;){var i=r.next,a=L(r,t);a===0?(r.next=null,n===null?fd=i:n.next=i,i===null&&(pd=n)):(n=r,(e!==0||a&3)&&(hd=!0)),r=i}_u!==0&&_u!==5||yd(e,!1),_d!==0&&(_d=0)}function L(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=Bf(e);break;case`script`:a=Wf(e)}Ef.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function H(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!Ef.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Lf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=wt(r).hoistableStyles,a=Bf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);Tt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function U(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=Ef.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Rf(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t,n,r){var a=(a=fe.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Bf(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Bf(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Bf(e){return`href="`+Ut(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ut(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Jd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Bf(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Hf(n),(a=Ef.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=Ef.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Bf(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=Ef.get(i))&&Jf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ku()}))(),ju=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Mu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Nu=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Pu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Fu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Iu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Lu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ru={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},zu={micro:11,small:12,body:14,title:16,section:22,page:32},Bu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Vu={brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},Hu={light:7,dark:5};function Uu(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Wu(e){let t=Uu(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Gu(e){return Object.fromEntries(Object.entries(Vu).map(([t,n])=>[`--fanout-color-${t}-contrast`,Wu(n[Hu[e]])]))}function Ku(e){return t=>{let n=t.color??Yu.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Vu,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var qu=.25,Ju={xs:9,sm:10,md:11,lg:13,xl:16},Yu={primaryColor:`brand`,primaryShade:Hu,autoContrast:!0,luminanceThreshold:qu,colors:{dark:ju,brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},defaultRadius:`md`,fontFamily:Bu.body,fontFamilyMonospace:Bu.display,headings:{fontFamily:Bu.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Qu(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Qu(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Zu(t.size)})}}},Xu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Lu.light.muted,...Gu(`light`)},dark:Gu(`dark`)});function Zu(e){let t=Ju[e??`md`];return t===void 0||t>=zu.micro?{}:{"--badge-fz":`${zu.micro/16}rem`}}function Qu(e,t){return!e||e===Yu.primaryColor?{[t]:`var(--fanout-color-${Yu.primaryColor}-contrast)`}:{}}var $u=en({...Yu,variantColorResolver:Ku(lt)});function ed({dark:e,children:t}){return(0,M.jsx)($t,{theme:$u,cssVariablesResolver:Xu,forceColorScheme:e?`dark`:`light`,children:(0,M.jsx)(_s,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function td({title:e,summary:t,onRefresh:n,disabled:r}){return(0,M.jsxs)(uc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(hu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,M.jsx)(vl,{label:`Refresh this view`,children:(0,M.jsx)(ec,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,M.jsx)(Su,{size:15,weight:`bold`})})})]})}function nd({error:e,loading:t,retry:n}){return e?(0,M.jsx)(pc,{color:`bad`,m:`md`,radius:`md`,children:(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(vc,{size:`sm`,children:e}),n&&(0,M.jsx)(Ac,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,M.jsxs)(Mc,{mih:160,p:`xl`,children:[(0,M.jsx)(Ks,{size:`sm`}),(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function rd({active:e,items:t,onChange:n}){return(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,M.jsx)(au,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,M.jsx)(au.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,M.jsx)(au.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,M.jsx)(xc,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function id({icon:e,title:t,children:n,tall:r=!1}){return(0,M.jsx)(Mc,{mih:r?220:130,p:`xl`,children:(0,M.jsxs)(uc,{wrap:`nowrap`,children:[(0,M.jsx)(cu,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,M.jsxs)(P,{children:[(0,M.jsx)(vc,{fw:700,size:`sm`,children:t}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function ad({left:e,right:t}){return(0,M.jsxs)(uc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function od({label:e,value:t,color:n}){return(0,M.jsxs)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function sd(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}function cd({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,M.jsxs)(uc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsxs)(vc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,M.jsx)(il,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`})]})}function ld(e,t){let n=Ru[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function ud(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}var dd=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function fd(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${fd(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function pd(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}var md=c({BIGINT_FORMAT_RANGES:()=>Af,CONSTANT_CATCH:()=>If,Class:()=>Mf,NUMBER_FORMAT_RANGES:()=>kf,aborted:()=>Qd,allowsEval:()=>Tf,assert:()=>bd,assertEqual:()=>hd,assertIs:()=>vd,assertNever:()=>yd,assertNotEqual:()=>gd,assignProp:()=>kd,attachSchema:()=>nf,base64ToUint8Array:()=>uf,base64urlToUint8Array:()=>ff,cached:()=>Cd,captureStackTrace:()=>wf,cleanEnum:()=>lf,cleanRegex:()=>Td,clone:()=>Hd,cloneDef:()=>jd,codePointLength:()=>of,constantCatch:()=>Sf,createTransparentProxy:()=>Ud,defineLazy:()=>Dd,defineLazyInternal:()=>V,esc:()=>Fd,escapeRegex:()=>Vd,explicitlyAborted:()=>$d,extend:()=>qd,finalizeIssue:()=>rf,floatSafeRemainder:()=>Ed,getElementAtPath:()=>Md,getEnumValues:()=>xd,getLengthableOrigin:()=>sf,getParsedType:()=>Ef,getSizableOrigin:()=>af,hexToUint8Array:()=>mf,hide:()=>vf,installLazyProp:()=>xf,isObject:()=>Ld,isPlainObject:()=>Rd,issue:()=>cf,joinValues:()=>L,jsonStringifyReplacer:()=>Sd,members:()=>gf,merge:()=>Yd,mergeDefs:()=>Ad,normalizeParams:()=>R,nullish:()=>wd,numKeys:()=>Bd,objectClone:()=>Od,omit:()=>Kd,optionalKeys:()=>Wd,own:()=>_f,parsedType:()=>B,partial:()=>Xd,pick:()=>Gd,prefixIssues:()=>ef,primitiveTypes:()=>Of,promiseAllObject:()=>Nd,propertyKeyTypes:()=>Df,randomString:()=>Pd,required:()=>Zd,safeExtend:()=>Jd,shallowClone:()=>zd,slugify:()=>Id,stringifyPrimitive:()=>z,toZod:()=>_d,uint8ArrayToBase64:()=>df,uint8ArrayToBase64url:()=>pf,uint8ArrayToHex:()=>hf,unwrapMessage:()=>tf});function hd(e){return e}function gd(e){return e}function _d(){return e=>e}function vd(e){}function yd(e){throw Error(`Unexpected value in exhaustive check`)}function bd(e){}function xd(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function L(e,t=`|`){return e.map(e=>z(e)).join(t)}function Sd(e,t){return typeof t==`bigint`?t.toString():t}function Cd(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function wd(e){return e==null}function Td(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function Ed(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Nd(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Ud(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function z(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Wd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function Gd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Hd(e,Ad(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&kd(e,r,n.shape[r])}return kd(this,`shape`,e),e},checks:[]}))}function Kd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Hd(e,Ad(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return kd(this,`shape`,r),r},checks:[]}))}function qd(e,t){if(!Rd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Hd(e,Ad(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return kd(this,`shape`,n),n}}))}function Jd(e,t){if(!Rd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Hd(e,Ad(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return kd(this,`shape`,n),n}}))}function Yd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Hd(e,Ad(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return kd(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Xd(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return Hd(t,Ad(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return kd(this,`shape`,i),i},checks:[]}))}function Zd(e,t,n){return Hd(t,Ad(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return kd(this,`shape`,i),i}}))}function Qd(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function tf(e){return typeof e==`string`?e:e?.message}function nf(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function uf(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function gf(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):yf(e,n,r.value)}}function _f(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function vf(e,t,n){return _f(e,t,n,!1)}function yf(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:_f(this,t,n.bind(this))},set(e){_f(this,t,e)}})}function bf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function V(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Nf!==e._zod){Nf=void 0;return}Nf=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Ff);let e=Pf;Pf=!1;try{let r=n(this);return Pf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Pf||=e,r}catch(n){throw delete this[t],Pf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function xf(e,t,n,r){let i=bf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function Sf(e){let t=()=>e;return t[If]=!0,t}var Cf,wf,Tf,Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,H=o((()=>{qf(),Cf=Symbol(`evaluating`),wf=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Tf=Cd(()=>{if(Kf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),Ef=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Df=new Set([`string`,`number`,`symbol`]),Of=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),kf={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Af={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},jf=/[\uD800-\uDBFF]/,Mf=class{constructor(...e){}},Pf=!1,Ff={configurable:!0,get(){Pf=!0}},If=`~constantCatch`}));function Lf(e){let t=Hf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Hf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Vf.value=new a(r);try{Object.defineProperty(n,"_zod",Vf)}finally{Vf.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),gf(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Lf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function Rf(e){return e&&Object.assign(Kf,e),Kf}var zf,Bf,Vf,Hf,Uf,Wf,Gf,Kf,qf=o((()=>{H(),Bf=Object.freeze({status:`aborted`}),Vf={value:void 0,enumerable:!1},Hf=`captureStackTrace`in Error?Error:null,Uf=Symbol(`zod_brand`),Wf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Gf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(zf=globalThis).__zod_globalConfig??(zf.__zod_globalConfig={}),Kf=globalThis.__zod_globalConfig}));function Jf(){let e=this._zod;return e.message??=JSON.stringify(e.def,Sd,2),e.message}function Yf(e){this._zod.message=e}function Xf(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Zf(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Xf(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function Qf(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function tp(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${ep(e.path)}`);return t.join(` -`)}var np,rp,ip,ap,op,sp,cp,lp=o((()=>{qf(),H(),np={get:Jf,set:Yf,enumerable:!0,configurable:!0},rp={value:void 0,enumerable:!1},ip={value:void 0,enumerable:!1},ap=new WeakSet([Object.prototype,Error.prototype]),op=(e,t)=>{e.name=`$ZodError`,rp.value=e._zod,Object.defineProperty(e,"_zod",rp),ip.value=t,Object.defineProperty(e,"issues",ip),rp.value=void 0,ip.value=void 0,Object.defineProperty(e,"message",np);let n=Object.getPrototypeOf(e);ap.has(n)||(ap.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},sp=U(`$ZodError`,op),cp=U(`$ZodError`,op,void 0,{Parent:Error})}));function up(e,t){return{callee:t?.callee??e,Err:t?.Err}}function dp(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[xp]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new Wf;return a.issues.length===0}var fp,pp,mp,hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp=o((()=>{qf(),lp(),H(),fp=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new Wf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rf(e,o,Rf())));throw wf(n,a?.callee??t),n}return s.value};return t},pp=fp(cp),mp=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>rf(e,o,Rf())));throw wf(n,a?.callee??t),n}return s.value};return t},hp=mp(cp),gp=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new Wf;return a.issues.length?{success:!1,error:new(e??sp)(a.issues.map(e=>rf(e,i,Rf())))}:{success:!0,data:a.value}},_p=gp(cp),vp=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>rf(e,i,Rf())))}:{success:!0,data:a.value}},yp=vp(cp),bp=Symbol.for(`zod.compile.invalid`),xp=Symbol.for(`zod.compile.fallback`),Sp=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==bp||dp(e,t,n)}),Cp=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},wp=e=>{let t=fp(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,up(n,a))};return n},Tp=wp(cp),Ep=e=>{let t=fp(e),n=(e,r,i,a)=>t(e,r,i,up(n,a));return n},Dp=Ep(cp),Op=e=>{let t=mp(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,up(n,a))};return n},kp=Op(cp),Ap=e=>{let t=mp(e),n=async(e,r,i,a)=>await t(e,r,i,up(n,a));return n},jp=Ap(cp),Mp=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return gp(e)(t,n,i)},Np=Mp(cp),Pp=e=>(t,n,r)=>gp(e)(t,n,r),Fp=Pp(cp),Ip=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vp(e)(t,n,i)},Lp=Ip(cp),Rp=e=>async(t,n,r)=>vp(e)(t,n,r),zp=Rp(cp)})),Vp=c({base64:()=>xm,base64url:()=>Sm,bigint:()=>jm,boolean:()=>Pm,browserEmail:()=>mm,cidrv4:()=>ym,cidrv6:()=>bm,creditCard:()=>Dm,cuid:()=>Xp,cuid2:()=>Zp,date:()=>km,datetime:()=>qp,domain:()=>wm,duration:()=>nm,e164:()=>Em,email:()=>lm,emoji:()=>Up,extendedDuration:()=>rm,guid:()=>im,hex:()=>zm,hostname:()=>Cm,html5Email:()=>um,httpProtocol:()=>Tm,idnEmail:()=>pm,integer:()=>Mm,ipv4:()=>gm,ipv6:()=>_m,ksuid:()=>em,lowercase:()=>Lm,mac:()=>vm,md5_base64:()=>Vm,md5_base64url:()=>Hm,md5_hex:()=>Bm,nanoid:()=>tm,nanoidOfLength:()=>Hp,null:()=>Fm,number:()=>Nm,rfc5322Email:()=>dm,sha1_base64:()=>Wm,sha1_base64url:()=>Gm,sha1_hex:()=>Um,sha256_base64:()=>qm,sha256_base64url:()=>Jm,sha256_hex:()=>Km,sha384_base64:()=>Xm,sha384_base64url:()=>Zm,sha384_hex:()=>Ym,sha512_base64:()=>$m,sha512_base64url:()=>eh,sha512_hex:()=>Qm,string:()=>Am,time:()=>Kp,ulid:()=>Qp,undefined:()=>Im,unicodeEmail:()=>fm,uppercase:()=>Rm,uuid:()=>am,uuid4:()=>om,uuid6:()=>sm,uuid7:()=>cm,xid:()=>$p});function Hp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function Up(){return new RegExp(hm,`u`)}function Wp(e){return RegExp(`^${e}$`)}function Gp(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Kp(e){return RegExp(`^${Gp(e)}$`)}function qp(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Gp({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Gp({precision:e.precision})}`:n;return RegExp(`^${Om}T(?:${r})$`)}function Jp(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Yp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Xp,Zp,Qp,$p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th=o((()=>{H(),Xp=/^[cC][0-9a-z]{6,}$/,Zp=/^[0-9a-z]+$/,Qp=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,$p=/^[0-9a-vA-V]{20}$/,em=/^[A-Za-z0-9]{27}$/,tm=/^[a-zA-Z0-9_-]{21}$/,nm=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,rm=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,im=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,am=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,om=am(4),sm=am(6),cm=am(7),lm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,um=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,dm=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,fm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,pm=fm,mm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,hm=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,gm=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_m=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,vm=e=>{let t=Vd(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},ym=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,bm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Sm=/^[A-Za-z0-9_-]*$/,Cm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,wm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Tm=/^https?$/,Em=/^\+[1-9]\d{6,14}$/,Dm=/^\d(?:[ -]?\d){11,18}$/,Om=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,km=Wp(Om),Am=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},jm=/^-?\d+n?$/,Mm=/^-?\d+$/,Nm=/^-?\d+(?:\.\d+)?$/,Pm=/^(?:true|false)$/i,Fm=/^null$/i,Im=/^undefined$/i,Lm=/^[^A-Z]*$/,Rm=/^[^a-z]*$/,zm=/^[0-9a-fA-F]*$/,Bm=/^[0-9a-fA-F]{32}$/,Vm=Jp(22,`==`),Hm=Yp(22),Um=/^[0-9a-fA-F]{40}$/,Wm=Jp(27,`=`),Gm=Yp(27),Km=/^[0-9a-fA-F]{64}$/,qm=Jp(43,`=`),Jm=Yp(43),Ym=/^[0-9a-fA-F]{96}$/,Xm=Jp(64,``),Zm=Yp(64),Qm=/^[0-9a-fA-F]{128}$/,$m=Jp(86,`==`),eh=Yp(86)}));function nh(e,t,n){e.issues.length&&t.issues.push(...ef(n,e.issues))}var rh,ih,ah,oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh=o((()=>{qf(),th(),H(),rh=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),ih=e=>{let t=e.value;return!wd(t)&&t.size!==void 0},ah=e=>{let t=e.value;return!wd(t)&&t.length!==void 0},oh={number:`number`,bigint:`bigint`,object:`date`},sh=U(`$ZodCheckLessThan`,(e,t)=>{rh.init(e,t);let n=oh[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{rh.init(e,t);let n=oh[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:oh[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),lh=U(`$ZodCheckMultipleOf`,(e,t)=>{rh.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):Ed(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),uh=U(`$ZodCheckNumberFormat`,(e,t)=>{rh.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=kf[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Mm)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),dh=U(`$ZodCheckBigIntFormat`,(e,t)=>{rh.init(e,t);let[n,r]=Af[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),fh=U(`$ZodCheckMaxSize`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ih),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:af(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),ph=U(`$ZodCheckMinSize`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ih),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:af(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),mh=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ih),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:af(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),hh=U(`$ZodCheckMaxLength`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ah),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?of(r):i)<=t.maximum)return;let a=sf(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gh=U(`$ZodCheckMinLength`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ah),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=sf(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_h=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;rh.init(e,t),(n=e._zod.def).when??(n.when=ah),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?of(r):i;if(a===t.length)return;let o=sf(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vh=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;rh.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),yh=U(`$ZodCheckRegex`,(e,t)=>{vh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),bh=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Lm,vh.init(e,t)}),xh=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Rm,vh.init(e,t)}),Sh=U(`$ZodCheckIncludes`,(e,t)=>{rh.init(e,t);let n=Vd(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Ch=U(`$ZodCheckStartsWith`,(e,t)=>{rh.init(e,t);let n=RegExp(`^${Vd(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),wh=U(`$ZodCheckEndsWith`,(e,t)=>{rh.init(e,t);let n=RegExp(`.*${Vd(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Th=U(`$ZodCheckProperty`,(e,t)=>{rh.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>nh(n,e,t.property));nh(n,e,t.property)}}),Eh=U(`$ZodCheckMimeType`,(e,t)=>{rh.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Dh=U(`$ZodCheckOverwrite`,(e,t)=>{rh.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),kh,Ah=o((()=>{kh=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` +`+e.stack}}var Te=Object.prototype.hasOwnProperty,Ee=t.unstable_scheduleCallback,De=t.unstable_cancelCallback,Oe=t.unstable_shouldYield,ke=t.unstable_requestPaint,Ae=t.unstable_now,je=t.unstable_getCurrentPriorityLevel,Me=t.unstable_ImmediatePriority,Ne=t.unstable_UserBlockingPriority,Fe=t.unstable_NormalPriority,Ie=t.unstable_LowPriority,Le=t.unstable_IdlePriority,Re=t.log,ze=t.unstable_setDisableYieldValue,Be=null,Ve=null;function He(e){if(typeof Re==`function`&&ze(e),Ve&&typeof Ve.setStrictMode==`function`)try{Ve.setStrictMode(Be,e)}catch{}}var Ue=Math.clz32?Math.clz32:Ke,We=Math.log,Ge=Math.LN2;function Ke(e){return e>>>=0,e===0?32:31-(We(e)/Ge|0)|0}var qe=256,Je=262144,Ye=4194304;function Xe(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Ze(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=Xe(n))):i=Xe(o):i=Xe(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Xe(n))):i=Xe(o)):i=Xe(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function Qe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function $e(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function et(){var e=Ye;return Ye<<=1,!(Ye&62914560)&&(Ye=4194304),e}function tt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function nt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function rt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),mn=!1;if(pn)try{var hn={};Object.defineProperty(hn,"passive",{get:function(){mn=!0}}),window.addEventListener(`test`,hn,hn),window.removeEventListener(`test`,hn,hn)}catch{mn=!1}var gn=null,_n=null,vn=null;function yn(){if(vn)return vn;var e,t=_n,n=t.length,r,i=`value`in gn?gn.value:gn.textContent,a=i.length;for(e=0;e=Zn),er=` `,tr=!1;function nr(e,t){switch(e){case`keyup`:return Yn.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function rr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var P=!1;function ir(e,t){switch(e){case`compositionend`:return rr(t);case`keypress`:return t.which===32?(tr=!0,er):null;case`textInput`:return e=t.data,e===er&&tr?null:e;default:return null}}function ar(e,t){if(P)return e===`compositionend`||!Xn&&nr(e,t)?(e=yn(),vn=_n=gn=null,P=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Dr(n)}}function kr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?kr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Ar(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Vt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Vt(e.document)}return t}function jr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Mr=pn&&`documentMode`in document&&11>=document.documentMode,Nr=null,Pr=null,Fr=null,Ir=!1;function Lr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ir||Nr==null||Nr!==Vt(r)||(r=Nr,`selectionStart`in r&&jr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Fr&&Er(Fr,r)||(Fr=r,r=Vd(Pr,`onSelect`),0>=o,i-=o,ki=1<<32-Ue(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ri&&ji(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ri&&ji(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ri&&ji(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ri&&ji(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===E&&Ma(l)===r.type){n(e,r.sibling),c=a(r,o.props),za(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=gi(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=hi(o.type,o.key,o.props,null,e.mode,c),za(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=yi(o,e.mode,c),c.return=e,e=c}return s(e);case E:return o=Ma(o),x(e,r,o,c)}if(re(o))return v(e,r,o,c);if(k(o)){if(l=k(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ra(o),c);if(o.$$typeof===b)return x(e,r,oa(e,o),c);Ba(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=_i(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{La=0;var i=x(e,t,n,r);return Ia=null,i}catch(t){if(t===Ea||t===Oa)throw t;var a=di(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Ha=Va(!0),Ua=Va(!1),Wa=!1;function Ga(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ka(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function qa(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ja(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Jl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=ci(e),si(e,null,n),t}return ii(e,r,t,n),ci(e)}function Ya(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}function Xa(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Za=!1;function Qa(){if(Za){var e=_a;if(e!==null)throw e}}function $a(e,t,n,r){Za=!1;var i=e.updateQueue;Wa=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Xl&p)===p:(r&p)===p){p!==0&&p===ga&&(Za=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:Wa=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),iu|=o,e.lanes=o,e.memoizedState=d}}function eo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function to(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=A.T,s={};A.T=s,Vs(e,!1,t,n);try{var c=i(),l=A.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Bs(e,t,ba(c,r),Eu(e)):Bs(e,t,r,Eu(e))}catch(n){Bs(e,t,{then:function(){},status:`rejected`,reason:n},Eu())}finally{j.p=a,o!==null&&s.types!==null&&(o.types=s.types),A.T=o}}function As(){}function js(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ms(e).queue;ks(e,a,t,ie,n===null?As:function(){return Ns(e),n(r)})}function Ms(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ie,baseState:ie,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:ie},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ho,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ns(e){var t=Ms(e);t.next===null&&(t=e.alternate.memoizedState),Bs(e,t.next.queue,{},Eu())}function Ps(){return aa(cp)}function Fs(){return Lo().memoizedState}function Is(){return Lo().memoizedState}function Ls(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Eu();e=qa(n);var r=Ja(t,e,n);r!==null&&(ku(r,t,n),Ya(r,t,n)),t={cache:fa()},e.payload=t;return}t=t.return}}function Rs(e,t,n){var r=Eu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Hs(e)?Us(t,n):(n=ai(e,t,n,r),n!==null&&(ku(n,e,r),Ws(n,t,r)))}function zs(e,t,n){Bs(e,t,n,Eu())}function Bs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Hs(e))Us(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Tr(s,o))return ii(e,t,i,0),Yl===null&&ri(),!1}catch{}if(n=ai(e,t,i,r),n!==null)return ku(n,e,r),Ws(n,t,r),!0}return!1}function Vs(e,t,n,r){if(r={lane:2,revertLane:Td(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Hs(e)){if(t)throw Error(i(479))}else t=ai(e,n,r,2),t!==null&&ku(t,e,2)}function Hs(e){var t=e.alternate;return e===F||t!==null&&t===F}function Us(e,t){xo=bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ws(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,at(e,n)}}var Gs={readContext:aa,use:Bo,useCallback:Do,useContext:Do,useEffect:Do,useImperativeHandle:Do,useLayoutEffect:Do,useInsertionEffect:Do,useMemo:Do,useReducer:Do,useRef:Do,useState:Do,useDebugValue:Do,useDeferredValue:Do,useTransition:Do,useSyncExternalStore:Do,useId:Do,useHostTransitionStatus:Do,useFormState:Do,useActionState:Do,useOptimistic:Do,useMemoCache:Do,useCacheRefresh:Do};Gs.useEffectEvent=Do;var Ks={readContext:aa,use:Bo,useCallback:function(e,t){return Io().memoizedState=[e,t===void 0?null:t],e},useContext:aa,useEffect:gs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ms(4194308,4,Ss.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ms(4194308,4,e,t)},useInsertionEffect:function(e,t){ms(4,2,e,t)},useMemo:function(e,t){var n=Io();t=t===void 0?null:t;var r=e();if(So){He(!0);try{e()}finally{He(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Io();if(n!==void 0){var i=n(t);if(So){He(!0);try{n(t)}finally{He(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Rs.bind(null,F,e),[r.memoizedState,e]},useRef:function(e){var t=Io();return e={current:e},t.memoizedState=e},useState:function(e){e=Qo(e);var t=e.queue,n=zs.bind(null,F,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:ws,useDeferredValue:function(e,t){return Ds(Io(),e,t)},useTransition:function(){var e=Qo(!1);return e=ks.bind(null,F,e.queue,!0,!1),Io().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=F,a=Io();if(Ri){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Yl===null)throw Error(i(349));Xl&127||qo(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,gs(Yo.bind(null,r,o,e),[e]),r.flags|=2048,fs(9,{destroy:void 0},Jo.bind(null,r,o,n,t),null),n},useId:function(){var e=Io(),t=Yl.identifierPrefix;if(Ri){var n=Ai,r=ki;n=(r&~(1<<32-Ue(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Co++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[ft]=t,o[pt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Bc(t)}}return Gc(t),Vc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Bc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=fe.current,Gi(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ii,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[ft]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Kd(e.nodeValue,n)),e||Hi(t,!0)}else e=ef(e).createTextNode(r),e[ft]=t,t.stateNode=e}return Gc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Gi(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),e=!1}else n=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(mo(t),t):(mo(t),null);if(t.flags&128)throw Error(i(558))}return Gc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Gi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[ft]=t}else Ki(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Gc(t),a=!1}else a=qi(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(mo(t),t):(mo(t),null)}return mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Uc(t,t.updateQueue),Gc(t),null);case 4:return he(),e===null&&Ld(t.stateNode.containerInfo),Gc(t),null;case 10:return $i(t.type),Gc(t),null;case 19:if(ce(ho),r=t.memoizedState,r===null)return Gc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Wc(r,!1);else{if(ru!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=go(e),o!==null){for(t.flags|=128,Wc(r,!1),e=o.updateQueue,t.updateQueue=e,Uc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)mi(n,e),n=n.sibling;return le(ho,ho.current&1|2),Ri&&ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ae()>mu&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=go(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Uc(t,e),Wc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ri)return Gc(t),null}else 2*Ae()-r.renderingStartTime>mu&&n!==536870912&&(t.flags|=128,a=!0,Wc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Gc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ae(),e.sibling=null,n=ho.current,le(ho,a?n&1|2:n&1),Ri&&ji(t,r.treeForkCount),e);case 22:case 23:return mo(t),oo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Gc(t),t.subtreeFlags&6&&(t.flags|=8192)):Gc(t),n=t.updateQueue,n!==null&&Uc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ce(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),$i(da),Gc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function qc(e,t){switch(Pi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return $i(da),he(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return _e(t),null;case 31:if(t.memoizedState!==null){if(mo(t),t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));Ki()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ce(ho),null;case 4:return he(),null;case 10:return $i(t.type),null;case 22:case 23:return mo(t),oo(),e!==null&&ce(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return $i(da),null;case 25:return null;default:return null}}function Jc(e,t){switch(Pi(t),t.tag){case 3:$i(da),he();break;case 26:case 27:case 5:_e(t);break;case 4:he();break;case 31:t.memoizedState!==null&&mo(t);break;case 13:mo(t);break;case 19:ce(ho);break;case 10:$i(t.type);break;case 22:case 23:mo(t),oo(),e!==null&&ce(Sa);break;case 24:$i(da)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ad(t,t.return,e)}}function Xc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ad(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ad(t,t.return,e)}}function Zc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{to(t,n)}catch(t){ad(e,e.return,t)}}}function Qc(e,t,n){n.props=$s(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ad(e,t,n)}}function $c(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ad(e,t,n)}}function el(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ad(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ad(e,t,n)}else n.current=null}}function tl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ad(e,e.return,t)}}function nl(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[pt]=t}catch(t){ad(e,e.return,t)}}function rl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&df(e.type)||e.tag===4}function il(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&df(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function al(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=rn));else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(al(e,t,n),e=e.sibling;e!==null;)al(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&df(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(ol(e,t,n),e=e.sibling;e!==null;)ol(e,t,n),e=e.sibling}function sl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[ft]=e,t[pt]=n}catch(t){ad(e,e.return,t)}}var cl=!1,ll=!1,ul=!1,dl=typeof WeakSet==`function`?WeakSet:Set,fl=null;function pl(e,t){if(e=e.containerInfo,Qd=_p,e=Ar(e),jr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},_p=!1,fl=t;fl!==null;)if(t=fl,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,fl=e;else for(;fl!==null;){switch(t=fl,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Jd(o,r,n),o[ft]=e,Tt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Or(s,h),v=Or(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,A.T=null,n=Su,Su=null;var o=vu,s=bu;if(_u=0,yu=vu=null,bu=0,Jl&6)throw Error(i(331));var c=Jl;if(Jl|=4,Ul(o.current),Fl(o,o.current,s,n),Jl=c,yd(0,!1),Ve&&typeof Ve.onPostCommitFiberRoot==`function`)try{Ve.onPostCommitFiberRoot(Be,o)}catch{}return!0}finally{j.p=a,A.T=r,td(e,t)}}function id(e,t,n){t=xi(n,t),t=ac(e.stateNode,t,2),e=Ja(e,t,2),e!==null&&(nt(e,2),vd(e))}function ad(e,t,n){if(e.tag===3)id(e,e,n);else for(;t!==null;){if(t.tag===3){id(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(gu===null||!gu.has(r))){e=xi(n,e),n=oc(2),r=Ja(t,n,2),r!==null&&(sc(n,r,t,e),nt(r,2),vd(r));break}}t=t.return}}function od(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new ql;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(tu=!0,i.add(n),e=sd.bind(null,e,t,n),t.then(e,e))}function sd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Yl===e&&(Xl&n)===n&&(ru===4||ru===3&&(Xl&62914560)===Xl&&300>Ae()-fu?!(Jl&2)&&Iu(e,0):ou|=n,cu===Xl&&(cu=0)),vd(e)}function cd(e,t){t===0&&(t=et()),e=oi(e,t),e!==null&&(nt(e,t),vd(e))}function ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),cd(e,n)}function ud(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),cd(e,n)}function dd(e,t){return Ee(e,t)}var fd=null,pd=null,md=!1,hd=!1,gd=!1,_d=0;function vd(e){e!==pd&&e.next===null&&(pd===null?fd=pd=e:pd=pd.next=e),hd=!0,md||(md=!0,L())}function yd(e,t){if(!gd&&hd){gd=!0;do for(var n=!1,r=fd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ue(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,wd(r,a))}else a=Xl,a=Ze(r,r===Yl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||Qe(r,a)||(n=!0,wd(r,a))}r=r.next}while(n);gd=!1}}function bd(){xd()}function xd(){hd=md=!1;var e=0;_d!==0&&of()&&(e=_d);for(var t=Ae(),n=null,r=fd;r!==null;){var i=r.next,a=Sd(r,t);a===0?(r.next=null,n===null?fd=i:n.next=i,i===null&&(pd=n)):(n=r,(e!==0||a&3)&&(hd=!0)),r=i}_u!==0&&_u!==5||yd(e,!1),_d!==0&&(_d=0)}function Sd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Nf(e,t,n){var r=Mf;if(r&&typeof t==`string`&&t){var i=Ut(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Df.has(i)||(Df.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Pf(e){kf.D(e),Nf(`dns-prefetch`,e,null)}function Ff(e,t){kf.C(e,t),Nf(`preconnect`,e,t)}function If(e,t,n){kf.L(e,t,n);var r=Mf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Ut(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Ut(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Ut(n.imageSizes)+`"]`)):i+=`[href="`+Ut(e)+`"]`;var a=i;switch(t){case`style`:a=U(e);break;case`script`:a=Wf(e)}Ef.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Ef.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Vf(a))||t===`script`&&r.querySelector(Gf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Tt(t),r.head.appendChild(t)))}}function Lf(e,t){kf.m(e,t);var n=Mf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Ut(r)+`"][href="`+Ut(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Wf(e)}if(!Ef.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Ef.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Gf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Tt(r),n.head.appendChild(r)}}}function Rf(e,t,n){kf.S(e,t,n);var r=Mf;if(r&&e){var i=wt(r).hoistableStyles,a=U(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Vf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Ef.get(a))&&Jf(e,n);var c=o=r.createElement(`link`);Tt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,qf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function zf(e,t){kf.X(e,t);var n=Mf;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0},t),(t=Ef.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function H(e,t){kf.M(e,t);var n=Mf;if(n&&e){var r=wt(n).hoistableScripts,i=Wf(e),a=r.get(i);a||(a=n.querySelector(Gf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Ef.get(i))&&Yf(e,t),a=n.createElement(`script`),Tt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=fe.current)?Of(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=U(n.href),n=wt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=U(n.href);var o=wt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Vf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Ef.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Ef.set(e,n),o||Uf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Wf(n),n=wt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function U(e){return`href="`+Ut(e)+`"`}function Vf(e){return`link[rel="stylesheet"][`+e+`]`}function Hf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Uf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Tt(t),e.head.appendChild(t))}function Wf(e){return`[src="`+Ut(e)+`"]`}function Gf(e){return`script[async]`+e}function Kf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Ut(n.href)+`"]`);if(r)return t.instance=r,Tt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Tt(r),Jd(r,`style`,a),qf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=U(n.href);var o=e.querySelector(Vf(a));if(o)return t.state.loading|=4,t.instance=o,Tt(o),o;r=Hf(n),(a=Ef.get(a))&&Jf(r,a),o=(e.ownerDocument||e).createElement(`link`),Tt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,qf(o,n.precedence,e),t.instance=o;case`script`:return o=Wf(n.src),(a=e.querySelector(Gf(o)))?(t.instance=a,Tt(a),a):(r=n,(a=Ef.get(o))&&(r=f({},n),Yf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Tt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,qf(r,n.precedence,e));return t.instance}function qf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=U(r.href),a=t.querySelector(Vf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ip.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Tt(a);return}a=t.ownerDocument||t,r=Hf(r),(i=Ef.get(i))&&Jf(r,i),a=a.createElement(`link`),Tt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ip.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&op(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ip(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)op(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ap=null;function op(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ap=new Map,t.forEach(sp,e),ap=null,ip.call(e))}function sp(e,t){if(!(t.state.loading&4)){var n=ap.get(e);if(n)var r=n.get(null);else{n=new Map,ap.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ku()}))(),ju=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],Mu=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],Nu=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],Pu=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Fu=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Iu=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Lu={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ru={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},zu={micro:11,small:12,body:14,title:16,section:22,page:32},Bu={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`},Vu={brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},Hu={light:7,dark:5};function Uu(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Wu(e){let t=Uu(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Gu(e){return Object.fromEntries(Object.entries(Vu).map(([t,n])=>[`--fanout-color-${t}-contrast`,Wu(n[Hu[e]])]))}function Ku(e){return t=>{let n=t.color??Yu.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Vu,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var qu=.25,Ju={xs:9,sm:10,md:11,lg:13,xl:16},Yu={primaryColor:`brand`,primaryShade:Hu,autoContrast:!0,luminanceThreshold:qu,colors:{dark:ju,brand:Mu,ok:Nu,warn:Pu,bad:Fu,info:Iu},defaultRadius:`md`,fontFamily:Bu.body,fontFamilyMonospace:Bu.display,headings:{fontFamily:Bu.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Qu(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Qu(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Zu(t.size)})}}},Xu=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":Lu.light.muted,...Gu(`light`)},dark:Gu(`dark`)});function Zu(e){let t=Ju[e??`md`];return t===void 0||t>=zu.micro?{}:{"--badge-fz":`${zu.micro/16}rem`}}function Qu(e,t){return!e||e===Yu.primaryColor?{[t]:`var(--fanout-color-${Yu.primaryColor}-contrast)`}:{}}var $u=en({...Yu,variantColorResolver:Ku(lt)});function ed({dark:e,children:t}){return(0,M.jsx)($t,{theme:$u,cssVariablesResolver:Xu,forceColorScheme:e?`dark`:`light`,children:(0,M.jsx)(_s,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},children:t})})}function td({title:e,summary:t,onRefresh:n,disabled:r}){return(0,M.jsxs)(uc,{justify:`space-between`,align:`flex-start`,wrap:`nowrap`,px:{base:`md`,sm:`lg`},pt:`sm`,pb:`xs`,children:[(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(hu,{order:2,fz:`lg`,style:{overflow:`hidden`,textOverflow:`ellipsis`,whiteSpace:`nowrap`},children:e}),t&&(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,mt:2,children:t})]}),(0,M.jsx)(vl,{label:`Refresh this view`,children:(0,M.jsx)(ec,{variant:`default`,size:`md`,"aria-label":`Refresh this view`,onClick:()=>void n(),disabled:r,children:(0,M.jsx)(Su,{size:15,weight:`bold`})})})]})}function nd({error:e,loading:t,retry:n}){return e?(0,M.jsx)(pc,{color:`bad`,m:`md`,radius:`md`,children:(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(vc,{size:`sm`,children:e}),n&&(0,M.jsx)(Ac,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:n,children:`Retry`})]})}):t?(0,M.jsxs)(Mc,{mih:160,p:`xl`,children:[(0,M.jsx)(Ks,{size:`sm`}),(0,M.jsx)(vc,{c:`dimmed`,size:`sm`,ml:`sm`,children:t})]}):null}function rd({active:e,items:t,onChange:n}){return(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,scrollbarSize:6,children:(0,M.jsx)(au,{value:e,onChange:e=>e&&n(e),variant:`pills`,px:{base:`md`,sm:`lg`},pb:`sm`,children:(0,M.jsx)(au.List,{style:{flexWrap:`nowrap`},children:t.map(e=>(0,M.jsx)(au.Tab,{value:e.id,rightSection:e.count===void 0?void 0:(0,M.jsx)(xc,{size:`xs`,variant:`light`,children:e.count}),children:e.label},e.id))})})})}function id({icon:e,title:t,children:n,tall:r=!1}){return(0,M.jsx)(Mc,{mih:r?220:130,p:`xl`,children:(0,M.jsxs)(uc,{wrap:`nowrap`,children:[(0,M.jsx)(cu,{variant:`light`,size:`xl`,radius:`md`,children:e}),(0,M.jsxs)(P,{children:[(0,M.jsx)(vc,{fw:700,size:`sm`,children:t}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,mt:3,children:n})]})]})})}function ad({left:e,right:t}){return(0,M.jsxs)(uc,{justify:`space-between`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,ta:`right`,children:t})]})}function od({label:e,value:t,color:n}){return(0,M.jsxs)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:[(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e}),(0,M.jsx)(vc,{fw:700,fz:`xl`,c:n,mt:3,children:t})]})}function sd(e,t=8){let[n,r]=(0,E.useState)(1),i=Math.max(1,Math.ceil(e.length/t));(0,E.useEffect)(()=>{n>i&&r(i)},[n,i]);let a=(n-1)*t;return{page:n,setPage:r,totalPages:i,pageItems:e.slice(a,a+t),from:e.length===0?0:a+1,to:Math.min(a+t,e.length),total:e.length}}var cd={first:`First page`,previous:`Previous page`,next:`Next page`,last:`Last page`};function ld({page:e,totalPages:t,from:n,to:r,total:i,onChange:a}){return t<=1?null:(0,M.jsxs)(uc,{justify:`space-between`,gap:`sm`,px:{base:`md`,sm:`lg`},py:`xs`,style:{borderTop:`1px solid var(--mantine-color-default-border)`},children:[(0,M.jsxs)(vc,{c:`dimmed`,size:`xs`,children:[n,`–`,r,` of `,i]}),(0,M.jsx)(il,{value:e,total:t,onChange:a,size:`xs`,withEdges:!0,"aria-label":`Table pages`,getItemProps:e=>({"aria-label":`Page ${e}`}),getControlProps:e=>({"aria-label":cd[e]})})]})}function ud(e,t){let n=Ru[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function dd(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}var fd=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function pd(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${pd(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function md(e){let[t,n]=e.split(`/`),r=new Date(t),i=new Date(n);if(Number.isNaN(r.valueOf())||Number.isNaN(i.valueOf()))return e;let a=Math.round((i.valueOf()-r.valueOf())/6e4);return a>=60&&a%60==0?`Last ${a/60}h`:`Last ${Math.max(a,1)}m`}function hd(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?hd(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}function gd(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?String(e):t.toLocaleString([],{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`})}var _d=c({BIGINT_FORMAT_RANGES:()=>Nf,CONSTANT_CATCH:()=>zf,Class:()=>Ff,NUMBER_FORMAT_RANGES:()=>Mf,aborted:()=>tf,allowsEval:()=>Of,assert:()=>Cd,assertEqual:()=>vd,assertIs:()=>xd,assertNever:()=>Sd,assertNotEqual:()=>yd,assignProp:()=>Md,attachSchema:()=>of,base64ToUint8Array:()=>pf,base64urlToUint8Array:()=>hf,cached:()=>Ed,captureStackTrace:()=>Df,cleanEnum:()=>ff,cleanRegex:()=>Od,clone:()=>Gd,cloneDef:()=>Pd,codePointLength:()=>lf,constantCatch:()=>Tf,createTransparentProxy:()=>Kd,defineLazy:()=>Ad,defineLazyInternal:()=>V,esc:()=>Rd,escapeRegex:()=>Wd,explicitlyAborted:()=>nf,extend:()=>Xd,finalizeIssue:()=>sf,floatSafeRemainder:()=>kd,getElementAtPath:()=>Fd,getEnumValues:()=>wd,getLengthableOrigin:()=>uf,getParsedType:()=>kf,getSizableOrigin:()=>cf,hexToUint8Array:()=>_f,hide:()=>xf,installLazyProp:()=>wf,isObject:()=>Bd,isPlainObject:()=>Vd,issue:()=>df,joinValues:()=>L,jsonStringifyReplacer:()=>Td,members:()=>yf,merge:()=>Qd,mergeDefs:()=>Nd,normalizeParams:()=>R,nullish:()=>Dd,numKeys:()=>Ud,objectClone:()=>jd,omit:()=>Yd,optionalKeys:()=>qd,own:()=>bf,parsedType:()=>B,partial:()=>$d,pick:()=>Jd,prefixIssues:()=>rf,primitiveTypes:()=>jf,promiseAllObject:()=>Id,propertyKeyTypes:()=>Af,randomString:()=>Ld,required:()=>ef,safeExtend:()=>Zd,shallowClone:()=>Hd,slugify:()=>zd,stringifyPrimitive:()=>z,toZod:()=>bd,uint8ArrayToBase64:()=>mf,uint8ArrayToBase64url:()=>gf,uint8ArrayToHex:()=>vf,unwrapMessage:()=>af});function vd(e){return e}function yd(e){return e}function bd(){return e=>e}function xd(e){}function Sd(e){throw Error(`Unexpected value in exhaustive check`)}function Cd(e){}function wd(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function L(e,t=`|`){return e.map(e=>z(e)).join(t)}function Td(e,t){return typeof t==`bigint`?t.toString():t}function Ed(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function Dd(e){return e==null}function Od(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function kd(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)e?.[t],e):e}function Id(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;rt};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function Kd(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function z(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function qd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}function Jd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return Gd(e,Nd(e._zod.def,{get shape(){let e={};for(let r of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,r))throw Error(`Unrecognized key: "${String(r)}"`);t[r]&&Md(e,r,n.shape[r])}return Md(this,`shape`,e),e},checks:[]}))}function Yd(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return Gd(e,Nd(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e of Reflect.ownKeys(t)){if(!Object.prototype.hasOwnProperty.call(n.shape,e))throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&delete r[e]}return Md(this,`shape`,r),r},checks:[]}))}function Xd(e,t){if(!Vd(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Gd(e,Nd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Md(this,`shape`,n),n}}))}function Zd(e,t){if(!Vd(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return Gd(e,Nd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return Md(this,`shape`,n),n}}))}function Qd(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return Gd(e,Nd(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return Md(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function $d(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);return Gd(t,Nd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(r,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t of Reflect.ownKeys(r))i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return Md(this,`shape`,i),i},checks:[]}))}function ef(e,t,n){return Gd(t,Nd(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t of Reflect.ownKeys(n)){if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Unrecognized key: "${String(t)}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t of Reflect.ownKeys(r))i[t]=new e({type:`nonoptional`,innerType:r[t]});return Md(this,`shape`,i),i}}))}function tf(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function af(e){return typeof e==`string`?e:e?.message}function of(e,t,n){var r;for(let i=t;iNumber.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function pf(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;ee.toString(16).padStart(2,`0`)).join(``)}function yf(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Sf(e,n,r.value)}}function bf(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function xf(e,t,n){return bf(e,t,n,!1)}function Sf(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:bf(this,t,n.bind(this))},set(e){bf(this,t,e)}})}function Cf(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}function V(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&If!==e._zod){If=void 0;return}If=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,Rf);let e=Lf;Lf=!1;try{let r=n(this);return Lf?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Lf||=e,r}catch(n){throw delete this[t],Lf||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function wf(e,t,n,r){let i=Cf(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}function Tf(e){let t=()=>e;return t[zf]=!0,t}var Ef,Df,Of,kf,Af,jf,Mf,Nf,Pf,Ff,If,Lf,Rf,zf,H=o((()=>{Xf(),Ef=Symbol(`evaluating`),Df=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{},Of=Ed(()=>{if(Yf.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}}),kf=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Af=new Set([`string`,`number`,`symbol`]),jf=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]),Mf={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Nf={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]},Pf=/[\uD800-\uDBFF]/,Ff=class{constructor(...e){}},Lf=!1,Rf={configurable:!0,get(){Lf=!0}},zf=`~constantCatch`}));function Bf(e){let t=Gf;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return Gf=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function U(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){Wf.value=new a(r);try{Object.defineProperty(n,"_zod",Wf)}finally{Wf.value=void 0}}if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),yf(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?Bf(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}function Vf(e){return e&&Object.assign(Yf,e),Yf}var Hf,Uf,Wf,Gf,Kf,qf,Jf,Yf,Xf=o((()=>{H(),Uf=Object.freeze({status:`aborted`}),Wf={value:void 0,enumerable:!1},Gf=`captureStackTrace`in Error?Error:null,Kf=Symbol(`zod_brand`),qf=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},Jf=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}},(Hf=globalThis).__zod_globalConfig??(Hf.__zod_globalConfig={}),Yf=globalThis.__zod_globalConfig}));function Zf(){let e=this._zod;return e.message??=JSON.stringify(e.def,Td,2),e.message}function Qf(e){this._zod.message=e}function $f(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function ep(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?$f(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function tp(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;ie.message){let n={errors:[]},r=(e,i=[])=>{var a;for(let o of e.issues)if(o.code===`invalid_union`&&o.errors.length)o.errors.map(e=>r({issues:e},[...i,...o.path]));else if(o.code===`invalid_key`)r({issues:o.issues},[...i,...o.path]);else if(o.code===`invalid_element`)r({issues:o.issues},[...i,...o.path]);else{let e=[...i,...o.path];if(e.length===0){n.errors.push(t(o));continue}let r=n,s=0;for(;stypeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function ip(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${rp(e.path)}`);return t.join(` +`)}var ap,op,sp,cp,lp,up,dp,fp=o((()=>{Xf(),H(),ap={get:Zf,set:Qf,enumerable:!0,configurable:!0},op={value:void 0,enumerable:!1},sp={value:void 0,enumerable:!1},cp=new WeakSet([Object.prototype,Error.prototype]),lp=(e,t)=>{e.name=`$ZodError`,op.value=e._zod,Object.defineProperty(e,"_zod",op),sp.value=t,Object.defineProperty(e,"issues",sp),op.value=void 0,sp.value=void 0,Object.defineProperty(e,"message",ap);let n=Object.getPrototypeOf(e);cp.has(n)||(cp.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},up=U(`$ZodError`,lp),dp=U(`$ZodError`,lp,void 0,{Parent:Error})}));function pp(e,t){return{callee:t?.callee??e,Err:t?.Err}}function mp(e,t,n){let r=n?{...n,async:!1}:{async:!1},i=e._zod.bag.fallbackRun,a;if(i?(r[wp]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new qf;return a.issues.length===0}var hp,gp,_p,vp,yp,bp,xp,Sp,Cp,wp,Tp,Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp,Up=o((()=>{Xf(),fp(),H(),hp=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new qf;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>sf(e,o,Vf())));throw Df(n,a?.callee??t),n}return s.value};return t},gp=hp(dp),_p=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>sf(e,o,Vf())));throw Df(n,a?.callee??t),n}return s.value};return t},vp=_p(dp),yp=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new qf;return a.issues.length?{success:!1,error:new(e??up)(a.issues.map(e=>sf(e,i,Vf())))}:{success:!0,data:a.value}},bp=yp(dp),xp=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>sf(e,i,Vf())))}:{success:!0,data:a.value}},Sp=xp(dp),Cp=Symbol.for(`zod.compile.invalid`),wp=Symbol.for(`zod.compile.fallback`),Tp=((e,t,n)=>{let r=e._zod.bag.validator;return r!==void 0&&r(t)!==Cp||mp(e,t,n)}),Ep=async(e,t,n)=>{let r=n?{...n,async:!0}:{async:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Dp=e=>{let t=hp(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,pp(n,a))};return n},Op=Dp(dp),kp=e=>{let t=hp(e),n=(e,r,i,a)=>t(e,r,i,pp(n,a));return n},Ap=kp(dp),jp=e=>{let t=_p(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,pp(n,a))};return n},Mp=jp(dp),Np=e=>{let t=_p(e),n=async(e,r,i,a)=>await t(e,r,i,pp(n,a));return n},Pp=Np(dp),Fp=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return yp(e)(t,n,i)},Ip=Fp(dp),Lp=e=>(t,n,r)=>yp(e)(t,n,r),Rp=Lp(dp),zp=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return xp(e)(t,n,i)},Bp=zp(dp),Vp=e=>async(t,n,r)=>xp(e)(t,n,r),Hp=Vp(dp)})),Wp=c({base64:()=>wm,base64url:()=>Tm,bigint:()=>Pm,boolean:()=>Lm,browserEmail:()=>_m,cidrv4:()=>Sm,cidrv6:()=>Cm,creditCard:()=>Am,cuid:()=>$p,cuid2:()=>em,date:()=>Mm,datetime:()=>Xp,domain:()=>Dm,duration:()=>am,e164:()=>km,email:()=>fm,emoji:()=>Kp,extendedDuration:()=>om,guid:()=>sm,hex:()=>Hm,hostname:()=>Em,html5Email:()=>pm,httpProtocol:()=>Om,idnEmail:()=>gm,integer:()=>Fm,ipv4:()=>ym,ipv6:()=>bm,ksuid:()=>rm,lowercase:()=>Bm,mac:()=>xm,md5_base64:()=>Wm,md5_base64url:()=>Gm,md5_hex:()=>Um,nanoid:()=>im,nanoidOfLength:()=>Gp,null:()=>Rm,number:()=>Im,rfc5322Email:()=>mm,sha1_base64:()=>qm,sha1_base64url:()=>Jm,sha1_hex:()=>Km,sha256_base64:()=>Xm,sha256_base64url:()=>Zm,sha256_hex:()=>Ym,sha384_base64:()=>$m,sha384_base64url:()=>eh,sha384_hex:()=>Qm,sha512_base64:()=>nh,sha512_base64url:()=>rh,sha512_hex:()=>th,string:()=>Nm,time:()=>Yp,ulid:()=>tm,undefined:()=>zm,unicodeEmail:()=>hm,uppercase:()=>Vm,uuid:()=>cm,uuid4:()=>lm,uuid6:()=>um,uuid7:()=>dm,xid:()=>nm});function Gp(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}function Kp(){return new RegExp(vm,`u`)}function qp(e){return RegExp(`^${e}$`)}function Jp(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yp(e){return RegExp(`^${Jp(e)}$`)}function Xp(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let n=`${Jp({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${Jp({precision:e.precision})}`:n;return RegExp(`^${jm}T(?:${r})$`)}function Zp(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Qp(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var $p,em,tm,nm,rm,im,am,om,sm,cm,lm,um,dm,fm,pm,mm,hm,gm,_m,vm,ym,bm,xm,Sm,Cm,wm,Tm,Em,Dm,Om,km,Am,jm,Mm,Nm,Pm,Fm,Im,Lm,Rm,zm,Bm,Vm,Hm,Um,Wm,Gm,Km,qm,Jm,Ym,Xm,Zm,Qm,$m,eh,th,nh,rh,ih=o((()=>{H(),$p=/^[cC][0-9a-z]{6,}$/,em=/^[0-9a-z]+$/,tm=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,nm=/^[0-9a-vA-V]{20}$/,rm=/^[A-Za-z0-9]{27}$/,im=/^[a-zA-Z0-9_-]{21}$/,am=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,om=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,sm=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,cm=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,lm=cm(4),um=cm(6),dm=cm(7),fm=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,pm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,mm=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,hm=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,gm=hm,_m=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,vm=`^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`,ym=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,xm=e=>{let t=Wd(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Sm=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Cm=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,wm=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Tm=/^[A-Za-z0-9_-]*$/,Em=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Dm=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Om=/^https?$/,km=/^\+[1-9]\d{6,14}$/,Am=/^\d(?:[ -]?\d){11,18}$/,jm=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,Mm=qp(jm),Nm=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},Pm=/^-?\d+n?$/,Fm=/^-?\d+$/,Im=/^-?\d+(?:\.\d+)?$/,Lm=/^(?:true|false)$/i,Rm=/^null$/i,zm=/^undefined$/i,Bm=/^[^A-Z]*$/,Vm=/^[^a-z]*$/,Hm=/^[0-9a-fA-F]*$/,Um=/^[0-9a-fA-F]{32}$/,Wm=Zp(22,`==`),Gm=Qp(22),Km=/^[0-9a-fA-F]{40}$/,qm=Zp(27,`=`),Jm=Qp(27),Ym=/^[0-9a-fA-F]{64}$/,Xm=Zp(43,`=`),Zm=Qp(43),Qm=/^[0-9a-fA-F]{96}$/,$m=Zp(64,``),eh=Qp(64),th=/^[0-9a-fA-F]{128}$/,nh=Zp(86,`==`),rh=Qp(86)}));function ah(e,t,n){e.issues.length&&t.issues.push(...rf(n,e.issues))}var oh,sh,ch,lh,uh,dh,fh,ph,mh,hh,gh,_h,vh,yh,bh,xh,Sh,Ch,wh,Th,Eh,Dh,Oh,kh,Ah,jh=o((()=>{Xf(),ih(),H(),oh=U(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),sh=e=>{let t=e.value;return!Dd(t)&&t.size!==void 0},ch=e=>{let t=e.value;return!Dd(t)&&t.length!==void 0},lh={number:`number`,bigint:`bigint`,object:`date`},uh=U(`$ZodCheckLessThan`,(e,t)=>{oh.init(e,t);let n=lh[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value{(t.inclusive?r.value<=t.value:r.value{oh.init(e,t);let n=lh[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:lh[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),fh=U(`$ZodCheckMultipleOf`,(e,t)=>{oh.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):kd(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ph=U(`$ZodCheckNumberFormat`,(e,t)=>{oh.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Mf[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=Fm)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}sa&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),mh=U(`$ZodCheckBigIntFormat`,(e,t)=>{oh.init(e,t);let[n,r]=Nf[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;ar&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),hh=U(`$ZodCheckMaxSize`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=sh),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value;r.size<=t.maximum||n.issues.push({origin:cf(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),gh=U(`$ZodCheckMinSize`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=sh),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:cf(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),_h=U(`$ZodCheckSizeEquals`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=sh),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:cf(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),vh=U(`$ZodCheckMaxLength`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=ch),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?lf(r):i)<=t.maximum)return;let a=uf(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),yh=U(`$ZodCheckMinLength`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=ch),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i=t.minimum)return;let a=uf(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),bh=U(`$ZodCheckLengthEquals`,(e,t)=>{var n;oh.init(e,t),(n=e._zod.def).when??(n.when=ch),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?lf(r):i;if(a===t.length)return;let o=uf(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),xh=U(`$ZodCheckStringFormat`,(e,t)=>{var n,r;oh.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Sh=U(`$ZodCheckRegex`,(e,t)=>{xh.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Ch=U(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Bm,xh.init(e,t)}),wh=U(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=Vm,xh.init(e,t)}),Th=U(`$ZodCheckIncludes`,(e,t)=>{oh.init(e,t);let n=Wd(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Eh=U(`$ZodCheckStartsWith`,(e,t)=>{oh.init(e,t);let n=RegExp(`^${Wd(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),Dh=U(`$ZodCheckEndsWith`,(e,t)=>{oh.init(e,t);let n=RegExp(`.*${Wd(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Oh=U(`$ZodCheckProperty`,(e,t)=>{oh.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>ah(n,e,t.property));ah(n,e,t.property)}}),kh=U(`$ZodCheckMimeType`,(e,t)=>{oh.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),Ah=U(`$ZodCheckOverwrite`,(e,t)=>{oh.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})})),Mh,Nh=o((()=>{Mh=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(` `).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\n${t.join(` -`)}\n};`)(...Object.values(this.closed))}}})),jh,Mh=o((()=>{jh={major:4,minor:5,patch:4}}));function Nh(e){return{validate:t=>{try{return mg(_p(e,t))}catch{return yp(e,t).then(mg)}},vendor:`zod`,version:1}}function Ph(e,t){if(!t.normalize&&t.protocol?.source===Tm.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Fh(e){return e.replace(bg,``)}function Ih(e,t){return t.lastIndex=0,t.test(e.hostname)}function Lh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Rh(e){if(!Pg.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function zh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Rh(n)}function Bh(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Vh(e){if(!Sm.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Bh(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Hh(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Uh(e){return Dm.test(e)?Hh(e.replace(Hg,``)):!1}function Wh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Gh(e,t,n){e.issues.length&&t.issues.push(...ef(n,e.issues)),t.value[n]=e.value}function Kh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...ef(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function qh(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:o_,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=Wd(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Jh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Kh(e,n,i,t,u,d))):Kh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Yh(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Qd(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>rf(e,r,Rf())))}),t)}function Xh(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>rf(e,r,Rf())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function Zh(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function Qh(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rd(e)&&Rd(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Qh(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Qh(t.value,n.value);if(!c.valid){if(Qd(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function eg(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function tg(e,t,n){e.issues.length&&t.issues.push(...ef(n,e.issues)),t.value[n]=e.value}function ng(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...ef(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function rg(e,t,n,r,i,a,o){e.issues.length&&(Df.has(typeof r)?n.issues.push(...ef(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>rf(e,o,Rf()))})),t.issues.length&&(Df.has(typeof r)?n.issues.push(...ef(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>rf(e,o,Rf()))})),n.value.set(e.value,t.value)}function ig(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function ag(e,t){return e.value=t.issues.length?void 0:t.value,e}function og(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function sg(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function cg(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>rf(e,r,Rf()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function lg(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function ug(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>dg(e,r,t.out,n)):dg(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>dg(e,r,t.in,n)):dg(e,r,t.in,n)}}function dg(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function fg(e){return e.memo||(e.value=Object.freeze(e.value)),e}function pg(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(cf(e))}}var W,mg,hg,gg,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_,E_,D_,O_,k_,A_,j_,M_,N_,P_,F_,I_,L_,R_,z_,B_=o((()=>{Oh(),qf(),Ah(),Bp(),th(),H(),Mh(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=jh;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Qd(t),a;for(let o of n){if(o._zod.def.when){if($d(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new Wf;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(nf(t.issues,n,e),i||=Qd(t,n))});else{if(t.issues.length===n)continue;nf(t.issues,n,e),i||=Qd(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Qd(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new Wf;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new Wf;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return vf(this,`~standard`,Nh(this))},set"~standard"(e){_f(this,`~standard`,e)}}),mg=e=>e.success?{value:e.data}:{issues:e.error?.issues},hg=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Am(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),gg=U(`$ZodStringFormat`,(e,t)=>{vh.init(e,t),hg.init(e,t)}),_g=U(`$ZodGUID`,(e,t)=>{t.pattern??=im,gg.init(e,t)}),vg=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=am(e)}else t.pattern??=am();gg.init(e,t)}),yg=U(`$ZodEmail`,(e,t)=>{t.pattern??=lm,gg.init(e,t)}),bg=/[\t\n\r]/g,xg=U(`$ZodURL`,(e,t)=>{gg.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Ph(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!Ih(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Lh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Fh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Sg=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Up(),gg.init(e,t)}),Cg=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?tm:Hp(t.length),gg.init(e,t)}),wg=U(`$ZodCUID`,(e,t)=>{t.pattern??=Xp,gg.init(e,t)}),Tg=U(`$ZodCUID2`,(e,t)=>{t.pattern??=Zp,gg.init(e,t)}),Eg=U(`$ZodULID`,(e,t)=>{t.pattern??=Qp,gg.init(e,t)}),Dg=U(`$ZodXID`,(e,t)=>{t.pattern??=$p,gg.init(e,t)}),Og=U(`$ZodKSUID`,(e,t)=>{t.pattern??=em,gg.init(e,t)}),kg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=qp(t),gg.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Ag=U(`$ZodISODate`,(e,t)=>{t.pattern??=km,gg.init(e,t)}),jg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Kp(t),gg.init(e,t)}),Mg=U(`$ZodISODuration`,(e,t)=>{t.pattern??=nm,gg.init(e,t)}),Ng=U(`$ZodIPv4`,(e,t)=>{t.pattern??=gm,gg.init(e,t),e._zod.bag.format=`ipv4`}),Pg=/^[0-9a-fA-F:.]+$/,Fg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=_m,gg.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Rh(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),Ig=U(`$ZodMAC`,(e,t)=>{t.pattern??=vm(t.delimiter),gg.init(e,t),e._zod.bag.format=`mac`}),Lg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=ym,gg.init(e,t)}),Rg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=bm,gg.init(e,t),e._zod.check=n=>{zh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),zg=U(`$ZodBase64`,(e,t)=>{t.pattern??=xm,gg.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Bh(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Bg=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Sm,gg.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Vh(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Vg=U(`$ZodE164`,(e,t)=>{t.pattern??=Em,gg.init(e,t)}),Hg=/[- ]/g,Ug=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=Dm,gg.init(e,t),e._zod.check=n=>{Uh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),Wg=U(`$ZodJWT`,(e,t)=>{gg.init(e,t),e._zod.check=n=>{Wh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Gg=U(`$ZodCustomStringFormat`,(e,t)=>{gg.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Kg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??Nm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),qg=U(`$ZodNumberFormat`,(e,t)=>{uh.init(e,t),Kg.init(e,t)}),Jg=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=Pm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Yg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=jm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),Xg=U(`$ZodBigIntFormat`,(e,t)=>{dh.init(e,t),Yg.init(e,t)}),Zg=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),Qg=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=Im,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),$g=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=Fm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),e_=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),t_=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),n_=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),r_=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),i_=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),a_=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=Kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eGh(t,r,e))):Gh(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),o_=[],s_=new WeakMap,c_=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;s_.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),s_.set(t,n),n}})}let n=Cd(()=>qh(t));V(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||kd(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=Ld,i=t.catchall,a,o=Kf.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Kh(n,t,e,c,r,i))):Kh(a,t,e,c,r,i)}return i?Jh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),l_=U(`$ZodObjectJIT`,(e,t)=>{c_.init(e,t);let n=e._zod.parse,r=Cd(()=>qh(t)),i=Kf.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new kh([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` +`)}\n};`)(...Object.values(this.closed))}}})),Ph,Fh=o((()=>{Ph={major:4,minor:5,patch:4}}));function Ih(e){return{validate:t=>{try{return _g(bp(e,t))}catch{return Sp(e,t).then(_g)}},vendor:`zod`,version:1}}function Lh(e,t){if(!t.normalize&&t.protocol?.source===Om.source&&!/^https?:\/\//i.test(e))return 1;try{return new URL(e)}catch{return 2}}function Rh(e){return e.replace(Cg,``)}function zh(e,t){return t.lastIndex=0,t.test(e.hostname)}function Bh(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}function Vh(e){if(!Lg.test(e))return!1;try{return new URL(`http://[${e}]`),!0}catch{return!1}}function Hh(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Vh(n)}function Uh(e){if(e===``)return!0;if(/\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}function Wh(e){if(!Tm.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Uh(t.padEnd(Math.ceil(t.length/4)*4,`=`))}function Gh(e){let t=e.length,n=1,r=0;for(;t;){let i=+e[--t];n^=1,r+=n?[0,2,4,6,8,1,3,5,7,9][i]:i}return r%10==0}function Kh(e){return Am.test(e)?Gh(e.replace(Gg,``)):!1}function qh(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}function Jh(e,t,n){e.issues.length&&t.issues.push(...rf(n,e.issues)),t.value[n]=e.value}function Yh(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(o||!s||i!==`optional`){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...rf(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?o&&(t.value[n]=void 0):t.value[n]=e.value}}function Xh(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:l_,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=qd(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Zh(e,t,n,r,i,a){let o=[],s=i.keySet,c=i.catchall._zod,l=c.def.type,u=c.optin,d=c.optout;for(let i in t){if(s.has(i))continue;if(i===`__proto__`){l===`never`&&o.push(i);continue}if(l===`never`){o.push(i);continue}let a=c.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Yh(e,n,i,t,u,d))):Yh(a,n,i,t,u,d)}return o.length&&n.issues.push({code:`unrecognized_keys`,keys:o,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}function Qh(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!tf(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>sf(e,r,Vf())))}),t)}function $h(e,t,n,r){let i=[];for(let t=0;te.issues.map(e=>sf(e,r,Vf())))}):t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:[],inclusive:!1,matches:i}),t)}function eg(e,t){let n=e._zod,r=n.bag.optionsMap;if(!r){r=new Map;let{options:e,discriminator:t}=n.def;for(let n of e)for(let e of n._zod.propValues?.[t]??[])r.has(e)||r.set(e,n);n.bag.optionsMap=r}return r.get(t)}function tg(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Vd(e)&&Vd(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=tg(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=tg(t.value,n.value);if(!c.valid){if(tf(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}function rg(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function ig(e,t,n){e.issues.length&&t.issues.push(...rf(n,e.issues)),t.value[n]=e.value}function ag(e,t,n,r,i){for(let a=0;a=i&&n[a]._zod.optin===`optional`){t.value.length=a;break}if(o.issues.length){if(!s&&a>=i){t.value.length=a;break}t.issues.push(...rf(a,o.issues))}t.value[a]=o.value}for(let e=t.value.length-1;e>=r.length&&n[e]._zod.optout===`optional`&&t.value[e]===void 0;e--)t.value.length=e;return t}function og(e,t,n,r,i,a,o){e.issues.length&&(Af.has(typeof r)?n.issues.push(...rf(r,e.issues)):n.issues.push({code:`invalid_key`,origin:`map`,input:i,inst:a,issues:e.issues.map(e=>sf(e,o,Vf()))})),t.issues.length&&(Af.has(typeof r)?n.issues.push(...rf(r,t.issues)):n.issues.push({origin:`map`,code:`invalid_element`,input:i,inst:a,key:r,issues:t.issues.map(e=>sf(e,o,Vf()))})),n.value.set(e.value,t.value)}function sg(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}function cg(e,t){return e.value=t.issues.length?void 0:t.value,e}function lg(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}function ug(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function dg(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>sf(e,r,Vf()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}function fg(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}function pg(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||`forward`)===`forward`){let r=t.transform(e.value,e);return r instanceof Promise?r.then(r=>mg(e,r,t.out,n)):mg(e,r,t.out,n)}{let r=t.reverseTransform(e.value,e);return r instanceof Promise?r.then(r=>mg(e,r,t.in,n)):mg(e,r,t.in,n)}}function mg(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}function hg(e){return e.memo||(e.value=Object.freeze(e.value)),e}function gg(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(df(e))}}var W,_g,vg,yg,bg,xg,Sg,Cg,wg,Tg,Eg,Dg,Og,kg,Ag,jg,Mg,Ng,Pg,Fg,Ig,Lg,Rg,zg,Bg,Vg,Hg,Ug,Wg,Gg,Kg,qg,Jg,Yg,Xg,Zg,Qg,$g,e_,t_,n_,r_,i_,a_,o_,s_,c_,l_,u_,d_,f_,p_,m_,h_,g_,__,v_,y_,b_,x_,S_,C_,w_,T_,E_,D_,O_,k_,A_,j_,M_,N_,P_,F_,I_,L_,R_,z_,B_,V_,H_,U_=o((()=>{jh(),Xf(),Nh(),Up(),ih(),H(),Fh(),W=U(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Ph;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=tf(t),a;for(let o of n){if(o._zod.def.when){if(nf(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new qf;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(of(t.issues,n,e),i||=tf(t,n))});else{if(t.issues.length===n)continue;of(t.issues,n,e),i||=tf(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(tf(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new qf;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new qf;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return xf(this,`~standard`,Ih(this))},set"~standard"(e){bf(this,`~standard`,e)}}),_g=e=>e.success?{value:e.data}:{issues:e.error?.issues},vg=U(`$ZodString`,(e,t)=>{W.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Nm(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value==`string`||n.issues.push({expected:`string`,code:`invalid_type`,input:n.value,inst:e}),n}}),yg=U(`$ZodStringFormat`,(e,t)=>{xh.init(e,t),vg.init(e,t)}),bg=U(`$ZodGUID`,(e,t)=>{t.pattern??=sm,yg.init(e,t)}),xg=U(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=cm(e)}else t.pattern??=cm();yg.init(e,t)}),Sg=U(`$ZodEmail`,(e,t)=>{t.pattern??=fm,yg.init(e,t)}),Cg=/[\t\n\r]/g,wg=U(`$ZodURL`,(e,t)=>{yg.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Lh(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}t.hostname&&!zh(i,t.hostname)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid hostname`,pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort}),t.protocol&&!Bh(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Rh(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Tg=U(`$ZodEmoji`,(e,t)=>{t.pattern??=Kp(),yg.init(e,t)}),Eg=U(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?im:Gp(t.length),yg.init(e,t)}),Dg=U(`$ZodCUID`,(e,t)=>{t.pattern??=$p,yg.init(e,t)}),Og=U(`$ZodCUID2`,(e,t)=>{t.pattern??=em,yg.init(e,t)}),kg=U(`$ZodULID`,(e,t)=>{t.pattern??=tm,yg.init(e,t)}),Ag=U(`$ZodXID`,(e,t)=>{t.pattern??=nm,yg.init(e,t)}),jg=U(`$ZodKSUID`,(e,t)=>{t.pattern??=rm,yg.init(e,t)}),Mg=U(`$ZodISODateTime`,(e,t)=>{t.pattern??=Xp(t),yg.init(e,t),(t.local||t.precision===-1)&&(e._zod.bag.laxFormat=!0,e._zod.onattach.push(e=>{e._zod.bag.laxFormat=!0}))}),Ng=U(`$ZodISODate`,(e,t)=>{t.pattern??=Mm,yg.init(e,t)}),Pg=U(`$ZodISOTime`,(e,t)=>{t.pattern??=Yp(t),yg.init(e,t)}),Fg=U(`$ZodISODuration`,(e,t)=>{t.pattern??=am,yg.init(e,t)}),Ig=U(`$ZodIPv4`,(e,t)=>{t.pattern??=ym,yg.init(e,t),e._zod.bag.format=`ipv4`}),Lg=/^[0-9a-fA-F:.]+$/,Rg=U(`$ZodIPv6`,(e,t)=>{t.pattern??=bm,yg.init(e,t),e._zod.bag.format=`ipv6`,e._zod.check=n=>{Vh(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),zg=U(`$ZodMAC`,(e,t)=>{t.pattern??=xm(t.delimiter),yg.init(e,t),e._zod.bag.format=`mac`}),Bg=U(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Sm,yg.init(e,t)}),Vg=U(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Cm,yg.init(e,t),e._zod.check=n=>{Hh(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}}),Hg=U(`$ZodBase64`,(e,t)=>{t.pattern??=wm,yg.init(e,t),e._zod.bag.contentEncoding=`base64`,e._zod.check=n=>{Uh(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Ug=U(`$ZodBase64URL`,(e,t)=>{t.pattern??=Tm,yg.init(e,t),e._zod.bag.contentEncoding=`base64url`,e._zod.check=n=>{Wh(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Wg=U(`$ZodE164`,(e,t)=>{t.pattern??=km,yg.init(e,t)}),Gg=/[- ]/g,Kg=U(`$ZodCreditCard`,(e,t)=>{t.pattern??=Am,yg.init(e,t),e._zod.check=n=>{Kh(n.value)||n.issues.push({code:`invalid_format`,format:`credit_card`,input:n.value,inst:e,continue:!t.abort})}}),qg=U(`$ZodJWT`,(e,t)=>{yg.init(e,t),e._zod.check=n=>{qh(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Jg=U(`$ZodCustomStringFormat`,(e,t)=>{yg.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:`invalid_format`,format:t.format,input:n.value,inst:e,continue:!t.abort})}}),Yg=U(`$ZodNumber`,(e,t)=>{W.init(e,t),e._zod.pattern=e._zod.bag.pattern??Im,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Xg=U(`$ZodNumberFormat`,(e,t)=>{ph.init(e,t),Yg.init(e,t)}),Zg=U(`$ZodBoolean`,(e,t)=>{W.init(e,t),e._zod.pattern=Lm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Qg=U(`$ZodBigInt`,(e,t)=>{W.init(e,t),e._zod.pattern=Pm,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value==`bigint`||n.issues.push({expected:`bigint`,code:`invalid_type`,input:n.value,inst:e}),n}}),$g=U(`$ZodBigIntFormat`,(e,t)=>{mh.init(e,t),Qg.init(e,t)}),e_=U(`$ZodSymbol`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return typeof r==`symbol`||t.issues.push({expected:`symbol`,code:`invalid_type`,input:r,inst:e}),t}}),t_=U(`$ZodUndefined`,(e,t)=>{W.init(e,t),e._zod.pattern=zm,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),n_=U(`$ZodNull`,(e,t)=>{W.init(e,t),e._zod.pattern=Rm,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),r_=U(`$ZodAny`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),i_=U(`$ZodUnknown`,(e,t)=>{W.init(e,t),e._zod.parse=e=>e}),a_=U(`$ZodNever`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)}),o_=U(`$ZodVoid`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`void`,code:`invalid_type`,input:r,inst:e}),t}}),s_=U(`$ZodDate`,(e,t)=>{W.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,a=i instanceof Date;return a&&!Number.isNaN(i.getTime())||n.issues.push({expected:`date`,code:`invalid_type`,input:i,...a?{received:`Invalid Date`}:{},inst:e}),n}}),c_=U(`$ZodArray`,(e,t)=>{W.init(e,t);let n=Yf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[];for(let e=0;eJh(t,r,e))):Jh(s,r,e)}return o.length?Promise.all(o).then(()=>r):r}}),l_=[],u_=new WeakMap,d_=U(`$ZodObject`,(e,t)=>{if(W.init(e,t),!Object.getOwnPropertyDescriptor(t,`shape`)?.get){let e=t.shape;u_.set(t,e),Object.defineProperty(t,"shape",{get:()=>{let n={...e};return Object.defineProperty(t,"shape",{value:n}),u_.set(t,n),n}})}let n=Ed(()=>Xh(t));V(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||Md(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let r=Bd,i=t.catchall,a,o=Yf.memoizer;o?.attach(e),e._zod.parse=(t,s)=>{a??=n.value;let c=t.value;if(!r(c))return t.issues.push({expected:`object`,code:`invalid_type`,input:c,inst:e}),t;t.value=o?o.alloc(e,t,{},s):{};let l=[],u=a.shape;for(let e of a.allKeys){if(e===`__proto__`)continue;let n=u[e],r=n._zod.optin,i=n._zod.optout,a=n._zod.run({value:c[e],issues:[]},s);a instanceof Promise?l.push(a.then(n=>Yh(n,t,e,c,r,i))):Yh(a,t,e,c,r,i)}return i?Zh(l,c,t,s,n.value,e):l.length?Promise.all(l).then(()=>t):t}}),f_=U(`$ZodObjectJIT`,(e,t)=>{d_.init(e,t);let n=e._zod.parse,r=Ed(()=>Xh(t)),i=Yf.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Mh([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>` for (let i = 0; i < ${e}.issues.length; i++) { const iss = ${e}.issues[i]; iss.path = iss.path ? [${t}, ...iss.path] : [${t}]; payload.issues.push(iss); - }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Fd(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` + }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:Rd(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(` const ${n}_present = ${i}; if (!${n}.issues.length || ${n}_present) { if (${n}.issues.length) {${c(n,r)} @@ -54,16 +54,16 @@ newResult[${r}] = ${n}.value; } - `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Ld,c=!Kf.jitless,l=c&&Tf.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Jh([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),u_=U(`$ZodUnion`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),V(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),V(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Td(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Yh(t,r,e,i)):Yh(o,r,e,i)}}),d_=U(`$ZodXor`,(e,t)=>{u_.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>Xh(t,r,e,i)):Xh(o,r,e,i)}}),f_=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,u_.init(e,t);let n=e._zod.parse;V(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||kd(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=s_.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Cd(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Ld(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),p_=U(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>$h(e,t,n)):$h(e,i,a)}}),m_=U(`$ZodTuple`,(e,t)=>{W.init(e,t);let n=t.items,r=Kf.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=eg(n,`optin`),l=eg(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>tg(t,i,e))):tg(r,i,e)}}return s.length?Promise.all(s).then(()=>ng(u,i,n,o,l)):ng(u,i,n,o,l)}}),h_=U(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=Kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Rd(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>rf(e,i,Rf())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...ef(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...ef(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Nm.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>rf(e,i,Rf())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...ef(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...ef(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),g_=U(`$ZodMap`,(e,t)=>{W.init(e,t);let n=Kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{rg(t,o,r,n,a,e,i)})):rg(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),__=U(`$ZodSet`,(e,t)=>{W.init(e,t);let n=Kf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>ig(e,r))):ig(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),v_=U(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=xd(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>Df.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>Vd(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),y_=U(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?Vd(e):e?Vd(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),b_=U(`$ZodFile`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),x_=U(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,Kf.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gf(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new Wf;return n.value=i,n}}),S_=U(`$ZodOptional`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Td(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>ag(e,t)):ag(e,r)}return t.innerType._zod.run(e,n)}}),C_=U(`$ZodExactOptional`,(e,t)=>{S_.init(e,t),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),w_=U(`$ZodNullable`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Td(t.source)}|null)$`):void 0}),V(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),T_=U(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>og(e,t)):og(r,t)}}),E_=U(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),D_=U(`$ZodNonOptional`,(e,t)=>{W.init(e,t),V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>sg(t,e)):sg(i,e)}}),O_=U(`$ZodSuccess`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Gf(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),k_=U(`$ZodCatch`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>cg(e,r,t,n)):cg(e,r,t,n)}}),A_=U(`$ZodNaN`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),j_=U(`$ZodPipe`,(e,t)=>{W.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>lg(e,t.in,n)):lg(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>lg(e,t.out,n)):lg(r,t.out,n)}}),M_=U(`$ZodCodec`,(e,t)=>{W.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ug(e,t,n)):ug(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ug(e,t,n)):ug(r,t,n)}}}),N_=U(`$ZodPreprocess`,(e,t)=>{j_.init(e,t)}),P_=U(`$ZodReadonly`,(e,t)=>{W.init(e,t),V(e,`propValues`,e=>e.def.innerType._zod.propValues),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`optin`,e=>e.def.innerType?._zod?.optin),V(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(fg):fg(r)}}),F_=U(`$ZodTemplateLiteral`,(e,t)=>{W.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||Of.has(typeof e))n.push(Vd(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),I_=U(`$ZodFunction`,(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?pp(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?pp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await hp(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await hp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new m_({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),L_=U(`$ZodPromise`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),R_=U(`$ZodLazy`,(e,t)=>{W.init(e,t),Dd(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),V(e,`pattern`,e=>e.innerType?._zod?.pattern),V(e,`propValues`,e=>e.innerType?._zod?.propValues),V(e,`optin`,e=>e.innerType?._zod?.optin??void 0),V(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),z_=U(`$ZodCustom`,(e,t)=>{rh.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>pg(t,n,r,e));pg(i,n,r,e)}})}));function V_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function H_(e,t){let n=X_.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&H_(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),X_.set(e,r),r}function U_(e){return H_(e,new Set)}function W_(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function G_(){return $_}function K_(e,t){let n=e[J_]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var q_,J_,Y_,X_,Z_,Q_,$_,ev=o((()=>{q_=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},J_=`~memo`,Y_=[],X_=new WeakMap,Q_=[],$_={alloc(e,t,n){let r=Z_;if(!r)return n;Z_=void 0;let i={value:n,issues:null};return r.set(t.value,i),Q_.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&K_(n,e.value))throw new q_;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=H_(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[J_];l||(l={buckets:new Map,backEdges:void 0},s[J_]=l);let u;r===s?u=i:(u=W_(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...V_(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;Z_=u;let f=Q_.length,p=t(o,s);Z_=void 0;let m=Q_.length>f?Q_.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?V_(e.issues):Y_),e)):(m&&(m.issues=p.issues.length?V_(p.issues):Y_),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function tv(){return{localeError:nv()}}var nv,rv=o((()=>{H(),nv=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${z(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${L(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function iv(){return{localeError:av()}}var av,ov=o((()=>{H(),av=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${z(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function sv(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function cv(){return{localeError:lv()}}var lv,uv=o((()=>{H(),lv=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${z(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=sv(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=sv(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function dv(){return{localeError:fv()}}var fv,pv=o((()=>{H(),fv=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${z(e.values[0])}`:`Невалидна опция: очаквано едно от ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function mv(){return{localeError:hv()}}var hv,gv=o((()=>{H(),hv=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${z(e.values[0])}`:`অবৈধ অপশন: ${L(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function _v(){return{localeError:vv()}}var vv,yv=o((()=>{H(),vv=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${z(e.values[0])}`:`Opció invàlida: s'esperava una de ${L(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function bv(){return{localeError:xv()}}var xv,Sv=o((()=>{H(),xv=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${z(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${L(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${L(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function Cv(){return{localeError:wv()}}var wv,Tv=o((()=>{H(),wv=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${z(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Ev(){return{localeError:Dv()}}var Dv,Ov=o((()=>{H(),Dv=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${z(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function kv(){return{localeError:Av()}}var Av,jv=o((()=>{H(),Av=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${z(e.values[0])}`:`Ungültige Option: erwartet eine von ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function Mv(){return{localeError:Nv()}}var Nv,Pv=o((()=>{H(),Nv=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${z(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function Fv(){return{localeError:Iv()}}var Iv,Lv=o((()=>{H(),Iv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(B(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${z(e.values[0])}`:`Invalid option: expected one of ${L(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function Rv(){return{localeError:zv()}}var zv,Bv=o((()=>{H(),zv=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${z(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function Vv(){return{localeError:Hv()}}var Hv,Uv=o((()=>{H(),Hv=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${z(e.values[0])}`:`Opción inválida: se esperaba una de ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function Wv(){return{localeError:Gv()}}var Gv,Kv=o((()=>{H(),Gv=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${z(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${L(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${L(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function qv(){return{localeError:Jv()}}var Jv,Yv=o((()=>{H(),Jv=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${z(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function Xv(){return{localeError:Zv()}}var Zv,Qv=o((()=>{H(),Zv=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${z(e.values[0])} attendu`:`Option invalide : une valeur parmi ${L(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${L(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function $v(){return{localeError:ey()}}var ey,ty=o((()=>{H(),ey=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${z(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${L(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function ny(){return{localeError:ry()}}var ry,iy=o((()=>{H(),ry=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${z(e.values[0])}`:`અમાન્ય વિકલ્પ: ${L(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function ay(){return{localeError:oy()}}var oy,sy=o((()=>{H(),oy=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=B(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${z(t.values[0])}`;let e=t.values.map(e=>z(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${L(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function cy(){return{localeError:ly()}}var ly,uy=o((()=>{H(),ly=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${z(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function dy(){return{localeError:fy()}}var fy,py=o((()=>{H(),fy=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${z(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function my(){return{localeError:hy()}}var hy,gy=o((()=>{H(),hy=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${z(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function _y(e,t,n){return Math.abs(e)===1?t:n}function vy(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function yy(){return{localeError:by()}}var by,xy=o((()=>{H(),by=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${z(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=_y(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${vy(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${vy(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=_y(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${vy(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${vy(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${L(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${vy(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${vy(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function Sy(){return{localeError:Cy()}}var Cy,wy=o((()=>{H(),Cy=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${z(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function Ty(){return{localeError:Ey()}}var Ey,Dy=o((()=>{H(),Ey=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${z(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function Oy(){return{localeError:ky()}}var ky,Ay=o((()=>{H(),ky=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${z(e.values[0])}`:`Opzione non valida: atteso uno tra ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function jy(){return{localeError:My()}}var My,Ny=o((()=>{H(),My=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${z(e.values[0])}が期待されました`:`無効な選択: ${L(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${L(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function Py(){return{localeError:Fy()}}var Fy,Iy=o((()=>{H(),Fy=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${z(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${L(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function Ly(){return{localeError:Ry()}}var Ry,zy=o((()=>{H(),Ry=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${L(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function By(){return Ly()}var Vy=o((()=>{zy()}));function Hy(){return{localeError:Uy()}}var Uy,Wy=o((()=>{H(),Uy=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${z(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function Gy(){return{localeError:Ky()}}var Ky,qy=o((()=>{H(),Ky=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${z(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${L(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${L(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function Jy(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function Yy(){return{localeError:Zy()}}var Xy,Zy,Qy=o((()=>{H(),Xy=e=>e.charAt(0).toUpperCase()+e.slice(1),Zy=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${z(e.values[0])}`:`Privalo būti vienas iš ${L(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,Jy(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${Xy(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${Xy(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,Jy(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${Xy(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${Xy(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${Xy(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function $y(){return{localeError:eb()}}var eb,tb=o((()=>{H(),eb=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${z(e.values[0])}`:`Грешана опција: се очекува една ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function nb(){return{localeError:rb()}}var rb,ib=o((()=>{H(),rb=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${z(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${L(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function ab(){return{localeError:ob()}}var ob,sb=o((()=>{H(),ob=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${z(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function cb(){return{localeError:lb()}}var lb,ub=o((()=>{H(),lb=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${z(e.values[0])}`:`Ongeldige optie: verwacht één van ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function db(){return{localeError:fb()}}var fb,pb=o((()=>{H(),fb=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${z(e.values[0])}`:`Ugyldig val: forventa eitt av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function mb(){return{localeError:hb()}}var hb,gb=o((()=>{H(),hb=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${z(e.values[0])}`:`Ugyldig valg: forventet en av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function _b(){return{localeError:vb()}}var vb,yb=o((()=>{H(),vb=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${z(e.values[0])}`:`Fâsit tercih: mûteberler ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function bb(){return{localeError:xb()}}var xb,Sb=o((()=>{H(),xb=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${z(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${L(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function Cb(){return{localeError:wb()}}var wb,Tb=o((()=>{H(),wb=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${z(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function Eb(){return{localeError:Db()}}var Db,Ob=o((()=>{H(),Db=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(B(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${z(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${L(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function kb(){return{localeError:Ab()}}var Ab,jb=o((()=>{H(),Ab=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(B(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${z(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${L(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function Mb(){return{localeError:Nb()}}var Nb,Pb=o((()=>{H(),Nb=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${z(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${L(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function Fb(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function Ib(){return{localeError:Lb()}}var Lb,Rb=o((()=>{H(),Lb=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${z(e.values[0])}`:`Неверный вариант: ожидалось одно из ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Fb(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Fb(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function zb(){return{localeError:Bb()}}var Bb,Vb=o((()=>{H(),Bb=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${z(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Hb(){return{localeError:Ub()}}var Ub,Wb=o((()=>{H(),Ub=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${z(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Gb(){return{localeError:Kb()}}var Kb,qb=o((()=>{H(),Kb=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${z(e.values[0])}`:`Ogiltigt val: förväntade en av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Jb(){return{localeError:Yb()}}var Yb,Xb=o((()=>{H(),Yb=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${L(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function Zb(){return{localeError:Qb()}}var Qb,$b=o((()=>{H(),Qb=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${z(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${L(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function ex(){return{localeError:tx()}}var tx,nx=o((()=>{H(),tx=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${z(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function rx(){return{localeError:ix()}}var ix,ax=o((()=>{H(),ix=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${z(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function ox(){return{localeError:sx()}}var sx,cx=o((()=>{H(),sx=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${z(e.values[0])}`:`Неправильна опція: очікується одне з ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function lx(){return ox()}var ux=o((()=>{cx()}));function dx(){return{localeError:fx()}}var fx,px=o((()=>{H(),fx=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${z(e.values[0])} متوقع تھا`:`غلط آپشن: ${L(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${L(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function mx(){return{localeError:hx()}}var hx,gx=o((()=>{H(),hx=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${z(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function _x(){return{localeError:vx()}}var vx,yx=o((()=>{H(),vx=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${z(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${L(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function bx(){return{localeError:xx()}}var xx,Sx=o((()=>{H(),xx=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${z(e.values[0])}`:`无效选项:期望以下之一 ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function Cx(){return{localeError:wx()}}var wx,Tx=o((()=>{H(),wx=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${z(e.values[0])}`:`無效的選項:預期為以下其中之一 ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${L(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function Ex(){return{localeError:Dx()}}var Dx,Ox=o((()=>{H(),Dx=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${z(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${L(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),kx=c({ar:()=>tv,az:()=>iv,be:()=>cv,bg:()=>dv,bn:()=>mv,ca:()=>_v,ckb:()=>bv,cs:()=>Cv,da:()=>Ev,de:()=>kv,el:()=>Mv,en:()=>Fv,eo:()=>Rv,es:()=>Vv,fa:()=>Wv,fi:()=>qv,fr:()=>Xv,frCA:()=>$v,gu:()=>ny,he:()=>ay,hi:()=>cy,hr:()=>dy,hu:()=>my,hy:()=>yy,id:()=>Sy,is:()=>Ty,it:()=>Oy,ja:()=>jy,ka:()=>Py,kh:()=>By,km:()=>Ly,kn:()=>Hy,ko:()=>Gy,lt:()=>Yy,mk:()=>$y,ms:()=>nb,ne:()=>ab,nl:()=>cb,nn:()=>db,no:()=>mb,ota:()=>_b,pl:()=>Cb,ps:()=>bb,pt:()=>Eb,ptBR:()=>kb,ro:()=>Mb,ru:()=>Ib,sk:()=>zb,sl:()=>Hb,sv:()=>Gb,ta:()=>Jb,th:()=>Zb,tk:()=>ex,tr:()=>rx,ua:()=>lx,uk:()=>ox,ur:()=>dx,uz:()=>mx,vi:()=>_x,yo:()=>Ex,zhCN:()=>bx,zhTW:()=>Cx}),Ax=o((()=>{rv(),ov(),uv(),pv(),gv(),yv(),Sv(),Tv(),Ov(),jv(),Pv(),Lv(),Bv(),Uv(),Kv(),Yv(),Qv(),ty(),iy(),sy(),uy(),py(),gy(),xy(),wy(),Dy(),Ay(),Ny(),Iy(),Vy(),zy(),Wy(),qy(),Qy(),tb(),ib(),sb(),ub(),pb(),gb(),yb(),Sb(),Tb(),Ob(),jb(),Pb(),Rb(),Vb(),Wb(),qb(),Xb(),$b(),nx(),ax(),ux(),cx(),px(),gx(),yx(),Sx(),Tx(),Ox()}));function jx(){return new Fx}var Mx,Nx,Px,Fx,Ix,Lx=o((()=>{Nx=Symbol(`ZodOutput`),Px=Symbol(`ZodInput`),Fx=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(Mx=globalThis).__zod_globalRegistry??(Mx.__zod_globalRegistry=jx()),Ix=globalThis.__zod_globalRegistry}));function Rx(e,t){try{return Vx(e,{assertOnly:!0})}catch{return t}}function zx(e,t){try{let t=Vx(e),n=Hd(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[QS]||n&&K_(n,e.value))return i(e,n);let r=t(e.value);return r===ZS?(n&&(n[QS]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=Rx(e,t),n._zod.run=a,r.__originalRun||Bx(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function Bx(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===ZS?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===ZS?e(t,r):i}}}function Vx(e,t){let n=!0;try{n=U_(e)}catch{}if(n)throw new eC(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new kh([`input`]),a=sS(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[ZS,...r.constants.values()],c=i.content.join(` -`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new eC(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function G(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function K(e){return`v${e.varCounter++}`}function Hx(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return ZS;let r=n;return r.issues.length===0?r.value:ZS}function Ux(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return sS(e,t,n,r,i)}catch(i){if(!(i instanceof eC)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,Wx(e,t,n,r)}}function Wx(e,t,n,r){let i=G(t,n),a=G(t,Hx),o=K(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function Gx(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!tC.has(r.check))throw new eC(`check with a custom "when" condition`);switch(r.check){case`greater_than`:Yx(e,t,r,a);break;case`less_than`:Xx(e,t,r,a);break;case`multiple_of`:Zx(e,t,r,a);break;case`number_format`:Qx(e,r,a);break;case`min_length`:{let n=qx(r.minimum,`min_length`),i=Kx(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=qx(r.maximum,`max_length`),i=Kx(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=qx(r.length,`length_equals`),i=Kx(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${qx(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${qx(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${qx(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=oS(e,t,r,a);break;case`custom`:a=aS(e,t,n,a);break;case`bigint_format`:$x(e,r,a);break;case`mime_type`:eS(e,t,r,a);break;case`property`:tS(e,t,r,a);break;case`overwrite`:{let r=K(t);nS(e,t,n,a,r),a=r;break}default:throw new eC(`check type ${r.check}`)}}return a}function Kx(e,t,n,r){let i=G(t,of),a=K(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function qx(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new eC(`${t} bound of type ${typeof e}`);return`${e}`}function Jx(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new eC(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new eC(`comparison check with Invalid Date bound`);return G(e,t)}throw new eC(`comparison check bound of type ${typeof t}`)}function Yx(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${Jx(t,n.value)}) return INVALID;`)}function Xx(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${Jx(t,n.value)}) return INVALID;`)}function Zx(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new eC(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=G(t,Ed);e.write(`if (${i}(${r}, ${qx(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function Qx(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new eC(`number format ${r}`)}}function $x(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new eC(`bigint format ${r}`)}}function eS(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=G(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function tS(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;sS(e,t,n.schema,i)}function nS(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new eC(`overwrite check without a transform function`);if(KS(a))throw new $S(`z.compile: async overwrite transforms are not supported`);let o=G(t,a);e.write(`const ${i} = ${o}(${r});`)}function rS(){throw new Wf}function iS(e){this.issues.push(e)}function aS(e,t,n,r){let i=n._zod.def;if(i.fn){if(KS(i.fn))throw new $S(`z.compile: async .refine() predicates are not supported`);let n=G(t,i.fn),a=G(t,rS),o=K(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(KS(n._zod.check))throw new $S(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=G(t,e=>{let t={value:e,issues:[],addIssue:iS};return i(t)instanceof Promise&&rS(),t.issues.length===0?t.value:ZS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new eC(`custom check without a predicate or check function`)}function oS(e,t,n,r){let i=n.format;if(i===`base64`){let n=G(t,Bh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=G(t,Vh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=G(t,Wh),a=G(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=G(t,Rh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=G(t,zh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=G(t,Uh);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=G(t,Ph),o=G(t,n),s=K(t),c=K(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=G(t,Ih);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=G(t,Lh);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=K(t),u=a.normalize?`${c}.href`:`${G(t,Fh)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(KS(o))throw new eC(`async string format ${i}`);let n=G(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(nC.has(i)&&n.pattern){let i=G(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new eC(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${Fd(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${Fd(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${Fd(t)}) return INVALID;`);break}default:throw new eC(`string format ${s}`)}return r}function sS(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new eC(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=cS(e,t,n,r);break;case`number`:c=lS(e,n,r);break;case`boolean`:c=uS(e,r);break;case`bigint`:c=dS(e,n,r);break;case`symbol`:c=fS(e,r);break;case`undefined`:c=pS(e,r);break;case`null`:c=mS(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=hS(e,r);break;case`nan`:c=gS(e,r);break;case`date`:c=_S(e,r);break;case`object`:c=vS(e,t,n,r,s);break;case`optional`:c=yS(e,t,n,r,s);break;case`nullable`:c=TS(e,t,n,r,s);break;case`array`:c=ES(e,t,n,r,s);break;case`literal`:c=DS(e,t,n,r);break;case`enum`:c=OS(e,t,n,r);break;case`readonly`:{let i=kS(e,t,n,r),a=K(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:kS(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=AS(e,t,n,r);break;case`nonoptional`:c=jS(e,t,n,r);break;case`tuple`:c=MS(e,t,n,r);break;case`union`:c=PS(e,t,n,r);break;case`intersection`:c=LS(e,t,n,r);break;case`record`:c=RS(e,t,n,r);break;case`map`:c=BS(e,t,n,r);break;case`set`:c=VS(e,t,n,r);break;case`file`:c=HS(e,r);break;case`template_literal`:c=US(e,t,n,r);break;case`lazy`:c=WS(e,t,n,r);break;case`pipe`:c=GS(e,t,n,r);break;case`custom`:c=qS(e,t,n,r);break;case`transform`:c=XS(e,t,n,r);break;case`catch`:c=YS(e,t,n,r);break;default:throw new eC(`schema type ${o}`)}return c===null?null:Gx(e,t,n,c)}function cS(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:oS(e,t,i,r)}function lS(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&Qx(e,{format:r.format},n),n}function uS(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function dS(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function fS(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function pS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function mS(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function hS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function gS(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function _S(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function vS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?G(t,e):Fd(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:Fd(e),f=o;if(s.includes(`__proto__`))throw new eC(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=K(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=K(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=Ux(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{xS(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=Ux(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${Fd(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=K(t),_=l.some(e=>wS(f[e])||CS(f[e]));if(!i){if(h===`schema`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=K(t);e.write(`const ${i} = ${r}[k];`),Ux(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);CS(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):wS(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=K(t);e.write(`const ${n} = ${r}[k];`);let i=Ux(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function yS(e,t,n,r,i=!0){let a=n._zod.def;if(bS(n))return sS(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=K(t),i=K(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=sS(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=sS(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?K(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=sS(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function bS(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function xS(e){return e._zod.optin===void 0&&SS(e)}function SS(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?SS(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||SS(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(SS);case`intersection`:return!t.left||!t.right||SS(t.left)&&SS(t.right);case`pipe`:return!t.in||SS(t.in);default:return!0}}function CS(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function wS(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||wS(t.innerType);case`union`:return!t.options||t.options.some(wS);case`intersection`:return!t.left||!t.right||wS(t.left)||wS(t.right);case`pipe`:return!t.out||wS(t.out);default:return!0}}function TS(e,t,n,r,i=!0){let a=n._zod.def,o=i?K(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=sS(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function ES(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?K(t):null,s=K(t),c=K(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=Ux(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function DS(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${Fd(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new eC(`literal type ${typeof a}`);return r}function OS(e,t,n,r){let i=n._zod.values;if(!i)throw new eC(`enum schema without enumerated values`);let a=G(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function kS(e,t,n,r){let i=n._zod.def;return sS(e,t,i.innerType,r)}function AS(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return sS(e,t,i.innerType,r);let n=G(t,a),o=K(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),sS(e,t,i.innerType,o)}let o=K(t);if(a){let n=G(t,a),s=G(t,zd);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=sS(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=sS(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function jS(e,t,n,r){let i=n._zod.def,a=sS(e,t,i.innerType,r),o=K(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function MS(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=NS(a,`optin`),c=NS(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=K(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ux(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(CS(i)){e.write(`${l}.length = ${n};`);return}let r=K(t),a=K(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=Ux(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Ux(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=K(t),i=K(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=Ux(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function NS(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function PS(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return FS(e,t,i,r);if(i.inclusive===!1)throw new eC(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return sS(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=G(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=K(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=sS(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function FS(e,t,n,r){if(n.unionFallback)throw new eC(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=K(t),a=K(t);e.write(`const ${i} = ${r}?.[${Fd(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new eC(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new eC(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>IS(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=sS(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function IS(e,t,n){if(typeof n==`string`)return`${t} === ${Fd(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${G(e,n)}`;throw new eC(`literal discriminator value ${String(n)}`)}function LS(e,t,n,r){let i=n._zod.def,a=Ux(e,t,i.left,r),o=Ux(e,t,i.right,r),s=G(t,Qh),c=K(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function RS(e,t,n,r){let i=n._zod.def,a=G(t,Rd);e.write(`if (!${a}(${r})) return INVALID;`);let o=K(t),s=K(t),c=K(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new eC(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new eC(`record key "__proto__"`);n.push(s);let c=G(t,a),l=sS(e,t,i.keyType,c),u=K(t);e.write(`const ${u} = ${r}[${zS(t,s)}];`);let d=Ux(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=G(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=G(t,Vx(i.keyType)),c=G(t,Nm),l=G(t,Object.prototype.propertyIsEnumerable),u=K(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=K(t);e.write(`const ${d} = ${r}[${s}];`);let f=Ux(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=G(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=Ux(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function zS(e,t){return typeof t==`string`?Fd(t):G(e,t)}function BS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=K(t),o=K(t),s=K(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=sS(e,t,i.keyType,o),r=sS(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function VS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=K(t),o=K(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=sS(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function HS(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function US(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=G(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function WS(e,t,n,r){let i=n._zod.def,a=G(t,i.getter),o=G(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=K(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function GS(e,t,n,r){let i=n._zod.def,a=sS(e,t,i.in,r);if(i.transform){if(KS(i.transform))throw new $S(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=G(t,e=>{let t={value:e,issues:[],addIssue:iS},r=n(e,t);return r instanceof Promise?ZS:t.issues.length===0?r:ZS}),o=K(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),sS(e,t,i.out,o)}return sS(e,t,i.out,a)}function KS(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function qS(e,t,n,r){let i=n._zod.def;if(i.fn){if(KS(i.fn))throw new $S(`z.compile: async custom predicates are not supported`);let n=G(t,i.fn),a=G(t,rS),o=K(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new eC(`custom schema without a predicate function`);return r}function JS(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return ZS;let i=r;return i.issues.length===0?i.value:t()}function YS(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new eC(`catch with a callback (only a constant catch value compiles)`,!1);let a=K(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=Ux(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=G(t,i.innerType),s=G(t,i.catchValue),c=G(t,JS);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function XS(e,t,n,r){let i=n._zod.def;if(i.transform){if(KS(i.transform))throw new $S(`z.compile: async transforms are not supported`);let n=i.transform,a=G(t,e=>{let t={value:e,issues:[],addIssue:iS},r=n(e,t);return r instanceof Promise?ZS:t.issues.length===0?r:ZS}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var ZS,QS,$S,eC,tC,nC,rC=o((()=>{qf(),Ah(),ev(),th(),B_(),H(),ZS=Symbol.for(`zod.compile.invalid`),QS=Symbol.for(`zod.compile.fallback`),$S=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},eC=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},tC=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),nC=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function iC(e,t){return new e({type:`string`,...R(t)})}function aC(e,t){return new e({type:`string`,coerce:!0,...R(t)})}function oC(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...R(t)})}function sC(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...R(t)})}function cC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...R(t)})}function lC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...R(t)})}function uC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...R(t)})}function dC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...R(t)})}function fC(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...R(t)})}function pC(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...R(t)})}function mC(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...R(t)})}function hC(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...R(t)})}function gC(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...R(t)})}function _C(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...R(t)})}function vC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...R(t)})}function yC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...R(t)})}function bC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...R(t)})}function xC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...R(t)})}function SC(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...R(t)})}function CC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...R(t)})}function wC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...R(t)})}function TC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...R(t)})}function EC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...R(t)})}function DC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...R(t)})}function OC(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...R(t)})}function kC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...R(t)})}function AC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...R(t)})}function jC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...R(t)})}function MC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...R(t)})}function NC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...R(t)})}function PC(e,t){return new e({type:`number`,checks:[],...R(t)})}function FC(e,t){return new e({type:`number`,coerce:!0,checks:[],...R(t)})}function IC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...R(t)})}function LC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...R(t)})}function RC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...R(t)})}function zC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...R(t)})}function BC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...R(t)})}function VC(e,t){return new e({type:`boolean`,...R(t)})}function HC(e,t){return new e({type:`boolean`,coerce:!0,...R(t)})}function UC(e,t){return new e({type:`bigint`,...R(t)})}function WC(e,t){return new e({type:`bigint`,coerce:!0,...R(t)})}function GC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...R(t)})}function KC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...R(t)})}function qC(e,t){return new e({type:`symbol`,...R(t)})}function JC(e,t){return new e({type:`undefined`,...R(t)})}function YC(e,t){return new e({type:`null`,...R(t)})}function XC(e){return new e({type:`any`})}function ZC(e){return new e({type:`unknown`})}function QC(e,t){return new e({type:`never`,...R(t)})}function $C(e,t){return new e({type:`void`,...R(t)})}function ew(e,t){return new e({type:`date`,...R(t)})}function tw(e,t){return new e({type:`date`,coerce:!0,...R(t)})}function nw(e,t){return new e({type:`nan`,...R(t)})}function rw(e,t){return new sh({check:`less_than`,...R(t),value:e,inclusive:!1})}function iw(e,t){return new sh({check:`less_than`,...R(t),value:e,inclusive:!0})}function aw(e,t){return new ch({check:`greater_than`,...R(t),value:e,inclusive:!1})}function ow(e,t){return new ch({check:`greater_than`,...R(t),value:e,inclusive:!0})}function sw(e){return aw(0,e)}function cw(e){return rw(0,e)}function lw(e){return iw(0,e)}function uw(e){return ow(0,e)}function dw(e,t){return new lh({check:`multiple_of`,...R(t),value:e})}function fw(e,t){return new fh({check:`max_size`,...R(t),maximum:e})}function pw(e,t){return new ph({check:`min_size`,...R(t),minimum:e})}function mw(e,t){return new mh({check:`size_equals`,...R(t),size:e})}function hw(e,t){return new hh({check:`max_length`,...R(t),maximum:e})}function gw(e,t){return new gh({check:`min_length`,...R(t),minimum:e})}function _w(e,t){return new _h({check:`length_equals`,...R(t),length:e})}function vw(e,t){return new yh({check:`string_format`,format:`regex`,...R(t),pattern:e})}function yw(e){return new bh({check:`string_format`,format:`lowercase`,...R(e)})}function bw(e){return new xh({check:`string_format`,format:`uppercase`,...R(e)})}function xw(e,t){return new Sh({check:`string_format`,format:`includes`,...R(t),includes:e})}function Sw(e,t){return new Ch({check:`string_format`,format:`starts_with`,...R(t),prefix:e})}function Cw(e,t){return new wh({check:`string_format`,format:`ends_with`,...R(t),suffix:e})}function ww(e,t,n){return new Th({check:`property`,property:e,schema:t,...R(n)})}function Tw(e){return Object.entries(e).map(([e,t])=>new Th({check:`property`,property:e,schema:t}))}function Ew(e,t){return new Eh({check:`mime_type`,mime:e,...R(t)})}function Dw(e){return new Dh({check:`overwrite`,tx:e})}function Ow(e){return Dw(t=>t.normalize(e))}function kw(){return Dw(e=>e.trim())}function Aw(){return Dw(e=>e.toLowerCase())}function jw(){return Dw(e=>e.toUpperCase())}function Mw(){return Dw(e=>Id(e))}function Nw(e,t,n){return new e({type:`array`,element:t,...R(n)})}function Pw(e,t,n){return new e({type:`union`,options:t,...R(n)})}function Fw(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...R(n)})}function Iw(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...R(r)})}function Lw(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Rw(e,t,n,r){let i=n instanceof W;return new e({type:`tuple`,items:t,rest:i?n:null,...R(i?r:n)})}function zw(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...R(r)})}function Bw(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...R(r)})}function Vw(e,t,n){return new e({type:`set`,valueType:t,...R(n)})}function Hw(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...R(n)})}function Uw(e,t,n){return new e({type:`enum`,entries:t,...R(n)})}function Ww(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...R(n)})}function Gw(e,t){return new e({type:`file`,...R(t)})}function Kw(e,t){return new e({type:`transform`,transform:t})}function qw(e,t){return new e({type:`optional`,innerType:t})}function Jw(e,t){return new e({type:`nullable`,innerType:t})}function Yw(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():zd(n)}})}function Xw(e,t,n){return new e({type:`nonoptional`,innerType:t,...R(n)})}function Zw(e,t){return new e({type:`success`,innerType:t})}function Qw(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:Sf(n)})}function $w(e,t,n){return new e({type:`pipe`,in:t,out:n})}function eT(e,t){return new e({type:`readonly`,innerType:t})}function tT(e,t,n){return new e({type:`template_literal`,parts:t,...R(n)})}function nT(e,t){return new e({type:`lazy`,getter:t})}function rT(e,t){return new e({type:`promise`,innerType:t})}function iT(e,t,n){let r=R(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function aT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...R(n)})}function oT(e,t){let n=sT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(cf(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(cf(r))}},e(t.value,t)),t);return n}function sT(e,t){let n=new rh({check:`custom`,...R(t)});return n._zod.check=e,n}function cT(e){let t=new rh({check:`describe`});return t._zod.onattach=[t=>{let n=Ix.get(t)??{};Ix.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function lT(e){let t=new rh({check:`meta`});return t._zod.onattach=[t=>{let n=Ix.get(t)??{};Ix.add(t,{...n,...e})}],t._zod.check=()=>{},t}function uT(e,t){let n=R(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??M_,c=e.Boolean??Jg,l=new s({type:`pipe`,in:new(e.String??hg)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function dT(e,t,n,r={}){let i=R(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var fT,pT=o((()=>{Oh(),Lx(),B_(),H(),fT={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function mT(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&kd(e,t,n[t]);return e}function hT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??Ix,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function gT(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function _T(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,_T(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&mT(o.schema,c),t.io===`input`&&TT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function vT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function yT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${vT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+vT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ + `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=Bd,c=!Yf.jitless,l=c&&Of.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Zh([],p,i,f,d,e):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}}),p_=U(`$ZodUnion`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),V(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),V(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),V(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>Od(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Qh(t,r,e,i)):Qh(o,r,e,i)}}),m_=U(`$ZodXor`,(e,t)=>{p_.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);t instanceof Promise?(o.push(t),a=!0):o.push(t)}return a?Promise.all(o).then(t=>$h(t,r,e,i)):$h(o,r,e,i)}}),h_=U(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,p_.init(e,t);let n=e._zod.parse;V(e,`propValues`,e=>{let t={};for(let n of e.def.options){let r=n._zod.propValues;if(!r||Object.keys(r).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(n)}"`);for(let[e,n]of Object.entries(r)){Object.prototype.hasOwnProperty.call(t,e)||Md(t,e,new Set);for(let r of n)t[e].add(r)}}return t}),t.options.forEach((e,n)=>{let r=u_.get(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=Ed(()=>{let e=t.options,n=new Map;for(let r of e){let e=r._zod.propValues?.[t.discriminator];if(!e||e.size===0)throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);for(let t of e){if(n.has(t))throw Error(`Duplicate discriminator value "${String(t)}"`);n.set(t,r)}}return n});e._zod.parse=(i,a)=>{let o=i.value;if(!Bd(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=r.value.get(o?.[t.discriminator]);return s?s._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()),input:o,path:[t.discriminator],inst:e}),i)}}),g_=U(`$ZodIntersection`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>ng(e,t,n)):ng(e,i,a)}}),__=U(`$ZodTuple`,(e,t)=>{W.init(e,t);let n=t.items,r=Yf.memoizer;r?.attach(e),e._zod.parse=(i,a)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:`tuple`,code:`invalid_type`}),i;i.value=r?r.alloc(e,i,[],a):[];let s=[],c=rg(n,`optin`),l=rg(n,`optout`);if(!t.rest){if(o.lengthn.length&&i.issues.push({code:`too_big`,maximum:n.length,inclusive:!0,input:o,inst:e,origin:`array`})}let u=Array(n.length);for(let e=0;e{u[e]=t})):u[e]=t}if(t.rest){let e=n.length-1,r=o.slice(n.length);for(let n of r){e++;let r=t.rest._zod.run({value:n,issues:[]},a);r instanceof Promise?s.push(r.then(t=>ig(t,i,e))):ig(r,i,e)}}return s.length?Promise.all(s).then(()=>ag(u,i,n,o,l)):ag(u,i,n,o,l)}}),v_=U(`$ZodRecord`,(e,t)=>{W.init(e,t);let n=Yf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Vd(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>sf(e,i,Vf())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...rf(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...rf(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e)){if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e)}l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Im.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>sf(e,i,Vf())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...rf(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...rf(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),y_=U(`$ZodMap`,(e,t)=>{W.init(e,t);let n=Yf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Map))return r.issues.push({expected:`map`,code:`invalid_type`,input:a,inst:e}),r;let o=[];r.value=n?n.alloc(e,r,new Map,i):new Map;for(let[n,s]of a){let c=t.keyType._zod.run({value:n,issues:[]},i),l=t.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([t,o])=>{og(t,o,r,n,a,e,i)})):og(c,l,r,n,a,e,i)}return o.length?Promise.all(o).then(()=>r):r}}),b_=U(`$ZodSet`,(e,t)=>{W.init(e,t);let n=Yf.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!(a instanceof Set))return r.issues.push({input:a,inst:e,expected:`set`,code:`invalid_type`}),r;let o=[];r.value=n?n.alloc(e,r,new Set,i):new Set;for(let e of a){let n=t.valueType._zod.run({value:e,issues:[]},i);n instanceof Promise?o.push(n.then(e=>sg(e,r))):sg(n,r)}return o.length?Promise.all(o).then(()=>r):r}}),x_=U(`$ZodEnum`,(e,t)=>{W.init(e,t);let n=wd(t.entries),r=new Set(n);e._zod.values=r;let i=n.filter(e=>Af.has(typeof e));e._zod.pattern=RegExp(i.length?`^(${i.map(e=>Wd(e.toString())).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),S_=U(`$ZodLiteral`,(e,t)=>{W.init(e,t);let n=new Set(t.values);e._zod.values=n,e._zod.pattern=RegExp(t.values.length?`^(${t.values.map(e=>typeof e==`string`?Wd(e):e?Wd(e.toString()):String(e)).join(`|`)})$`:`^[^\\s\\S]$`),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),C_=U(`$ZodFile`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>{let r=t.value;return r instanceof File||t.issues.push({expected:`file`,code:`invalid_type`,input:r,inst:e}),t}}),w_=U(`$ZodTransform`,(e,t)=>{W.init(e,t),e._zod.optin=`optional`,Yf.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Jf(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new qf;return n.value=i,n}}),T_=U(`$ZodOptional`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Od(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>cg(e,t)):cg(e,r)}return t.innerType._zod.run(e,n)}}),E_=U(`$ZodExactOptional`,(e,t)=>{T_.init(e,t),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),D_=U(`$ZodNullable`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${Od(t.source)}|null)$`):void 0}),V(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),O_=U(`$ZodDefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>lg(e,t)):lg(r,t)}}),k_=U(`$ZodPrefault`,(e,t)=>{W.init(e,t),e._zod.optin=`defaulted`,V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),A_=U(`$ZodNonOptional`,(e,t)=>{W.init(e,t),V(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>ug(t,e)):ug(i,e)}}),j_=U(`$ZodSuccess`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>{if(n.direction===`backward`)throw new Jf(`ZodSuccess`);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(t=>(e.value=t.issues.length===0,e)):(e.value=r.issues.length===0,e)}}),M_=U(`$ZodCatch`,(e,t)=>{W.init(e,t),V(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),V(e,`optout`,e=>e.def.innerType._zod.optout),V(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>dg(e,r,t,n)):dg(e,r,t,n)}}),N_=U(`$ZodNaN`,(e,t)=>{W.init(e,t),e._zod.parse=(t,n)=>((typeof t.value!=`number`||!Number.isNaN(t.value))&&t.issues.push({input:t.value,inst:e,expected:`nan`,code:`invalid_type`}),t)}),P_=U(`$ZodPipe`,(e,t)=>{W.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>fg(e,t.in,n)):fg(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>fg(e,t.out,n)):fg(r,t.out,n)}}),F_=U(`$ZodCodec`,(e,t)=>{W.init(e,t),V(e,`values`,e=>e.def.in._zod.values),V(e,`optin`,e=>e.def.in._zod.optin),V(e,`optout`,e=>e.def.out._zod.optout),V(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if((n.direction||`forward`)===`forward`){let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>pg(e,t,n)):pg(r,t,n)}{let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>pg(e,t,n)):pg(r,t,n)}}}),I_=U(`$ZodPreprocess`,(e,t)=>{P_.init(e,t)}),L_=U(`$ZodReadonly`,(e,t)=>{W.init(e,t),V(e,`propValues`,e=>e.def.innerType._zod.propValues),V(e,`values`,e=>e.def.innerType._zod.values),V(e,`optin`,e=>e.def.innerType?._zod?.optin),V(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(hg):hg(r)}}),R_=U(`$ZodTemplateLiteral`,(e,t)=>{W.init(e,t);let n=[];for(let e of t.parts)if(typeof e==`object`&&e){if(!e._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);let t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw Error(`Invalid template literal part: ${e._zod.traits}`);let r=+!!t.startsWith(`^`),i=t.endsWith(`$`)?t.length-1:t.length;n.push(t.slice(r,i))}else if(e===null||jf.has(typeof e))n.push(Wd(`${e}`));else throw Error(`Invalid template literal part: ${e}`);e._zod.pattern=RegExp(`^${n.join(``)}$`),e._zod.parse=(n,r)=>typeof n.value==`string`?(e._zod.pattern.lastIndex=0,e._zod.pattern.test(n.value)||n.issues.push({input:n.value,inst:e,code:`invalid_format`,format:t.format??`template_literal`,pattern:e._zod.pattern.source}),n):(n.issues.push({input:n.value,inst:e,expected:`string`,code:`invalid_type`}),n)}),z_=U(`$ZodFunction`,(e,t)=>(W.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=t=>{if(typeof t!=`function`)throw Error(`implement() must be called with a function`);return Object.defineProperty(function(...n){let r=e._def.input?gp(e._def.input,n):n,i=Reflect.apply(t,this,r);return e._def.output?gp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=t=>{if(typeof t!=`function`)throw Error(`implementAsync() must be called with a function`);return Object.defineProperty(async function(...n){let r=e._def.input?await vp(e._def.input,n):n,i=await Reflect.apply(t,this,r);return e._def.output?await vp(e._def.output,i):i},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(t,n)=>typeof t.value==`function`?(t.value=e._def.output&&e._def.output._zod.def.type===`promise`?e.implementAsync(t.value):e.implement(t.value),t):(t.issues.push({code:`invalid_type`,expected:`function`,input:t.value,inst:e}),t),e.input=(...t)=>{let n=e.constructor;return Array.isArray(t[0])?new n({type:`function`,input:new __({type:`tuple`,items:t[0],rest:t[1]}),output:e._def.output}):new n({type:`function`,input:t[0],output:e._def.output})},e.output=t=>{let n=e.constructor;return new n({type:`function`,input:e._def.input,output:t})},e)),B_=U(`$ZodPromise`,(e,t)=>{W.init(e,t),e._zod.parse=(e,n)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},n))}),V_=U(`$ZodLazy`,(e,t)=>{W.init(e,t),Ad(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),V(e,`pattern`,e=>e.innerType?._zod?.pattern),V(e,`propValues`,e=>e.innerType?._zod?.propValues),V(e,`optin`,e=>e.innerType?._zod?.optin??void 0),V(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),H_=U(`$ZodCustom`,(e,t)=>{oh.init(e,t),W.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>gg(t,n,r,e));gg(i,n,r,e)}})}));function W_(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}function G_(e,t){let n=$_.get(e);if(n!==void 0)return n;if(t.has(e))return!0;t.add(e);let r=!1,i=e=>{!r&&e?._zod&&G_(e,t)&&(r=!0)},a=e._zod.def;switch(a.type){case`object`:for(let e of Reflect.ownKeys(a.shape))i(a.shape[e]);i(a.catchall);break;case`array`:i(a.element);break;case`tuple`:for(let e of a.items)i(e);i(a.rest);break;case`record`:case`map`:i(a.keyType),i(a.valueType);break;case`set`:i(a.valueType);break;case`union`:for(let e of a.options)i(e);break;case`intersection`:i(a.left),i(a.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:i(a.innerType);break;case`pipe`:i(a.in),i(a.out);break;case`function`:i(a.input),i(a.output);break;case`lazy`:i(e._zod.innerType);break;case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in a){let t=Object.getOwnPropertyDescriptor(a,e);if(!t||t.get)continue;let n=t.value;if(n&&typeof n==`object`){if(n._zod)i(n);else if(Array.isArray(n))for(let e of n)i(e)}}}return t.delete(e),$_.set(e,r),r}function K_(e){return G_(e,new Set)}function q_(e,t){let n=e.buckets.get(t);return n||(n=new Map,e.buckets.set(t,n)),n}function J_(){return nv}function Y_(e,t){let n=e[Z_]?.backEdges;return n!==void 0&&typeof t==`object`&&!!t&&n.has(t)}var X_,Z_,Q_,$_,ev,tv,nv,rv=o((()=>{X_=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Z_=`~memo`,Q_=[],$_=new WeakMap,tv=[],nv={alloc(e,t,n){let r=ev;if(!r)return n;ev=void 0;let i={value:n,issues:null};return r.set(t.value,i),tv.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Y_(n,e.value))throw new X_;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r,i;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,a=(o,s)=>{if(n===void 0&&(n=G_(e,new Set),!n))return e._zod.parse=t,e._zod.run===a&&(e._zod.run=t),t(o,s);let c=o.value;if(typeof c!=`object`||!c)return t(o,s);let l=s[Z_];l||(l={buckets:new Map,backEdges:void 0},s[Z_]=l);let u;r===s?u=i:(u=q_(l,e),r=s,i=u);let d=u.get(c);if(d)return o.value=d.value,d.issues?d.issues.length&&o.issues.push(...W_(d.issues)):(o.memo=!0,l.backEdges??(l.backEdges=new Set),l.backEdges.add(d.value)),o;ev=u;let f=tv.length,p=t(o,s);ev=void 0;let m=tv.length>f?tv.pop():void 0;return p instanceof Promise?p.then(e=>(m&&(m.issues=e.issues.length?W_(e.issues):Q_),e)):(m&&(m.issues=p.issues.length?W_(p.issues):Q_),p)};e._zod.parse=a,e._zod.run===t&&(e._zod.run=a)})}}}));function iv(){return{localeError:av()}}var av,ov=o((()=>{H(),av=()=>{let e={string:{unit:`حرف`,verb:`أن يحوي`},file:{unit:`بايت`,verb:`أن يحوي`},array:{unit:`عنصر`,verb:`أن يحوي`},set:{unit:`عنصر`,verb:`أن يحوي`},map:{unit:`عنصر`,verb:`أن يحوي`}};function t(t){return e[t]??null}let n={regex:`مدخل`,email:`بريد إلكتروني`,url:`رابط`,emoji:`إيموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاريخ ووقت بمعيار ISO`,date:`تاريخ بمعيار ISO`,time:`وقت بمعيار ISO`,duration:`مدة بمعيار ISO`,ipv4:`عنوان IPv4`,ipv6:`عنوان IPv6`,mac:`عنوان MAC`,cidrv4:`مدى عناوين بصيغة IPv4`,cidrv6:`مدى عناوين بصيغة IPv6`,base64:`نَص بترميز base64-encoded`,base64url:`نَص بترميز base64url-encoded`,json_string:`نَص على هيئة JSON`,e164:`رقم هاتف بمعيار E.164`,credit_card:`رقم بطاقة الائتمان`,jwt:`JWT`,template_literal:`مدخل`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`مدخلات غير مقبولة: يفترض إدخال instanceof ${e.expected}، ولكن تم إدخال ${i}`:`مدخلات غير مقبولة: يفترض إدخال ${t}، ولكن تم إدخال ${i}`}case`invalid_value`:return e.values.length===1?`مدخلات غير مقبولة: يفترض إدخال ${z(e.values[0])}`:`اختيار غير مقبول: يتوقع انتقاء أحد هذه الخيارات: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?` أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()} ${r.unit??`عنصر`}`:`أكبر من اللازم: يفترض أن تكون ${e.origin??`القيمة`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()} ${r.unit}`:`أصغر من اللازم: يفترض لـ ${e.origin} أن يكون ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`نَص غير مقبول: يجب أن يبدأ بـ "${e.prefix}"`:t.format===`ends_with`?`نَص غير مقبول: يجب أن ينتهي بـ "${t.suffix}"`:t.format===`includes`?`نَص غير مقبول: يجب أن يتضمَّن "${t.includes}"`:t.format===`regex`?`نَص غير مقبول: يجب أن يطابق النمط ${t.pattern}`:`${n[t.format]??e.format} غير مقبول`}case`not_multiple_of`:return`رقم غير مقبول: يجب أن يكون من مضاعفات ${e.divisor}`;case`unrecognized_keys`:return`معرف${e.keys.length>1?`ات`:``} غريب${e.keys.length>1?`ة`:``}: ${L(e.keys,`، `)}`;case`invalid_key`:return`معرف غير مقبول في ${e.origin}`;case`invalid_union`:return`مدخل غير مقبول`;case`invalid_element`:return`مدخل غير مقبول في ${e.origin}`;default:return`مدخل غير مقبول`}}}}));function sv(){return{localeError:cv()}}var cv,lv=o((()=>{H(),cv=()=>{let e={string:{unit:`simvol`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`element`,verb:`olmalıdır`},set:{unit:`element`,verb:`olmalıdır`},map:{unit:`element`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`kredit kartı nömrəsi`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Yanlış dəyər: gözlənilən instanceof ${e.expected}, daxil olan ${i}`:`Yanlış dəyər: gözlənilən ${t}, daxil olan ${i}`}case`invalid_value`:return e.values.length===1?`Yanlış dəyər: gözlənilən ${z(e.values[0])}`:`Yanlış seçim: aşağıdakılardan biri olmalıdır: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()} ${r.unit??`element`}`:`Çox böyük: gözlənilən ${e.origin??`dəyər`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çox kiçik: gözlənilən ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Yanlış mətn: "${t.prefix}" ilə başlamalıdır`:t.format===`ends_with`?`Yanlış mətn: "${t.suffix}" ilə bitməlidir`:t.format===`includes`?`Yanlış mətn: "${t.includes}" daxil olmalıdır`:t.format===`regex`?`Yanlış mətn: ${t.pattern} şablonuna uyğun olmalıdır`:`Yanlış ${n[t.format]??e.format}`}case`not_multiple_of`:return`Yanlış ədəd: ${e.divisor} ilə bölünə bilən olmalıdır`;case`unrecognized_keys`:return`Tanınmayan açar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} daxilində yanlış açar`;case`invalid_union`:return`Yanlış dəyər`;case`invalid_element`:return`${e.origin} daxilində yanlış dəyər`;default:return`Yanlış dəyər`}}}}));function uv(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function dv(){return{localeError:fv()}}var fv,pv=o((()=>{H(),fv=()=>{let e={string:{unit:{one:`сімвал`,few:`сімвалы`,many:`сімвалаў`},verb:`мець`},array:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},set:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},map:{unit:{one:`элемент`,few:`элементы`,many:`элементаў`},verb:`мець`},file:{unit:{one:`байт`,few:`байты`,many:`байтаў`},verb:`мець`}};function t(t){return e[t]??null}let n={regex:`увод`,email:`email адрас`,url:`URL`,emoji:`эмодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата і час`,date:`ISO дата`,time:`ISO час`,duration:`ISO працягласць`,ipv4:`IPv4 адрас`,ipv6:`IPv6 адрас`,mac:`MAC адрас`,cidrv4:`IPv4 дыяпазон`,cidrv6:`IPv6 дыяпазон`,base64:`радок у фармаце base64`,base64url:`радок у фармаце base64url`,json_string:`JSON радок`,e164:`нумар E.164`,credit_card:`нумар крэдытнай карты`,jwt:`JWT`,template_literal:`увод`},r={nan:`NaN`,number:`лік`,array:`масіў`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Няправільны ўвод: чакаўся instanceof ${e.expected}, атрымана ${i}`:`Няправільны ўвод: чакаўся ${t}, атрымана ${i}`}case`invalid_value`:return e.values.length===1?`Няправільны ўвод: чакалася ${z(e.values[0])}`:`Няправільны варыянт: чакаўся адзін з ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=uv(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна ${r.verb} ${n}${e.maximum.toString()} ${t}`}return`Занадта вялікі: чакалася, што ${e.origin??`значэнне`} павінна быць ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=uv(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Занадта малы: чакалася, што ${e.origin} павінна ${r.verb} ${n}${e.minimum.toString()} ${t}`}return`Занадта малы: чакалася, што ${e.origin} павінна быць ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Няправільны радок: павінен пачынацца з "${t.prefix}"`:t.format===`ends_with`?`Няправільны радок: павінен заканчвацца на "${t.suffix}"`:t.format===`includes`?`Няправільны радок: павінен змяшчаць "${t.includes}"`:t.format===`regex`?`Няправільны радок: павінен адпавядаць шаблону ${t.pattern}`:`Няправільны ${n[t.format]??e.format}`}case`not_multiple_of`:return`Няправільны лік: павінен быць кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспазнаны ${e.keys.length>1?`ключы`:`ключ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Няправільны ключ у ${e.origin}`;case`invalid_union`:return`Няправільны ўвод`;case`invalid_element`:return`Няправільнае значэнне ў ${e.origin}`;default:return`Няправільны ўвод`}}}}));function mv(){return{localeError:hv()}}var hv,gv=o((()=>{H(),hv=()=>{let e={string:{unit:`символа`,verb:`да съдържа`},file:{unit:`байта`,verb:`да съдържа`},array:{unit:`елемента`,verb:`да съдържа`},set:{unit:`елемента`,verb:`да съдържа`},map:{unit:`елемента`,verb:`да съдържа`}};function t(t){return e[t]??null}let n={regex:`вход`,email:`имейл адрес`,url:`URL`,emoji:`емоджи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO време`,date:`ISO дата`,time:`ISO време`,duration:`ISO продължителност`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`base64-кодиран низ`,base64url:`base64url-кодиран низ`,json_string:`JSON низ`,e164:`E.164 номер`,credit_card:`номер на кредитна карта`,jwt:`JWT`,template_literal:`вход`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Невалиден вход: очакван instanceof ${e.expected}, получен ${i}`:`Невалиден вход: очакван ${t}, получен ${i}`}case`invalid_value`:return e.values.length===1?`Невалиден вход: очакван ${z(e.values[0])}`:`Невалидна опция: очаквано едно от ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Твърде голямо: очаква се ${e.origin??`стойност`} да съдържа ${n}${e.maximum.toString()} ${r.unit??`елемента`}`:`Твърде голямо: очаква се ${e.origin??`стойност`} да бъде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Твърде малко: очаква се ${e.origin} да съдържа ${n}${e.minimum.toString()} ${r.unit}`:`Твърде малко: очаква се ${e.origin} да бъде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;if(t.format===`starts_with`)return`Невалиден низ: трябва да започва с "${t.prefix}"`;if(t.format===`ends_with`)return`Невалиден низ: трябва да завършва с "${t.suffix}"`;if(t.format===`includes`)return`Невалиден низ: трябва да включва "${t.includes}"`;if(t.format===`regex`)return`Невалиден низ: трябва да съвпада с ${t.pattern}`;let r=`Невалиден`;return t.format===`emoji`&&(r=`Невалидно`),t.format===`datetime`&&(r=`Невалидно`),t.format===`date`&&(r=`Невалидна`),t.format===`time`&&(r=`Невалидно`),t.format===`duration`&&(r=`Невалидна`),`${r} ${n[t.format]??e.format}`}case`not_multiple_of`:return`Невалидно число: трябва да бъде кратно на ${e.divisor}`;case`unrecognized_keys`:return`Неразпознат${e.keys.length>1?`и`:``} ключ${e.keys.length>1?`ове`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Невалиден ключ в ${e.origin}`;case`invalid_union`:return`Невалиден вход`;case`invalid_element`:return`Невалидна стойност в ${e.origin}`;default:return`Невалиден вход`}}}}));function _v(){return{localeError:vv()}}var vv,yv=o((()=>{H(),vv=()=>{let e={string:{unit:`অক্ষর`,verb:`থাকতে হবে`},file:{unit:`বাইট`,verb:`থাকতে হবে`},array:{unit:`আইটেম`,verb:`থাকতে হবে`},set:{unit:`আইটেম`,verb:`থাকতে হবে`},map:{unit:`এন্ট্রি`,verb:`থাকতে হবে`}};function t(t){return e[t]??null}let n={regex:`ইনপুট`,email:`ইমেইল ঠিকানা`,url:`URL`,emoji:`ইমোজি`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO তারিখ ও সময়`,date:`ISO তারিখ`,time:`ISO সময়`,duration:`ISO সময়কাল`,ipv4:`IPv4 ঠিকানা`,ipv6:`IPv6 ঠিকানা`,mac:`MAC ঠিকানা`,cidrv4:`IPv4 রেঞ্জ`,cidrv6:`IPv6 রেঞ্জ`,base64:`base64-এনকোডেড স্ট্রিং`,base64url:`base64url-এনকোডেড স্ট্রিং`,json_string:`JSON স্ট্রিং`,e164:`E.164 নম্বর`,credit_card:`ক্রেডিট কার্ড নম্বর`,jwt:`JWT`,template_literal:`ইনপুট`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`অবৈধ ইনপুট: প্রত্যাশিত ${t}, প্রাপ্ত ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`অবৈধ ইনপুট: প্রত্যাশিত ${z(e.values[0])}`:`অবৈধ অপশন: ${L(e.values,` | `)} এর মধ্যে একটি প্রত্যাশিত`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} ${r.unit??`এলিমেন্ট`} হতে হবে`:`অনেক বড়: ${e.origin??`মান`} ${n}${e.maximum.toString()} হতে হবে`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} হতে হবে`:`অনেক ছোট: ${e.origin} ${n}${e.minimum.toString()} হতে হবে`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`অবৈধ স্ট্রিং: "${t.prefix}" দিয়ে শুরু হতে হবে`:t.format===`ends_with`?`অবৈধ স্ট্রিং: "${t.suffix}" দিয়ে শেষ হতে হবে`:t.format===`includes`?`অবৈধ স্ট্রিং: "${t.includes}" অন্তর্ভুক্ত থাকতে হবে`:t.format===`regex`?`অবৈধ স্ট্রিং: ${t.pattern} প্যাটার্ন মিলতে হবে`:`অবৈধ ${n[t.format]??e.format}`}case`not_multiple_of`:return`অবৈধ নম্বর: ${e.divisor} এর গুণিতক হতে হবে`;case`unrecognized_keys`:return`অচেনা কী${e.keys.length>1?`গুলো`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} এ অবৈধ কী`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`অবৈধ ডিসক্রিমিনেটর মান। প্রত্যাশিত ${e.options.map(e=>`'${e}'`).join(` | `)}`:`অবৈধ ইনপুট`;case`invalid_element`:return`${e.origin} এ অবৈধ মান`;default:return`অবৈধ ইনপুট`}}}}));function bv(){return{localeError:xv()}}var xv,Sv=o((()=>{H(),xv=()=>{let e={string:{unit:`caràcters`,verb:`contenir`},file:{unit:`bytes`,verb:`contenir`},array:{unit:`elements`,verb:`contenir`},set:{unit:`elements`,verb:`contenir`},map:{unit:`elements`,verb:`contenir`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`adreça electrònica`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i hora ISO`,date:`data ISO`,time:`hora ISO`,duration:`durada ISO`,ipv4:`adreça IPv4`,ipv6:`adreça IPv6`,mac:`adreça MAC`,cidrv4:`rang IPv4`,cidrv6:`rang IPv6`,base64:`cadena codificada en base64`,base64url:`cadena codificada en base64url`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de targeta de crèdit`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Tipus invàlid: s'esperava instanceof ${e.expected}, s'ha rebut ${i}`:`Tipus invàlid: s'esperava ${t}, s'ha rebut ${i}`}case`invalid_value`:return e.values.length===1?`Valor invàlid: s'esperava ${z(e.values[0])}`:`Opció invàlida: s'esperava una de ${L(e.values,` o `)}`;case`too_big`:{let n=e.inclusive?`com a màxim`:`menys de`,r=t(e.origin);return r?`Massa gran: s'esperava que ${e.origin??`el valor`} contingués ${n} ${e.maximum.toString()} ${r.unit??`elements`}`:`Massa gran: s'esperava que ${e.origin??`el valor`} fos ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`com a mínim`:`més de`,r=t(e.origin);return r?`Massa petit: s'esperava que ${e.origin} contingués ${n} ${e.minimum.toString()} ${r.unit}`:`Massa petit: s'esperava que ${e.origin} fos ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Format invàlid: ha de començar amb "${t.prefix}"`:t.format===`ends_with`?`Format invàlid: ha d'acabar amb "${t.suffix}"`:t.format===`includes`?`Format invàlid: ha d'incloure "${t.includes}"`:t.format===`regex`?`Format invàlid: ha de coincidir amb el patró ${t.pattern}`:`Format invàlid per a ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número invàlid: ha de ser múltiple de ${e.divisor}`;case`unrecognized_keys`:return`Clau${e.keys.length>1?`s`:``} no reconeguda${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Clau invàlida a ${e.origin}`;case`invalid_union`:return`Entrada invàlida`;case`invalid_element`:return`Element invàlid a ${e.origin}`;default:return`Entrada invàlida`}}}}));function Cv(){return{localeError:wv()}}var wv,Tv=o((()=>{H(),wv=()=>{let e={string:{unit:`پیت`,verb:`بێت`},file:{unit:`بایت`,verb:`بێت`},array:{unit:`دانە`,verb:`بێت`},set:{unit:`دانە`,verb:`بێت`},map:{unit:`دانە`,verb:`بێت`}};function t(t){return e[t]??null}let n={regex:`regex`,email:`ئیمەیڵ`,url:`بەستەر (URL)`,emoji:`ئیمۆجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ڕێکەوت و کات`,date:`ڕێکەوت`,time:`کات`,duration:`ماوە`,ipv4:`ناونیشانی IPv4`,ipv6:`ناونیشانی IPv6`,mac:`ناونیشانی MAC`,cidrv4:`مەودای IPv4`,cidrv6:`مەودای IPv6`,base64:`دەقی base64`,base64url:`دەقی base64url`,json_string:`دەقی JSON`,e164:`ژمارەی E.164`,credit_card:`ژمارەی کارتی کرێدیت`,jwt:`JWT`,template_literal:`تێکردە`},r={nan:`NaN`,string:`نووسین`,number:`ژمارە`,boolean:`boolean`,array:`array`,object:`object`,date:`ڕێکەوت`,integer:`ژمارە`,float:`ژمارە`,null:`null`,undefined:`undefined`,function:`function`,symbol:`symbol`,unknown:`unknown`,promise:`promise`,void:`void`,never:`never`,map:`map`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n,a=[`ا`,`و`,`ۆ`,`وو`,`ە`,`ی`,`ێ`].some(e=>i.endsWith(e))?`یە`:`ە`,o=/^[a-zA-Z]+$/.test(i);return n===`null`||n===`undefined`?`داواکراوە`:`چاوەڕوانکراوە ${t} بێت، بەڵام ${i}${o?``:a}`}case`invalid_value`:return e.values.length===1?`بەهاکە نادرووستە: چاوەڕوانکراوە ${z(e.values[0])} بێت`:`هەڵبژاردەی نادروست: چاوەڕوانکراوە یەکێک بێت لە ${L(e.values,`|`)}`;case`too_big`:{let n=t(e.origin);return n?`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی زۆرەوە ${e.maximum.toString()} بێت`}case`too_small`:{let n=t(e.origin);return n?`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} ${n.unit} ${n.verb}`:`پێویستە بە لایەنی کەمەوە ${e.minimum.toString()} بێت`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`دەقی نادروست: پێویستە دەستپێبکات بە "${t.prefix}"`:t.format===`ends_with`?`دەقی نادروست: پێویستە کۆتاییبێت بە "${t.suffix}"`:t.format===`includes`?`دەقی نادروست: پێویستە "${t.includes}" لەخۆبگرێت`:t.format===`regex`?`دەقی نادروست: پێویستە لەگەڵ پاتێرنی ${t.pattern} بگونجێت`:`بەهای ${n[t.format]??e.format} نادروستە`}case`not_multiple_of`:return`ژمارەی نادروست: دەبێت چەند هێندە بێت بۆ ${e.divisor}`;case`unrecognized_keys`:return`کلیلی نەناسراو: ${L(e.keys,`, `)}`;case`invalid_key`:return`کلیلی نادروست لە ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`بەهای نەناسراو هەیە. بەهای چاوەڕوانکراو: ${e.options.map(e=>`'${e}'`).join(` | `)}`:`یەکگرتنی نادروست`;case`invalid_element`:return`${e.origin} بەهاکە نادروستە`;default:return`تێکردەی نادروست`}}}}));function Ev(){return{localeError:Dv()}}var Dv,Ov=o((()=>{H(),Dv=()=>{let e={string:{unit:`znaků`,verb:`mít`},file:{unit:`bajtů`,verb:`mít`},array:{unit:`prvků`,verb:`mít`},set:{unit:`prvků`,verb:`mít`},map:{unit:`prvků`,verb:`mít`}};function t(t){return e[t]??null}let n={regex:`regulární výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`datum a čas ve formátu ISO`,date:`datum ve formátu ISO`,time:`čas ve formátu ISO`,duration:`doba trvání ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`řetězec zakódovaný ve formátu base64`,base64url:`řetězec zakódovaný ve formátu base64url`,json_string:`řetězec ve formátu JSON`,e164:`číslo E.164`,credit_card:`číslo kreditní karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`řetězec`,function:`funkce`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očekáváno instanceof ${e.expected}, obdrženo ${i}`:`Neplatný vstup: očekáváno ${t}, obdrženo ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očekáváno ${z(e.values[0])}`:`Neplatná možnost: očekávána jedna z hodnot ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je příliš velká: ${e.origin??`hodnota`} musí mít ${n}${e.maximum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš velká: ${e.origin??`hodnota`} musí být ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je příliš malá: ${e.origin??`hodnota`} musí mít ${n}${e.minimum.toString()} ${r.unit??`prvků`}`:`Hodnota je příliš malá: ${e.origin??`hodnota`} musí být ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný řetězec: musí začínat na "${t.prefix}"`:t.format===`ends_with`?`Neplatný řetězec: musí končit na "${t.suffix}"`:t.format===`includes`?`Neplatný řetězec: musí obsahovat "${t.includes}"`:t.format===`regex`?`Neplatný řetězec: musí odpovídat vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí být násobkem ${e.divisor}`;case`unrecognized_keys`:return`Neznámé klíče: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klíč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function kv(){return{localeError:Av()}}var Av,jv=o((()=>{H(),Av=()=>{let e={string:{unit:`tegn`,verb:`havde`},file:{unit:`bytes`,verb:`havde`},array:{unit:`elementer`,verb:`indeholdt`},set:{unit:`elementer`,verb:`indeholdt`},map:{unit:`elementer`,verb:`indeholdt`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-mailadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslæt`,date:`ISO-dato`,time:`ISO-klokkeslæt`,duration:`ISO-varighed`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodet streng`,base64url:`base64url-kodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kreditkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,string:`streng`,number:`tal`,boolean:`boolean`,array:`liste`,object:`objekt`,set:`sæt`,file:`fil`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldigt input: forventede instanceof ${e.expected}, fik ${i}`:`Ugyldigt input: forventede ${t}, fik ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig værdi: forventede ${z(e.values[0])}`:`Ugyldigt valg: forventede en af følgende ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For stor: forventede ${a??`value`} ${i.verb} ${n} ${e.maximum.toString()} ${i.unit??`elementer`}`:`For stor: forventede ${a??`value`} havde ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`For lille: forventede ${a} ${i.verb} ${n} ${e.minimum.toString()} ${i.unit}`:`For lille: forventede ${a} havde ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: skal starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: skal ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: skal indeholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: skal matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldigt tal: skal være deleligt med ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukendte nøgler`:`Ukendt nøgle`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøgle i ${e.origin}`;case`invalid_union`:return`Ugyldigt input: matcher ingen af de tilladte typer`;case`invalid_element`:return`Ugyldig værdi i ${e.origin}`;default:return`Ugyldigt input`}}}}));function Mv(){return{localeError:Nv()}}var Nv,Pv=o((()=>{H(),Nv=()=>{let e={string:{unit:`Zeichen`,verb:`zu haben`},file:{unit:`Bytes`,verb:`zu haben`},array:{unit:`Elemente`,verb:`zu haben`},set:{unit:`Elemente`,verb:`zu haben`},map:{unit:`Elemente`,verb:`zu haben`}};function t(t){return e[t]??null}let n={regex:`Eingabe`,email:`E-Mail-Adresse`,url:`URL`,emoji:`Emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-Datum und -Uhrzeit`,date:`ISO-Datum`,time:`ISO-Uhrzeit`,duration:`ISO-Dauer`,ipv4:`IPv4-Adresse`,ipv6:`IPv6-Adresse`,mac:`MAC-Adresse`,cidrv4:`IPv4-Bereich`,cidrv6:`IPv6-Bereich`,base64:`Base64-codierter String`,base64url:`Base64-URL-codierter String`,json_string:`JSON-String`,e164:`E.164-Nummer`,credit_card:`Kreditkartennummer`,jwt:`JWT`,template_literal:`Eingabe`},r={nan:`NaN`,number:`Zahl`,array:`Array`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ungültige Eingabe: erwartet instanceof ${e.expected}, erhalten ${i}`:`Ungültige Eingabe: erwartet ${t}, erhalten ${i}`}case`invalid_value`:return e.values.length===1?`Ungültige Eingabe: erwartet ${z(e.values[0])}`:`Ungültige Option: erwartet eine von ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ${r.unit??`Elemente`} hat`:`Zu groß: erwartet, dass ${e.origin??`Wert`} ${n}${e.maximum.toString()} ist`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ${r.unit} hat`:`Zu klein: erwartet, dass ${e.origin} ${n}${e.minimum.toString()} ist`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ungültiger String: muss mit "${t.prefix}" beginnen`:t.format===`ends_with`?`Ungültiger String: muss mit "${t.suffix}" enden`:t.format===`includes`?`Ungültiger String: muss "${t.includes}" enthalten`:t.format===`regex`?`Ungültiger String: muss dem Muster ${t.pattern} entsprechen`:`Ungültig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ungültige Zahl: muss ein Vielfaches von ${e.divisor} sein`;case`unrecognized_keys`:return`${e.keys.length>1?`Unbekannte Schlüssel`:`Unbekannter Schlüssel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ungültiger Schlüssel in ${e.origin}`;case`invalid_union`:return`Ungültige Eingabe`;case`invalid_element`:return`Ungültiger Wert in ${e.origin}`;default:return`Ungültige Eingabe`}}}}));function Fv(){return{localeError:Iv()}}var Iv,Lv=o((()=>{H(),Iv=()=>{let e={string:{unit:`χαρακτήρες`,verb:`να έχει`},file:{unit:`bytes`,verb:`να έχει`},array:{unit:`στοιχεία`,verb:`να έχει`},set:{unit:`στοιχεία`,verb:`να έχει`},map:{unit:`καταχωρήσεις`,verb:`να έχει`}};function t(t){return e[t]??null}let n={regex:`είσοδος`,email:`διεύθυνση email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ημερομηνία και ώρα`,date:`ISO ημερομηνία`,time:`ISO ώρα`,duration:`ISO διάρκεια`,ipv4:`διεύθυνση IPv4`,ipv6:`διεύθυνση IPv6`,mac:`διεύθυνση MAC`,cidrv4:`εύρος IPv4`,cidrv6:`εύρος IPv6`,base64:`συμβολοσειρά κωδικοποιημένη σε base64`,base64url:`συμβολοσειρά κωδικοποιημένη σε base64url`,json_string:`συμβολοσειρά JSON`,e164:`αριθμός E.164`,credit_card:`αριθμός πιστωτικής κάρτας`,jwt:`JWT`,template_literal:`είσοδος`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return typeof e.expected==`string`&&/^[A-Z]/.test(e.expected)?`Μη έγκυρη είσοδος: αναμενόταν instanceof ${e.expected}, λήφθηκε ${i}`:`Μη έγκυρη είσοδος: αναμενόταν ${t}, λήφθηκε ${i}`}case`invalid_value`:return e.values.length===1?`Μη έγκυρη είσοδος: αναμενόταν ${z(e.values[0])}`:`Μη έγκυρη επιλογή: αναμενόταν ένα από ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να έχει ${n}${e.maximum.toString()} ${r.unit??`στοιχεία`}`:`Πολύ μεγάλο: αναμενόταν ${e.origin??`τιμή`} να είναι ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Πολύ μικρό: αναμενόταν ${e.origin} να έχει ${n}${e.minimum.toString()} ${r.unit}`:`Πολύ μικρό: αναμενόταν ${e.origin} να είναι ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να ξεκινά με "${t.prefix}"`:t.format===`ends_with`?`Μη έγκυρη συμβολοσειρά: πρέπει να τελειώνει με "${t.suffix}"`:t.format===`includes`?`Μη έγκυρη συμβολοσειρά: πρέπει να περιέχει "${t.includes}"`:t.format===`regex`?`Μη έγκυρη συμβολοσειρά: πρέπει να ταιριάζει με το μοτίβο ${t.pattern}`:`Μη έγκυρο: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Μη έγκυρος αριθμός: πρέπει να είναι πολλαπλάσιο του ${e.divisor}`;case`unrecognized_keys`:return`Άγνωστ${e.keys.length>1?`α`:`ο`} κλειδ${e.keys.length>1?`ιά`:`ί`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Μη έγκυρο κλειδί στο ${e.origin}`;case`invalid_union`:return`Μη έγκυρη είσοδος`;case`invalid_element`:return`Μη έγκυρη τιμή στο ${e.origin}`;default:return`Μη έγκυρη είσοδος`}}}}));function Rv(){return{localeError:zv()}}var zv,Bv=o((()=>{H(),zv=()=>{let e={string:{unit:`characters`,verb:`to have`},file:{unit:`bytes`,verb:`to have`},array:{unit:`items`,verb:`to have`},set:{unit:`items`,verb:`to have`},map:{unit:`entries`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,credit_card:`credit card number`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(B(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${z(e.values[0])}`:`Invalid option: expected one of ${L(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`'${e}'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}}}));function Vv(){return{localeError:Hv()}}var Hv,Uv=o((()=>{H(),Hv=()=>{let e={string:{unit:`karaktrojn`,verb:`havi`},file:{unit:`bajtojn`,verb:`havi`},array:{unit:`elementojn`,verb:`havi`},set:{unit:`elementojn`,verb:`havi`},map:{unit:`elementojn`,verb:`havi`}};function t(t){return e[t]??null}let n={regex:`enigo`,email:`retadreso`,url:`URL`,emoji:`emoĝio`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datotempo`,date:`ISO-dato`,time:`ISO-tempo`,duration:`ISO-daŭro`,ipv4:`IPv4-adreso`,ipv6:`IPv6-adreso`,mac:`MAC-adreso`,cidrv4:`IPv4-rango`,cidrv6:`IPv6-rango`,base64:`64-ume kodita karaktraro`,base64url:`URL-64-ume kodita karaktraro`,json_string:`JSON-karaktraro`,e164:`E.164-nombro`,credit_card:`kreditkarta numero`,jwt:`JWT`,template_literal:`enigo`},r={nan:`NaN`,number:`nombro`,array:`tabelo`,null:`senvalora`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nevalida enigo: atendiĝis instanceof ${e.expected}, riceviĝis ${i}`:`Nevalida enigo: atendiĝis ${t}, riceviĝis ${i}`}case`invalid_value`:return e.values.length===1?`Nevalida enigo: atendiĝis ${z(e.values[0])}`:`Nevalida opcio: atendiĝis unu el ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()} ${r.unit??`elementojn`}`:`Tro granda: atendiĝis ke ${e.origin??`valoro`} havu ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Tro malgranda: atendiĝis ke ${e.origin} havu ${n}${e.minimum.toString()} ${r.unit}`:`Tro malgranda: atendiĝis ke ${e.origin} estu ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nevalida karaktraro: devas komenciĝi per "${t.prefix}"`:t.format===`ends_with`?`Nevalida karaktraro: devas finiĝi per "${t.suffix}"`:t.format===`includes`?`Nevalida karaktraro: devas inkluzivi "${t.includes}"`:t.format===`regex`?`Nevalida karaktraro: devas kongrui kun la modelo ${t.pattern}`:`Nevalida ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nevalida nombro: devas esti oblo de ${e.divisor}`;case`unrecognized_keys`:return`Nekonata${e.keys.length>1?`j`:``} ŝlosilo${e.keys.length>1?`j`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Nevalida ŝlosilo en ${e.origin}`;case`invalid_union`:return`Nevalida enigo`;case`invalid_element`:return`Nevalida valoro en ${e.origin}`;default:return`Nevalida enigo`}}}}));function Wv(){return{localeError:Gv()}}var Gv,Kv=o((()=>{H(),Gv=()=>{let e={string:{unit:`caracteres`,verb:`tener`},file:{unit:`bytes`,verb:`tener`},array:{unit:`elementos`,verb:`tener`},set:{unit:`elementos`,verb:`tener`}};function t(t){return e[t]??null}let n={regex:`entrada`,email:`dirección de correo electrónico`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`fecha y hora ISO`,date:`fecha ISO`,time:`hora ISO`,duration:`duración ISO`,ipv4:`dirección IPv4`,ipv6:`dirección IPv6`,mac:`dirección MAC`,cidrv4:`rango IPv4`,cidrv6:`rango IPv6`,base64:`cadena codificada en base64`,base64url:`URL codificada en base64`,json_string:`cadena JSON`,e164:`número E.164`,credit_card:`número de tarjeta de crédito`,jwt:`JWT`,template_literal:`entrada`},r={nan:`NaN`,string:`texto`,number:`número`,boolean:`booleano`,array:`arreglo`,object:`objeto`,set:`conjunto`,file:`archivo`,date:`fecha`,bigint:`número grande`,symbol:`símbolo`,undefined:`indefinido`,null:`nulo`,function:`función`,map:`mapa`,record:`registro`,tuple:`tupla`,enum:`enumeración`,union:`unión`,literal:`literal`,promise:`promesa`,void:`vacío`,never:`nunca`,unknown:`desconocido`,any:`cualquiera`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrada inválida: se esperaba instanceof ${e.expected}, recibido ${i}`:`Entrada inválida: se esperaba ${t}, recibido ${i}`}case`invalid_value`:return e.values.length===1?`Entrada inválida: se esperaba ${z(e.values[0])}`:`Opción inválida: se esperaba una de ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado grande: se esperaba que ${a??`valor`} tuviera ${n}${e.maximum.toString()} ${i.unit??`elementos`}`:`Demasiado grande: se esperaba que ${a??`valor`} fuera ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Demasiado pequeño: se esperaba que ${a} tuviera ${n}${e.minimum.toString()} ${i.unit}`:`Demasiado pequeño: se esperaba que ${a} fuera ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Cadena inválida: debe comenzar con "${t.prefix}"`:t.format===`ends_with`?`Cadena inválida: debe terminar en "${t.suffix}"`:t.format===`includes`?`Cadena inválida: debe incluir "${t.includes}"`:t.format===`regex`?`Cadena inválida: debe coincidir con el patrón ${t.pattern}`:`Inválido ${n[t.format]??e.format}`}case`not_multiple_of`:return`Número inválido: debe ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:return`Llave${e.keys.length>1?`s`:``} desconocida${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Llave inválida en ${r[e.origin]??e.origin}`;case`invalid_union`:return`Entrada inválida`;case`invalid_element`:return`Valor inválido en ${r[e.origin]??e.origin}`;default:return`Entrada inválida`}}}}));function qv(){return{localeError:Jv()}}var Jv,Yv=o((()=>{H(),Jv=()=>{let e={string:{unit:`کاراکتر`,verb:`داشته باشد`},file:{unit:`بایت`,verb:`داشته باشد`},array:{unit:`آیتم`,verb:`داشته باشد`},set:{unit:`آیتم`,verb:`داشته باشد`},map:{unit:`آیتم`,verb:`داشته باشد`}};function t(t){return e[t]??null}let n={regex:`ورودی`,email:`آدرس ایمیل`,url:`URL`,emoji:`ایموجی`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`تاریخ و زمان ایزو`,date:`تاریخ ایزو`,time:`زمان ایزو`,duration:`مدت زمان ایزو`,ipv4:`IPv4 آدرس`,ipv6:`IPv6 آدرس`,mac:`MAC آدرس`,cidrv4:`IPv4 دامنه`,cidrv6:`IPv6 دامنه`,base64:`base64-encoded رشته`,base64url:`base64url-encoded رشته`,json_string:`JSON رشته`,e164:`E.164 عدد`,credit_card:`شماره کارت اعتباری`,jwt:`JWT`,template_literal:`ورودی`},r={nan:`NaN`,number:`عدد`,array:`آرایه`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ورودی نامعتبر: می‌بایست instanceof ${e.expected} می‌بود، ${i} دریافت شد`:`ورودی نامعتبر: می‌بایست ${t} می‌بود، ${i} دریافت شد`}case`invalid_value`:return e.values.length===1?`ورودی نامعتبر: می‌بایست ${z(e.values[0])} می‌بود`:`گزینه نامعتبر: می‌بایست یکی از ${L(e.values,`|`)} می‌بود`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصر`} باشد`:`خیلی بزرگ: ${e.origin??`مقدار`} باید ${n}${e.maximum.toString()} باشد`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} باشد`:`خیلی کوچک: ${e.origin} باید ${n}${e.minimum.toString()} باشد`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`رشته نامعتبر: باید با "${t.prefix}" شروع شود`:t.format===`ends_with`?`رشته نامعتبر: باید با "${t.suffix}" تمام شود`:t.format===`includes`?`رشته نامعتبر: باید شامل "${t.includes}" باشد`:t.format===`regex`?`رشته نامعتبر: باید با الگوی ${t.pattern} مطابقت داشته باشد`:`${n[t.format]??e.format} نامعتبر`}case`not_multiple_of`:return`عدد نامعتبر: باید مضرب ${e.divisor} باشد`;case`unrecognized_keys`:return`کلید${e.keys.length>1?`های`:``} ناشناس: ${L(e.keys,`, `)}`;case`invalid_key`:return`کلید ناشناس در ${e.origin}`;case`invalid_union`:return`ورودی نامعتبر`;case`invalid_element`:return`مقدار نامعتبر در ${e.origin}`;default:return`ورودی نامعتبر`}}}}));function Xv(){return{localeError:Zv()}}var Zv,Qv=o((()=>{H(),Zv=()=>{let e={string:{unit:`merkkiä`,subject:`merkkijonon`},file:{unit:`tavua`,subject:`tiedoston`},array:{unit:`alkiota`,subject:`listan`},set:{unit:`alkiota`,subject:`joukon`},map:{unit:`alkiota`,subject:`kuvauksen`},number:{unit:``,subject:`luvun`},bigint:{unit:``,subject:`suuren kokonaisluvun`},int:{unit:``,subject:`kokonaisluvun`},date:{unit:``,subject:`päivämäärän`}};function t(t){return e[t]??null}let n={regex:`säännöllinen lauseke`,email:`sähköpostiosoite`,url:`URL-osoite`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-aikaleima`,date:`ISO-päivämäärä`,time:`ISO-aika`,duration:`ISO-kesto`,ipv4:`IPv4-osoite`,ipv6:`IPv6-osoite`,mac:`MAC-osoite`,cidrv4:`IPv4-alue`,cidrv6:`IPv6-alue`,base64:`base64-koodattu merkkijono`,base64url:`base64url-koodattu merkkijono`,json_string:`JSON-merkkijono`,e164:`E.164-luku`,credit_card:`luottokortin numero`,jwt:`JWT`,template_literal:`templaattimerkkijono`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Virheellinen tyyppi: odotettiin instanceof ${e.expected}, oli ${i}`:`Virheellinen tyyppi: odotettiin ${t}, oli ${i}`}case`invalid_value`:return e.values.length===1?`Virheellinen syöte: täytyy olla ${z(e.values[0])}`:`Virheellinen valinta: täytyy olla yksi seuraavista: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Liian suuri: ${r.subject} täytyy olla ${n}${e.maximum.toString()} ${r.unit}`.trim():`Liian suuri: arvon täytyy olla ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Liian pieni: ${r.subject} täytyy olla ${n}${e.minimum.toString()} ${r.unit}`.trim():`Liian pieni: arvon täytyy olla ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Virheellinen syöte: täytyy alkaa "${t.prefix}"`:t.format===`ends_with`?`Virheellinen syöte: täytyy loppua "${t.suffix}"`:t.format===`includes`?`Virheellinen syöte: täytyy sisältää "${t.includes}"`:t.format===`regex`?`Virheellinen syöte: täytyy vastata säännöllistä lauseketta ${t.pattern}`:`Virheellinen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Virheellinen luku: täytyy olla luvun ${e.divisor} monikerta`;case`unrecognized_keys`:return`${e.keys.length>1?`Tuntemattomat avaimet`:`Tuntematon avain`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Virheellinen avain tietueessa`;case`invalid_union`:return`Virheellinen unioni`;case`invalid_element`:return`Virheellinen arvo joukossa`;default:return`Virheellinen syöte`}}}}));function $v(){return{localeError:ey()}}var ey,ty=o((()=>{H(),ey=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`expression régulière`,email:`adresse e-mail`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date et heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne de caractères encodée en base64`,base64url:`chaîne de caractères encodée en base64url`,json_string:`chaîne de caractères JSON`,e164:`numéro au format E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={string:`chaîne de caractères`,number:`nombre`,int:`entier`,boolean:`booléen`,bigint:`grand entier`,symbol:`symbole`,undefined:`indéfini`,null:`null`,never:`jamais`,void:`vide`,date:`date`,array:`tableau`,object:`objet`,tuple:`tuple`,record:`record`,map:`map`,set:`ensemble`,file:`fichier`,nonoptional:`non optionnel`,nan:`NaN`,function:`fonction`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : instance de ${e.expected} attendu, ${i} reçu`:`Entrée invalide : ${t} attendu, ${i} reçu`}case`invalid_value`:return e.values.length===1?`Entrée invalide : ${z(e.values[0])} attendu`:`Option invalide : une valeur parmi ${L(e.values,`|`)} attendue`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin);return i?`Trop grand : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.maximum.toString()} ${i.unit??`élément(s)`}`:`Trop grand : ${r[e.origin]??`valeur`} doit être ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin);return i?`Trop petit : ${r[e.origin]??`valeur`} doit ${i.verb} ${n}${e.minimum.toString()} ${i.unit}`:`Trop petit : ${r[e.origin]??`valeur`} doit être ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne de caractères invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne de caractères invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne de caractères invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne de caractères invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${L(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function ny(){return{localeError:ry()}}var ry,iy=o((()=>{H(),ry=()=>{let e={string:{unit:`caractères`,verb:`avoir`},file:{unit:`octets`,verb:`avoir`},array:{unit:`éléments`,verb:`avoir`},set:{unit:`éléments`,verb:`avoir`},map:{unit:`éléments`,verb:`avoir`}};function t(t){return e[t]??null}let n={regex:`entrée`,email:`adresse courriel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`date-heure ISO`,date:`date ISO`,time:`heure ISO`,duration:`durée ISO`,ipv4:`adresse IPv4`,ipv6:`adresse IPv6`,mac:`adresse MAC`,cidrv4:`plage IPv4`,cidrv6:`plage IPv6`,base64:`chaîne encodée en base64`,base64url:`chaîne encodée en base64url`,json_string:`chaîne JSON`,e164:`numéro E.164`,credit_card:`numéro de carte de crédit`,jwt:`JWT`,template_literal:`entrée`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Entrée invalide : attendu instanceof ${e.expected}, reçu ${i}`:`Entrée invalide : attendu ${t}, reçu ${i}`}case`invalid_value`:return e.values.length===1?`Entrée invalide : attendu ${z(e.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`≤`:`<`,r=t(e.origin);return r?`Trop grand : attendu que ${e.origin??`la valeur`} ait ${n}${e.maximum.toString()} ${r.unit}`:`Trop grand : attendu que ${e.origin??`la valeur`} soit ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`≥`:`>`,r=t(e.origin);return r?`Trop petit : attendu que ${e.origin} ait ${n}${e.minimum.toString()} ${r.unit}`:`Trop petit : attendu que ${e.origin} soit ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chaîne invalide : doit commencer par "${t.prefix}"`:t.format===`ends_with`?`Chaîne invalide : doit se terminer par "${t.suffix}"`:t.format===`includes`?`Chaîne invalide : doit inclure "${t.includes}"`:t.format===`regex`?`Chaîne invalide : doit correspondre au motif ${t.pattern}`:`${n[t.format]??e.format} invalide`}case`not_multiple_of`:return`Nombre invalide : doit être un multiple de ${e.divisor}`;case`unrecognized_keys`:return`Clé${e.keys.length>1?`s`:``} non reconnue${e.keys.length>1?`s`:``} : ${L(e.keys,`, `)}`;case`invalid_key`:return`Clé invalide dans ${e.origin}`;case`invalid_union`:return`Entrée invalide`;case`invalid_element`:return`Valeur invalide dans ${e.origin}`;default:return`Entrée invalide`}}}}));function ay(){return{localeError:oy()}}var oy,sy=o((()=>{H(),oy=()=>{let e={string:{unit:`અક્ષર`,verb:`હોવા જોઈએ`},file:{unit:`બાયટ`,verb:`હોવા જોઈએ`},array:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},set:{unit:`આઇટમ`,verb:`હોવા જોઈએ`},map:{unit:`એન્ટ્રી`,verb:`હોવા જોઈએ`}};function t(t){return e[t]??null}let n={regex:`ઇનપુટ`,email:`ઈમેઇલ એડ્રેસ`,url:`URL`,emoji:`ઇમોજી`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO તારીખ અને સમય`,date:`ISO તારીખ`,time:`ISO સમય`,duration:`ISO અવધિ`,ipv4:`IPv4 એડ્રેસ`,ipv6:`IPv6 એડ્રેસ`,mac:`MAC એડ્રેસ`,cidrv4:`IPv4 શ્રેણી`,cidrv6:`IPv6 શ્રેણી`,base64:`base64-એન્કોડેડ સ્ટ્રિંગ`,base64url:`base64url-એન્કોડેડ સ્ટ્રિંગ`,json_string:`JSON સ્ટ્રિંગ`,e164:`E.164 નંબર`,credit_card:`ક્રેડિટ કાર્ડ નંબર`,jwt:`JWT`,template_literal:`ઇનપુટ`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`અમાન્ય ઇનપુટ: અપેક્ષિત ${t}, પ્રાપ્ત ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`અમાન્ય ઇનપુટ: અપેક્ષિત ${z(e.values[0])}`:`અમાન્ય વિકલ્પ: ${L(e.values,` | `)} માધ્યમથી એક અપેક્ષિત`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} ${r.unit??`એલિમેન્ટ`} હોવા જોઈએ`:`ખૂબ મોટું: ${e.origin??`મૂલ્ય`} ${n}${e.maximum.toString()} હોવું જોઈએ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} ${r.unit} હોવા જોઈએ`:`ખૂબ નાનું: ${e.origin} ${n}${e.minimum.toString()} હોવું જોઈએ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`અમાન્ય સ્ટ્રિંગ: "${t.prefix}" થી શરૂ થવું જોઈએ`:t.format===`ends_with`?`અમાન્ય સ્ટ્રિંગ: "${t.suffix}" પર સમાપ્ત થવું જોઈએ`:t.format===`includes`?`અમાન્ય સ્ટ્રિંગ: "${t.includes}" શામેલ હોવું જોઈએ`:t.format===`regex`?`અમાન્ય સ્ટ્રિંગ: પેટર્ન ${t.pattern} સાથે મેળ ખાવું જોઈએ`:`અમાન્ય ${n[t.format]??e.format}`}case`not_multiple_of`:return`અમાન્ય નંબર: ${e.divisor} નો ગુણાંક હોવો જોઈએ`;case`unrecognized_keys`:return`ઓળખી શકાતા નહીં તે કી${e.keys.length>1?`ઓ`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} માં અમાન્ય કી`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`અમાન્ય ડિસ્ક્રિમિનેટર મૂલ્ય. અપેક્ષિત ${e.options.map(e=>`'${e}'`).join(` | `)}`:`અમાન્ય ઇનપુટ`;case`invalid_element`:return`${e.origin} માં અમાન્ય મૂલ્ય`;default:return`અમાન્ય ઇનપુટ`}}}}));function cy(){return{localeError:ly()}}var ly,uy=o((()=>{H(),ly=()=>{let e={string:{label:`מחרוזת`,gender:`f`},number:{label:`מספר`,gender:`m`},boolean:{label:`ערך בוליאני`,gender:`m`},bigint:{label:`BigInt`,gender:`m`},date:{label:`תאריך`,gender:`m`},array:{label:`מערך`,gender:`m`},object:{label:`אובייקט`,gender:`m`},null:{label:`ערך ריק (null)`,gender:`m`},undefined:{label:`ערך לא מוגדר (undefined)`,gender:`m`},symbol:{label:`סימבול (Symbol)`,gender:`m`},function:{label:`פונקציה`,gender:`f`},map:{label:`מפה (Map)`,gender:`f`},set:{label:`קבוצה (Set)`,gender:`f`},file:{label:`קובץ`,gender:`m`},promise:{label:`Promise`,gender:`m`},NaN:{label:`NaN`,gender:`m`},unknown:{label:`ערך לא ידוע`,gender:`m`},value:{label:`ערך`,gender:`m`}},t={string:{unit:`תווים`,shortLabel:`קצר`,longLabel:`ארוך`},file:{unit:`בייטים`,shortLabel:`קטן`,longLabel:`גדול`},array:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},set:{unit:`פריטים`,shortLabel:`קטן`,longLabel:`גדול`},number:{unit:``,shortLabel:`קטן`,longLabel:`גדול`}},n=t=>t?e[t]:void 0,r=t=>{let r=n(t);return r?r.label:t??e.unknown.label},i=e=>`ה${r(e)}`,a=e=>(n(e)?.gender??`m`)===`f`?`צריכה להיות`:`צריך להיות`,o=e=>e?t[e]??null:null,s={regex:{label:`קלט`,gender:`m`},email:{label:`כתובת אימייל`,gender:`f`},url:{label:`כתובת רשת`,gender:`f`},emoji:{label:`אימוג'י`,gender:`m`},uuid:{label:`UUID`,gender:`m`},uuidv4:{label:`UUIDv4`,gender:`m`},uuidv6:{label:`UUIDv6`,gender:`m`},nanoid:{label:`nanoid`,gender:`m`},guid:{label:`GUID`,gender:`m`},cuid:{label:`cuid`,gender:`m`},cuid2:{label:`cuid2`,gender:`m`},ulid:{label:`ULID`,gender:`m`},xid:{label:`XID`,gender:`m`},ksuid:{label:`KSUID`,gender:`m`},datetime:{label:`תאריך וזמן ISO`,gender:`m`},date:{label:`תאריך ISO`,gender:`m`},time:{label:`זמן ISO`,gender:`m`},duration:{label:`משך זמן ISO`,gender:`m`},ipv4:{label:`כתובת IPv4`,gender:`f`},ipv6:{label:`כתובת IPv6`,gender:`f`},mac:{label:`כתובת MAC`,gender:`f`},cidrv4:{label:`טווח IPv4`,gender:`m`},cidrv6:{label:`טווח IPv6`,gender:`m`},base64:{label:`מחרוזת בבסיס 64`,gender:`f`},base64url:{label:`מחרוזת בבסיס 64 לכתובות רשת`,gender:`f`},json_string:{label:`מחרוזת JSON`,gender:`f`},e164:{label:`מספר E.164`,gender:`m`},credit_card:{label:`מספר כרטיס אשראי`,gender:`m`},jwt:{label:`JWT`,gender:`m`},template_literal:{label:`קלט`,gender:`m`},ends_with:{label:`קלט`,gender:`m`},includes:{label:`קלט`,gender:`m`},lowercase:{label:`קלט`,gender:`m`},starts_with:{label:`קלט`,gender:`m`},uppercase:{label:`קלט`,gender:`m`}},c={nan:`NaN`};return t=>{switch(t.code){case`invalid_type`:{let n=t.expected,i=c[n??``]??r(n),a=B(t.input),o=c[a]??e[a]?.label??a;return/^[A-Z]/.test(t.expected)?`קלט לא תקין: צריך להיות instanceof ${t.expected}, התקבל ${o}`:`קלט לא תקין: צריך להיות ${i}, התקבל ${o}`}case`invalid_value`:{if(t.values.length===1)return`ערך לא תקין: הערך חייב להיות ${z(t.values[0])}`;let e=t.values.map(e=>z(e));if(t.values.length===2)return`ערך לא תקין: האפשרויות המתאימות הן ${e[0]} או ${e[1]}`;let n=e[e.length-1];return`ערך לא תקין: האפשרויות המתאימות הן ${e.slice(0,-1).join(`, `)} או ${n}`}case`too_big`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.longLabel??`ארוך`} מדי: ${n} צריכה להכיל ${t.maximum.toString()} ${e?.unit??``} ${t.inclusive?`או פחות`:`לכל היותר`}`.trim();if(t.origin===`number`)return`גדול מדי: ${n} צריך להיות ${t.inclusive?`קטן או שווה ל-${t.maximum}`:`קטן מ-${t.maximum}`}`;if(t.origin===`array`||t.origin===`set`)return`גדול מדי: ${n} ${t.origin===`set`?`צריכה`:`צריך`} להכיל ${t.inclusive?`${t.maximum} ${e?.unit??``} או פחות`:`פחות מ-${t.maximum} ${e?.unit??``}`}`.trim();let r=t.inclusive?`<=`:`<`,s=a(t.origin??`value`);return e?.unit?`${e.longLabel} מדי: ${n} ${s} ${r}${t.maximum.toString()} ${e.unit}`:`${e?.longLabel??`גדול`} מדי: ${n} ${s} ${r}${t.maximum.toString()}`}case`too_small`:{let e=o(t.origin),n=i(t.origin??`value`);if(t.origin===`string`)return`${e?.shortLabel??`קצר`} מדי: ${n} צריכה להכיל ${t.minimum.toString()} ${e?.unit??``} ${t.inclusive?`או יותר`:`לפחות`}`.trim();if(t.origin===`number`)return`קטן מדי: ${n} צריך להיות ${t.inclusive?`גדול או שווה ל-${t.minimum}`:`גדול מ-${t.minimum}`}`;if(t.origin===`array`||t.origin===`set`){let r=t.origin===`set`?`צריכה`:`צריך`;return t.minimum===1&&t.inclusive?`קטן מדי: ${n} ${r} להכיל ${t.origin,`לפחות פריט אחד`}`:`קטן מדי: ${n} ${r} להכיל ${t.inclusive?`${t.minimum} ${e?.unit??``} או יותר`:`יותר מ-${t.minimum} ${e?.unit??``}`}`.trim()}let r=t.inclusive?`>=`:`>`,s=a(t.origin??`value`);return e?.unit?`${e.shortLabel} מדי: ${n} ${s} ${r}${t.minimum.toString()} ${e.unit}`:`${e?.shortLabel??`קטן`} מדי: ${n} ${s} ${r}${t.minimum.toString()}`}case`invalid_format`:{let e=t;if(e.format===`starts_with`)return`המחרוזת חייבת להתחיל ב "${e.prefix}"`;if(e.format===`ends_with`)return`המחרוזת חייבת להסתיים ב "${e.suffix}"`;if(e.format===`includes`)return`המחרוזת חייבת לכלול "${e.includes}"`;if(e.format===`regex`)return`המחרוזת חייבת להתאים לתבנית ${e.pattern}`;let n=s[e.format];return`${n?.label??e.format} לא ${(n?.gender??`m`)===`f`?`תקינה`:`תקין`}`}case`not_multiple_of`:return`מספר לא תקין: חייב להיות מכפלה של ${t.divisor}`;case`unrecognized_keys`:return`מפתח${t.keys.length>1?`ות`:``} לא מזוה${t.keys.length>1?`ים`:`ה`}: ${L(t.keys,`, `)}`;case`invalid_key`:return`שדה לא תקין באובייקט`;case`invalid_union`:return`קלט לא תקין`;case`invalid_element`:return`ערך לא תקין ב${i(t.origin??`array`)}`;default:return`קלט לא תקין`}}}}));function dy(){return{localeError:fy()}}var fy,py=o((()=>{H(),fy=()=>{let e={string:{unit:`अक्षर`,verb:`रखने के लिए`},file:{unit:`बाइट्स`,verb:`रखने के लिए`},array:{unit:`तत्व`,verb:`रखने के लिए`},set:{unit:`तत्व`,verb:`रखने के लिए`},map:{unit:`प्रविष्टियाँ`,verb:`रखने के लिए`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`ईमेल पता`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO तिथि और समय`,date:`ISO तिथि`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 पता`,ipv6:`IPv6 पता`,mac:`MAC पता`,cidrv4:`IPv4 श्रेणी`,cidrv6:`IPv6 श्रेणी`,base64:`Base64-एन्कोडेड स्ट्रिंग`,base64url:`Base64URL-एन्कोडेड स्ट्रिंग`,json_string:`JSON स्ट्रिंग`,e164:`E.164 संख्या`,credit_card:`क्रेडिट कार्ड संख्या`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${z(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानों में से एक ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} में ${n}${e.maximum} ${r.unit} हों`:`बहुत बड़ा: अपेक्षित था कि ${e.origin??`मान`} ${n}${e.maximum} हो`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`बहुत छोटा: अपेक्षित था कि ${e.origin} में ${n}${e.minimum} ${r.unit} हों`:`बहुत छोटा: अपेक्षित था कि ${e.origin} ${n}${e.minimum} हो`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिंग: "${t.prefix}" से शुरू होना चाहिए`:t.format===`ends_with`?`अमान्य स्ट्रिंग: "${t.suffix}" पर समाप्त होना चाहिए`:t.format===`includes`?`अमान्य स्ट्रिंग: इसमें "${t.includes}" शामिल होना चाहिए`:t.format===`regex`?`अमान्य स्ट्रिंग: पैटर्न ${t.pattern} से मेल खाना चाहिए`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: यह ${e.divisor} का गुणज होना चाहिए`;case`unrecognized_keys`:return`अपरिचित कुंजी${e.keys.length>1?`याँ`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुंजी: ${e.origin} में`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} में`;default:return`अमान्य इनपुट`}}}}));function my(){return{localeError:hy()}}var hy,gy=o((()=>{H(),hy=()=>{let e={string:{unit:`znakova`,verb:`imati`},file:{unit:`bajtova`,verb:`imati`},array:{unit:`stavki`,verb:`imati`},set:{unit:`stavki`,verb:`imati`}};function t(t){return e[t]??null}let n={regex:`unos`,email:`email adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum i vrijeme`,date:`ISO datum`,time:`ISO vrijeme`,duration:`ISO trajanje`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`IPv4 raspon`,cidrv6:`IPv6 raspon`,base64:`base64 kodirani tekst`,base64url:`base64url kodirani tekst`,json_string:`JSON tekst`,e164:`E.164 broj`,credit_card:`broj kreditne kartice`,jwt:`JWT`,template_literal:`unos`},r={nan:`NaN`,string:`tekst`,number:`broj`,boolean:`boolean`,array:`niz`,object:`objekt`,set:`skup`,file:`datoteka`,date:`datum`,bigint:`bigint`,symbol:`simbol`,undefined:`undefined`,null:`null`,function:`funkcija`,map:`mapa`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neispravan unos: očekuje se instanceof ${e.expected}, a primljeno je ${i}`:`Neispravan unos: očekuje se ${t}, a primljeno je ${i}`}case`invalid_value`:return e.values.length===1?`Neispravna vrijednost: očekivano ${z(e.values[0])}`:`Neispravna opcija: očekivano jedno od ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Preveliko: očekivano da ${a??`vrijednost`} ima ${n}${e.maximum.toString()} ${i.unit??`elemenata`}`:`Preveliko: očekivano da ${a??`vrijednost`} bude ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,i=t(e.origin),a=r[e.origin]??e.origin;return i?`Premalo: očekivano da ${a} ima ${n}${e.minimum.toString()} ${i.unit}`:`Premalo: očekivano da ${a} bude ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neispravan tekst: mora započinjati s "${t.prefix}"`:t.format===`ends_with`?`Neispravan tekst: mora završavati s "${t.suffix}"`:t.format===`includes`?`Neispravan tekst: mora sadržavati "${t.includes}"`:t.format===`regex`?`Neispravan tekst: mora odgovarati uzorku ${t.pattern}`:`Neispravna ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neispravan broj: mora biti višekratnik od ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznat${e.keys.length>1?`i ključevi`:` ključ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neispravan ključ u ${r[e.origin]??e.origin}`;case`invalid_union`:return`Neispravan unos`;case`invalid_element`:return`Neispravna vrijednost u ${r[e.origin]??e.origin}`;default:return`Neispravan unos`}}}}));function _y(){return{localeError:vy()}}var vy,yy=o((()=>{H(),vy=()=>{let e={string:{unit:`karakter`,verb:`legyen`},file:{unit:`byte`,verb:`legyen`},array:{unit:`elem`,verb:`legyen`},set:{unit:`elem`,verb:`legyen`},map:{unit:`elem`,verb:`legyen`}};function t(t){return e[t]??null}let n={regex:`bemenet`,email:`email cím`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO időbélyeg`,date:`ISO dátum`,time:`ISO idő`,duration:`ISO időintervallum`,ipv4:`IPv4 cím`,ipv6:`IPv6 cím`,mac:`MAC cím`,cidrv4:`IPv4 tartomány`,cidrv6:`IPv6 tartomány`,base64:`base64-kódolt string`,base64url:`base64url-kódolt string`,json_string:`JSON string`,e164:`E.164 szám`,credit_card:`hitelkártyaszám`,jwt:`JWT`,template_literal:`bemenet`},r={nan:`NaN`,number:`szám`,array:`tömb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Érvénytelen bemenet: a várt érték instanceof ${e.expected}, a kapott érték ${i}`:`Érvénytelen bemenet: a várt érték ${t}, a kapott érték ${i}`}case`invalid_value`:return e.values.length===1?`Érvénytelen bemenet: a várt érték ${z(e.values[0])}`:`Érvénytelen opció: valamelyik érték várt ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Túl nagy: ${e.origin??`érték`} mérete túl nagy ${n}${e.maximum.toString()} ${r.unit??`elem`}`:`Túl nagy: a bemeneti érték ${e.origin??`érték`} túl nagy: ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Túl kicsi: a bemeneti érték ${e.origin} mérete túl kicsi ${n}${e.minimum.toString()} ${r.unit}`:`Túl kicsi: a bemeneti érték ${e.origin} túl kicsi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Érvénytelen string: "${t.prefix}" értékkel kell kezdődnie`:t.format===`ends_with`?`Érvénytelen string: "${t.suffix}" értékkel kell végződnie`:t.format===`includes`?`Érvénytelen string: "${t.includes}" értéket kell tartalmaznia`:t.format===`regex`?`Érvénytelen string: ${t.pattern} mintának kell megfelelnie`:`Érvénytelen ${n[t.format]??e.format}`}case`not_multiple_of`:return`Érvénytelen szám: ${e.divisor} többszörösének kell lennie`;case`unrecognized_keys`:return`Ismeretlen kulcs${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Érvénytelen kulcs ${e.origin}`;case`invalid_union`:return`Érvénytelen bemenet`;case`invalid_element`:return`Érvénytelen érték: ${e.origin}`;default:return`Érvénytelen bemenet`}}}}));function by(e,t,n){return Math.abs(e)===1?t:n}function xy(e){if(!e)return``;let t=[`ա`,`ե`,`ը`,`ի`,`ո`,`ու`,`օ`],n=e[e.length-1];return e+(t.includes(n)?`ն`:`ը`)}function Sy(){return{localeError:Cy()}}var Cy,wy=o((()=>{H(),Cy=()=>{let e={string:{unit:{one:`նշան`,many:`նշաններ`},verb:`ունենալ`},file:{unit:{one:`բայթ`,many:`բայթեր`},verb:`ունենալ`},array:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},set:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`},map:{unit:{one:`տարր`,many:`տարրեր`},verb:`ունենալ`}};function t(t){return e[t]??null}let n={regex:`մուտք`,email:`էլ. հասցե`,url:`URL`,emoji:`էմոջի`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ամսաթիվ և ժամ`,date:`ISO ամսաթիվ`,time:`ISO ժամ`,duration:`ISO տևողություն`,ipv4:`IPv4 հասցե`,ipv6:`IPv6 հասցե`,mac:`MAC հասցե`,cidrv4:`IPv4 միջակայք`,cidrv6:`IPv6 միջակայք`,base64:`base64 ձևաչափով տող`,base64url:`base64url ձևաչափով տող`,json_string:`JSON տող`,e164:`E.164 համար`,credit_card:`կրեդիտ քարտի համար`,jwt:`JWT`,template_literal:`մուտք`},r={nan:`NaN`,number:`թիվ`,array:`զանգված`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Սխալ մուտքագրում․ սպասվում էր instanceof ${e.expected}, ստացվել է ${i}`:`Սխալ մուտքագրում․ սպասվում էր ${t}, ստացվել է ${i}`}case`invalid_value`:return e.values.length===1?`Սխալ մուտքագրում․ սպասվում էր ${z(e.values[1])}`:`Սխալ տարբերակ․ սպասվում էր հետևյալներից մեկը՝ ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=by(Number(e.maximum),r.unit.one,r.unit.many);return`Չափազանց մեծ արժեք․ սպասվում է, որ ${xy(e.origin??`արժեք`)} կունենա ${n}${e.maximum.toString()} ${t}`}return`Չափազանց մեծ արժեք․ սպասվում է, որ ${xy(e.origin??`արժեք`)} լինի ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=by(Number(e.minimum),r.unit.one,r.unit.many);return`Չափազանց փոքր արժեք․ սպասվում է, որ ${xy(e.origin)} կունենա ${n}${e.minimum.toString()} ${t}`}return`Չափազանց փոքր արժեք․ սպասվում է, որ ${xy(e.origin)} լինի ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Սխալ տող․ պետք է սկսվի "${t.prefix}"-ով`:t.format===`ends_with`?`Սխալ տող․ պետք է ավարտվի "${t.suffix}"-ով`:t.format===`includes`?`Սխալ տող․ պետք է պարունակի "${t.includes}"`:t.format===`regex`?`Սխալ տող․ պետք է համապատասխանի ${t.pattern} ձևաչափին`:`Սխալ ${n[t.format]??e.format}`}case`not_multiple_of`:return`Սխալ թիվ․ պետք է բազմապատիկ լինի ${e.divisor}-ի`;case`unrecognized_keys`:return`Չճանաչված բանալի${e.keys.length>1?`ներ`:``}. ${L(e.keys,`, `)}`;case`invalid_key`:return`Սխալ բանալի ${xy(e.origin)}-ում`;case`invalid_union`:return`Սխալ մուտքագրում`;case`invalid_element`:return`Սխալ արժեք ${xy(e.origin)}-ում`;default:return`Սխալ մուտքագրում`}}}}));function Ty(){return{localeError:Ey()}}var Ey,Dy=o((()=>{H(),Ey=()=>{let e={string:{unit:`karakter`,verb:`memiliki`},file:{unit:`byte`,verb:`memiliki`},array:{unit:`item`,verb:`memiliki`},set:{unit:`item`,verb:`memiliki`},map:{unit:`item`,verb:`memiliki`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tanggal dan waktu format ISO`,date:`tanggal format ISO`,time:`jam format ISO`,duration:`durasi format ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`rentang alamat IPv4`,cidrv6:`rentang alamat IPv6`,base64:`string dengan enkode base64`,base64url:`string dengan enkode base64url`,json_string:`string JSON`,e164:`angka E.164`,credit_card:`nomor kartu kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak valid: diharapkan instanceof ${e.expected}, diterima ${i}`:`Input tidak valid: diharapkan ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak valid: diharapkan ${z(e.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: diharapkan ${e.origin??`value`} memiliki ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: diharapkan ${e.origin??`value`} menjadi ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: diharapkan ${e.origin} memiliki ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: diharapkan ${e.origin} menjadi ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak valid: harus dimulai dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak valid: harus berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak valid: harus menyertakan "${t.includes}"`:t.format===`regex`?`String tidak valid: harus sesuai pola ${t.pattern}`:`${n[t.format]??e.format} tidak valid`}case`not_multiple_of`:return`Angka tidak valid: harus kelipatan dari ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak valid di ${e.origin}`;case`invalid_union`:return`Input tidak valid`;case`invalid_element`:return`Nilai tidak valid di ${e.origin}`;default:return`Input tidak valid`}}}}));function Oy(){return{localeError:ky()}}var ky,Ay=o((()=>{H(),ky=()=>{let e={string:{unit:`stafi`,verb:`að hafa`},file:{unit:`bæti`,verb:`að hafa`},array:{unit:`hluti`,verb:`að hafa`},set:{unit:`hluti`,verb:`að hafa`},map:{unit:`hluti`,verb:`að hafa`}};function t(t){return e[t]??null}let n={regex:`gildi`,email:`netfang`,url:`vefslóð`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dagsetning og tími`,date:`ISO dagsetning`,time:`ISO tími`,duration:`ISO tímalengd`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded strengur`,base64url:`base64url-encoded strengur`,json_string:`JSON strengur`,e164:`E.164 tölugildi`,credit_card:`kreditkortanúmer`,jwt:`JWT`,template_literal:`gildi`},r={nan:`NaN`,number:`númer`,array:`fylki`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Rangt gildi: Þú slóst inn ${i} þar sem á að vera instanceof ${e.expected}`:`Rangt gildi: Þú slóst inn ${i} þar sem á að vera ${t}`}case`invalid_value`:return e.values.length===1?`Rangt gildi: gert ráð fyrir ${z(e.values[0])}`:`Ógilt val: má vera eitt af eftirfarandi ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} hafi ${n}${e.maximum.toString()} ${r.unit??`hluti`}`:`Of stórt: gert er ráð fyrir að ${e.origin??`gildi`} sé ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Of lítið: gert er ráð fyrir að ${e.origin} hafi ${n}${e.minimum.toString()} ${r.unit}`:`Of lítið: gert er ráð fyrir að ${e.origin} sé ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ógildur strengur: verður að byrja á "${t.prefix}"`:t.format===`ends_with`?`Ógildur strengur: verður að enda á "${t.suffix}"`:t.format===`includes`?`Ógildur strengur: verður að innihalda "${t.includes}"`:t.format===`regex`?`Ógildur strengur: verður að fylgja mynstri ${t.pattern}`:`Rangt ${n[t.format]??e.format}`}case`not_multiple_of`:return`Röng tala: verður að vera margfeldi af ${e.divisor}`;case`unrecognized_keys`:return`Óþekkt ${e.keys.length>1?`ir lyklar`:`ur lykill`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Rangur lykill í ${e.origin}`;case`invalid_union`:return`Rangt gildi`;case`invalid_element`:return`Rangt gildi í ${e.origin}`;default:return`Rangt gildi`}}}}));function jy(){return{localeError:My()}}var My,Ny=o((()=>{H(),My=()=>{let e={string:{unit:`caratteri`,verb:`avere`},file:{unit:`byte`,verb:`avere`},array:{unit:`elementi`,verb:`avere`},set:{unit:`elementi`,verb:`avere`},map:{unit:`elementi`,verb:`avere`}};function t(t){return e[t]??null}let n={regex:`input`,email:`indirizzo email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data e ora ISO`,date:`data ISO`,time:`ora ISO`,duration:`durata ISO`,ipv4:`indirizzo IPv4`,ipv6:`indirizzo IPv6`,mac:`indirizzo MAC`,cidrv4:`intervallo IPv4`,cidrv6:`intervallo IPv6`,base64:`stringa codificata in base64`,base64url:`URL codificata in base64`,json_string:`stringa JSON`,e164:`numero E.164`,credit_card:`numero di carta di credito`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`numero`,array:`vettore`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input non valido: atteso instanceof ${e.expected}, ricevuto ${i}`:`Input non valido: atteso ${t}, ricevuto ${i}`}case`invalid_value`:return e.values.length===1?`Input non valido: atteso ${z(e.values[0])}`:`Opzione non valida: atteso uno tra ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Troppo grande: ${e.origin??`valore`} deve avere ${n}${e.maximum.toString()} ${r.unit??`elementi`}`:`Troppo grande: ${e.origin??`valore`} deve essere ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Troppo piccolo: ${e.origin} deve avere ${n}${e.minimum.toString()} ${r.unit}`:`Troppo piccolo: ${e.origin} deve essere ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Stringa non valida: deve iniziare con "${t.prefix}"`:t.format===`ends_with`?`Stringa non valida: deve terminare con "${t.suffix}"`:t.format===`includes`?`Stringa non valida: deve includere "${t.includes}"`:t.format===`regex`?`Stringa non valida: deve corrispondere al pattern ${t.pattern}`:`Input non valido: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Numero non valido: deve essere un multiplo di ${e.divisor}`;case`unrecognized_keys`:return`Chiav${e.keys.length>1?`i`:`e`} non riconosciut${e.keys.length>1?`e`:`a`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Chiave non valida in ${e.origin}`;case`invalid_union`:return`Input non valido`;case`invalid_element`:return`Valore non valido in ${e.origin}`;default:return`Input non valido`}}}}));function Py(){return{localeError:Fy()}}var Fy,Iy=o((()=>{H(),Fy=()=>{let e={string:{unit:`文字`,verb:`である`},file:{unit:`バイト`,verb:`である`},array:{unit:`要素`,verb:`である`},set:{unit:`要素`,verb:`である`},map:{unit:`要素`,verb:`である`}};function t(t){return e[t]??null}let n={regex:`入力値`,email:`メールアドレス`,url:`URL`,emoji:`絵文字`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日時`,date:`ISO日付`,time:`ISO時刻`,duration:`ISO期間`,ipv4:`IPv4アドレス`,ipv6:`IPv6アドレス`,mac:`MACアドレス`,cidrv4:`IPv4範囲`,cidrv6:`IPv6範囲`,base64:`base64エンコード文字列`,base64url:`base64urlエンコード文字列`,json_string:`JSON文字列`,e164:`E.164番号`,credit_card:`クレジットカード番号`,jwt:`JWT`,template_literal:`入力値`},r={nan:`NaN`,number:`数値`,array:`配列`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無効な入力: instanceof ${e.expected}が期待されましたが、${i}が入力されました`:`無効な入力: ${t}が期待されましたが、${i}が入力されました`}case`invalid_value`:return e.values.length===1?`無効な入力: ${z(e.values[0])}が期待されました`:`無効な選択: ${L(e.values,`、`)}のいずれかである必要があります`;case`too_big`:{let n=e.inclusive?`以下である`:`より小さい`,r=t(e.origin);return r?`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${r.unit??`要素`}${n}必要があります`:`大きすぎる値: ${e.origin??`値`}は${e.maximum.toString()}${n}必要があります`}case`too_small`:{let n=e.inclusive?`以上である`:`より大きい`,r=t(e.origin);return r?`小さすぎる値: ${e.origin}は${e.minimum.toString()}${r.unit}${n}必要があります`:`小さすぎる値: ${e.origin}は${e.minimum.toString()}${n}必要があります`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無効な文字列: "${t.prefix}"で始まる必要があります`:t.format===`ends_with`?`無効な文字列: "${t.suffix}"で終わる必要があります`:t.format===`includes`?`無効な文字列: "${t.includes}"を含む必要があります`:t.format===`regex`?`無効な文字列: パターン${t.pattern}に一致する必要があります`:`無効な${n[t.format]??e.format}`}case`not_multiple_of`:return`無効な数値: ${e.divisor}の倍数である必要があります`;case`unrecognized_keys`:return`認識されていないキー${e.keys.length>1?`群`:``}: ${L(e.keys,`、`)}`;case`invalid_key`:return`${e.origin}内の無効なキー`;case`invalid_union`:return`無効な入力`;case`invalid_element`:return`${e.origin}内の無効な値`;default:return`無効な入力`}}}}));function Ly(){return{localeError:Ry()}}var Ry,zy=o((()=>{H(),Ry=()=>{let e={string:{unit:`სიმბოლო`,verb:`უნდა შეიცავდეს`},file:{unit:`ბაიტი`,verb:`უნდა შეიცავდეს`},array:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},set:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`},map:{unit:`ელემენტი`,verb:`უნდა შეიცავდეს`}};function t(t){return e[t]??null}let n={regex:`შეყვანა`,email:`ელ-ფოსტის მისამართი`,url:`URL`,emoji:`ემოჯი`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`თარიღი-დრო`,date:`თარიღი`,time:`დრო`,duration:`ხანგრძლივობა`,ipv4:`IPv4 მისამართი`,ipv6:`IPv6 მისამართი`,mac:`MAC მისამართი`,cidrv4:`IPv4 დიაპაზონი`,cidrv6:`IPv6 დიაპაზონი`,base64:`base64-კოდირებული ველი`,base64url:`base64url-კოდირებული ველი`,json_string:`JSON ველი`,e164:`E.164 ნომერი`,credit_card:`საკრედიტო ბარათის ნომერი`,jwt:`JWT`,template_literal:`შეყვანა`},r={nan:`NaN`,number:`რიცხვი`,string:`ველი`,boolean:`ბულეანი`,function:`ფუნქცია`,array:`მასივი`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`არასწორი შეყვანა: მოსალოდნელი instanceof ${e.expected}, მიღებული ${i}`:`არასწორი შეყვანა: მოსალოდნელი ${t}, მიღებული ${i}`}case`invalid_value`:return e.values.length===1?`არასწორი შეყვანა: მოსალოდნელი ${z(e.values[0])}`:`არასწორი ვარიანტი: მოსალოდნელია ერთ-ერთი ${L(e.values,`|`)}-დან`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit}`:`ზედმეტად დიდი: მოსალოდნელი ${e.origin??`მნიშვნელობა`} იყოს ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ზედმეტად პატარა: მოსალოდნელი ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`ზედმეტად პატარა: მოსალოდნელი ${e.origin} იყოს ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`არასწორი ველი: უნდა იწყებოდეს "${t.prefix}"-ით`:t.format===`ends_with`?`არასწორი ველი: უნდა მთავრდებოდეს "${t.suffix}"-ით`:t.format===`includes`?`არასწორი ველი: უნდა შეიცავდეს "${t.includes}"-ს`:t.format===`regex`?`არასწორი ველი: უნდა შეესაბამებოდეს შაბლონს ${t.pattern}`:`არასწორი ${n[t.format]??e.format}`}case`not_multiple_of`:return`არასწორი რიცხვი: უნდა იყოს ${e.divisor}-ის ჯერადი`;case`unrecognized_keys`:return`უცნობი გასაღებ${e.keys.length>1?`ები`:`ი`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`არასწორი გასაღები ${e.origin}-ში`;case`invalid_union`:return`არასწორი შეყვანა`;case`invalid_element`:return`არასწორი მნიშვნელობა ${e.origin}-ში`;default:return`არასწორი შეყვანა`}}}}));function By(){return{localeError:Vy()}}var Vy,Hy=o((()=>{H(),Vy=()=>{let e={string:{unit:`តួអក្សរ`,verb:`គួរមាន`},file:{unit:`បៃ`,verb:`គួរមាន`},array:{unit:`ធាតុ`,verb:`គួរមាន`},set:{unit:`ធាតុ`,verb:`គួរមាន`},map:{unit:`ធាតុ`,verb:`គួរមាន`}};function t(t){return e[t]??null}let n={regex:`ទិន្នន័យបញ្ចូល`,email:`អាសយដ្ឋានអ៊ីមែល`,url:`URL`,emoji:`សញ្ញាអារម្មណ៍`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`កាលបរិច្ឆេទ និងម៉ោង ISO`,date:`កាលបរិច្ឆេទ ISO`,time:`ម៉ោង ISO`,duration:`រយៈពេល ISO`,ipv4:`អាសយដ្ឋាន IPv4`,ipv6:`អាសយដ្ឋាន IPv6`,mac:`អាសយដ្ឋាន MAC`,cidrv4:`ដែនអាសយដ្ឋាន IPv4`,cidrv6:`ដែនអាសយដ្ឋាន IPv6`,base64:`ខ្សែអក្សរអ៊ិកូដ base64`,base64url:`ខ្សែអក្សរអ៊ិកូដ base64url`,json_string:`ខ្សែអក្សរ JSON`,e164:`លេខ E.164`,credit_card:`លេខប័ណ្ណឥណទាន`,jwt:`JWT`,template_literal:`ទិន្នន័យបញ្ចូល`},r={nan:`NaN`,number:`លេខ`,array:`អារេ (Array)`,null:`គ្មានតម្លៃ (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ instanceof ${e.expected} ប៉ុន្តែទទួលបាន ${i}`:`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${t} ប៉ុន្តែទទួលបាន ${i}`}case`invalid_value`:return e.values.length===1?`ទិន្នន័យបញ្ចូលមិនត្រឹមត្រូវ៖ ត្រូវការ ${z(e.values[0])}`:`ជម្រើសមិនត្រឹមត្រូវ៖ ត្រូវជាមួយក្នុងចំណោម ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()} ${r.unit??`ធាតុ`}`:`ធំពេក៖ ត្រូវការ ${e.origin??`តម្លៃ`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`តូចពេក៖ ត្រូវការ ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវចាប់ផ្តើមដោយ "${t.prefix}"`:t.format===`ends_with`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវបញ្ចប់ដោយ "${t.suffix}"`:t.format===`includes`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវមាន "${t.includes}"`:t.format===`regex`?`ខ្សែអក្សរមិនត្រឹមត្រូវ៖ ត្រូវតែផ្គូផ្គងនឹងទម្រង់ដែលបានកំណត់ ${t.pattern}`:`មិនត្រឹមត្រូវ៖ ${n[t.format]??e.format}`}case`not_multiple_of`:return`លេខមិនត្រឹមត្រូវ៖ ត្រូវតែជាពហុគុណនៃ ${e.divisor}`;case`unrecognized_keys`:return`រកឃើញសោមិនស្គាល់៖ ${L(e.keys,`, `)}`;case`invalid_key`:return`សោមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;case`invalid_union`:return`ទិន្នន័យមិនត្រឹមត្រូវ`;case`invalid_element`:return`ទិន្នន័យមិនត្រឹមត្រូវនៅក្នុង ${e.origin}`;default:return`ទិន្នន័យមិនត្រឹមត្រូវ`}}}}));function Uy(){return By()}var Wy=o((()=>{Hy()}));function Gy(){return{localeError:Ky()}}var Ky,qy=o((()=>{H(),Ky=()=>{let e={string:{unit:`ಅಕ್ಷರಗಳು`,verb:`ಹೊಂದಲು`},file:{unit:`ಬೈಟ್‌ಗಳು`,verb:`ಹೊಂದಲು`},array:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},set:{unit:`ವಸ್ತುಗಳು`,verb:`ಹೊಂದಲು`},map:{unit:`entries`,verb:`ಹೊಂದಲು`}};function t(t){return e[t]??null}let n={regex:`ಇನ್ಪುಟ್`,email:`email ವಿಳಾಸ`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO ದಿನಾಂಕದ ಸಮಯ`,date:`ISO ದಿನಾಂಕ`,time:`ISO ಸಮಯ`,duration:`ISO ಅವಧಿ`,ipv4:`IPv4 ವಿಳಾಸ`,ipv6:`IPv6 ವಿಳಾಸ`,mac:`MAC ವಿಳಾಸ`,cidrv4:`IPv4 ವ್ಯಾಪ್ತಿಯ`,cidrv6:`IPv6 ವ್ಯಾಪ್ತಿಯ`,base64:`base64-encodedಸ್ಟ್ರಿಂಗ್`,base64url:`base64url-encodedಸ್ಟ್ರಿಂಗ್`,json_string:`JSONಸ್ಟ್ರಿಂಗ್`,e164:`E.164 ಸಂಖ್ಯೆ`,credit_card:`ಕ್ರೆಡಿಟ್ ಕಾರ್ಡ್ ಸಂಖ್ಯೆ`,jwt:`JWT`,template_literal:`ಇನ್ಪುಟ್`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${t}, ಸ್ವೀಕರಿಸಿದನು ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${z(e.values[0])}`:`ಅಮಾನ್ಯ ಆಯ್ಕೆ: ಇವುಗಳಲ್ಲಿ ಒಂದನ್ನು ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಹೊಂದಲು ${n}${e.maximum.toString()} ${r.unit??`ಅಂಶಗಳು`}`:`ತುಂಬಾ ದೊಡ್ಡದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin??`value`} ಎಂದು ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಹೊಂದಲು ${n}${e.minimum.toString()} ${r.unit}`:`ತುಂಬಾ ಚಿಕ್ಕದು: ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.origin} ಎಂದು ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಪ್ರಾರಂಭಿಸಬೇಕು "${t.prefix}"`:t.format===`ends_with`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಇದರೊಂದಿಗೆ ಕೊನೆಗೊಳ್ಳಬೇಕು "${t.suffix}"`:t.format===`includes`?`ಅಮಾನ್ಯ ಸ್ಟ್ರಿಂಗ್: ಒಳಗೊಂಡಿರಬೇಕು "${t.includes}"`:t.format===`regex`?`ಅಮಾನ್ಯವಾದ ಸ್ಟ್ರಿಂಗ್: ಮಾದರಿಗೆ ಹೊಂದಿಕೆಯಾಗಬೇಕು ${t.pattern}`:`ಅಮಾನ್ಯ ${n[t.format]??e.format}`}case`not_multiple_of`:return`ಅಮಾನ್ಯ ಸಂಖ್ಯೆ: ಬಹುಸಂಖ್ಯೆಯಾಗಿರಬೇಕು ${e.divisor}`;case`unrecognized_keys`:return`ಗುರುತಿಸಲಾಗದ ಕೀ ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`ಅಮಾನ್ಯವಾದ ಕೀ ಇನ್ ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`ಅಮಾನ್ಯ ತಾರತಮ್ಯ ಮೌಲ್ಯ. ನಿರೀಕ್ಷಿಸಲಾಗಿದೆ ${e.options.map(e=>`'${e}'`).join(` | `)}`:`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`;case`invalid_element`:return`ರಲ್ಲಿ ಅಮಾನ್ಯ ಮೌಲ್ಯ ${e.origin}`;default:return`ಅಮಾನ್ಯ ಇನ್‌ಪುಟ್`}}}}));function Jy(){return{localeError:Yy()}}var Yy,Xy=o((()=>{H(),Yy=()=>{let e={string:{unit:`문자`,verb:`to have`},file:{unit:`바이트`,verb:`to have`},array:{unit:`개`,verb:`to have`},set:{unit:`개`,verb:`to have`},map:{unit:`개`,verb:`to have`}};function t(t){return e[t]??null}let n={regex:`입력`,email:`이메일 주소`,url:`URL`,emoji:`이모지`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 날짜시간`,date:`ISO 날짜`,time:`ISO 시간`,duration:`ISO 기간`,ipv4:`IPv4 주소`,ipv6:`IPv6 주소`,mac:`MAC 주소`,cidrv4:`IPv4 범위`,cidrv6:`IPv6 범위`,base64:`base64 인코딩 문자열`,base64url:`base64url 인코딩 문자열`,json_string:`JSON 문자열`,e164:`E.164 번호`,credit_card:`신용카드 번호`,jwt:`JWT`,template_literal:`입력`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`잘못된 입력: 예상 타입은 instanceof ${e.expected}, 받은 타입은 ${i}입니다`:`잘못된 입력: 예상 타입은 ${t}, 받은 타입은 ${i}입니다`}case`invalid_value`:return e.values.length===1?`잘못된 입력: 값은 ${z(e.values[0])} 이어야 합니다`:`잘못된 옵션: ${L(e.values,`또는 `)} 중 하나여야 합니다`;case`too_big`:{let n=e.inclusive?`이하`:`미만`,r=n===`미만`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 큽니다: ${e.maximum.toString()} ${n}${r}`}case`too_small`:{let n=e.inclusive?`이상`:`초과`,r=n===`이상`?`이어야 합니다`:`여야 합니다`,i=t(e.origin),a=i?.unit??`요소`;return i?`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()}${a} ${n}${r}`:`${e.origin??`값`}이 너무 작습니다: ${e.minimum.toString()} ${n}${r}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`잘못된 문자열: "${t.prefix}"(으)로 시작해야 합니다`:t.format===`ends_with`?`잘못된 문자열: "${t.suffix}"(으)로 끝나야 합니다`:t.format===`includes`?`잘못된 문자열: "${t.includes}"을(를) 포함해야 합니다`:t.format===`regex`?`잘못된 문자열: 정규식 ${t.pattern} 패턴과 일치해야 합니다`:`잘못된 ${n[t.format]??e.format}`}case`not_multiple_of`:return`잘못된 숫자: ${e.divisor}의 배수여야 합니다`;case`unrecognized_keys`:return`인식할 수 없는 키: ${L(e.keys,`, `)}`;case`invalid_key`:return`잘못된 키: ${e.origin}`;case`invalid_union`:return`잘못된 입력`;case`invalid_element`:return`잘못된 값: ${e.origin}`;default:return`잘못된 입력`}}}}));function Zy(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?`many`:n===1?`one`:`few`}function Qy(){return{localeError:eb()}}var $y,eb,tb=o((()=>{H(),$y=e=>e.charAt(0).toUpperCase()+e.slice(1),eb=()=>{let e={string:{unit:{one:`simbolis`,few:`simboliai`,many:`simbolių`},verb:{smaller:{inclusive:`turi būti ne ilgesnė kaip`,notInclusive:`turi būti trumpesnė kaip`},bigger:{inclusive:`turi būti ne trumpesnė kaip`,notInclusive:`turi būti ilgesnė kaip`}}},file:{unit:{one:`baitas`,few:`baitai`,many:`baitų`},verb:{smaller:{inclusive:`turi būti ne didesnis kaip`,notInclusive:`turi būti mažesnis kaip`},bigger:{inclusive:`turi būti ne mažesnis kaip`,notInclusive:`turi būti didesnis kaip`}}},array:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}},set:{unit:{one:`elementą`,few:`elementus`,many:`elementų`},verb:{smaller:{inclusive:`turi turėti ne daugiau kaip`,notInclusive:`turi turėti mažiau kaip`},bigger:{inclusive:`turi turėti ne mažiau kaip`,notInclusive:`turi turėti daugiau kaip`}}}};function t(t,n,r,i){let a=e[t]??null;return a===null?a:{unit:a.unit[n],verb:a.verb[i][r?`inclusive`:`notInclusive`]}}let n={regex:`įvestis`,email:`el. pašto adresas`,url:`URL`,emoji:`jaustukas`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO data ir laikas`,date:`ISO data`,time:`ISO laikas`,duration:`ISO trukmė`,ipv4:`IPv4 adresas`,ipv6:`IPv6 adresas`,mac:`MAC adresas`,cidrv4:`IPv4 tinklo prefiksas (CIDR)`,cidrv6:`IPv6 tinklo prefiksas (CIDR)`,base64:`base64 užkoduota eilutė`,base64url:`base64url užkoduota eilutė`,json_string:`JSON eilutė`,e164:`E.164 numeris`,credit_card:`kredito kortelės numeris`,jwt:`JWT`,template_literal:`įvestis`},r={nan:`NaN`,number:`skaičius`,bigint:`sveikasis skaičius`,string:`eilutė`,boolean:`loginė reikšmė`,undefined:`neapibrėžta reikšmė`,function:`funkcija`,symbol:`simbolis`,array:`masyvas`,object:`objektas`,null:`nulinė reikšmė`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Gautas tipas ${i}, o tikėtasi - instanceof ${e.expected}`:`Gautas tipas ${i}, o tikėtasi - ${t}`}case`invalid_value`:return e.values.length===1?`Privalo būti ${z(e.values[0])}`:`Privalo būti vienas iš ${L(e.values,`|`)} pasirinkimų`;case`too_big`:{let n=r[e.origin]??e.origin,i=t(e.origin,Zy(Number(e.maximum)),e.inclusive??!1,`smaller`);if(i?.verb)return`${$y(n??e.origin??`reikšmė`)} ${i.verb} ${e.maximum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne didesnis kaip`:`mažesnis kaip`;return`${$y(n??e.origin??`reikšmė`)} turi būti ${a} ${e.maximum.toString()} ${i?.unit}`}case`too_small`:{let n=r[e.origin]??e.origin,i=t(e.origin,Zy(Number(e.minimum)),e.inclusive??!1,`bigger`);if(i?.verb)return`${$y(n??e.origin??`reikšmė`)} ${i.verb} ${e.minimum.toString()} ${i.unit??`elementų`}`;let a=e.inclusive?`ne mažesnis kaip`:`didesnis kaip`;return`${$y(n??e.origin??`reikšmė`)} turi būti ${a} ${e.minimum.toString()} ${i?.unit}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Eilutė privalo prasidėti "${t.prefix}"`:t.format===`ends_with`?`Eilutė privalo pasibaigti "${t.suffix}"`:t.format===`includes`?`Eilutė privalo įtraukti "${t.includes}"`:t.format===`regex`?`Eilutė privalo atitikti ${t.pattern}`:`Neteisingas ${n[t.format]??e.format}`}case`not_multiple_of`:return`Skaičius privalo būti ${e.divisor} kartotinis.`;case`unrecognized_keys`:return`Neatpažint${e.keys.length>1?`i`:`as`} rakt${e.keys.length>1?`ai`:`as`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Rastas klaidingas raktas`;case`invalid_union`:return`Klaidinga įvestis`;case`invalid_element`:{let t=r[e.origin]??e.origin;return`${$y(t??e.origin??`reikšmė`)} turi klaidingą įvestį`}default:return`Klaidinga įvestis`}}}}));function nb(){return{localeError:rb()}}var rb,ib=o((()=>{H(),rb=()=>{let e={string:{unit:`знаци`,verb:`да имаат`},file:{unit:`бајти`,verb:`да имаат`},array:{unit:`ставки`,verb:`да имаат`},set:{unit:`ставки`,verb:`да имаат`},map:{unit:`ставки`,verb:`да имаат`}};function t(t){return e[t]??null}let n={regex:`внес`,email:`адреса на е-пошта`,url:`URL`,emoji:`емоџи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO датум и време`,date:`ISO датум`,time:`ISO време`,duration:`ISO времетраење`,ipv4:`IPv4 адреса`,ipv6:`IPv6 адреса`,mac:`MAC адреса`,cidrv4:`IPv4 опсег`,cidrv6:`IPv6 опсег`,base64:`base64-енкодирана низа`,base64url:`base64url-енкодирана низа`,json_string:`JSON низа`,e164:`E.164 број`,credit_card:`број на кредитна картичка`,jwt:`JWT`,template_literal:`внес`},r={nan:`NaN`,number:`број`,array:`низа`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Грешен внес: се очекува instanceof ${e.expected}, примено ${i}`:`Грешен внес: се очекува ${t}, примено ${i}`}case`invalid_value`:return e.values.length===1?`Invalid input: expected ${z(e.values[0])}`:`Грешана опција: се очекува една ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Премногу голем: се очекува ${e.origin??`вредноста`} да има ${n}${e.maximum.toString()} ${r.unit??`елементи`}`:`Премногу голем: се очекува ${e.origin??`вредноста`} да биде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Премногу мал: се очекува ${e.origin} да има ${n}${e.minimum.toString()} ${r.unit}`:`Премногу мал: се очекува ${e.origin} да биде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неважечка низа: мора да започнува со "${t.prefix}"`:t.format===`ends_with`?`Неважечка низа: мора да завршува со "${t.suffix}"`:t.format===`includes`?`Неважечка низа: мора да вклучува "${t.includes}"`:t.format===`regex`?`Неважечка низа: мора да одгоара на патернот ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Грешен број: мора да биде делив со ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Непрепознаени клучеви`:`Непрепознаен клуч`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Грешен клуч во ${e.origin}`;case`invalid_union`:return`Грешен внес`;case`invalid_element`:return`Грешна вредност во ${e.origin}`;default:return`Грешен внес`}}}}));function ab(){return{localeError:ob()}}var ob,sb=o((()=>{H(),ob=()=>{let e={string:{unit:`aksara`,verb:`mempunyai`},file:{unit:`bait`,verb:`mempunyai`},array:{unit:`elemen`,verb:`mempunyai`},set:{unit:`elemen`,verb:`mempunyai`},map:{unit:`elemen`,verb:`mempunyai`}};function t(t){return e[t]??null}let n={regex:`input`,email:`alamat e-mel`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`tarikh masa ISO`,date:`tarikh ISO`,time:`masa ISO`,duration:`tempoh ISO`,ipv4:`alamat IPv4`,ipv6:`alamat IPv6`,mac:`alamat MAC`,cidrv4:`julat IPv4`,cidrv6:`julat IPv6`,base64:`string dikodkan base64`,base64url:`string dikodkan base64url`,json_string:`string JSON`,e164:`nombor E.164`,credit_card:`nombor kad kredit`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`nombor`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Input tidak sah: dijangka instanceof ${e.expected}, diterima ${i}`:`Input tidak sah: dijangka ${t}, diterima ${i}`}case`invalid_value`:return e.values.length===1?`Input tidak sah: dijangka ${z(e.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Terlalu besar: dijangka ${e.origin??`nilai`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemen`}`:`Terlalu besar: dijangka ${e.origin??`nilai`} adalah ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Terlalu kecil: dijangka ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Terlalu kecil: dijangka ${e.origin} adalah ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`String tidak sah: mesti bermula dengan "${t.prefix}"`:t.format===`ends_with`?`String tidak sah: mesti berakhir dengan "${t.suffix}"`:t.format===`includes`?`String tidak sah: mesti mengandungi "${t.includes}"`:t.format===`regex`?`String tidak sah: mesti sepadan dengan corak ${t.pattern}`:`${n[t.format]??e.format} tidak sah`}case`not_multiple_of`:return`Nombor tidak sah: perlu gandaan ${e.divisor}`;case`unrecognized_keys`:return`Kunci tidak dikenali: ${L(e.keys,`, `)}`;case`invalid_key`:return`Kunci tidak sah dalam ${e.origin}`;case`invalid_union`:return`Input tidak sah`;case`invalid_element`:return`Nilai tidak sah dalam ${e.origin}`;default:return`Input tidak sah`}}}}));function cb(){return{localeError:lb()}}var lb,ub=o((()=>{H(),lb=()=>{let e={string:{unit:`अक्षर`,verb:`हुनुपर्छ`},file:{unit:`बाइट`,verb:`हुनुपर्छ`},array:{unit:`तत्व`,verb:`हुनुपर्छ`},set:{unit:`तत्व`,verb:`हुनुपर्छ`},map:{unit:`प्रविष्टि`,verb:`हुनुपर्छ`}};function t(t){return e[t]??null}let n={regex:`इनपुट`,email:`इमेल ठेगाना`,url:`URL`,emoji:`इमोजी`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO मिति र समय`,date:`ISO मिति`,time:`ISO समय`,duration:`ISO अवधि`,ipv4:`IPv4 ठेगाना`,ipv6:`IPv6 ठेगाना`,mac:`MAC ठेगाना`,cidrv4:`IPv4 दायरा`,cidrv6:`IPv6 दायरा`,base64:`base64-इन्कोड गरिएको स्ट्रिङ`,base64url:`base64url-इन्कोड गरिएको स्ट्रिङ`,json_string:`JSON स्ट्रिङ`,e164:`E.164 नम्बर`,credit_card:`क्रेडिट कार्ड नम्बर`,jwt:`JWT`,template_literal:`इनपुट`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`अमान्य इनपुट: अपेक्षित ${t}, प्राप्त ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`अमान्य इनपुट: अपेक्षित ${z(e.values[0])}`:`अमान्य विकल्प: अपेक्षित मानहरू मध्ये एक ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`धेरै ठूलो: ${e.origin??`मान`} मा ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`धेरै ठूलो: ${e.origin??`मान`} ${n}${e.maximum.toString()} हुनुपर्छ`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`धेरै सानो: ${e.origin} मा ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`धेरै सानो: ${e.origin} ${n}${e.minimum.toString()} हुनुपर्छ`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`अमान्य स्ट्रिङ: "${t.prefix}" बाट सुरु हुनुपर्छ`:t.format===`ends_with`?`अमान्य स्ट्रिङ: "${t.suffix}" मा समाप्त हुनुपर्छ`:t.format===`includes`?`अमान्य स्ट्रिङ: "${t.includes}" समावेश हुनुपर्छ`:t.format===`regex`?`अमान्य स्ट्रिङ: ढाँचा ${t.pattern} सँग मेल खानुपर्छ`:`अमान्य ${n[t.format]??e.format}`}case`not_multiple_of`:return`अमान्य संख्या: ${e.divisor} को गुणज हुनुपर्छ`;case`unrecognized_keys`:return`अपरिचित कुञ्जी${e.keys.length>1?`हरू`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`अमान्य कुञ्जी: ${e.origin} मा`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`अमान्य डिस्क्रिमिनेटर मान: अपेक्षित ${e.options.map(e=>`'${e}'`).join(` | `)}`:`अमान्य इनपुट`;case`invalid_element`:return`अमान्य मान: ${e.origin} मा`;default:return`अमान्य इनपुट`}}}}));function db(){return{localeError:fb()}}var fb,pb=o((()=>{H(),fb=()=>{let e={string:{unit:`tekens`,verb:`heeft`},file:{unit:`bytes`,verb:`heeft`},array:{unit:`elementen`,verb:`heeft`},set:{unit:`elementen`,verb:`heeft`},map:{unit:`elementen`,verb:`heeft`}};function t(t){return e[t]??null}let n={regex:`invoer`,email:`emailadres`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum en tijd`,date:`ISO datum`,time:`ISO tijd`,duration:`ISO duur`,ipv4:`IPv4-adres`,ipv6:`IPv6-adres`,mac:`MAC-adres`,cidrv4:`IPv4-bereik`,cidrv6:`IPv6-bereik`,base64:`base64-gecodeerde tekst`,base64url:`base64 URL-gecodeerde tekst`,json_string:`JSON string`,e164:`E.164-nummer`,credit_card:`creditcardnummer`,jwt:`JWT`,template_literal:`invoer`},r={nan:`NaN`,number:`getal`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ongeldige invoer: verwacht instanceof ${e.expected}, ontving ${i}`:`Ongeldige invoer: verwacht ${t}, ontving ${i}`}case`invalid_value`:return e.values.length===1?`Ongeldige invoer: verwacht ${z(e.values[0])}`:`Ongeldige optie: verwacht één van ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin),i=e.origin===`date`?`laat`:e.origin===`string`?`lang`:`groot`;return r?`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} ${r.unit??`elementen`} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin??`waarde`} ${n}${e.maximum.toString()} is`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin),i=e.origin===`date`?`vroeg`:e.origin===`string`?`kort`:`klein`;return r?`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Te ${i}: verwacht dat ${e.origin} ${n}${e.minimum.toString()} is`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ongeldige tekst: moet met "${t.prefix}" beginnen`:t.format===`ends_with`?`Ongeldige tekst: moet op "${t.suffix}" eindigen`:t.format===`includes`?`Ongeldige tekst: moet "${t.includes}" bevatten`:t.format===`regex`?`Ongeldige tekst: moet overeenkomen met patroon ${t.pattern}`:`Ongeldig: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ongeldig getal: moet een veelvoud van ${e.divisor} zijn`;case`unrecognized_keys`:return`Onbekende key${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ongeldige key in ${e.origin}`;case`invalid_union`:return`Ongeldige invoer`;case`invalid_element`:return`Ongeldige waarde in ${e.origin}`;default:return`Ongeldige invoer`}}}}));function mb(){return{localeError:hb()}}var hb,gb=o((()=>{H(),hb=()=>{let e={string:{unit:`teikn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`element`,verb:`å innehalde`},set:{unit:`element`,verb:`å innehalde`},map:{unit:`element`,verb:`å innehalde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varigheit`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkoda streng`,base64url:`base64url-enkoda streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tal`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventa instanceof ${e.expected}, fekk ${i}`:`Ugyldig input: forventa ${t}, fekk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventa ${z(e.values[0])}`:`Ugyldig val: forventa eitt av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`For stor(t): forventa ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventa ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må slutte med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må innehalde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tal: må vere eit multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjende nøklar`:`Ukjend nøkkel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function _b(){return{localeError:vb()}}var vb,yb=o((()=>{H(),vb=()=>{let e={string:{unit:`tegn`,verb:`å ha`},file:{unit:`bytes`,verb:`å ha`},array:{unit:`elementer`,verb:`å inneholde`},set:{unit:`elementer`,verb:`å inneholde`},map:{unit:`elementer`,verb:`å inneholde`}};function t(t){return e[t]??null}let n={regex:`input`,email:`e-postadresse`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO dato- og klokkeslett`,date:`ISO-dato`,time:`ISO-klokkeslett`,duration:`ISO-varighet`,ipv4:`IPv4-adresse`,ipv6:`IPv6-adresse`,mac:`MAC-adresse`,cidrv4:`IPv4-spekter`,cidrv6:`IPv6-spekter`,base64:`base64-enkodet streng`,base64url:`base64url-enkodet streng`,json_string:`JSON-streng`,e164:`E.164-nummer`,credit_card:`kredittkortnummer`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`tall`,array:`liste`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ugyldig input: forventet instanceof ${e.expected}, fikk ${i}`:`Ugyldig input: forventet ${t}, fikk ${i}`}case`invalid_value`:return e.values.length===1?`Ugyldig verdi: forventet ${z(e.values[0])}`:`Ugyldig valg: forventet en av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()} ${r.unit??`elementer`}`:`For stor(t): forventet ${e.origin??`value`} til å ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()} ${r.unit}`:`For lite(n): forventet ${e.origin} til å ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ugyldig streng: må starte med "${t.prefix}"`:t.format===`ends_with`?`Ugyldig streng: må ende med "${t.suffix}"`:t.format===`includes`?`Ugyldig streng: må inneholde "${t.includes}"`:t.format===`regex`?`Ugyldig streng: må matche mønsteret ${t.pattern}`:`Ugyldig ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ugyldig tall: må være et multiplum av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Ukjente nøkler`:`Ukjent nøkkel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ugyldig nøkkel i ${e.origin}`;case`invalid_union`:return`Ugyldig input`;case`invalid_element`:return`Ugyldig verdi i ${e.origin}`;default:return`Ugyldig input`}}}}));function bb(){return{localeError:xb()}}var xb,Sb=o((()=>{H(),xb=()=>{let e={string:{unit:`harf`,verb:`olmalıdır`},file:{unit:`bayt`,verb:`olmalıdır`},array:{unit:`unsur`,verb:`olmalıdır`},set:{unit:`unsur`,verb:`olmalıdır`},map:{unit:`unsur`,verb:`olmalıdır`}};function t(t){return e[t]??null}let n={regex:`giren`,email:`epostagâh`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO hengâmı`,date:`ISO tarihi`,time:`ISO zamanı`,duration:`ISO müddeti`,ipv4:`IPv4 nişânı`,ipv6:`IPv6 nişânı`,mac:`MAC nişânı`,cidrv4:`IPv4 menzili`,cidrv6:`IPv6 menzili`,base64:`base64-şifreli metin`,base64url:`base64url-şifreli metin`,json_string:`JSON metin`,e164:`E.164 sayısı`,credit_card:`i'tibâr kartı numarası`,jwt:`JWT`,template_literal:`giren`},r={nan:`NaN`,number:`numara`,array:`saf`,null:`gayb`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Fâsit giren: umulan instanceof ${e.expected}, alınan ${i}`:`Fâsit giren: umulan ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Fâsit giren: umulan ${z(e.values[0])}`:`Fâsit tercih: mûteberler ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} ${r.unit??`elements`} sahip olmalıydı.`:`Fazla büyük: ${e.origin??`value`}, ${n}${e.maximum.toString()} olmalıydı.`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} ${r.unit} sahip olmalıydı.`:`Fazla küçük: ${e.origin}, ${n}${e.minimum.toString()} olmalıydı.`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Fâsit metin: "${t.prefix}" ile başlamalı.`:t.format===`ends_with`?`Fâsit metin: "${t.suffix}" ile bitmeli.`:t.format===`includes`?`Fâsit metin: "${t.includes}" ihtivâ etmeli.`:t.format===`regex`?`Fâsit metin: ${t.pattern} nakşına uymalı.`:`Fâsit ${n[t.format]??e.format}`}case`not_multiple_of`:return`Fâsit sayı: ${e.divisor} katı olmalıydı.`;case`unrecognized_keys`:return`Tanınmayan anahtar ${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} için tanınmayan anahtar var.`;case`invalid_union`:return`Giren tanınamadı.`;case`invalid_element`:return`${e.origin} için tanınmayan kıymet var.`;default:return`Kıymet tanınamadı.`}}}}));function Cb(){return{localeError:wb()}}var wb,Tb=o((()=>{H(),wb=()=>{let e={string:{unit:`توکي`,verb:`ولري`},file:{unit:`بایټس`,verb:`ولري`},array:{unit:`توکي`,verb:`ولري`},set:{unit:`توکي`,verb:`ولري`},map:{unit:`توکي`,verb:`ولري`}};function t(t){return e[t]??null}let n={regex:`ورودي`,email:`بریښنالیک`,url:`یو آر ال`,emoji:`ایموجي`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`نیټه او وخت`,date:`نېټه`,time:`وخت`,duration:`موده`,ipv4:`د IPv4 پته`,ipv6:`د IPv6 پته`,mac:`د MAC پته`,cidrv4:`د IPv4 ساحه`,cidrv6:`د IPv6 ساحه`,base64:`base64-encoded متن`,base64url:`base64url-encoded متن`,json_string:`JSON متن`,e164:`د E.164 شمېره`,credit_card:`د کریډیټ کارت شمیره`,jwt:`JWT`,template_literal:`ورودي`},r={nan:`NaN`,number:`عدد`,array:`ارې`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ناسم ورودي: باید instanceof ${e.expected} وای, مګر ${i} ترلاسه شو`:`ناسم ورودي: باید ${t} وای, مګر ${i} ترلاسه شو`}case`invalid_value`:return e.values.length===1?`ناسم ورودي: باید ${z(e.values[0])} وای`:`ناسم انتخاب: باید یو له ${L(e.values,`|`)} څخه وای`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} ${r.unit??`عنصرونه`} ولري`:`ډیر لوی: ${e.origin??`ارزښت`} باید ${n}${e.maximum.toString()} وي`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} ${r.unit} ولري`:`ډیر کوچنی: ${e.origin} باید ${n}${e.minimum.toString()} وي`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`ناسم متن: باید د "${t.prefix}" سره پیل شي`:t.format===`ends_with`?`ناسم متن: باید د "${t.suffix}" سره پای ته ورسيږي`:t.format===`includes`?`ناسم متن: باید "${t.includes}" ولري`:t.format===`regex`?`ناسم متن: باید د ${t.pattern} سره مطابقت ولري`:`${n[t.format]??e.format} ناسم دی`}case`not_multiple_of`:return`ناسم عدد: باید د ${e.divisor} مضرب وي`;case`unrecognized_keys`:return`ناسم ${e.keys.length>1?`کلیډونه`:`کلیډ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`ناسم کلیډ په ${e.origin} کې`;case`invalid_union`:return`ناسمه ورودي`;case`invalid_element`:return`ناسم عنصر په ${e.origin} کې`;default:return`ناسمه ورودي`}}}}));function Eb(){return{localeError:Db()}}var Db,Ob=o((()=>{H(),Db=()=>{let e={string:{unit:`znaków`,verb:`mieć`},file:{unit:`bajtów`,verb:`mieć`},array:{unit:`elementów`,verb:`mieć`},set:{unit:`elementów`,verb:`mieć`},map:{unit:`elementów`,verb:`mieć`}};function t(t){return e[t]??null}let n={regex:`wyrażenie`,email:`adres email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`data i godzina w formacie ISO`,date:`data w formacie ISO`,time:`godzina w formacie ISO`,duration:`czas trwania ISO`,ipv4:`adres IPv4`,ipv6:`adres IPv6`,mac:`adres MAC`,cidrv4:`zakres IPv4`,cidrv6:`zakres IPv6`,base64:`ciąg znaków zakodowany w formacie base64`,base64url:`ciąg znaków zakodowany w formacie base64url`,json_string:`ciąg znaków w formacie JSON`,e164:`liczba E.164`,credit_card:`numer karty kredytowej`,jwt:`JWT`,template_literal:`wejście`},r={nan:`NaN`,number:`liczba`,array:`tablica`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Nieprawidłowe dane wejściowe: oczekiwano instanceof ${e.expected}, otrzymano ${i}`:`Nieprawidłowe dane wejściowe: oczekiwano ${t}, otrzymano ${i}`}case`invalid_value`:return e.values.length===1?`Nieprawidłowe dane wejściowe: oczekiwano ${z(e.values[0])}`:`Nieprawidłowa opcja: oczekiwano jednej z wartości ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Za duża wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.maximum.toString()} ${r.unit??`elementów`}`:`Zbyt duż(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Za mała wartość: oczekiwano, że ${e.origin??`wartość`} będzie mieć ${n}${e.minimum.toString()} ${r.unit??`elementów`}`:`Zbyt mał(y/a/e): oczekiwano, że ${e.origin??`wartość`} będzie wynosić ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nieprawidłowy ciąg znaków: musi zaczynać się od "${t.prefix}"`:t.format===`ends_with`?`Nieprawidłowy ciąg znaków: musi kończyć się na "${t.suffix}"`:t.format===`includes`?`Nieprawidłowy ciąg znaków: musi zawierać "${t.includes}"`:t.format===`regex`?`Nieprawidłowy ciąg znaków: musi odpowiadać wzorcowi ${t.pattern}`:`Nieprawidłow(y/a/e) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nieprawidłowa liczba: musi być wielokrotnością ${e.divisor}`;case`unrecognized_keys`:return`Nierozpoznane klucze${e.keys.length>1?`s`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Nieprawidłowy klucz w ${e.origin}`;case`invalid_union`:return`Nieprawidłowe dane wejściowe`;case`invalid_element`:return`Nieprawidłowa wartość w ${e.origin}`;default:return`Nieprawidłowe dane wejściowe`}}}}));function kb(){return{localeError:Ab()}}var Ab,jb=o((()=>{H(),Ab=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`o intervalo de endereços IPv4`,cidrv6:`o intervalo de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tuplo`,articles:r.masculine},record:{name:`registo`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`ficheiro`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(B(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${z(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Demasiado grande: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Demasiado grande: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Demasiado pequeno: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar por "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar em "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${L(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function Mb(){return{localeError:Nb()}}var Nb,Pb=o((()=>{H(),Nb=()=>{let e={string:{unit:`caracteres`},file:{unit:`bytes`},array:{unit:`elementos`},set:{unit:`elementos`},map:{unit:`entradas`}};function t(t){return e[t]??null}let n={regex:`a entrada`,email:`o endereço de e-mail`,url:`o URL`,emoji:`o emoji`,uuid:`o UUID`,uuidv4:`o UUIDv4`,uuidv6:`o UUIDv6`,nanoid:`o nanoid`,guid:`o GUID`,cuid:`o cuid`,cuid2:`o cuid2`,ulid:`o ULID`,xid:`o XID`,ksuid:`o KSUID`,datetime:`a data e hora ISO`,date:`a data ISO`,time:`a hora ISO`,duration:`a duração ISO`,ipv4:`o endereço IPv4`,ipv6:`o endereço IPv6`,mac:`o endereço MAC`,cidrv4:`a faixa de endereços IPv4`,cidrv6:`a faixa de endereços IPv6`,base64:`o texto codificado em base64`,base64url:`o texto codificado em base64url`,json_string:`o texto JSON`,e164:`o número E.164`,credit_card:`o número de cartão de crédito`,jwt:`o JWT`,template_literal:`a entrada`},r={masculine:{definite:`o`,indefinite:`um`},feminine:{definite:`a`,indefinite:`uma`}},i={string:{name:`texto`,articles:r.masculine},number:{name:`número`,articles:r.masculine},int:{name:`número inteiro`,articles:r.masculine},boolean:{name:`valor booleano`,articles:r.masculine},bigint:{name:`número bigint`,articles:r.masculine},symbol:{name:`símbolo`,articles:r.masculine},undefined:{name:`valor "undefined"`,articles:r.masculine},null:{name:`valor "nulo"`,articles:r.masculine},never:{name:`valor "never"`,articles:r.masculine},void:{name:`valor "void"`,articles:r.masculine},date:{name:`data`,articles:r.feminine},array:{name:`vetor`,articles:r.masculine},object:{name:`objeto`,articles:r.masculine},tuple:{name:`tupla`,articles:r.feminine},record:{name:`registro`,articles:r.masculine},map:{name:`mapa`,articles:r.masculine},set:{name:`conjunto`,articles:r.masculine},file:{name:`arquivo`,articles:r.masculine},nonoptional:{name:`valor não opcional`,articles:r.masculine},nan:{name:`valor "NaN"`,articles:r.masculine},function:{name:`função`,articles:r.feminine}};function a(e,t){let n=i[e]??{name:`valor "${e}"`,articles:r.masculine};return`${n.articles[t]} ${n.name}`}return e=>{switch(e.code){case`invalid_type`:return`Entrada inválida: esperava ${a(e.expected,`indefinite`)}, recebeu ${a(B(e.input),`indefinite`)}`;case`invalid_value`:return e.values.length===1?`Entrada inválida: esperava ${z(e.values[0])}`:`Opção inválida: esperava uma das seguintes opções: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Grande demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.maximum.toString()} ${r.unit??`elementos`}`:`Grande demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Pequeno demais: esperava que ${a(e.origin,`definite`)} tivesse ${n} ${e.minimum.toString()} ${r.unit??`elementos`}`:`Pequeno demais: esperava que ${a(e.origin,`definite`)} fosse ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Texto inválido: deve começar com "${t.prefix}"`:t.format===`ends_with`?`Texto inválido: deve terminar com "${t.suffix}"`:t.format===`includes`?`Texto inválido: deve incluir "${t.includes}"`:t.format===`regex`?`Texto inválido: deve corresponder ao padrão ${t.pattern}`:`Formato d${n[t.format]??e.format} inválido`}case`not_multiple_of`:return`Número inválido: deve ser múltiplo de ${e.divisor}`;case`unrecognized_keys`:{let t=e.keys.length>1?`s`:``;return`Chave${t} inválida${t}: ${L(e.keys,`, `)}`}case`invalid_key`:return`Entrada inválida n${a(e.origin,`definite`)}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Valor de discriminação inválido. Esperava ${e.options.map(e=>`'${e}'`).join(` | `)}`:`Entrada inválida`;case`invalid_element`:return`Entrada inválida n${a(e.origin,`definite`)}`;default:return`Entrada inválida`}}}}));function Fb(){return{localeError:Ib()}}var Ib,Lb=o((()=>{H(),Ib=()=>{let e={string:{unit:`caractere`,verb:`să aibă`},file:{unit:`octeți`,verb:`să aibă`},array:{unit:`elemente`,verb:`să aibă`},set:{unit:`elemente`,verb:`să aibă`},map:{unit:`intrări`,verb:`să aibă`}};function t(t){return e[t]??null}let n={regex:`intrare`,email:`adresă de email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dată și oră ISO`,date:`dată ISO`,time:`oră ISO`,duration:`durată ISO`,ipv4:`adresă IPv4`,ipv6:`adresă IPv6`,mac:`adresă MAC`,cidrv4:`interval IPv4`,cidrv6:`interval IPv6`,base64:`șir codat base64`,base64url:`șir codat base64url`,json_string:`șir JSON`,e164:`număr E.164`,credit_card:`număr de card de credit`,jwt:`JWT`,template_literal:`intrare`},r={nan:`NaN`,string:`șir`,number:`număr`,boolean:`boolean`,function:`funcție`,array:`matrice`,object:`obiect`,undefined:`nedefinit`,symbol:`simbol`,bigint:`număr mare`,void:`void`,never:`never`,map:`hartă`,set:`set`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`Intrare invalidă: așteptat ${t}, primit ${r[n]??n}`}case`invalid_value`:return e.values.length===1?`Intrare invalidă: așteptat ${z(e.values[0])}`:`Opțiune invalidă: așteptat una dintre ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Prea mare: așteptat ca ${e.origin??`valoarea`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`elemente`}`:`Prea mare: așteptat ca ${e.origin??`valoarea`} să fie ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Prea mic: așteptat ca ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Prea mic: așteptat ca ${e.origin} să fie ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Șir invalid: trebuie să înceapă cu "${t.prefix}"`:t.format===`ends_with`?`Șir invalid: trebuie să se termine cu "${t.suffix}"`:t.format===`includes`?`Șir invalid: trebuie să includă "${t.includes}"`:t.format===`regex`?`Șir invalid: trebuie să se potrivească cu modelul ${t.pattern}`:`Format invalid: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Număr invalid: trebuie să fie multiplu de ${e.divisor}`;case`unrecognized_keys`:return`Chei nerecunoscute: ${L(e.keys,`, `)}`;case`invalid_key`:return`Cheie invalidă în ${e.origin}`;case`invalid_union`:return`Intrare invalidă`;case`invalid_element`:return`Valoare invalidă în ${e.origin}`;default:return`Intrare invalidă`}}}}));function Rb(e,t,n,r){let i=Math.abs(e),a=i%10,o=i%100;return o>=11&&o<=19?r:a===1?t:a>=2&&a<=4?n:r}function zb(){return{localeError:Bb()}}var Bb,Vb=o((()=>{H(),Bb=()=>{let e={string:{unit:{one:`символ`,few:`символа`,many:`символов`},verb:`иметь`},file:{unit:{one:`байт`,few:`байта`,many:`байт`},verb:`иметь`},array:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},set:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`},map:{unit:{one:`элемент`,few:`элемента`,many:`элементов`},verb:`иметь`}};function t(t){return e[t]??null}let n={regex:`ввод`,email:`email адрес`,url:`URL`,emoji:`эмодзи`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO дата и время`,date:`ISO дата`,time:`ISO время`,duration:`ISO длительность`,ipv4:`IPv4 адрес`,ipv6:`IPv6 адрес`,mac:`MAC адрес`,cidrv4:`IPv4 диапазон`,cidrv6:`IPv6 диапазон`,base64:`строка в формате base64`,base64url:`строка в формате base64url`,json_string:`JSON строка`,e164:`номер E.164`,credit_card:`номер кредитной карты`,jwt:`JWT`,template_literal:`ввод`},r={nan:`NaN`,number:`число`,array:`массив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неверный ввод: ожидалось instanceof ${e.expected}, получено ${i}`:`Неверный ввод: ожидалось ${t}, получено ${i}`}case`invalid_value`:return e.values.length===1?`Неверный ввод: ожидалось ${z(e.values[0])}`:`Неверный вариант: ожидалось одно из ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);if(r){let t=Rb(Number(e.maximum),r.unit.one,r.unit.few,r.unit.many);return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет иметь ${n}${e.maximum.toString()} ${t}`}return`Слишком большое значение: ожидалось, что ${e.origin??`значение`} будет ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);if(r){let t=Rb(Number(e.minimum),r.unit.one,r.unit.few,r.unit.many);return`Слишком маленькое значение: ожидалось, что ${e.origin} будет иметь ${n}${e.minimum.toString()} ${t}`}return`Слишком маленькое значение: ожидалось, что ${e.origin} будет ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неверная строка: должна начинаться с "${t.prefix}"`:t.format===`ends_with`?`Неверная строка: должна заканчиваться на "${t.suffix}"`:t.format===`includes`?`Неверная строка: должна содержать "${t.includes}"`:t.format===`regex`?`Неверная строка: должна соответствовать шаблону ${t.pattern}`:`Неверный ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неверное число: должно быть кратным ${e.divisor}`;case`unrecognized_keys`:return`Нераспознанн${e.keys.length>1?`ые`:`ый`} ключ${e.keys.length>1?`и`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Неверный ключ в ${e.origin}`;case`invalid_union`:return`Неверные входные данные`;case`invalid_element`:return`Неверное значение в ${e.origin}`;default:return`Неверные входные данные`}}}}));function Hb(){return{localeError:Ub()}}var Ub,Wb=o((()=>{H(),Ub=()=>{let e={string:{unit:`znakov`,verb:`mať`},file:{unit:`bajtov`,verb:`mať`},array:{unit:`prvkov`,verb:`mať`},set:{unit:`prvkov`,verb:`mať`},map:{unit:`položiek`,verb:`mať`}};function t(t){return e[t]??null}let n={regex:`regulárny výraz`,email:`e-mailová adresa`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`dátum a čas vo formáte ISO`,date:`dátum vo formáte ISO`,time:`čas vo formáte ISO`,duration:`doba trvania ISO`,ipv4:`IPv4 adresa`,ipv6:`IPv6 adresa`,mac:`MAC adresa`,cidrv4:`rozsah IPv4`,cidrv6:`rozsah IPv6`,base64:`reťazec zakódovaný vo formáte base64`,base64url:`reťazec zakódovaný vo formáte base64url`,json_string:`reťazec vo formáte JSON`,e164:`číslo E.164`,credit_card:`číslo kreditnej karty`,jwt:`JWT`,template_literal:`vstup`},r={nan:`NaN`,number:`číslo`,string:`reťazec`,function:`funkcia`,array:`pole`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neplatný vstup: očakávané instanceof ${e.expected}, obdržané ${i}`:`Neplatný vstup: očakávané ${t}, obdržané ${i}`}case`invalid_value`:return e.values.length===1?`Neplatný vstup: očakávané ${z(e.values[0])}`:`Neplatný vstup: očakávaná jedna z hodnôt ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí mať ${n}${e.maximum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš veľká: ${e.origin??`hodnota`} musí byť ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Hodnota je príliš malá: ${e.origin??`hodnota`} musí mať ${n}${e.minimum.toString()} ${r.unit??`prvkov`}`:`Hodnota je príliš malá: ${e.origin??`hodnota`} musí byť ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neplatný reťazec: musí začínať na "${t.prefix}"`:t.format===`ends_with`?`Neplatný reťazec: musí končiť na "${t.suffix}"`:t.format===`includes`?`Neplatný reťazec: musí obsahovať "${t.includes}"`:t.format===`regex`?`Neplatný reťazec: musí zodpovedať vzoru ${t.pattern}`:`Neplatný formát ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neplatné číslo: musí byť násobkom ${e.divisor}`;case`unrecognized_keys`:return`Neznáme klúče: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neplatný klúč v ${e.origin}`;case`invalid_union`:return`Neplatný vstup`;case`invalid_element`:return`Neplatná hodnota v ${e.origin}`;default:return`Neplatný vstup`}}}}));function Gb(){return{localeError:Kb()}}var Kb,qb=o((()=>{H(),Kb=()=>{let e={string:{unit:`znakov`,verb:`imeti`},file:{unit:`bajtov`,verb:`imeti`},array:{unit:`elementov`,verb:`imeti`},set:{unit:`elementov`,verb:`imeti`},map:{unit:`elementov`,verb:`imeti`}};function t(t){return e[t]??null}let n={regex:`vnos`,email:`e-poštni naslov`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datum in čas`,date:`ISO datum`,time:`ISO čas`,duration:`ISO trajanje`,ipv4:`IPv4 naslov`,ipv6:`IPv6 naslov`,mac:`MAC naslov`,cidrv4:`obseg IPv4`,cidrv6:`obseg IPv6`,base64:`base64 kodiran niz`,base64url:`base64url kodiran niz`,json_string:`JSON niz`,e164:`E.164 številka`,credit_card:`številka kreditne kartice`,jwt:`JWT`,template_literal:`vnos`},r={nan:`NaN`,number:`število`,array:`tabela`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Neveljaven vnos: pričakovano instanceof ${e.expected}, prejeto ${i}`:`Neveljaven vnos: pričakovano ${t}, prejeto ${i}`}case`invalid_value`:return e.values.length===1?`Neveljaven vnos: pričakovano ${z(e.values[0])}`:`Neveljavna možnost: pričakovano eno izmed ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} imelo ${n}${e.maximum.toString()} ${r.unit??`elementov`}`:`Preveliko: pričakovano, da bo ${e.origin??`vrednost`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Premajhno: pričakovano, da bo ${e.origin} imelo ${n}${e.minimum.toString()} ${r.unit}`:`Premajhno: pričakovano, da bo ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Neveljaven niz: mora se začeti z "${t.prefix}"`:t.format===`ends_with`?`Neveljaven niz: mora se končati z "${t.suffix}"`:t.format===`includes`?`Neveljaven niz: mora vsebovati "${t.includes}"`:t.format===`regex`?`Neveljaven niz: mora ustrezati vzorcu ${t.pattern}`:`Neveljaven ${n[t.format]??e.format}`}case`not_multiple_of`:return`Neveljavno število: mora biti večkratnik ${e.divisor}`;case`unrecognized_keys`:return`Neprepoznan${e.keys.length>1?`i ključi`:` ključ`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Neveljaven ključ v ${e.origin}`;case`invalid_union`:return`Neveljaven vnos`;case`invalid_element`:return`Neveljavna vrednost v ${e.origin}`;default:return`Neveljaven vnos`}}}}));function Jb(){return{localeError:Yb()}}var Yb,Xb=o((()=>{H(),Yb=()=>{let e={string:{unit:`tecken`,verb:`att ha`},file:{unit:`bytes`,verb:`att ha`},array:{unit:`objekt`,verb:`att innehålla`},set:{unit:`objekt`,verb:`att innehålla`},map:{unit:`objekt`,verb:`att innehålla`}};function t(t){return e[t]??null}let n={regex:`reguljärt uttryck`,email:`e-postadress`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO-datum och tid`,date:`ISO-datum`,time:`ISO-tid`,duration:`ISO-varaktighet`,ipv4:`IPv4-adress`,ipv6:`IPv6-adress`,mac:`MAC-adress`,cidrv4:`IPv4-spektrum`,cidrv6:`IPv6-spektrum`,base64:`base64-kodad sträng`,base64url:`base64url-kodad sträng`,json_string:`JSON-sträng`,e164:`E.164-nummer`,credit_card:`kreditkortsnummer`,jwt:`JWT`,template_literal:`mall-literal`},r={nan:`NaN`,number:`antal`,array:`lista`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ogiltig inmatning: förväntat instanceof ${e.expected}, fick ${i}`:`Ogiltig inmatning: förväntat ${t}, fick ${i}`}case`invalid_value`:return e.values.length===1?`Ogiltig inmatning: förväntat ${z(e.values[0])}`:`Ogiltigt val: förväntade en av ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`För stor(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()} ${r.unit??`element`}`:`För stor(t): förväntat ${e.origin??`värdet`} att ha ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()} ${r.unit}`:`För lite(t): förväntade ${e.origin??`värdet`} att ha ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ogiltig sträng: måste börja med "${t.prefix}"`:t.format===`ends_with`?`Ogiltig sträng: måste sluta med "${t.suffix}"`:t.format===`includes`?`Ogiltig sträng: måste innehålla "${t.includes}"`:t.format===`regex`?`Ogiltig sträng: måste matcha mönstret "${t.pattern}"`:`Ogiltig(t) ${n[t.format]??e.format}`}case`not_multiple_of`:return`Ogiltigt tal: måste vara en multipel av ${e.divisor}`;case`unrecognized_keys`:return`${e.keys.length>1?`Okända nycklar`:`Okänd nyckel`}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Ogiltig nyckel i ${e.origin??`värdet`}`;case`invalid_union`:return`Ogiltig input`;case`invalid_element`:return`Ogiltigt värde i ${e.origin??`värdet`}`;default:return`Ogiltig input`}}}}));function Zb(){return{localeError:Qb()}}var Qb,$b=o((()=>{H(),Qb=()=>{let e={string:{unit:`எழுத்துக்கள்`,verb:`கொண்டிருக்க வேண்டும்`},file:{unit:`பைட்டுகள்`,verb:`கொண்டிருக்க வேண்டும்`},array:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},set:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`},map:{unit:`உறுப்புகள்`,verb:`கொண்டிருக்க வேண்டும்`}};function t(t){return e[t]??null}let n={regex:`உள்ளீடு`,email:`மின்னஞ்சல் முகவரி`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO தேதி நேரம்`,date:`ISO தேதி`,time:`ISO நேரம்`,duration:`ISO கால அளவு`,ipv4:`IPv4 முகவரி`,ipv6:`IPv6 முகவரி`,mac:`MAC முகவரி`,cidrv4:`IPv4 வரம்பு`,cidrv6:`IPv6 வரம்பு`,base64:`base64-encoded சரம்`,base64url:`base64url-encoded சரம்`,json_string:`JSON சரம்`,e164:`E.164 எண்`,credit_card:`கடன் அட்டை எண்`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`,number:`எண்`,array:`அணி`,null:`வெறுமை`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது instanceof ${e.expected}, பெறப்பட்டது ${i}`:`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${t}, பெறப்பட்டது ${i}`}case`invalid_value`:return e.values.length===1?`தவறான உள்ளீடு: எதிர்பார்க்கப்பட்டது ${z(e.values[0])}`:`தவறான விருப்பம்: எதிர்பார்க்கப்பட்டது ${L(e.values,`|`)} இல் ஒன்று`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ${r.unit??`உறுப்புகள்`} ஆக இருக்க வேண்டும்`:`மிக பெரியது: எதிர்பார்க்கப்பட்டது ${e.origin??`மதிப்பு`} ${n}${e.maximum.toString()} ஆக இருக்க வேண்டும்`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ஆக இருக்க வேண்டும்`:`மிகச் சிறியது: எதிர்பார்க்கப்பட்டது ${e.origin} ${n}${e.minimum.toString()} ஆக இருக்க வேண்டும்`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`தவறான சரம்: "${t.prefix}" இல் தொடங்க வேண்டும்`:t.format===`ends_with`?`தவறான சரம்: "${t.suffix}" இல் முடிவடைய வேண்டும்`:t.format===`includes`?`தவறான சரம்: "${t.includes}" ஐ உள்ளடக்க வேண்டும்`:t.format===`regex`?`தவறான சரம்: ${t.pattern} முறைபாட்டுடன் பொருந்த வேண்டும்`:`தவறான ${n[t.format]??e.format}`}case`not_multiple_of`:return`தவறான எண்: ${e.divisor} இன் பலமாக இருக்க வேண்டும்`;case`unrecognized_keys`:return`அடையாளம் தெரியாத விசை${e.keys.length>1?`கள்`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} இல் தவறான விசை`;case`invalid_union`:return`தவறான உள்ளீடு`;case`invalid_element`:return`${e.origin} இல் தவறான மதிப்பு`;default:return`தவறான உள்ளீடு`}}}}));function ex(){return{localeError:tx()}}var tx,nx=o((()=>{H(),tx=()=>{let e={string:{unit:`ตัวอักษร`,verb:`ควรมี`},file:{unit:`ไบต์`,verb:`ควรมี`},array:{unit:`รายการ`,verb:`ควรมี`},set:{unit:`รายการ`,verb:`ควรมี`},map:{unit:`รายการ`,verb:`ควรมี`}};function t(t){return e[t]??null}let n={regex:`ข้อมูลที่ป้อน`,email:`ที่อยู่อีเมล`,url:`URL`,emoji:`อิโมจิ`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`วันที่เวลาแบบ ISO`,date:`วันที่แบบ ISO`,time:`เวลาแบบ ISO`,duration:`ช่วงเวลาแบบ ISO`,ipv4:`ที่อยู่ IPv4`,ipv6:`ที่อยู่ IPv6`,mac:`ที่อยู่ MAC`,cidrv4:`ช่วง IP แบบ IPv4`,cidrv6:`ช่วง IP แบบ IPv6`,base64:`ข้อความแบบ Base64`,base64url:`ข้อความแบบ Base64 สำหรับ URL`,json_string:`ข้อความแบบ JSON`,e164:`เบอร์โทรศัพท์ระหว่างประเทศ (E.164)`,credit_card:`หมายเลขบัตรเครดิต`,jwt:`โทเคน JWT`,template_literal:`ข้อมูลที่ป้อน`},r={nan:`NaN`,number:`ตัวเลข`,array:`อาร์เรย์ (Array)`,null:`ไม่มีค่า (null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น instanceof ${e.expected} แต่ได้รับ ${i}`:`ประเภทข้อมูลไม่ถูกต้อง: ควรเป็น ${t} แต่ได้รับ ${i}`}case`invalid_value`:return e.values.length===1?`ค่าไม่ถูกต้อง: ควรเป็น ${z(e.values[0])}`:`ตัวเลือกไม่ถูกต้อง: ควรเป็นหนึ่งใน ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`ไม่เกิน`:`น้อยกว่า`,r=t(e.origin);return r?`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()} ${r.unit??`รายการ`}`:`เกินกำหนด: ${e.origin??`ค่า`} ควรมี${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`อย่างน้อย`:`มากกว่า`,r=t(e.origin);return r?`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()} ${r.unit}`:`น้อยกว่ากำหนด: ${e.origin} ควรมี${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องขึ้นต้นด้วย "${t.prefix}"`:t.format===`ends_with`?`รูปแบบไม่ถูกต้อง: ข้อความต้องลงท้ายด้วย "${t.suffix}"`:t.format===`includes`?`รูปแบบไม่ถูกต้อง: ข้อความต้องมี "${t.includes}" อยู่ในข้อความ`:t.format===`regex`?`รูปแบบไม่ถูกต้อง: ต้องตรงกับรูปแบบที่กำหนด ${t.pattern}`:`รูปแบบไม่ถูกต้อง: ${n[t.format]??e.format}`}case`not_multiple_of`:return`ตัวเลขไม่ถูกต้อง: ต้องเป็นจำนวนที่หารด้วย ${e.divisor} ได้ลงตัว`;case`unrecognized_keys`:return`พบคีย์ที่ไม่รู้จัก: ${L(e.keys,`, `)}`;case`invalid_key`:return`คีย์ไม่ถูกต้องใน ${e.origin}`;case`invalid_union`:return`ข้อมูลไม่ถูกต้อง: ไม่ตรงกับรูปแบบยูเนียนที่กำหนดไว้`;case`invalid_element`:return`ข้อมูลไม่ถูกต้องใน ${e.origin}`;default:return`ข้อมูลไม่ถูกต้อง`}}}}));function rx(){return{localeError:ix()}}var ix,ax=o((()=>{H(),ix=()=>{let e={string:{unit:`simwol`,verb:`bolmaly`},file:{unit:`baýt`,verb:`bolmaly`},array:{unit:`elementler`,verb:`bolmaly`},set:{unit:`elementler`,verb:`bolmaly`},map:{unit:`elementler`,verb:`bolmaly`}};function t(t){return e[t]??null}let n={regex:`giriş`,email:`e-poçta salgysy`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sene we wagt`,date:`ISO sene`,time:`ISO wagt`,duration:`ISO wagt aralygy`,ipv4:`IPv4 salgysy`,ipv6:`IPv6 salgysy`,mac:`MAC salgysy`,cidrv4:`IPv4 aralygy`,cidrv6:`IPv6 aralygy`,base64:`base64 bilen şifrlenen setir`,base64url:`base64url bilen şifrlenen setir`,json_string:`JSON setiri`,e164:`E.164 nomeri`,credit_card:`kredit kartynyň nomeri`,jwt:`JWT`,template_literal:`şablon`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input);return`Nädogry baha: garaşylan ${t} ýerine ${r[n]??n} alyndy`}case`invalid_value`:return e.values.length===1?`Nädogry baha: ${z(e.values[0])} bolmaly`:`Nädogry saýlaw: aşakdakylardan biri bolmaly: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()} ${r.unit??`element`}`:`Has uly: garaşylýan ${e.origin??`baha`} ${n} ${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()} ${r.unit}`:`Has kiçi: garaşylýan ${e.origin} ${n} ${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Nädogry setir: "${t.prefix}" bilen başlamaly`:t.format===`ends_with`?`Nädogry setir: "${t.suffix}" bilen gutarmaly`:t.format===`includes`?`Nädogry setir: "${t.includes}" saklamaly`:t.format===`regex`?`Nädogry setir: ${t.pattern} nusga laýyk bolmaly`:`Nädogry ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nädogry san: ${e.divisor} bilen galyndysyz bölünmeli`;case`unrecognized_keys`:return`Tanalmaýan açar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde nädogry açar`;case`invalid_union`:return`Nädogry baha`;case`invalid_element`:return`${e.origin} içinde nädogry baha`;default:return`Nädogry baha`}}}}));function ox(){return{localeError:sx()}}var sx,cx=o((()=>{H(),sx=()=>{let e={string:{unit:`karakter`,verb:`olmalı`},file:{unit:`bayt`,verb:`olmalı`},array:{unit:`öğe`,verb:`olmalı`},set:{unit:`öğe`,verb:`olmalı`},map:{unit:`öğe`,verb:`olmalı`}};function t(t){return e[t]??null}let n={regex:`girdi`,email:`e-posta adresi`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO tarih ve saat`,date:`ISO tarih`,time:`ISO saat`,duration:`ISO süre`,ipv4:`IPv4 adresi`,ipv6:`IPv6 adresi`,mac:`MAC adresi`,cidrv4:`IPv4 aralığı`,cidrv6:`IPv6 aralığı`,base64:`base64 ile şifrelenmiş metin`,base64url:`base64url ile şifrelenmiş metin`,json_string:`JSON dizesi`,e164:`E.164 sayısı`,credit_card:`kredi kartı numarası`,jwt:`JWT`,template_literal:`Şablon dizesi`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Geçersiz değer: beklenen instanceof ${e.expected}, alınan ${i}`:`Geçersiz değer: beklenen ${t}, alınan ${i}`}case`invalid_value`:return e.values.length===1?`Geçersiz değer: beklenen ${z(e.values[0])}`:`Geçersiz seçenek: aşağıdakilerden biri olmalı: ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()} ${r.unit??`öğe`}`:`Çok büyük: beklenen ${e.origin??`değer`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`Çok küçük: beklenen ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Geçersiz metin: "${t.prefix}" ile başlamalı`:t.format===`ends_with`?`Geçersiz metin: "${t.suffix}" ile bitmeli`:t.format===`includes`?`Geçersiz metin: "${t.includes}" içermeli`:t.format===`regex`?`Geçersiz metin: ${t.pattern} desenine uymalı`:`Geçersiz ${n[t.format]??e.format}`}case`not_multiple_of`:return`Geçersiz sayı: ${e.divisor} ile tam bölünebilmeli`;case`unrecognized_keys`:return`Tanınmayan anahtar${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} içinde geçersiz anahtar`;case`invalid_union`:return`Geçersiz değer`;case`invalid_element`:return`${e.origin} içinde geçersiz değer`;default:return`Geçersiz değer`}}}}));function lx(){return{localeError:ux()}}var ux,dx=o((()=>{H(),ux=()=>{let e={string:{unit:`символів`,verb:`матиме`},file:{unit:`байтів`,verb:`матиме`},array:{unit:`елементів`,verb:`матиме`},set:{unit:`елементів`,verb:`матиме`},map:{unit:`елементів`,verb:`матиме`}};function t(t){return e[t]??null}let n={regex:`вхідні дані`,email:`адреса електронної пошти`,url:`URL`,emoji:`емодзі`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`дата та час ISO`,date:`дата ISO`,time:`час ISO`,duration:`тривалість ISO`,ipv4:`адреса IPv4`,ipv6:`адреса IPv6`,mac:`адреса MAC`,cidrv4:`діапазон IPv4`,cidrv6:`діапазон IPv6`,base64:`рядок у кодуванні base64`,base64url:`рядок у кодуванні base64url`,json_string:`рядок JSON`,e164:`номер E.164`,credit_card:`номер кредитної картки`,jwt:`JWT`,template_literal:`вхідні дані`},r={nan:`NaN`,number:`число`,array:`масив`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Неправильні вхідні дані: очікується instanceof ${e.expected}, отримано ${i}`:`Неправильні вхідні дані: очікується ${t}, отримано ${i}`}case`invalid_value`:return e.values.length===1?`Неправильні вхідні дані: очікується ${z(e.values[0])}`:`Неправильна опція: очікується одне з ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Занадто велике: очікується, що ${e.origin??`значення`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`елементів`}`:`Занадто велике: очікується, що ${e.origin??`значення`} буде ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Занадто мале: очікується, що ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Занадто мале: очікується, що ${e.origin} буде ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Неправильний рядок: повинен починатися з "${t.prefix}"`:t.format===`ends_with`?`Неправильний рядок: повинен закінчуватися на "${t.suffix}"`:t.format===`includes`?`Неправильний рядок: повинен містити "${t.includes}"`:t.format===`regex`?`Неправильний рядок: повинен відповідати шаблону ${t.pattern}`:`Неправильний ${n[t.format]??e.format}`}case`not_multiple_of`:return`Неправильне число: повинно бути кратним ${e.divisor}`;case`unrecognized_keys`:return`Нерозпізнаний ключ${e.keys.length>1?`і`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`Неправильний ключ у ${e.origin}`;case`invalid_union`:return`Неправильні вхідні дані`;case`invalid_element`:return`Неправильне значення у ${e.origin}`;default:return`Неправильні вхідні дані`}}}}));function fx(){return lx()}var px=o((()=>{dx()}));function mx(){return{localeError:hx()}}var hx,gx=o((()=>{H(),hx=()=>{let e={string:{unit:`حروف`,verb:`ہونا`},file:{unit:`بائٹس`,verb:`ہونا`},array:{unit:`آئٹمز`,verb:`ہونا`},set:{unit:`آئٹمز`,verb:`ہونا`},map:{unit:`آئٹمز`,verb:`ہونا`}};function t(t){return e[t]??null}let n={regex:`ان پٹ`,email:`ای میل ایڈریس`,url:`یو آر ایل`,emoji:`ایموجی`,uuid:`یو یو آئی ڈی`,uuidv4:`یو یو آئی ڈی وی 4`,uuidv6:`یو یو آئی ڈی وی 6`,nanoid:`نینو آئی ڈی`,guid:`جی یو آئی ڈی`,cuid:`سی یو آئی ڈی`,cuid2:`سی یو آئی ڈی 2`,ulid:`یو ایل آئی ڈی`,xid:`ایکس آئی ڈی`,ksuid:`کے ایس یو آئی ڈی`,datetime:`آئی ایس او ڈیٹ ٹائم`,date:`آئی ایس او تاریخ`,time:`آئی ایس او وقت`,duration:`آئی ایس او مدت`,ipv4:`آئی پی وی 4 ایڈریس`,ipv6:`آئی پی وی 6 ایڈریس`,mac:`ایم اے سی ایڈریس`,cidrv4:`آئی پی وی 4 رینج`,cidrv6:`آئی پی وی 6 رینج`,base64:`بیس 64 ان کوڈڈ سٹرنگ`,base64url:`بیس 64 یو آر ایل ان کوڈڈ سٹرنگ`,json_string:`جے ایس او این سٹرنگ`,e164:`ای 164 نمبر`,credit_card:`کریڈٹ کارڈ نمبر`,jwt:`جے ڈبلیو ٹی`,template_literal:`ان پٹ`},r={nan:`NaN`,number:`نمبر`,array:`آرے`,null:`نل`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`غلط ان پٹ: instanceof ${e.expected} متوقع تھا، ${i} موصول ہوا`:`غلط ان پٹ: ${t} متوقع تھا، ${i} موصول ہوا`}case`invalid_value`:return e.values.length===1?`غلط ان پٹ: ${z(e.values[0])} متوقع تھا`:`غلط آپشن: ${L(e.values,`|`)} میں سے ایک متوقع تھا`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`بہت بڑا: ${e.origin??`ویلیو`} کے ${n}${e.maximum.toString()} ${r.unit??`عناصر`} ہونے متوقع تھے`:`بہت بڑا: ${e.origin??`ویلیو`} کا ${n}${e.maximum.toString()} ہونا متوقع تھا`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`بہت چھوٹا: ${e.origin} کے ${n}${e.minimum.toString()} ${r.unit} ہونے متوقع تھے`:`بہت چھوٹا: ${e.origin} کا ${n}${e.minimum.toString()} ہونا متوقع تھا`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`غلط سٹرنگ: "${t.prefix}" سے شروع ہونا چاہیے`:t.format===`ends_with`?`غلط سٹرنگ: "${t.suffix}" پر ختم ہونا چاہیے`:t.format===`includes`?`غلط سٹرنگ: "${t.includes}" شامل ہونا چاہیے`:t.format===`regex`?`غلط سٹرنگ: پیٹرن ${t.pattern} سے میچ ہونا چاہیے`:`غلط ${n[t.format]??e.format}`}case`not_multiple_of`:return`غلط نمبر: ${e.divisor} کا مضاعف ہونا چاہیے`;case`unrecognized_keys`:return`غیر تسلیم شدہ کی${e.keys.length>1?`ز`:``}: ${L(e.keys,`، `)}`;case`invalid_key`:return`${e.origin} میں غلط کی`;case`invalid_union`:return`غلط ان پٹ`;case`invalid_element`:return`${e.origin} میں غلط ویلیو`;default:return`غلط ان پٹ`}}}}));function _x(){return{localeError:vx()}}var vx,yx=o((()=>{H(),vx=()=>{let e={string:{unit:`belgi`,verb:`bo‘lishi kerak`},file:{unit:`bayt`,verb:`bo‘lishi kerak`},array:{unit:`element`,verb:`bo‘lishi kerak`},set:{unit:`element`,verb:`bo‘lishi kerak`},map:{unit:`yozuv`,verb:`bo‘lishi kerak`}};function t(t){return e[t]??null}let n={regex:`kirish`,email:`elektron pochta manzili`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO sana va vaqti`,date:`ISO sana`,time:`ISO vaqt`,duration:`ISO davomiylik`,ipv4:`IPv4 manzil`,ipv6:`IPv6 manzil`,mac:`MAC manzil`,cidrv4:`IPv4 diapazon`,cidrv6:`IPv6 diapazon`,base64:`base64 kodlangan satr`,base64url:`base64url kodlangan satr`,json_string:`JSON satr`,e164:`E.164 raqam`,credit_card:`kredit karta raqami`,jwt:`JWT`,template_literal:`kirish`},r={nan:`NaN`,number:`raqam`,array:`massiv`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Noto‘g‘ri kirish: kutilgan instanceof ${e.expected}, qabul qilingan ${i}`:`Noto‘g‘ri kirish: kutilgan ${t}, qabul qilingan ${i}`}case`invalid_value`:return e.values.length===1?`Noto‘g‘ri kirish: kutilgan ${z(e.values[0])}`:`Noto‘g‘ri variant: quyidagilardan biri kutilgan ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()} ${r.unit} ${r.verb}`:`Juda katta: kutilgan ${e.origin??`qiymat`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()} ${r.unit} ${r.verb}`:`Juda kichik: kutilgan ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Noto‘g‘ri satr: "${t.prefix}" bilan boshlanishi kerak`:t.format===`ends_with`?`Noto‘g‘ri satr: "${t.suffix}" bilan tugashi kerak`:t.format===`includes`?`Noto‘g‘ri satr: "${t.includes}" ni o‘z ichiga olishi kerak`:t.format===`regex`?`Noto‘g‘ri satr: ${t.pattern} shabloniga mos kelishi kerak`:`Noto‘g‘ri ${n[t.format]??e.format}`}case`not_multiple_of`:return`Noto‘g‘ri raqam: ${e.divisor} ning karralisi bo‘lishi kerak`;case`unrecognized_keys`:return`Noma’lum kalit${e.keys.length>1?`lar`:``}: ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} dagi kalit noto‘g‘ri`;case`invalid_union`:return`Noto‘g‘ri kirish`;case`invalid_element`:return`${e.origin} da noto‘g‘ri qiymat`;default:return`Noto‘g‘ri kirish`}}}}));function bx(){return{localeError:xx()}}var xx,Sx=o((()=>{H(),xx=()=>{let e={string:{unit:`ký tự`,verb:`có`},file:{unit:`byte`,verb:`có`},array:{unit:`phần tử`,verb:`có`},set:{unit:`phần tử`,verb:`có`},map:{unit:`phần tử`,verb:`có`}};function t(t){return e[t]??null}let n={regex:`đầu vào`,email:`địa chỉ email`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ngày giờ ISO`,date:`ngày ISO`,time:`giờ ISO`,duration:`khoảng thời gian ISO`,ipv4:`địa chỉ IPv4`,ipv6:`địa chỉ IPv6`,mac:`địa chỉ MAC`,cidrv4:`dải IPv4`,cidrv6:`dải IPv6`,base64:`chuỗi mã hóa base64`,base64url:`chuỗi mã hóa base64url`,json_string:`chuỗi JSON`,e164:`số E.164`,credit_card:`số thẻ tín dụng`,jwt:`JWT`,template_literal:`đầu vào`},r={nan:`NaN`,number:`số`,array:`mảng`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Đầu vào không hợp lệ: mong đợi instanceof ${e.expected}, nhận được ${i}`:`Đầu vào không hợp lệ: mong đợi ${t}, nhận được ${i}`}case`invalid_value`:return e.values.length===1?`Đầu vào không hợp lệ: mong đợi ${z(e.values[0])}`:`Tùy chọn không hợp lệ: mong đợi một trong các giá trị ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Quá lớn: mong đợi ${e.origin??`giá trị`} ${r.verb} ${n}${e.maximum.toString()} ${r.unit??`phần tử`}`:`Quá lớn: mong đợi ${e.origin??`giá trị`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Quá nhỏ: mong đợi ${e.origin} ${r.verb} ${n}${e.minimum.toString()} ${r.unit}`:`Quá nhỏ: mong đợi ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Chuỗi không hợp lệ: phải bắt đầu bằng "${t.prefix}"`:t.format===`ends_with`?`Chuỗi không hợp lệ: phải kết thúc bằng "${t.suffix}"`:t.format===`includes`?`Chuỗi không hợp lệ: phải bao gồm "${t.includes}"`:t.format===`regex`?`Chuỗi không hợp lệ: phải khớp với mẫu ${t.pattern}`:`${n[t.format]??e.format} không hợp lệ`}case`not_multiple_of`:return`Số không hợp lệ: phải là bội số của ${e.divisor}`;case`unrecognized_keys`:return`Khóa không được nhận dạng: ${L(e.keys,`, `)}`;case`invalid_key`:return`Khóa không hợp lệ trong ${e.origin}`;case`invalid_union`:return`Đầu vào không hợp lệ`;case`invalid_element`:return`Giá trị không hợp lệ trong ${e.origin}`;default:return`Đầu vào không hợp lệ`}}}}));function Cx(){return{localeError:wx()}}var wx,Tx=o((()=>{H(),wx=()=>{let e={string:{unit:`字符`,verb:`包含`},file:{unit:`字节`,verb:`包含`},array:{unit:`项`,verb:`包含`},set:{unit:`项`,verb:`包含`},map:{unit:`项`,verb:`包含`}};function t(t){return e[t]??null}let n={regex:`输入`,email:`电子邮件`,url:`URL`,emoji:`表情符号`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO日期时间`,date:`ISO日期`,time:`ISO时间`,duration:`ISO时长`,ipv4:`IPv4地址`,ipv6:`IPv6地址`,mac:`MAC地址`,cidrv4:`IPv4网段`,cidrv6:`IPv6网段`,base64:`base64编码字符串`,base64url:`base64url编码字符串`,json_string:`JSON字符串`,e164:`E.164号码`,credit_card:`信用卡号`,jwt:`JWT`,template_literal:`输入`},r={nan:`NaN`,number:`数字`,array:`数组`,null:`空值(null)`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`无效输入:期望 instanceof ${e.expected},实际接收 ${i}`:`无效输入:期望 ${t},实际接收 ${i}`}case`invalid_value`:return e.values.length===1?`无效输入:期望 ${z(e.values[0])}`:`无效选项:期望以下之一 ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()} ${r.unit??`个元素`}`:`数值过大:期望 ${e.origin??`值`} ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()} ${r.unit}`:`数值过小:期望 ${e.origin} ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`无效字符串:必须以 "${t.prefix}" 开头`:t.format===`ends_with`?`无效字符串:必须以 "${t.suffix}" 结尾`:t.format===`includes`?`无效字符串:必须包含 "${t.includes}"`:t.format===`regex`?`无效字符串:必须满足正则表达式 ${t.pattern}`:`无效${n[t.format]??e.format}`}case`not_multiple_of`:return`无效数字:必须是 ${e.divisor} 的倍数`;case`unrecognized_keys`:return`出现未知的键(key): ${L(e.keys,`, `)}`;case`invalid_key`:return`${e.origin} 中的键(key)无效`;case`invalid_union`:return`无效输入`;case`invalid_element`:return`${e.origin} 中包含无效值(value)`;default:return`无效输入`}}}}));function Ex(){return{localeError:Dx()}}var Dx,Ox=o((()=>{H(),Dx=()=>{let e={string:{unit:`字元`,verb:`擁有`},file:{unit:`位元組`,verb:`擁有`},array:{unit:`項目`,verb:`擁有`},set:{unit:`項目`,verb:`擁有`},map:{unit:`項目`,verb:`擁有`}};function t(t){return e[t]??null}let n={regex:`輸入`,email:`郵件地址`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO 日期時間`,date:`ISO 日期`,time:`ISO 時間`,duration:`ISO 期間`,ipv4:`IPv4 位址`,ipv6:`IPv6 位址`,mac:`MAC 位址`,cidrv4:`IPv4 範圍`,cidrv6:`IPv6 範圍`,base64:`base64 編碼字串`,base64url:`base64url 編碼字串`,json_string:`JSON 字串`,e164:`E.164 數值`,credit_card:`信用卡號`,jwt:`JWT`,template_literal:`輸入`},r={nan:`NaN`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`無效的輸入值:預期為 instanceof ${e.expected},但收到 ${i}`:`無效的輸入值:預期為 ${t},但收到 ${i}`}case`invalid_value`:return e.values.length===1?`無效的輸入值:預期為 ${z(e.values[0])}`:`無效的選項:預期為以下其中之一 ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()} ${r.unit??`個元素`}`:`數值過大:預期 ${e.origin??`值`} 應為 ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()} ${r.unit}`:`數值過小:預期 ${e.origin} 應為 ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`無效的字串:必須以 "${t.prefix}" 開頭`:t.format===`ends_with`?`無效的字串:必須以 "${t.suffix}" 結尾`:t.format===`includes`?`無效的字串:必須包含 "${t.includes}"`:t.format===`regex`?`無效的字串:必須符合格式 ${t.pattern}`:`無效的 ${n[t.format]??e.format}`}case`not_multiple_of`:return`無效的數字:必須為 ${e.divisor} 的倍數`;case`unrecognized_keys`:return`無法識別的鍵值${e.keys.length>1?`們`:``}:${L(e.keys,`、`)}`;case`invalid_key`:return`${e.origin} 中有無效的鍵值`;case`invalid_union`:return`無效的輸入值`;case`invalid_element`:return`${e.origin} 中有無效的值`;default:return`無效的輸入值`}}}}));function kx(){return{localeError:Ax()}}var Ax,jx=o((()=>{H(),Ax=()=>{let e={string:{unit:`àmi`,verb:`ní`},file:{unit:`bytes`,verb:`ní`},array:{unit:`nkan`,verb:`ní`},set:{unit:`nkan`,verb:`ní`},map:{unit:`nkan`,verb:`ní`}};function t(t){return e[t]??null}let n={regex:`ẹ̀rọ ìbáwọlé`,email:`àdírẹ́sì ìmẹ́lì`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`àkókò ISO`,date:`ọjọ́ ISO`,time:`àkókò ISO`,duration:`àkókò tó pé ISO`,ipv4:`àdírẹ́sì IPv4`,ipv6:`àdírẹ́sì IPv6`,mac:`àdírẹ́sì MAC`,cidrv4:`àgbègbè IPv4`,cidrv6:`àgbègbè IPv6`,base64:`ọ̀rọ̀ tí a kọ́ ní base64`,base64url:`ọ̀rọ̀ base64url`,json_string:`ọ̀rọ̀ JSON`,e164:`nọ́mbà E.164`,credit_card:`nọmba kaadi gbese`,jwt:`JWT`,template_literal:`ẹ̀rọ ìbáwọlé`},r={nan:`NaN`,number:`nọ́mbà`,array:`akopọ`};return e=>{switch(e.code){case`invalid_type`:{let t=r[e.expected]??e.expected,n=B(e.input),i=r[n]??n;return/^[A-Z]/.test(e.expected)?`Ìbáwọlé aṣìṣe: a ní láti fi instanceof ${e.expected}, àmọ̀ a rí ${i}`:`Ìbáwọlé aṣìṣe: a ní láti fi ${t}, àmọ̀ a rí ${i}`}case`invalid_value`:return e.values.length===1?`Ìbáwọlé aṣìṣe: a ní láti fi ${z(e.values[0])}`:`Àṣàyàn aṣìṣe: yan ọ̀kan lára ${L(e.values,`|`)}`;case`too_big`:{let n=e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Tó pọ̀ jù: a ní láti jẹ́ pé ${e.origin??`iye`} ${r.verb} ${n}${e.maximum} ${r.unit}`:`Tó pọ̀ jù: a ní láti jẹ́ ${n}${e.maximum}`}case`too_small`:{let n=e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Kéré ju: a ní láti jẹ́ pé ${e.origin} ${r.verb} ${n}${e.minimum} ${r.unit}`:`Kéré ju: a ní láti jẹ́ ${n}${e.minimum}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bẹ̀rẹ̀ pẹ̀lú "${t.prefix}"`:t.format===`ends_with`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ parí pẹ̀lú "${t.suffix}"`:t.format===`includes`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ ní "${t.includes}"`:t.format===`regex`?`Ọ̀rọ̀ aṣìṣe: gbọ́dọ̀ bá àpẹẹrẹ mu ${t.pattern}`:`Aṣìṣe: ${n[t.format]??e.format}`}case`not_multiple_of`:return`Nọ́mbà aṣìṣe: gbọ́dọ̀ jẹ́ èyà pípín ti ${e.divisor}`;case`unrecognized_keys`:return`Bọtìnì àìmọ̀: ${L(e.keys,`, `)}`;case`invalid_key`:return`Bọtìnì aṣìṣe nínú ${e.origin}`;case`invalid_union`:return`Ìbáwọlé aṣìṣe`;case`invalid_element`:return`Iye aṣìṣe nínú ${e.origin}`;default:return`Ìbáwọlé aṣìṣe`}}}})),Mx=c({ar:()=>iv,az:()=>sv,be:()=>dv,bg:()=>mv,bn:()=>_v,ca:()=>bv,ckb:()=>Cv,cs:()=>Ev,da:()=>kv,de:()=>Mv,el:()=>Fv,en:()=>Rv,eo:()=>Vv,es:()=>Wv,fa:()=>qv,fi:()=>Xv,fr:()=>$v,frCA:()=>ny,gu:()=>ay,he:()=>cy,hi:()=>dy,hr:()=>my,hu:()=>_y,hy:()=>Sy,id:()=>Ty,is:()=>Oy,it:()=>jy,ja:()=>Py,ka:()=>Ly,kh:()=>Uy,km:()=>By,kn:()=>Gy,ko:()=>Jy,lt:()=>Qy,mk:()=>nb,ms:()=>ab,ne:()=>cb,nl:()=>db,nn:()=>mb,no:()=>_b,ota:()=>bb,pl:()=>Eb,ps:()=>Cb,pt:()=>kb,ptBR:()=>Mb,ro:()=>Fb,ru:()=>zb,sk:()=>Hb,sl:()=>Gb,sv:()=>Jb,ta:()=>Zb,th:()=>ex,tk:()=>rx,tr:()=>ox,ua:()=>fx,uk:()=>lx,ur:()=>mx,uz:()=>_x,vi:()=>bx,yo:()=>kx,zhCN:()=>Cx,zhTW:()=>Ex}),Nx=o((()=>{ov(),lv(),pv(),gv(),yv(),Sv(),Tv(),Ov(),jv(),Pv(),Lv(),Bv(),Uv(),Kv(),Yv(),Qv(),ty(),iy(),sy(),uy(),py(),gy(),yy(),wy(),Dy(),Ay(),Ny(),Iy(),zy(),Wy(),Hy(),qy(),Xy(),tb(),ib(),sb(),ub(),pb(),gb(),yb(),Sb(),Tb(),Ob(),jb(),Pb(),Lb(),Vb(),Wb(),qb(),Xb(),$b(),nx(),ax(),cx(),px(),dx(),gx(),yx(),Sx(),Tx(),Ox(),jx()}));function Px(){return new Rx}var Fx,Ix,Lx,Rx,zx,Bx=o((()=>{Ix=Symbol(`ZodOutput`),Lx=Symbol(`ZodInput`),Rx=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}},(Fx=globalThis).__zod_globalRegistry??(Fx.__zod_globalRegistry=Px()),zx=globalThis.__zod_globalRegistry}));function Vx(e,t){try{return Wx(e,{assertOnly:!0})}catch{return t}}function Hx(e,t){try{let t=Wx(e),n=Gd(e),r=e._zod.run,i=r.__originalRun??r,a=(e,n)=>{if(n?.async||n?.direction===`backward`||n?.skipChecks||n?.[tC]||n&&Y_(n,e.value))return i(e,n);let r=t(e.value);return r===eC?(n&&(n[tC]=!0),i(e,n)):(e.value=r,e)};return a.__originalRun=i,n._zod.bag.fallbackRun=i,n._zod.bag.validator=Vx(e,t),n._zod.run=a,r.__originalRun||Ux(n,e,t),n}catch(n){if(t?.strict)throw n;return e}}function Ux(e,t,n){let r=e,i=t;if(typeof i.safeParse==`function`){let e=i.safeParse;r.safeParse=(t,r)=>{let i=n(t);return i===eC?e(t,r):{success:!0,data:i}}}if(typeof i.parse==`function`){let e=i.parse;r.parse=(t,r)=>{let i=n(t);return i===eC?e(t,r):i}}}function Wx(e,t){let n=!0;try{n=K_(e)}catch{}if(n)throw new rC(`a schema whose subtree contains a reference cycle`);let r={constants:new Map,constantCounter:0,varCounter:0},i=new Mh([`input`]),a=uS(i,r,e,`input`,!t?.assertOnly);i.write(a===null?`return true;`:`return ${a};`);let o=[`INVALID`,...r.constants.keys()],s=[eC,...r.constants.values()],c=i.content.join(` +`),l=t?.debug?o.length>0?`// Constants: ${o.join(`, `)}\n${c}`:c:``,u=Function,d=`return (input) => {\n${c}\n}`,f;try{f=new u(...o,d)(...s)}catch(e){throw new rC(`this schema (generated code failed to evaluate: ${e.message})`)}return t?.debug&&(f.code=l),f}function G(e,t){for(let[n,r]of e.constants)if(r===t)return n;let n=`c${e.constantCounter++}`;return e.constants.set(n,t),n}function K(e){return`v${e.varCounter++}`}function Gx(e,t){let n=e._zod.run({value:t,issues:[]},{});if(n&&typeof n.then==`function`)return eC;let r=n;return r.issues.length===0?r.value:eC}function Kx(e,t,n,r,i=!0){let a=e.content.length,o=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return uS(e,t,n,r,i)}catch(i){if(!(i instanceof rC)||!i.islandable)throw i;if(e.content.length=a,t.constants.size>o){let e=Array.from(t.constants.keys()).slice(o);for(let n of e)t.constants.delete(n)}return t.constantCounter=s,t.varCounter=c,qx(e,t,n,r)}}function qx(e,t,n,r){let i=G(t,n),a=G(t,Gx),o=K(t);return e.write(`const ${o} = ${a}(${i}, ${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}function Jx(e,t,n,r){let i=n._zod.def.checks;if(!i||i.length===0)return r;let a=r;for(let n of i){let r=n._zod.def;if(r.when&&!iC.has(r.check))throw new rC(`check with a custom "when" condition`);switch(r.check){case`greater_than`:Qx(e,t,r,a);break;case`less_than`:$x(e,t,r,a);break;case`multiple_of`:eS(e,t,r,a);break;case`number_format`:tS(e,r,a);break;case`min_length`:{let n=Xx(r.minimum,`min_length`),i=Yx(e,t,a,`${a}.length >= ${n} && ${a}.length < ${r.minimum*2}`);e.write(`if (${i} < ${n}) return INVALID;`);break}case`max_length`:{let n=Xx(r.maximum,`max_length`),i=Yx(e,t,a,`${a}.length > ${n}`);e.write(`if (${i} > ${n}) return INVALID;`);break}case`length_equals`:{let n=Xx(r.length,`length_equals`),i=Yx(e,t,a,`${a}.length >= ${n} && ${a}.length <= ${r.length*2}`);e.write(`if (${i} !== ${n}) return INVALID;`);break}case`min_size`:e.write(`if (${a}.size < ${Xx(r.minimum,`min_size`)}) return INVALID;`);break;case`max_size`:e.write(`if (${a}.size > ${Xx(r.maximum,`max_size`)}) return INVALID;`);break;case`size_equals`:e.write(`if (${a}.size !== ${Xx(r.size,`size_equals`)}) return INVALID;`);break;case`string_format`:a=lS(e,t,r,a);break;case`custom`:a=cS(e,t,n,a);break;case`bigint_format`:nS(e,r,a);break;case`mime_type`:rS(e,t,r,a);break;case`property`:iS(e,t,r,a);break;case`overwrite`:{let r=K(t);aS(e,t,n,a,r),a=r;break}default:throw new rC(`check type ${r.check}`)}}return a}function Yx(e,t,n,r){let i=G(t,lf),a=K(t);return e.write(`const ${a} = typeof ${n} === "string" && ${r} ? ${i}(${n}) : ${n}.length;`),a}function Xx(e,t){if(typeof e!=`number`||!Number.isFinite(e))throw new rC(`${t} bound of type ${typeof e}`);return`${e}`}function Zx(e,t){if(typeof t==`bigint`)return`${t}n`;if(typeof t==`number`){if(Number.isNaN(t))throw new rC(`comparison check with NaN bound`);return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new rC(`comparison check with Invalid Date bound`);return G(e,t)}throw new rC(`comparison check bound of type ${typeof t}`)}function Qx(e,t,n,r){let i=n.inclusive?`<`:`<=`;e.write(`if (${r} ${i} ${Zx(t,n.value)}) return INVALID;`)}function $x(e,t,n,r){let i=n.inclusive?`>`:`>=`;e.write(`if (${r} ${i} ${Zx(t,n.value)}) return INVALID;`)}function eS(e,t,n,r){if(typeof n.value==`bigint`){if(n.value===BigInt(0))throw new rC(`multiple_of check with a zero divisor`);e.write(`if (${r} % ${n.value}n !== 0n) return INVALID;`)}else{let i=G(t,kd);e.write(`if (${i}(${r}, ${Xx(n.value,`multiple_of`)}) !== 0) return INVALID;`)}}function tS(e,t,n){let r=t.format;switch(r){case`safeint`:e.write(`if (!Number.isSafeInteger(${n})) return INVALID;`);break;case`int32`:e.write(`if (!Number.isInteger(${n}) || ${n} < -2147483648 || ${n} > 2147483647) return INVALID;`);break;case`uint32`:e.write(`if (!Number.isInteger(${n}) || ${n} < 0 || ${n} > 4294967295) return INVALID;`);break;case`float32`:e.write(`if (!Number.isFinite(${n}) || ${n} < -3.4028234663852886e38 || ${n} > 3.4028234663852886e38) return INVALID;`);break;case`float64`:e.write(`if (!Number.isFinite(${n})) return INVALID;`);break;default:throw new rC(`number format ${r}`)}}function nS(e,t,n){let r=t.format;if(r)switch(r){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`);break;default:throw new rC(`bigint format ${r}`)}}function rS(e,t,n,r){let i=n.mime;if(i&&i.length>0){let n=G(t,new Set(i));e.write(`if (!${n}.has(${r}.type)) return INVALID;`)}}function iS(e,t,n,r){let i=`${r}[${JSON.stringify(n.property)}]`;uS(e,t,n.schema,i)}function aS(e,t,n,r,i){let a=n._zod.def.tx;if(!a)throw new rC(`overwrite check without a transform function`);if(YS(a))throw new nC(`z.compile: async overwrite transforms are not supported`);let o=G(t,a);e.write(`const ${i} = ${o}(${r});`)}function oS(){throw new qf}function sS(e){this.issues.push(e)}function cS(e,t,n,r){let i=n._zod.def;if(i.fn){if(YS(i.fn))throw new nC(`z.compile: async .refine() predicates are not supported`);let n=G(t,i.fn),a=G(t,oS),o=K(t);return e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`),r}if(n._zod.check){if(YS(n._zod.check))throw new nC(`z.compile: async .superRefine() / check functions are not supported`);let i=n._zod.check,a=G(t,e=>{let t={value:e,issues:[],addIssue:sS};return i(t)instanceof Promise&&oS(),t.issues.length===0?t.value:eC}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}throw new rC(`custom check without a predicate or check function`)}function lS(e,t,n,r){let i=n.format;if(i===`base64`){let n=G(t,Uh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`base64url`){let n=G(t,Wh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`jwt`){let i=G(t,qh),a=G(t,n.alg??null);return e.write(`if (!${i}(${r}, ${a})) return INVALID;`),r}if(i===`ipv6`){let n=G(t,Vh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`cidrv6`){let n=G(t,Hh);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(i===`credit_card`){let n=G(t,Kh);return e.write(`if (!${n}(${r})) return INVALID;`),r}let a=n;if(i===`url`||i===`httpurl`||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let i=G(t,Lh),o=G(t,n),s=K(t),c=K(t);if(e.write(`const ${s} = ${r}.trim();`),e.write(`const ${c} = ${i}(${s}, ${o});`),e.write(`if (typeof ${c} === "number") return INVALID;`),a.hostname!==void 0){let n=G(t,zh);e.write(`if (!${n}(${c}, ${o}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let n=G(t,Bh);e.write(`if (!${n}(${c}, ${o}.protocol)) return INVALID;`)}let l=K(t),u=a.normalize?`${c}.href`:`${G(t,Rh)}(${s})`;return e.write(`const ${l} = ${u};`),l}let o=n.fn;if(o){if(YS(o))throw new rC(`async string format ${i}`);let n=G(t,o);return e.write(`if (!${n}(${r})) return INVALID;`),r}if(aC.has(i)&&n.pattern){let i=G(t,n.pattern);return e.write(`${i}.lastIndex = 0;`),e.write(`if (!${i}.test(${r})) return INVALID;`),r}let s=n.format;switch(s){case`regex`:throw new rC(`regex format without a pattern`);case`lowercase`:e.write(`if (${r} !== ${r}.toLowerCase()) return INVALID;`);break;case`uppercase`:e.write(`if (${r} !== ${r}.toUpperCase()) return INVALID;`);break;case`includes`:e.write(`if (!${r}.includes(${Rd(n.includes)})) return INVALID;`);break;case`starts_with`:{let t=n.prefix;e.write(`if (${r}.slice(0, ${t.length}) !== ${Rd(t)}) return INVALID;`);break}case`ends_with`:{let t=n.suffix;e.write(`if (${r}.slice(-${t.length}) !== ${Rd(t)}) return INVALID;`);break}default:throw new rC(`string format ${s}`)}return r}function uS(e,t,n,r,i=!0){let a=n._zod.def,o=a.type;if(a.coerce)throw new rC(`coercion (z.coerce.${o}())`);let s=i||!!a.checks?.length,c;switch(o){case`string`:c=dS(e,t,n,r);break;case`number`:c=fS(e,n,r);break;case`boolean`:c=pS(e,r);break;case`bigint`:c=mS(e,n,r);break;case`symbol`:c=hS(e,r);break;case`undefined`:c=gS(e,r);break;case`null`:c=_S(e,r);break;case`any`:case`unknown`:c=r;break;case`never`:e.write(`return INVALID;`),c=r;break;case`void`:c=vS(e,r);break;case`nan`:c=yS(e,r);break;case`date`:c=bS(e,r);break;case`object`:c=xS(e,t,n,r,s);break;case`optional`:c=SS(e,t,n,r,s);break;case`nullable`:c=OS(e,t,n,r,s);break;case`array`:c=kS(e,t,n,r,s);break;case`literal`:c=AS(e,t,n,r);break;case`enum`:c=jS(e,t,n,r);break;case`readonly`:{let i=MS(e,t,n,r),a=K(t);e.write(`const ${a} = Object.freeze(${i});`),c=a;break}case`success`:MS(e,t,n,r),c=`true`;break;case`default`:case`prefault`:c=NS(e,t,n,r);break;case`nonoptional`:c=PS(e,t,n,r);break;case`tuple`:c=FS(e,t,n,r);break;case`union`:c=LS(e,t,n,r);break;case`intersection`:c=BS(e,t,n,r);break;case`record`:c=VS(e,t,n,r);break;case`map`:c=US(e,t,n,r);break;case`set`:c=WS(e,t,n,r);break;case`file`:c=GS(e,r);break;case`template_literal`:c=KS(e,t,n,r);break;case`lazy`:c=qS(e,t,n,r);break;case`pipe`:c=JS(e,t,n,r);break;case`custom`:c=XS(e,t,n,r);break;case`transform`:c=$S(e,t,n,r);break;case`catch`:c=QS(e,t,n,r);break;default:throw new rC(`schema type ${o}`)}return c===null?null:Jx(e,t,n,c)}function dS(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.def;return i.format===void 0?r:lS(e,t,i,r)}function fS(e,t,n){e.write(`if (typeof ${n} !== "number" || !Number.isFinite(${n})) return INVALID;`);let r=t._zod.def;return r.check===`number_format`&&r.format&&tS(e,{format:r.format},n),n}function pS(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function mS(e,t,n){e.write(`if (typeof ${n} !== "bigint") return INVALID;`);let r=t._zod.def;if(r.format)switch(r.format){case`int64`:e.write(`if (${n} < -9223372036854775808n || ${n} > 9223372036854775807n) return INVALID;`);break;case`uint64`:e.write(`if (${n} < 0n || ${n} > 18446744073709551615n) return INVALID;`)}return n}function hS(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function gS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function _S(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function vS(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function yS(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function bS(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function xS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (typeof ${r} !== "object" || ${r} === null || Array.isArray(${r})) return INVALID;`);let o=a.shape,s=Object.keys(o),c=Object.getOwnPropertySymbols(o),l=c.length?[...s,...c]:s,u=e=>typeof e==`symbol`?G(t,e):Rd(e),d=e=>typeof e==`symbol`?`[${u(e)}]`:Rd(e),f=o;if(s.includes(`__proto__`))throw new rC(`object shape key "__proto__"`);let p=new Map;for(let n of l){let a=f[n],o=u(n),s=K(t);if(e.write(`const ${s} = ${r}[${o}];`),a._zod.optin!==void 0){let i=K(t);e.write(`let ${i} = (() => {`),e.indented(e=>{let n=Kx(e,t,a,s);e.write(`return ${n};`)}),e.write(`})();`),a._zod.optout===`optional`?(e.write(`if (${i} === INVALID) {`),e.indented(e=>{e.write(`if (${o} in ${r}) return INVALID;`),e.write(`${i} = undefined;`)}),e.write(`}`)):e.write(`if (${i} === INVALID) return INVALID;`),p.set(n,i)}else{wS(a)&&e.write(`if (!(${o} in ${r})) return INVALID;`);let c=Kx(e,t,a,s,i);c!==null&&p.set(n,c)}}let m=a.catchall,h=`none`;if(m){let t=m._zod.def.type;if(t===`never`){let t=s.map(e=>`k !== ${Rd(e)}`).join(` && `)||`true`;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (${t}) return INVALID;`)}),e.write(`}`)}else h=(t===`unknown`||t===`any`)&&!m._zod.def.checks?.length?`passthrough`:`schema`}let g=K(t),_=l.some(e=>DS(f[e])||ES(f[e]));if(!i){if(h===`schema`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`);let i=K(t);e.write(`const ${i} = ${r}[k];`),Kx(e,t,m,i,!1)}),e.write(`}`)}return null}if(_){e.write(`const ${g} = {};`);for(let t of l){let n=u(t),i=p.get(t);ES(f[t])?e.write(`if (${n} in ${r}) ${g}[${n}] = ${i};`):DS(f[t])?e.write(`if (${i} !== undefined || ${n} in ${r}) ${g}[${n}] = ${i};`):e.write(`${g}[${n}] = ${i};`)}}else{let t=l.map(e=>`${d(e)}: ${p.get(e)}`).join(`, `);e.write(`const ${g} = { ${t} };`)}if(h!==`none`){let n=s.length>0?G(t,new Set(s)):null;e.write(`for (const k in ${r}) {`),e.indented(e=>{if(e.write(`if (k === "__proto__") continue;`),n&&e.write(`if (${n}.has(k)) continue;`),h===`passthrough`)e.write(`${g}[k] = ${r}[k];`);else{let n=K(t);e.write(`const ${n} = ${r}[k];`);let i=Kx(e,t,m,n);e.write(`${g}[k] = ${i};`)}}),e.write(`}`)}return g}function SS(e,t,n,r,i=!0){let a=n._zod.def;if(CS(n))return uS(e,t,a.innerType,r,i);if(a.innerType._zod.optin===`defaulted`){let n=K(t),i=K(t);return e.write(`let ${n};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`const ${i} = (() => {`),e.indented(e=>{let n=uS(e,t,a.innerType,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${i} !== INVALID) ${n} = ${i};`)}),e.write(`} else {`),e.indented(e=>{let i=uS(e,t,a.innerType,r);e.write(`${n} = ${i};`)}),e.write(`}`),n}let o=i?K(t):null;return o&&e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=uS(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function CS(e){return e._zod.traits?.has(`$ZodExactOptional`)===!0}function wS(e){return e._zod.optin===void 0&&TS(e)}function TS(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case`any`:case`unknown`:case`undefined`:case`void`:case`default`:case`prefault`:case`transform`:case`custom`:case`lazy`:return!0;case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`never`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:return!1;case`nonoptional`:return t.innerType?TS(t.innerType):!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:case`nullable`:case`readonly`:case`success`:return!t.innerType||TS(t.innerType);case`catch`:return!0;case`union`:return!t.options||t.options.some(TS);case`intersection`:return!t.left||!t.right||TS(t.left)&&TS(t.right);case`pipe`:return!t.in||TS(t.in);default:return!0}}function ES(e){return e._zod.optin===`optional`&&e._zod.optout===`optional`}function DS(e){let t=e._zod.def;switch(t.type){case`string`:case`number`:case`boolean`:case`bigint`:case`symbol`:case`null`:case`nan`:case`date`:case`object`:case`array`:case`tuple`:case`record`:case`map`:case`set`:case`file`:case`template_literal`:case`never`:case`success`:return!1;case`literal`:return!!t.values?.includes(void 0);case`enum`:return!!e._zod.values?.has(void 0);case`optional`:return!0;case`nullable`:case`readonly`:case`nonoptional`:return!t.innerType||DS(t.innerType);case`union`:return!t.options||t.options.some(DS);case`intersection`:return!t.left||!t.right||DS(t.left)||DS(t.right);case`pipe`:return!t.out||DS(t.out);default:return!0}}function OS(e,t,n,r,i=!0){let a=n._zod.def,o=i?K(t):null;return o&&e.write(`let ${o} = null;`),e.write(`if (${r} !== null) {`),e.indented(e=>{let n=uS(e,t,a.innerType,r,i);o&&n!==null&&e.write(`${o} = ${n};`)}),e.write(`}`),o}function kS(e,t,n,r,i=!0){let a=n._zod.def;e.write(`if (!Array.isArray(${r})) return INVALID;`);let o=i?K(t):null,s=K(t),c=K(t);return o&&e.write(`const ${o} = new Array(${r}.length);`),e.write(`for (let ${s} = 0; ${s} < ${r}.length; ${s}++) {`),e.indented(e=>{e.write(`const ${c} = ${r}[${s}];`);let n=Kx(e,t,a.element,c,i);o&&n!==null&&e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function AS(e,t,n,r){let i=n._zod.def.values;if(i.length!==1){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let a=i[0];if(typeof a==`number`&&Number.isNaN(a)){let n=G(t,new Set(i));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}if(typeof a==`string`)e.write(`if (${r} !== ${Rd(a)}) return INVALID;`);else if(typeof a==`number`||typeof a==`boolean`)e.write(`if (${r} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${r} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${r} !== undefined) return INVALID;`);else if(typeof a==`bigint`)e.write(`if (${r} !== ${a}n) return INVALID;`);else throw new rC(`literal type ${typeof a}`);return r}function jS(e,t,n,r){let i=n._zod.values;if(!i)throw new rC(`enum schema without enumerated values`);let a=G(t,i);return e.write(`if (!${a}.has(${r})) return INVALID;`),r}function MS(e,t,n,r){let i=n._zod.def;return uS(e,t,i.innerType,r)}function NS(e,t,n,r){let i=n._zod.def,a=Object.getOwnPropertyDescriptor(n._zod.def,`defaultValue`)?()=>n._zod.def.defaultValue:void 0;if(n._zod.def.type===`prefault`){if(!a)return uS(e,t,i.innerType,r);let n=G(t,a),o=K(t);return e.write(`let ${o} = ${r};`),e.write(`if (${r} === undefined) ${o} = ${n}();`),uS(e,t,i.innerType,o)}let o=K(t);if(a){let n=G(t,a),s=G(t,Hd);e.write(`let ${o};`),e.write(`if (${r} === undefined) {`),e.indented(e=>{e.write(`${o} = ${s}(${n}());`)}),e.write(`} else {`),e.indented(e=>{let a=uS(e,t,i.innerType,r);e.write(`${o} = ${a} === undefined ? ${s}(${n}()) : ${a};`)}),e.write(`}`)}else e.write(`let ${o};`),e.write(`if (${r} !== undefined) {`),e.indented(e=>{let n=uS(e,t,i.innerType,r);e.write(`${o} = ${n};`)}),e.write(`}`);return o}function PS(e,t,n,r){let i=n._zod.def,a=uS(e,t,i.innerType,r),o=K(t);return e.write(`const ${o} = ${a};`),e.write(`if (${o} === undefined) return INVALID;`),o}function FS(e,t,n,r){let i=n._zod.def,a=i.items,o=i.rest;e.write(`if (!Array.isArray(${r})) return INVALID;`);let s=IS(a,`optin`),c=IS(a,`optout`);o?e.write(`if (${r}.length < ${s}) return INVALID;`):e.write(`if (${r}.length < ${s} || ${r}.length > ${a.length}) return INVALID;`);let l=K(t);e.write(`const ${l} = [];`);for(let n=0;n=c)e.write(`if (${l}.length === ${n}) {`),e.indented(e=>{e.write(`if (${n} < ${r}.length) {`),e.indented(e=>{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Kx(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}),e.write(`} else {`),e.indented(e=>{if(ES(i)){e.write(`${l}.length = ${n};`);return}let r=K(t),a=K(t);e.write(`const ${r} = undefined;`),e.write(`const ${a} = (() => {`),e.indented(e=>{let n=Kx(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`),e.write(`if (${a} === INVALID || ${a} === undefined) ${l}.length = ${n};`),e.write(`else ${l}[${n}] = ${a};`)}),e.write(`}`)}),e.write(`}`);else{let a=K(t);e.write(`const ${a} = ${r}[${n}];`);let o=Kx(e,t,i,a);e.write(`${l}[${n}] = ${o};`)}}if(o){let n=K(t),i=K(t);e.write(`for (let ${n} = ${a.length}; ${n} < ${r}.length; ${n}++) {`),e.indented(e=>{e.write(`const ${i} = ${r}[${n}];`);let a=Kx(e,t,o,i);e.write(`${l}[${n}] = ${a};`)}),e.write(`}`)}return l}function IS(e,t){for(let n=e.length-1;n>=0;n--)if(!(t===`optin`?e[n]._zod.optin!==void 0:e[n]._zod.optout===`optional`))return n+1;return 0}function LS(e,t,n,r){let i=n._zod.def,a=i.options;if(i.discriminator)return RS(e,t,i,r);if(i.inclusive===!1)throw new rC(`exclusive unions (z.xor)`);if(a.length===0)return e.write(`return INVALID;`),r;if(a.length===1)return uS(e,t,a[0],r);if(a.every(e=>e._zod.def.type===`literal`&&!e._zod.def.checks?.length)){let n=G(t,new Set(a.flatMap(e=>e._zod.def.values)));return e.write(`if (!${n}.has(${r})) return INVALID;`),r}let o=K(t);e.write(`let ${o};`);for(let n=0;n {`):e.write(`if (${o} === INVALID) ${o} = (() => {`),e.indented(e=>{let n=uS(e,t,i,r);e.write(`return ${n};`)}),e.write(`})();`)}return e.write(`if (${o} === INVALID) return INVALID;`),o}function RS(e,t,n,r){if(n.unionFallback)throw new rC(`discriminated union with unionFallback`);if(n.options.length===0)return e.write(`return INVALID;`),r;let i=K(t),a=K(t);e.write(`const ${i} = ${r}?.[${Rd(n.discriminator)}];`),e.write(`let ${a};`);let o=!0,s=new Set;for(let c of n.options){let l=c._zod.propValues?.[n.discriminator];if(!l||l.size===0)throw new rC(`discriminated union option without static discriminator values`);for(let e of l){if(s.has(e))throw new rC(`duplicate discriminator value ${String(e)}`);s.add(e)}let u=Array.from(l,e=>zS(t,i,e)),d=o?`if`:`else if`;e.write(`${d} (${u.join(` || `)}) {`),e.indented(e=>{let n=uS(e,t,c,r);e.write(`${a} = ${n};`)}),e.write(`}`),o=!1}return e.write(`else { return INVALID; }`),a}function zS(e,t,n){if(typeof n==`string`)return`${t} === ${Rd(n)}`;if(typeof n==`number`)return Number.isNaN(n)?`Number.isNaN(${t})`:`${t} === ${n}`;if(typeof n==`boolean`)return`${t} === ${n}`;if(n===null)return`${t} === null`;if(n===void 0)return`${t} === undefined`;if(typeof n==`bigint`)return`${t} === ${n}n`;if(typeof n==`symbol`)return`${t} === ${G(e,n)}`;throw new rC(`literal discriminator value ${String(n)}`)}function BS(e,t,n,r){let i=n._zod.def,a=Kx(e,t,i.left,r),o=Kx(e,t,i.right,r),s=G(t,tg),c=K(t);return e.write(`const ${c} = ${s}(${a}, ${o});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function VS(e,t,n,r){let i=n._zod.def,a=G(t,Vd);e.write(`if (!${a}(${r})) return INVALID;`);let o=K(t),s=K(t),c=K(t);e.write(`const ${o} = {};`);let l=i,u=l.partial?void 0:i.keyType._zod.values;if(u){let n=[];for(let a of u){if(typeof a!=`string`&&typeof a!=`number`&&typeof a!=`symbol`)throw new rC(`record key value ${String(a)}`);let s=typeof a==`number`?a.toString():a;if(s===`__proto__`)throw new rC(`record key "__proto__"`);n.push(s);let c=G(t,a),l=uS(e,t,i.keyType,c),u=K(t);e.write(`const ${u} = ${r}[${HS(t,s)}];`);let d=Kx(e,t,i.valueType,u);e.write(`${o}[${l}] = ${d};`)}let a=G(t,new Set(n));return e.write(`for (const ${s} in ${r}) {`),e.indented(e=>{e.write(`if (${a}.has(${s})) continue;`),l.mode===`loose`?e.write(`if (${s} !== "__proto__") ${o}[${s}] = ${r}[${s}];`):e.write(`return INVALID;`)}),e.write(`}`),o}let d=i.keyType._zod.def;if(d.type!==`string`||d.format!==void 0||d.coerce||(d.checks?.length??0)!==0){let n=i.mode===`loose`,a=G(t,Wx(i.keyType)),c=G(t,Im),l=G(t,Object.prototype.propertyIsEnumerable),u=K(t);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${l}.call(${r}, ${s})) continue;`),e.write(`let ${u} = ${a}(${s});`),e.write(`if (${u} === INVALID && typeof ${s} === "string" && ${c}.test(${s})) ${u} = ${a}(Number(${s}));`),n?e.write(`if (${u} === INVALID) { ${o}[${s}] = ${r}[${s}]; continue; }`):e.write(`if (${u} === INVALID) return INVALID;`),e.write(`if (${u} === "__proto__") continue;`);let d=K(t);e.write(`const ${d} = ${r}[${s}];`);let f=Kx(e,t,i.valueType,d);e.write(`${o}[${u}] = ${f};`)}),e.write(`}`),o}let f=G(t,Object.prototype.propertyIsEnumerable);return e.write(`for (const ${s} of Reflect.ownKeys(${r})) {`),e.indented(e=>{e.write(`if (${s} === "__proto__") continue;`),e.write(`if (!${f}.call(${r}, ${s})) continue;`),e.write(`if (typeof ${s} !== "string") return INVALID;`),e.write(`const ${c} = ${r}[${s}];`);let n=Kx(e,t,i.valueType,c);e.write(`${o}[${s}] = ${n};`)}),e.write(`}`),o}function HS(e,t){return typeof t==`string`?Rd(t):G(e,t)}function US(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Map)) return INVALID;`);let a=K(t),o=K(t),s=K(t);return e.write(`const ${a} = new Map();`),e.write(`for (const [${o}, ${s}] of ${r}) {`),e.indented(e=>{let n=uS(e,t,i.keyType,o),r=uS(e,t,i.valueType,s);e.write(`${a}.set(${n}, ${r});`)}),e.write(`}`),a}function WS(e,t,n,r){let i=n._zod.def;e.write(`if (!(${r} instanceof Set)) return INVALID;`);let a=K(t),o=K(t);return e.write(`const ${a} = new Set();`),e.write(`for (const ${o} of ${r}) {`),e.indented(e=>{let n=uS(e,t,i.valueType,o);e.write(`${a}.add(${n});`)}),e.write(`}`),a}function GS(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function KS(e,t,n,r){e.write(`if (typeof ${r} !== "string") return INVALID;`);let i=n._zod.pattern;if(i){let n=G(t,i);e.write(`${n}.lastIndex = 0;`),e.write(`if (!${n}.test(${r})) return INVALID;`)}return r}function qS(e,t,n,r){let i=n._zod.def,a=G(t,i.getter),o=G(t,{parser:null});e.write(`if (!${o}.parser) {`),e.indented(e=>{e.write(`const inner = ${a}();`),e.write(`${o}.parser = function(input) {`),e.indented(e=>{e.write(`const result = inner._zod.run({ value: input, issues: [] }, {});`),e.write(`return result.issues.length === 0 ? result.value : INVALID;`)}),e.write(`};`)}),e.write(`}`);let s=K(t);return e.write(`const ${s} = ${o}.parser(${r});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function JS(e,t,n,r){let i=n._zod.def,a=uS(e,t,i.in,r);if(i.transform){if(YS(i.transform))throw new nC(`z.compile: async transforms in pipes are not supported`);let n=i.transform,r=G(t,e=>{let t={value:e,issues:[],addIssue:sS},r=n(e,t);return r instanceof Promise?eC:t.issues.length===0?r:eC}),o=K(t);return e.write(`const ${o} = ${r}(${a});`),e.write(`if (${o} === INVALID) return INVALID;`),uS(e,t,i.out,o)}return uS(e,t,i.out,a)}function YS(e){return typeof e==`function`&&(e.constructor.name===`AsyncFunction`||e[Symbol.toStringTag]===`AsyncFunction`)}function XS(e,t,n,r){let i=n._zod.def;if(i.fn){if(YS(i.fn))throw new nC(`z.compile: async custom predicates are not supported`);let n=G(t,i.fn),a=G(t,oS),o=K(t);e.write(`const ${o} = ${n}(${r});`),e.write(`if (${o} instanceof Promise) ${a}();`),e.write(`if (!${o}) return INVALID;`)}else throw new rC(`custom schema without a predicate function`);return r}function ZS(e,t,n){let r=e._zod.run({value:n,issues:[]},{});if(r&&typeof r.then==`function`)return eC;let i=r;return i.issues.length===0?i.value:t()}function QS(e,t,n,r){let i=n._zod.def;if(!i.catchValue[`~constantCatch`])throw new rC(`catch with a callback (only a constant catch value compiles)`,!1);let a=K(t);e.write(`let ${a} = (() => {`),e.indented(e=>{let n=Kx(e,t,i.innerType,r);e.write(`return ${n};`)}),e.write(`})();`);let o=G(t,i.innerType),s=G(t,i.catchValue),c=G(t,ZS);return e.write(`if (${a} === INVALID) {`),e.indented(e=>{e.write(`${a} = ${c}(${o}, ${s}, ${r});`),e.write(`if (${a} === INVALID) return INVALID;`)}),e.write(`}`),a}function $S(e,t,n,r){let i=n._zod.def;if(i.transform){if(YS(i.transform))throw new nC(`z.compile: async transforms are not supported`);let n=i.transform,a=G(t,e=>{let t={value:e,issues:[],addIssue:sS},r=n(e,t);return r instanceof Promise?eC:t.issues.length===0?r:eC}),o=K(t);return e.write(`const ${o} = ${a}(${r});`),e.write(`if (${o} === INVALID) return INVALID;`),o}return r}var eC,tC,nC,rC,iC,aC,oC=o((()=>{Xf(),Nh(),rv(),ih(),U_(),H(),eC=Symbol.for(`zod.compile.invalid`),tC=Symbol.for(`zod.compile.fallback`),nC=class extends Error{constructor(e=`z.compile does not support async refinements, transforms, or checks`){super(e),this.name=`ZodCompileAsyncError`}},rC=class extends Error{constructor(e,t=!0){super(`z.compile does not support ${e}; this schema must use the runtime parser`),this.name=`ZodCompileUnsupportedError`,this.islandable=t}},iC=new Set([`max_size`,`min_size`,`size_equals`,`max_length`,`min_length`,`length_equals`]),aC=new Set([`cidrv4`,`cuid`,`cuid2`,`date`,`datetime`,`duration`,`e164`,`email`,`emoji`,`ends_with`,`guid`,`includes`,`ipv4`,`ksuid`,`lowercase`,`mac`,`nanoid`,`regex`,`starts_with`,`time`,`ulid`,`uppercase`,`uuid`,`xid`])}));function sC(e,t){return new e({type:`string`,...R(t)})}function cC(e,t){return new e({type:`string`,coerce:!0,...R(t)})}function lC(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...R(t)})}function uC(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...R(t)})}function dC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...R(t)})}function fC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...R(t)})}function pC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...R(t)})}function mC(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...R(t)})}function hC(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...R(t)})}function gC(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...R(t)})}function _C(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...R(t)})}function vC(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...R(t)})}function yC(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...R(t)})}function bC(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...R(t)})}function xC(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...R(t)})}function SC(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...R(t)})}function CC(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...R(t)})}function wC(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...R(t)})}function TC(e,t){return new e({type:`string`,format:`mac`,check:`string_format`,abort:!1,...R(t)})}function EC(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...R(t)})}function DC(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...R(t)})}function OC(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...R(t)})}function kC(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...R(t)})}function AC(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...R(t)})}function jC(e,t){return new e({type:`string`,format:`credit_card`,check:`string_format`,abort:!1,...R(t)})}function MC(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...R(t)})}function NC(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...R(t)})}function PC(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...R(t)})}function FC(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...R(t)})}function IC(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...R(t)})}function LC(e,t){return new e({type:`number`,checks:[],...R(t)})}function RC(e,t){return new e({type:`number`,coerce:!0,checks:[],...R(t)})}function zC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...R(t)})}function BC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float32`,...R(t)})}function VC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`float64`,...R(t)})}function HC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`int32`,...R(t)})}function UC(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`uint32`,...R(t)})}function WC(e,t){return new e({type:`boolean`,...R(t)})}function GC(e,t){return new e({type:`boolean`,coerce:!0,...R(t)})}function KC(e,t){return new e({type:`bigint`,...R(t)})}function qC(e,t){return new e({type:`bigint`,coerce:!0,...R(t)})}function JC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`int64`,...R(t)})}function YC(e,t){return new e({type:`bigint`,check:`bigint_format`,abort:!1,format:`uint64`,...R(t)})}function XC(e,t){return new e({type:`symbol`,...R(t)})}function ZC(e,t){return new e({type:`undefined`,...R(t)})}function QC(e,t){return new e({type:`null`,...R(t)})}function $C(e){return new e({type:`any`})}function ew(e){return new e({type:`unknown`})}function tw(e,t){return new e({type:`never`,...R(t)})}function nw(e,t){return new e({type:`void`,...R(t)})}function rw(e,t){return new e({type:`date`,...R(t)})}function iw(e,t){return new e({type:`date`,coerce:!0,...R(t)})}function aw(e,t){return new e({type:`nan`,...R(t)})}function ow(e,t){return new uh({check:`less_than`,...R(t),value:e,inclusive:!1})}function sw(e,t){return new uh({check:`less_than`,...R(t),value:e,inclusive:!0})}function cw(e,t){return new dh({check:`greater_than`,...R(t),value:e,inclusive:!1})}function lw(e,t){return new dh({check:`greater_than`,...R(t),value:e,inclusive:!0})}function uw(e){return cw(0,e)}function dw(e){return ow(0,e)}function fw(e){return sw(0,e)}function pw(e){return lw(0,e)}function mw(e,t){return new fh({check:`multiple_of`,...R(t),value:e})}function hw(e,t){return new hh({check:`max_size`,...R(t),maximum:e})}function gw(e,t){return new gh({check:`min_size`,...R(t),minimum:e})}function _w(e,t){return new _h({check:`size_equals`,...R(t),size:e})}function vw(e,t){return new vh({check:`max_length`,...R(t),maximum:e})}function yw(e,t){return new yh({check:`min_length`,...R(t),minimum:e})}function bw(e,t){return new bh({check:`length_equals`,...R(t),length:e})}function xw(e,t){return new Sh({check:`string_format`,format:`regex`,...R(t),pattern:e})}function Sw(e){return new Ch({check:`string_format`,format:`lowercase`,...R(e)})}function Cw(e){return new wh({check:`string_format`,format:`uppercase`,...R(e)})}function ww(e,t){return new Th({check:`string_format`,format:`includes`,...R(t),includes:e})}function Tw(e,t){return new Eh({check:`string_format`,format:`starts_with`,...R(t),prefix:e})}function Ew(e,t){return new Dh({check:`string_format`,format:`ends_with`,...R(t),suffix:e})}function Dw(e,t,n){return new Oh({check:`property`,property:e,schema:t,...R(n)})}function Ow(e){return Object.entries(e).map(([e,t])=>new Oh({check:`property`,property:e,schema:t}))}function kw(e,t){return new kh({check:`mime_type`,mime:e,...R(t)})}function Aw(e){return new Ah({check:`overwrite`,tx:e})}function jw(e){return Aw(t=>t.normalize(e))}function Mw(){return Aw(e=>e.trim())}function Nw(){return Aw(e=>e.toLowerCase())}function Pw(){return Aw(e=>e.toUpperCase())}function Fw(){return Aw(e=>zd(e))}function Iw(e,t,n){return new e({type:`array`,element:t,...R(n)})}function Lw(e,t,n){return new e({type:`union`,options:t,...R(n)})}function Rw(e,t,n){return new e({type:`union`,options:t,inclusive:!1,...R(n)})}function zw(e,t,n,r){return new e({type:`union`,options:n,discriminator:t,...R(r)})}function Bw(e,t,n){return new e({type:`intersection`,left:t,right:n})}function Vw(e,t,n,r){let i=n instanceof W;return new e({type:`tuple`,items:t,rest:i?n:null,...R(i?r:n)})}function Hw(e,t,n,r){return new e({type:`record`,keyType:t,valueType:n,...R(r)})}function Uw(e,t,n,r){return new e({type:`map`,keyType:t,valueType:n,...R(r)})}function Ww(e,t,n){return new e({type:`set`,valueType:t,...R(n)})}function Gw(e,t,n){return new e({type:`enum`,entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...R(n)})}function Kw(e,t,n){return new e({type:`enum`,entries:t,...R(n)})}function qw(e,t,n){return new e({type:`literal`,values:Array.isArray(t)?t:[t],...R(n)})}function Jw(e,t){return new e({type:`file`,...R(t)})}function Yw(e,t){return new e({type:`transform`,transform:t})}function Xw(e,t){return new e({type:`optional`,innerType:t})}function Zw(e,t){return new e({type:`nullable`,innerType:t})}function Qw(e,t,n){return new e({type:`default`,innerType:t,get defaultValue(){return typeof n==`function`?n():Hd(n)}})}function $w(e,t,n){return new e({type:`nonoptional`,innerType:t,...R(n)})}function eT(e,t){return new e({type:`success`,innerType:t})}function tT(e,t,n){return new e({type:`catch`,innerType:t,catchValue:typeof n==`function`?n:Tf(n)})}function nT(e,t,n){return new e({type:`pipe`,in:t,out:n})}function rT(e,t){return new e({type:`readonly`,innerType:t})}function iT(e,t,n){return new e({type:`template_literal`,parts:t,...R(n)})}function aT(e,t){return new e({type:`lazy`,getter:t})}function oT(e,t){return new e({type:`promise`,innerType:t})}function sT(e,t,n){let r=R(n);return r.abort??=!0,new e({type:`custom`,check:`custom`,fn:t,...r})}function cT(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...R(n)})}function lT(e,t){let n=uT(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(df(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(df(r))}},e(t.value,t)),t);return n}function uT(e,t){let n=new oh({check:`custom`,...R(t)});return n._zod.check=e,n}function dT(e){let t=new oh({check:`describe`});return t._zod.onattach=[t=>{let n=zx.get(t)??{};zx.add(t,{...n,description:e})}],t._zod.check=()=>{},t}function fT(e){let t=new oh({check:`meta`});return t._zod.onattach=[t=>{let n=zx.get(t)??{};zx.add(t,{...n,...e})}],t._zod.check=()=>{},t}function pT(e,t){let n=R(t),r=n.truthy??[`true`,`1`,`yes`,`on`,`y`,`enabled`],i=n.falsy??[`false`,`0`,`no`,`off`,`n`,`disabled`];n.case!==`sensitive`&&(r=r.map(e=>typeof e==`string`?e.toLowerCase():e),i=i.map(e=>typeof e==`string`?e.toLowerCase():e));let a=new Set(r),o=new Set(i),s=e.Codec??F_,c=e.Boolean??Zg,l=new s({type:`pipe`,in:new(e.String??vg)({type:`string`,error:n.error}),out:new c({type:`boolean`,error:n.error}),transform:((e,t)=>{let r=e;return n.case!==`sensitive`&&(r=r.toLowerCase()),a.has(r)?!0:!o.has(r)&&(t.issues.push({code:`invalid_value`,expected:`stringbool`,values:[...a,...o],input:t.value,inst:l,continue:!1}),{})}),reverseTransform:((e,t)=>e===!0?r[0]||`true`:i[0]||`false`),error:n.error});return l._zod.bag.truthy=r,l._zod.bag.falsy=i,l._zod.bag.case=n.case??`insensitive`,l}function mT(e,t,n,r={}){let i=R(r),a={check:`string_format`,type:`string`,format:t,fn:typeof n==`function`?n:e=>n.test(e),...i};return n instanceof RegExp&&(a.pattern=n),new e(a)}var hT,gT=o((()=>{jh(),Bx(),U_(),H(),hT={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6}}));function _T(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&Md(e,t,n[t]);return e}function vT(e){let t=e?.target??`draft-2020-12`;return t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),{processors:e.processors??{},metadataRegistry:e?.metadata??zx,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function yT(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function bT(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,bT(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&_T(o.schema,c),t.io===`input`&&OT(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function xT(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function ST(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${xT(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+xT(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function bT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;bT(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function xT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function ST(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!ET.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xT(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}kd(n,r,e.length===1?e[0]:ST(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function CT(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of ET)if(t in e)return;let n=t.filter(e=>DT.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=ST(t);else{let e=n[0],i=DT.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>ST([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,mT(e,r))}function wT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):mT(i,s),mT(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())bT(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])CT(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}mT(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,kd(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:kT(t,`input`,e.processors),output:kT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function TT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return TT(r.element,n);if(r.type===`set`)return TT(r.valueType,n);if(r.type===`lazy`)return TT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return TT(r.innerType,n);if(r.type===`intersection`)return TT(r.left,n)||TT(r.right,n);if(r.type===`record`||r.type===`map`)return TT(r.keyType,n)||TT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:TT(r.in,n)||TT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(TT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(TT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(TT(e,n))return!0;return!!(r.rest&&TT(r.rest,n))}return!1}var ET,DT,OT,kT,AT=o((()=>{Lx(),H(),ET=new Set([`type`,`properties`,`required`,`additionalProperties`]),DT=[`oneOf`,`anyOf`],OT=(e,t={})=>n=>{let r=hT({...n,processors:t});return _T(e,r),yT(r,e),wT(r,e)},kT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=hT({...i??{},target:a,io:t,processors:n});return _T(e,o),yT(o,e),wT(o,e)}}));function jT(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?jT(t.out):t.type===`catch`?jT(t.innerType):e._zod.optin}function MT(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=MT(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>MT(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Nm:Mm).source),p):p}function NT(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of dE.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=MT(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function PT(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(gT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),hE):JSON.parse(o)}function FT(e,t){if(`_idmap`in e){let n=e,r=hT({...t,processors:wE}),i={};for(let e of n._idmap.entries()){let[t,n]=e;_T(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;yT(r,n),kd(a,t,wT(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=hT({...t,processors:wE});return _T(e,n),yT(n,e),wT(n,e)}var IT,LT,RT,zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE=o((()=>{th(),AT(),H(),IT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},LT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=IT[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},RT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):gT(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},zT=(e,t,n,r)=>{n.type=`boolean`},BT=(e,t,n,r)=>{gT(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},VT=(e,t,n,r)=>{gT(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},HT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},UT=(e,t,n,r)=>{gT(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},WT=(e,t,n,r)=>{gT(e,t,n,r,`Void cannot be represented in JSON Schema`)},GT=(e,t,n,r)=>{n.not={}},KT=(e,t,n,r)=>{},qT=(e,t,n,r)=>{},JT=(e,t,n,r)=>{gT(e,t,n,r,`Date cannot be represented in JSON Schema`)},YT=(e,t,n,r)=>{let i=e._zod.def,a=xd(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},XT=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(gT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(gT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},ZT=(e,t,n,r)=>{gT(e,t,n,r,`NaN cannot be represented in JSON Schema`)},QT=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},$T=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},eE=(e,t,n,r)=>{n.type=`boolean`},tE=(e,t,n,r)=>{gT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},nE=(e,t,n,r)=>{gT(e,t,n,r,`Function types cannot be represented in JSON Schema`)},rE=(e,t,n,r)=>{gT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},iE=(e,t,n,r)=>{gT(e,t,n,r,`Map cannot be represented in JSON Schema`)},aE=(e,t,n,r)=>{gT(e,t,n,r,`Set cannot be represented in JSON Schema`)},oE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=_T(a.element,t,{...r,path:[...r.path,`items`]})},sE=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&gT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)kd(i.properties,e,_T(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?jT(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=_T(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},cE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>_T(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},lE=(e,t,n,r)=>{let i=e._zod.def,a=_T(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=_T(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},uE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>_T(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?_T(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?jT(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},dE=new WeakMap,fE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=_T(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)kd(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=_T(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=dE.get(t);n||(n=[],dE.set(t,n),t.deferred.push(()=>NT(t))),n.push(e)}i.additionalProperties=_T(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&jT(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},pE=(e,t,n,r)=>{let i=e._zod.def,a=_T(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},mE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},hE=Symbol(),gE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=PT(i.defaultValue,e,t,n,r);o!==hE&&(n.default=o)},_E=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=PT(i.defaultValue,e,t,n,r);o!==hE&&(n._prefault=o)},vE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{gT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},yE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;_T(o,t,r);let s=t.seen.get(e);s.ref=o},bE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},xE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},SE=(e,t,n,r)=>{let i=e._zod.def;_T(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},CE=(e,t,n,r)=>{let i=e._zod.innerType;_T(i,t,r);let a=t.seen.get(e);a.ref=i},wE={string:LT,number:RT,boolean:zT,bigint:BT,symbol:VT,null:HT,undefined:UT,void:WT,never:GT,any:KT,unknown:qT,date:JT,enum:YT,literal:XT,nan:ZT,template_literal:QT,file:$T,success:eE,custom:tE,function:nE,transform:rE,map:iE,set:aE,array:oE,object:sE,union:cE,intersection:lE,tuple:uE,record:fE,nullable:pE,nonoptional:mE,default:gE,prefault:_E,catch:vE,pipe:yE,readonly:bE,promise:xE,optional:SE,lazy:CE}})),EE,DE=o((()=>{TE(),AT(),EE=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=hT({processors:wE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return _T(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,yT(this.ctx,e);let{"~standard":n,...r}=wT(this.ctx,e);return r}}})),OE=c({}),kE=o((()=>{})),AE=c({$ZodAny:()=>e_,$ZodArray:()=>a_,$ZodAsyncError:()=>Wf,$ZodBase64:()=>zg,$ZodBase64URL:()=>Bg,$ZodBigInt:()=>Yg,$ZodBigIntFormat:()=>Xg,$ZodBoolean:()=>Jg,$ZodCIDRv4:()=>Lg,$ZodCIDRv6:()=>Rg,$ZodCUID:()=>wg,$ZodCUID2:()=>Tg,$ZodCatch:()=>k_,$ZodCheck:()=>rh,$ZodCheckBigIntFormat:()=>dh,$ZodCheckEndsWith:()=>wh,$ZodCheckGreaterThan:()=>ch,$ZodCheckIncludes:()=>Sh,$ZodCheckLengthEquals:()=>_h,$ZodCheckLessThan:()=>sh,$ZodCheckLowerCase:()=>bh,$ZodCheckMaxLength:()=>hh,$ZodCheckMaxSize:()=>fh,$ZodCheckMimeType:()=>Eh,$ZodCheckMinLength:()=>gh,$ZodCheckMinSize:()=>ph,$ZodCheckMultipleOf:()=>lh,$ZodCheckNumberFormat:()=>uh,$ZodCheckOverwrite:()=>Dh,$ZodCheckProperty:()=>Th,$ZodCheckRegex:()=>yh,$ZodCheckSizeEquals:()=>mh,$ZodCheckStartsWith:()=>Ch,$ZodCheckStringFormat:()=>vh,$ZodCheckUpperCase:()=>xh,$ZodCodec:()=>M_,$ZodCreditCard:()=>Ug,$ZodCustom:()=>z_,$ZodCustomStringFormat:()=>Gg,$ZodCyclicError:()=>q_,$ZodDate:()=>i_,$ZodDefault:()=>T_,$ZodDiscriminatedUnion:()=>f_,$ZodE164:()=>Vg,$ZodEmail:()=>yg,$ZodEmoji:()=>Sg,$ZodEncodeError:()=>Gf,$ZodEnum:()=>v_,$ZodError:()=>sp,$ZodExactOptional:()=>C_,$ZodFile:()=>b_,$ZodFunction:()=>I_,$ZodGUID:()=>_g,$ZodIPv4:()=>Ng,$ZodIPv6:()=>Fg,$ZodISODate:()=>Ag,$ZodISODateTime:()=>kg,$ZodISODuration:()=>Mg,$ZodISOTime:()=>jg,$ZodIntersection:()=>p_,$ZodJWT:()=>Wg,$ZodKSUID:()=>Og,$ZodLazy:()=>R_,$ZodLiteral:()=>y_,$ZodMAC:()=>Ig,$ZodMap:()=>g_,$ZodNaN:()=>A_,$ZodNanoID:()=>Cg,$ZodNever:()=>n_,$ZodNonOptional:()=>D_,$ZodNull:()=>$g,$ZodNullable:()=>w_,$ZodNumber:()=>Kg,$ZodNumberFormat:()=>qg,$ZodObject:()=>c_,$ZodObjectJIT:()=>l_,$ZodOptional:()=>S_,$ZodPipe:()=>j_,$ZodPrefault:()=>E_,$ZodPreprocess:()=>N_,$ZodPromise:()=>L_,$ZodReadonly:()=>P_,$ZodRealError:()=>cp,$ZodRecord:()=>h_,$ZodRegistry:()=>Fx,$ZodSet:()=>__,$ZodString:()=>hg,$ZodStringFormat:()=>gg,$ZodSuccess:()=>O_,$ZodSymbol:()=>Zg,$ZodTemplateLiteral:()=>F_,$ZodTransform:()=>x_,$ZodTuple:()=>m_,$ZodType:()=>W,$ZodULID:()=>Eg,$ZodURL:()=>xg,$ZodUUID:()=>vg,$ZodUndefined:()=>Qg,$ZodUnion:()=>u_,$ZodUnknown:()=>t_,$ZodVoid:()=>r_,$ZodXID:()=>Dg,$ZodXor:()=>d_,$brand:()=>Uf,$constructor:()=>U,$input:()=>Px,$output:()=>Nx,Doc:()=>kh,INVALID:()=>ZS,JSONSchema:()=>OE,JSONSchemaGenerator:()=>EE,NEVER:()=>Bf,TimePrecision:()=>fT,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>$S,ZodCompileUnsupportedError:()=>eC,_any:()=>XC,_array:()=>Nw,_base64:()=>TC,_base64url:()=>EC,_bigint:()=>UC,_boolean:()=>VC,_catch:()=>Qw,_check:()=>sT,_cidrv4:()=>CC,_cidrv6:()=>wC,_coercedBigint:()=>WC,_coercedBoolean:()=>HC,_coercedDate:()=>tw,_coercedNumber:()=>FC,_coercedString:()=>aC,_creditCard:()=>OC,_cuid:()=>hC,_cuid2:()=>gC,_custom:()=>iT,_date:()=>ew,_decode:()=>Ep,_decodeAsync:()=>Ap,_default:()=>Yw,_discriminatedUnion:()=>Iw,_e164:()=>DC,_email:()=>oC,_emoji:()=>pC,_encode:()=>wp,_encodeAsync:()=>Op,_endsWith:()=>Cw,_enum:()=>Hw,_file:()=>Gw,_float32:()=>LC,_float64:()=>RC,_gt:()=>aw,_gte:()=>ow,_guid:()=>sC,_includes:()=>xw,_int:()=>IC,_int32:()=>zC,_int64:()=>GC,_intersection:()=>Lw,_ipv4:()=>bC,_ipv6:()=>xC,_isoDate:()=>jC,_isoDateTime:()=>AC,_isoDuration:()=>NC,_isoTime:()=>MC,_jwt:()=>kC,_ksuid:()=>yC,_lazy:()=>nT,_length:()=>_w,_literal:()=>Ww,_lowercase:()=>yw,_lt:()=>rw,_lte:()=>iw,_mac:()=>SC,_map:()=>Bw,_max:()=>iw,_maxLength:()=>hw,_maxSize:()=>fw,_mime:()=>Ew,_min:()=>ow,_minLength:()=>gw,_minSize:()=>pw,_multipleOf:()=>dw,_nan:()=>nw,_nanoid:()=>mC,_nativeEnum:()=>Uw,_negative:()=>cw,_never:()=>QC,_nonnegative:()=>uw,_nonoptional:()=>Xw,_nonpositive:()=>lw,_normalize:()=>Ow,_null:()=>YC,_nullable:()=>Jw,_number:()=>PC,_optional:()=>qw,_overwrite:()=>Dw,_parse:()=>fp,_parseAsync:()=>mp,_pipe:()=>$w,_positive:()=>sw,_promise:()=>rT,_properties:()=>Tw,_property:()=>ww,_readonly:()=>eT,_record:()=>zw,_refine:()=>aT,_regex:()=>vw,_safeDecode:()=>Pp,_safeDecodeAsync:()=>Rp,_safeEncode:()=>Mp,_safeEncodeAsync:()=>Ip,_safeParse:()=>gp,_safeParseAsync:()=>vp,_set:()=>Vw,_size:()=>mw,_slugify:()=>Mw,_startsWith:()=>Sw,_string:()=>iC,_stringFormat:()=>dT,_stringbool:()=>uT,_success:()=>Zw,_superRefine:()=>oT,_symbol:()=>qC,_templateLiteral:()=>tT,_toLowerCase:()=>Aw,_toUpperCase:()=>jw,_transform:()=>Kw,_trim:()=>kw,_tuple:()=>Rw,_uint32:()=>BC,_uint64:()=>KC,_ulid:()=>_C,_undefined:()=>JC,_union:()=>Pw,_unknown:()=>ZC,_uppercase:()=>bw,_url:()=>fC,_uuid:()=>cC,_uuidv4:()=>lC,_uuidv6:()=>uC,_uuidv7:()=>dC,_void:()=>$C,_xid:()=>vC,_xor:()=>Fw,clone:()=>Hd,compile:()=>zx,compileFn:()=>Vx,config:()=>Rf,createStandardJSONSchemaMethod:()=>kT,createToJSONSchemaMethod:()=>OT,decode:()=>Dp,decodeAsync:()=>jp,describe:()=>cT,encode:()=>Tp,encodeAsync:()=>kp,extractDefs:()=>yT,finalize:()=>wT,flattenError:()=>Zf,formatError:()=>Qf,getDiscriminatedOption:()=>Zh,globalConfig:()=>Kf,globalRegistry:()=>Ix,handleUnrepresentable:()=>gT,initializeContext:()=>hT,isBackEdge:()=>K_,isRecursiveSchema:()=>U_,isValidBase64:()=>Bh,isValidBase64URL:()=>Vh,isValidCIDRv6:()=>zh,isValidCreditCard:()=>Uh,isValidIPv6:()=>Rh,isValidJWT:()=>Wh,locales:()=>kx,memoizer:()=>G_,mergeValues:()=>Qh,meta:()=>lT,parse:()=>pp,parseAsync:()=>hp,parseURLObject:()=>Ph,prettifyError:()=>tp,process:()=>_T,regexes:()=>Vp,registry:()=>jx,safeDecode:()=>Fp,safeDecodeAsync:()=>zp,safeEncode:()=>Np,safeEncodeAsync:()=>Lp,safeParse:()=>_p,safeParseAsync:()=>yp,standardProps:()=>Nh,stripTabAndNewline:()=>Fh,toDotPath:()=>ep,toJSONSchema:()=>FT,toZod:()=>_d,treeifyError:()=>$f,urlHostnameOk:()=>Ih,urlProtocolOk:()=>Lh,util:()=>md,validate:()=>Sp,validateAsync:()=>Cp,version:()=>jh}),jE=o((()=>{qf(),Bp(),lp(),B_(),ev(),Oh(),Mh(),H(),th(),Ax(),Lx(),Ah(),rC(),pT(),AT(),TE(),DE(),kE()}));function ME(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===NE)return new R_({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,NE);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?Hd(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:Hd(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?Hd(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:Hd(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:Hd(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?Hd(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:Hd(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:Hd(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:Hd(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:Hd(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return Hd(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var NE,PE=o((()=>{B_(),H(),NE=Symbol(`z.visit/resolving`)}));Bp();function FE(e){return!!e._zod}function IE(e,t){return FE(e)?_p(e,t):e.safeParse(t)}function LE(e){if(!e)return;let t;if(t=FE(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function RE(e){if(FE(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var zE=c({endsWith:()=>Cw,gt:()=>aw,gte:()=>ow,includes:()=>xw,length:()=>_w,lowercase:()=>yw,lt:()=>rw,lte:()=>iw,maxLength:()=>hw,maxSize:()=>fw,mime:()=>Ew,minLength:()=>gw,minSize:()=>pw,multipleOf:()=>dw,negative:()=>cw,nonnegative:()=>uw,nonpositive:()=>lw,normalize:()=>Ow,overwrite:()=>Dw,positive:()=>sw,properties:()=>Tw,property:()=>ww,regex:()=>vw,size:()=>mw,slugify:()=>Mw,startsWith:()=>Sw,toLowerCase:()=>Aw,toUpperCase:()=>jw,trim:()=>kw,uppercase:()=>bw}),BE=o((()=>{jE()}));function VE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var HE,UE,WE,GE,KE=o((()=>{jE(),H(),HE=new WeakSet([Object.prototype,Error.prototype]),UE=(e,t)=>{sp.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);HE.has(n)||(HE.add(n),VE(n,`format`,e=>t=>Qf(e,t)),VE(n,`flatten`,e=>t=>Zf(e,t)),VE(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Sd,2)}),VE(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Sd,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},WE=U(`ZodError`,UE),GE=U(`ZodError`,UE,void 0,{Parent:Error})})),qE,JE,YE,XE,ZE,QE,$E,eD,tD,nD,rD,iD,aD=o((()=>{jE(),KE(),qE=fp(GE),JE=mp(GE),YE=gp(GE),XE=vp(GE),ZE=wp(GE),QE=Ep(GE),$E=Op(GE),eD=Ap(GE),tD=Mp(GE),nD=Pp(GE),rD=Ip(GE),iD=Rp(GE)})),oD=c({ZodAny:()=>Ek,ZodArray:()=>jk,ZodBase64:()=>fk,ZodBase64URL:()=>pk,ZodBigInt:()=>xk,ZodBigIntFormat:()=>Sk,ZodBoolean:()=>bk,ZodCIDRv4:()=>uk,ZodCIDRv6:()=>dk,ZodCUID:()=>nk,ZodCUID2:()=>rk,ZodCatch:()=>Qk,ZodCodec:()=>tA,ZodCreditCard:()=>hk,ZodCustom:()=>cA,ZodCustomStringFormat:()=>_k,ZodDate:()=>Ak,ZodDefault:()=>Jk,ZodDiscriminatedUnion:()=>Fk,ZodE164:()=>mk,ZodEmail:()=>XO,ZodEmoji:()=>ek,ZodEnum:()=>Vk,ZodExactOptional:()=>Kk,ZodFile:()=>Uk,ZodFunction:()=>sA,ZodGUID:()=>ZO,ZodIPv4:()=>sk,ZodIPv6:()=>lk,ZodISODate:()=>qO,ZodISODateTime:()=>KO,ZodISODuration:()=>YO,ZodISOTime:()=>JO,ZodIntersection:()=>Ik,ZodJWT:()=>gk,ZodKSUID:()=>ok,ZodLazy:()=>aA,ZodLiteral:()=>Hk,ZodMAC:()=>ck,ZodMap:()=>zk,ZodNaN:()=>$k,ZodNanoID:()=>tk,ZodNever:()=>Ok,ZodNonOptional:()=>Xk,ZodNull:()=>Tk,ZodNullable:()=>qk,ZodNumber:()=>vk,ZodNumberFormat:()=>yk,ZodObject:()=>Mk,ZodOptional:()=>Gk,ZodPipe:()=>eA,ZodPrefault:()=>Yk,ZodPreprocess:()=>nA,ZodPromise:()=>oA,ZodReadonly:()=>rA,ZodRecord:()=>Rk,ZodSet:()=>Bk,ZodString:()=>WO,ZodStringFormat:()=>GO,ZodSuccess:()=>Zk,ZodSymbol:()=>Ck,ZodTemplateLiteral:()=>iA,ZodTransform:()=>Wk,ZodTuple:()=>Lk,ZodType:()=>Q,ZodULID:()=>ik,ZodURL:()=>$O,ZodUUID:()=>QO,ZodUndefined:()=>wk,ZodUnion:()=>Nk,ZodUnknown:()=>Dk,ZodVoid:()=>kk,ZodXID:()=>ak,ZodXor:()=>Pk,_ZodString:()=>UO,_default:()=>SO,_function:()=>FO,any:()=>XD,array:()=>Y,base64:()=>kD,base64url:()=>AD,bigint:()=>WD,boolean:()=>UD,catch:()=>EO,check:()=>IO,cidrv4:()=>DD,cidrv6:()=>OD,codec:()=>kO,creditCard:()=>MD,cuid:()=>yD,cuid2:()=>bD,custom:()=>LO,date:()=>eO,describe:()=>lA,discriminatedUnion:()=>oO,e164:()=>jD,email:()=>lD,emoji:()=>_D,enum:()=>mO,exactOptional:()=>yO,file:()=>gO,float32:()=>zD,float64:()=>BD,function:()=>FO,guid:()=>uD,hash:()=>LD,hex:()=>ID,hostname:()=>FD,httpUrl:()=>gD,instanceof:()=>BO,int:()=>RD,int32:()=>VD,int64:()=>GD,intersection:()=>sO,invertCodec:()=>AO,ipv4:()=>wD,ipv6:()=>ED,json:()=>VO,jwt:()=>ND,keyof:()=>tO,ksuid:()=>CD,lazy:()=>NO,literal:()=>Z,looseObject:()=>rO,looseRecord:()=>dO,mac:()=>TD,map:()=>fO,meta:()=>uA,nan:()=>DO,nanoid:()=>vD,nativeEnum:()=>hO,never:()=>QD,nonoptional:()=>wO,null:()=>YD,nullable:()=>bO,nullish:()=>xO,number:()=>J,object:()=>X,optional:()=>vO,partialRecord:()=>uO,pipe:()=>OO,prefault:()=>CO,preprocess:()=>HO,promise:()=>PO,readonly:()=>jO,record:()=>lO,refine:()=>RO,set:()=>pO,strictObject:()=>nO,string:()=>q,stringFormat:()=>PD,stringbool:()=>dA,success:()=>TO,superRefine:()=>zO,symbol:()=>qD,templateLiteral:()=>MO,transform:()=>_O,tuple:()=>cO,uint32:()=>HD,uint64:()=>KD,ulid:()=>xD,undefined:()=>JD,union:()=>iO,unknown:()=>ZD,url:()=>hD,uuid:()=>dD,uuidv4:()=>fD,uuidv6:()=>pD,uuidv7:()=>mD,void:()=>$D,xid:()=>SD,xor:()=>aO});function sD(){Kf.localeError||Rf(Fv())}function cD(){Kf.memoizer||Rf({memoizer:G_()})}function q(e){return iC(WO,e)}function lD(e){return oC(XO,e)}function uD(e){return sC(ZO,e)}function dD(e){return cC(QO,e)}function fD(e){return lC(QO,e)}function pD(e){return uC(QO,e)}function mD(e){return dC(QO,e)}function hD(e){return fC($O,e)}function gD(e){return fC($O,{protocol:Tm,hostname:wm,...R(e)})}function _D(e){return pC(ek,e)}function vD(e){return mC(tk,e)}function yD(e){return hC(nk,e)}function bD(e){return gC(rk,e)}function xD(e){return _C(ik,e)}function SD(e){return vC(ak,e)}function CD(e){return yC(ok,e)}function wD(e){return bC(sk,e)}function TD(e){return SC(ck,e)}function ED(e){return xC(lk,e)}function DD(e){return CC(uk,e)}function OD(e){return wC(dk,e)}function kD(e){return TC(fk,e)}function AD(e){return EC(pk,e)}function jD(e){return DC(mk,e)}function MD(e){return OC(hk,e)}function ND(e){return kC(gk,e)}function PD(e,t,n={}){return dT(_k,e,t,n)}function FD(e){return dT(_k,`hostname`,Cm,e)}function ID(e){return dT(_k,`hex`,zm,e)}function LD(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Vp[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return dT(_k,n,r,t)}function J(e){return PC(vk,e)}function RD(e){return IC(yk,e)}function zD(e){return LC(yk,e)}function BD(e){return RC(yk,e)}function VD(e){return zC(yk,e)}function HD(e){return BC(yk,e)}function UD(e){return VC(bk,e)}function WD(e){return UC(xk,e)}function GD(e){return GC(Sk,e)}function KD(e){return KC(Sk,e)}function qD(e){return qC(Ck,e)}function JD(e){return JC(wk,e)}function YD(e){return YC(Tk,e)}function XD(){return XC(Ek)}function ZD(){return ZC(Dk)}function QD(e){return QC(Ok,e)}function $D(e){return $C(kk,e)}function eO(e){return ew(Ak,e)}function Y(e,t){return Nw(jk,e,t)}function tO(e){let t=e._zod.def.shape;return mO(Object.keys(t))}function X(e,t){let n={type:`object`,shape:e??{},...R(t)};return new Mk(n)}function nO(e,t){return new Mk({type:`object`,shape:e,catchall:QD(),...R(t)})}function rO(e,t){return new Mk({type:`object`,shape:e,catchall:ZD(),...R(t)})}function iO(e,t){return new Nk({type:`union`,options:e,...R(t)})}function aO(e,t){return new Pk({type:`union`,options:e,inclusive:!1,...R(t)})}function oO(e,t,n){return new Fk({type:`union`,options:t,discriminator:e,...R(n)})}function sO(e,t){return new Ik({type:`intersection`,left:e,right:t})}function cO(e,t,n){let r=t instanceof W;return new Lk({type:`tuple`,items:e,rest:r?t:null,...R(r?n:t)})}function lO(e,t,n){return!t||!t._zod?new Rk({type:`record`,keyType:q(),valueType:e,...R(t)}):new Rk({type:`record`,keyType:e,valueType:t,...R(n)})}function uO(e,t,n){return new Rk({type:`record`,keyType:e,valueType:t,...R(n),partial:!0})}function dO(e,t,n){return new Rk({type:`record`,keyType:e,valueType:t,mode:`loose`,...R(n)})}function fO(e,t,n){return new zk({type:`map`,keyType:e,valueType:t,...R(n)})}function pO(e,t){return new Bk({type:`set`,valueType:e,...R(t)})}function mO(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Vk({type:`enum`,entries:n,...R(t)})}function hO(e,t){return new Vk({type:`enum`,entries:e,...R(t)})}function Z(e,t){return new Hk({type:`literal`,values:Array.isArray(e)?e:[e],...R(t)})}function gO(e){return Gw(Uk,e)}function _O(e){return new Wk({type:`transform`,transform:e})}function vO(e){return new Gk({type:`optional`,innerType:e})}function yO(e){return new Kk({type:`optional`,innerType:e})}function bO(e){return new qk({type:`nullable`,innerType:e})}function xO(e){return vO(bO(e))}function SO(e,t){return new Jk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():zd(t)}})}function CO(e,t){return new Yk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():zd(t)}})}function wO(e,t){return new Xk({type:`nonoptional`,innerType:e,...R(t)})}function TO(e){return new Zk({type:`success`,innerType:e})}function EO(e,t){return new Qk({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Sf(t)})}function DO(e){return nw($k,e)}function OO(e,t){return new eA({type:`pipe`,in:e,out:t})}function kO(e,t,n){return new tA({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function AO(e){let t=e._zod.def;return new tA({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function jO(e){return new rA({type:`readonly`,innerType:e})}function MO(e,t){return new iA({type:`template_literal`,parts:e,...R(t)})}function NO(e){return new aA({type:`lazy`,getter:e})}function PO(e){return new oA({type:`promise`,innerType:e})}function FO(e){return new sA({type:`function`,input:Array.isArray(e?.input)?cO(e?.input):e?.input??Y(ZD()),output:e?.output??ZD()})}function IO(e){let t=new rh({check:`custom`});return t._zod.check=e,t}function LO(e,t){return iT(cA,e??(()=>!0),t)}function RO(e,t={}){return aT(cA,e,t)}function zO(e,t){return oT(e,t)}function BO(e,t={}){let n=new cA({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...R(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function VO(e){let t=NO(()=>iO([q(e),J(),UD(),YD(),Y(t),lO(q(),t)]));return t}function HO(e,t){return new nA({type:`pipe`,in:_O(e),out:t})}var Q,UO,WO,GO,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA,rA,iA,aA,oA,sA,cA,lA,uA,dA,fA=o((()=>{jE(),TE(),AT(),Lv(),BE(),aD(),Q=U(`ZodType`,(e,t)=>(sD(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Ad(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Hd(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(RO(e,t))},superRefine(e,t){return this.check(zO(e,t))},overwrite(e){return this.check(Dw(e))},optional(){return vO(this)},exactOptional(){return yO(this)},nullable(){return bO(this)},nullish(){return vO(bO(this))},nonoptional(e){return wO(this,e)},array(){return Y(this)},or(e){return iO([this,e])},and(e){return sO(this,e)},transform(e){return OO(this,_O(e))},default(e){return SO(this,e)},prefault(e){return CO(this,e)},catch(e){return EO(this,e)},pipe(e){return OO(this,e)},readonly(){return jO(this)},describe(e){let t=this.clone();return Ix.add(t,{description:e}),t},meta(...e){if(e.length===0)return Ix.get(this);let t=this.clone();return Ix.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return vf(this,`~standard`,{...Nh(this),jsonSchema:{input:kT(this,`input`),output:kT(this,`output`)}})},set"~standard"(e){_f(this,`~standard`,e)},parse:function e(t,n){return qE(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await JE(this,t,n,{callee:e})},safeParse(e,t){return YE(this,e,t)},async safeParseAsync(e,t){return XE(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){_f(this,`spa`,e)},encode:function e(t,n){return ZE(this,t,n,{callee:e})},decode:function e(t,n){return QE(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await $E(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await eD(this,t,n,{callee:e})},safeEncode(e,t){return tD(this,e,t)},safeDecode(e,t){return nD(this,e,t)},async safeEncodeAsync(e,t){return rD(this,e,t)},async safeDecodeAsync(e,t){return iD(this,e,t)},toJSONSchema(e){return OT(this,{})(e)},get description(){return Ix.get(this)?.description},get _def(){return this._zod.def}}),UO=U(`_ZodString`,(e,t)=>{hg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>LT(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(vw(...e))},includes(...e){return this.check(xw(...e))},startsWith(...e){return this.check(Sw(...e))},endsWith(...e){return this.check(Cw(...e))},min(...e){return this.check(gw(...e))},max(...e){return this.check(hw(...e))},length(...e){return this.check(_w(...e))},nonempty(...e){return this.check(gw(1,...e))},lowercase(e){return this.check(yw(e))},uppercase(e){return this.check(bw(e))},trim(){return this.check(kw())},normalize(...e){return this.check(Ow(...e))},toLowerCase(){return this.check(Aw())},toUpperCase(){return this.check(jw())},slugify(){return this.check(Mw())}}),WO=U(`ZodString`,(e,t)=>{hg.init(e,t),UO.init(e,t)},{email(e){return this.check(oC(XO,e))},url(e){return this.check(fC($O,e))},jwt(e){return this.check(kC(gk,e))},emoji(e){return this.check(pC(ek,e))},guid(e){return this.check(sC(ZO,e))},uuid(e){return this.check(cC(QO,e))},uuidv4(e){return this.check(lC(QO,e))},uuidv6(e){return this.check(uC(QO,e))},uuidv7(e){return this.check(dC(QO,e))},nanoid(e){return this.check(mC(tk,e))},cuid(e){return this.check(hC(nk,e))},cuid2(e){return this.check(gC(rk,e))},ulid(e){return this.check(_C(ik,e))},base64(e){return this.check(TC(fk,e))},base64url(e){return this.check(EC(pk,e))},xid(e){return this.check(vC(ak,e))},ksuid(e){return this.check(yC(ok,e))},ipv4(e){return this.check(bC(sk,e))},ipv6(e){return this.check(xC(lk,e))},cidrv4(e){return this.check(CC(uk,e))},cidrv6(e){return this.check(wC(dk,e))},e164(e){return this.check(DC(mk,e))},datetime(e){return this.check(AC(KO,e))},date(e){return this.check(jC(qO,e))},time(e){return this.check(MC(JO,e))},duration(e){return this.check(NC(YO,e))}}),GO=U(`ZodStringFormat`,(e,t)=>{gg.init(e,t),UO.init(e,t)}),KO=U(`ZodISODateTime`,(e,t)=>{kg.init(e,t),GO.init(e,t)}),qO=U(`ZodISODate`,(e,t)=>{Ag.init(e,t),GO.init(e,t)}),JO=U(`ZodISOTime`,(e,t)=>{jg.init(e,t),GO.init(e,t)}),YO=U(`ZodISODuration`,(e,t)=>{Mg.init(e,t),GO.init(e,t)}),XO=U(`ZodEmail`,(e,t)=>{yg.init(e,t),GO.init(e,t)}),ZO=U(`ZodGUID`,(e,t)=>{_g.init(e,t),GO.init(e,t)}),QO=U(`ZodUUID`,(e,t)=>{vg.init(e,t),GO.init(e,t)}),$O=U(`ZodURL`,(e,t)=>{xg.init(e,t),GO.init(e,t)}),ek=U(`ZodEmoji`,(e,t)=>{Sg.init(e,t),GO.init(e,t)}),tk=U(`ZodNanoID`,(e,t)=>{Cg.init(e,t),GO.init(e,t)}),nk=U(`ZodCUID`,(e,t)=>{wg.init(e,t),GO.init(e,t)}),rk=U(`ZodCUID2`,(e,t)=>{Tg.init(e,t),GO.init(e,t)}),ik=U(`ZodULID`,(e,t)=>{Eg.init(e,t),GO.init(e,t)}),ak=U(`ZodXID`,(e,t)=>{Dg.init(e,t),GO.init(e,t)}),ok=U(`ZodKSUID`,(e,t)=>{Og.init(e,t),GO.init(e,t)}),sk=U(`ZodIPv4`,(e,t)=>{Ng.init(e,t),GO.init(e,t)}),ck=U(`ZodMAC`,(e,t)=>{Ig.init(e,t),GO.init(e,t)}),lk=U(`ZodIPv6`,(e,t)=>{Fg.init(e,t),GO.init(e,t)}),uk=U(`ZodCIDRv4`,(e,t)=>{Lg.init(e,t),GO.init(e,t)}),dk=U(`ZodCIDRv6`,(e,t)=>{Rg.init(e,t),GO.init(e,t)}),fk=U(`ZodBase64`,(e,t)=>{zg.init(e,t),GO.init(e,t)}),pk=U(`ZodBase64URL`,(e,t)=>{Bg.init(e,t),GO.init(e,t)}),mk=U(`ZodE164`,(e,t)=>{Vg.init(e,t),GO.init(e,t)}),hk=U(`ZodCreditCard`,(e,t)=>{Ug.init(e,t),GO.init(e,t)}),gk=U(`ZodJWT`,(e,t)=>{Wg.init(e,t),GO.init(e,t)}),_k=U(`ZodCustomStringFormat`,(e,t)=>{Gg.init(e,t),GO.init(e,t)}),vk=U(`ZodNumber`,(e,t)=>{Kg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>RT(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(aw(e,t))},gte(e,t){return this.check(ow(e,t))},min(e,t){return this.check(ow(e,t))},lt(e,t){return this.check(rw(e,t))},lte(e,t){return this.check(iw(e,t))},max(e,t){return this.check(iw(e,t))},int(e){return this.check(RD(e))},safe(e){return this.check(RD(e))},positive(e){return this.check(aw(0,e))},nonnegative(e){return this.check(ow(0,e))},negative(e){return this.check(rw(0,e))},nonpositive(e){return this.check(iw(0,e))},multipleOf(e,t){return this.check(dw(e,t))},step(e,t){return this.check(dw(e,t))},finite(){return this}}),yk=U(`ZodNumberFormat`,(e,t)=>{qg.init(e,t),vk.init(e,t)}),bk=U(`ZodBoolean`,(e,t)=>{Jg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>zT(e,t,n,r)}),xk=U(`ZodBigInt`,(e,t)=>{Yg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BT(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(ow(e,t))},min(e,t){return this.check(ow(e,t))},gt(e,t){return this.check(aw(e,t))},lt(e,t){return this.check(rw(e,t))},lte(e,t){return this.check(iw(e,t))},max(e,t){return this.check(iw(e,t))},positive(e){return this.check(aw(BigInt(0),e))},negative(e){return this.check(rw(BigInt(0),e))},nonpositive(e){return this.check(iw(BigInt(0),e))},nonnegative(e){return this.check(ow(BigInt(0),e))},multipleOf(e,t){return this.check(dw(e,t))}}),Sk=U(`ZodBigIntFormat`,(e,t)=>{Xg.init(e,t),xk.init(e,t)}),Ck=U(`ZodSymbol`,(e,t)=>{Zg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VT(e,t,n,r)}),wk=U(`ZodUndefined`,(e,t)=>{Qg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UT(e,t,n,r)}),Tk=U(`ZodNull`,(e,t)=>{$g.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HT(e,t,n,r)}),Ek=U(`ZodAny`,(e,t)=>{e_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KT(e,t,n,r)}),Dk=U(`ZodUnknown`,(e,t)=>{t_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r)}),Ok=U(`ZodNever`,(e,t)=>{n_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r)}),kk=U(`ZodVoid`,(e,t)=>{r_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WT(e,t,n,r)}),Ak=U(`ZodDate`,(e,t)=>{i_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JT(e,t,n,r),e.min=(t,n)=>e.check(ow(t,n)),e.max=(t,n)=>e.check(iw(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),jk=U(`ZodArray`,(e,t)=>{cD(),a_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),e.element=t.element},{min(e,t){return this.check(gw(e,t))},nonempty(e){return this.check(gw(1,e))},max(e,t){return this.check(hw(e,t))},length(e,t){return this.check(_w(e,t))},unwrap(){return this.element}}),Mk=U(`ZodObject`,(e,t)=>{cD(),l_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r),xf(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return mO(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:ZD()})},loose(){return this.clone({...this._zod.def,catchall:ZD()})},strict(){return this.clone({...this._zod.def,catchall:QD()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return qd(this,e)},safeExtend(e){return Jd(this,e)},merge(e){return Yd(this,e)},pick(e){return Gd(this,e)},omit(e){return Kd(this,e)},partial(...e){return Xd(Gk,this,e[0])},exactPartial(...e){return Xd(Kk,this,e[0],`exactPartial`)},required(...e){return Zd(Xk,this,e[0])}}),Nk=U(`ZodUnion`,(e,t)=>{u_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r),e.options=t.options}),Pk=U(`ZodXor`,(e,t)=>{Nk.init(e,t),d_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r),e.options=t.options}),Fk=U(`ZodDiscriminatedUnion`,(e,t)=>{Nk.init(e,t),f_.init(e,t)}),Ik=U(`ZodIntersection`,(e,t)=>{p_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lE(e,t,n,r)}),Lk=U(`ZodTuple`,(e,t)=>{cD(),m_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uE(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Gk({type:`optional`,innerType:e}))})}}),Rk=U(`ZodRecord`,(e,t)=>{cD(),h_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),zk=U(`ZodMap`,(e,t)=>{cD(),g_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(pw(...t)),e.nonempty=t=>e.check(pw(1,t)),e.max=(...t)=>e.check(fw(...t)),e.size=(...t)=>e.check(mw(...t))}),Bk=U(`ZodSet`,(e,t)=>{cD(),__.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r),e.min=(...t)=>e.check(pw(...t)),e.nonempty=t=>e.check(pw(1,t)),e.max=(...t)=>e.check(fw(...t)),e.size=(...t)=>e.check(mw(...t))}),Vk=U(`ZodEnum`,(e,t)=>{v_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Vk({...t,checks:[],...R(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Vk({...t,checks:[],...R(r),entries:i})}}),Hk=U(`ZodLiteral`,(e,t)=>{y_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XT(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Uk=U(`ZodFile`,(e,t)=>{b_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$T(e,t,n,r),e.min=(t,n)=>e.check(pw(t,n)),e.max=(t,n)=>e.check(fw(t,n)),e.mime=(t,n)=>e.check(Ew(Array.isArray(t)?t:[t],n))}),Wk=U(`ZodTransform`,(e,t)=>{cD(),x_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Gf(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(cf(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(cf(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),Gk=U(`ZodOptional`,(e,t)=>{S_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Kk=U(`ZodExactOptional`,(e,t)=>{C_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),qk=U(`ZodNullable`,(e,t)=>{w_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Jk=U(`ZodDefault`,(e,t)=>{T_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Yk=U(`ZodPrefault`,(e,t)=>{E_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_E(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Xk=U(`ZodNonOptional`,(e,t)=>{D_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>mE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Zk=U(`ZodSuccess`,(e,t)=>{O_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Qk=U(`ZodCatch`,(e,t)=>{k_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>vE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),$k=U(`ZodNaN`,(e,t)=>{A_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZT(e,t,n,r)}),eA=U(`ZodPipe`,(e,t)=>{j_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yE(e,t,n,r),e.in=t.in,e.out=t.out}),tA=U(`ZodCodec`,(e,t)=>{eA.init(e,t),M_.init(e,t)}),nA=U(`ZodPreprocess`,(e,t)=>{eA.init(e,t),N_.init(e,t)}),rA=U(`ZodReadonly`,(e,t)=>{P_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),iA=U(`ZodTemplateLiteral`,(e,t)=>{F_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QT(e,t,n,r)}),aA=U(`ZodLazy`,(e,t)=>{R_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CE(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),oA=U(`ZodPromise`,(e,t)=>{L_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),sA=U(`ZodFunction`,(e,t)=>{I_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nE(e,t,n,r)}),cA=U(`ZodCustom`,(e,t)=>{z_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tE(e,t,n,r)}),lA=cT,uA=lT,dA=(...e)=>uT({Codec:tA,Boolean:bk,String:WO},...e)}));function pA(e){Rf({customError:e})}function mA(){return Rf().customError}var hA,gA,_A=o((()=>{jE(),hA={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},gA||={}})),vA=c({ZodISODate:()=>qO,ZodISODateTime:()=>KO,ZodISODuration:()=>YO,ZodISOTime:()=>JO,date:()=>bA,datetime:()=>yA,duration:()=>SA,time:()=>xA});function yA(e){return AC(KO,e)}function bA(e){return jC(qO,e)}function xA(e){return MC(JO,e)}function SA(e){return NC(YO,e)}var CA=o((()=>{jE(),fA()}));function wA(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function TA(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function kA(e,t){if(e!==!1)return e===void 0||e===!0?$.any():jA(e,t)}function AA(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=jA(DA(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>AA({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(PA)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?jA(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=jA(r,t);kd(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=jA(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!Rd(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=OA(r,jA(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=TA(n.map(e=>jA(e,t)),a),s=Array.isArray(i)?void 0:kA(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=TA(i.map(e=>jA(e,t)),n),o=kA(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=jA(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function jA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=AA(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>jA(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>jA(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:jA(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function MA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:wA(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Ix};return jA(n,r)}var $,NA,PA,FA=o((()=>{Lx(),H(),BE(),CA(),fA(),$={...oD,...zE,iso:vA},NA=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),PA=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function IA(e){return ME(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:iO(t.options)}})}var LA=o((()=>{PE(),fA()}));function RA(e,t){if(!t?.length)return e;let n=e._zod.def;return Hd(e,Ad(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function zA(e){return RA(e.out,e.checks)}function BA(e){return e.in._zod.traits.has(`$ZodTransform`)?zA(e):e.in}function VA(e){return ME(e,{pipe:e=>BA(e._zod.def),default:(e,t)=>t?vO(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function HA(e){return ME(e,{pipe:e=>zA(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var UA=o((()=>{H(),PE(),fA()})),WA=c({bigint:()=>JA,boolean:()=>qA,date:()=>YA,number:()=>KA,string:()=>GA});function GA(e){return aC(WO,e)}function KA(e){return FC(vk,e)}function qA(e){return HC(bk,e)}function JA(e){return WC(xk,e)}function YA(e){return tw(Ak,e)}var XA=o((()=>{jE(),fA()})),ZA=c({$brand:()=>Uf,$input:()=>Px,$output:()=>Nx,NEVER:()=>Bf,TimePrecision:()=>fT,ZodAny:()=>Ek,ZodArray:()=>jk,ZodBase64:()=>fk,ZodBase64URL:()=>pk,ZodBigInt:()=>xk,ZodBigIntFormat:()=>Sk,ZodBoolean:()=>bk,ZodCIDRv4:()=>uk,ZodCIDRv6:()=>dk,ZodCUID:()=>nk,ZodCUID2:()=>rk,ZodCatch:()=>Qk,ZodCodec:()=>tA,ZodCompileAsyncError:()=>$S,ZodCompileUnsupportedError:()=>eC,ZodCreditCard:()=>hk,ZodCustom:()=>cA,ZodCustomStringFormat:()=>_k,ZodDate:()=>Ak,ZodDefault:()=>Jk,ZodDiscriminatedUnion:()=>Fk,ZodE164:()=>mk,ZodEmail:()=>XO,ZodEmoji:()=>ek,ZodEnum:()=>Vk,ZodError:()=>WE,ZodExactOptional:()=>Kk,ZodFile:()=>Uk,ZodFirstPartyTypeKind:()=>gA,ZodFunction:()=>sA,ZodGUID:()=>ZO,ZodIPv4:()=>sk,ZodIPv6:()=>lk,ZodISODate:()=>qO,ZodISODateTime:()=>KO,ZodISODuration:()=>YO,ZodISOTime:()=>JO,ZodIntersection:()=>Ik,ZodIssueCode:()=>hA,ZodJWT:()=>gk,ZodKSUID:()=>ok,ZodLazy:()=>aA,ZodLiteral:()=>Hk,ZodMAC:()=>ck,ZodMap:()=>zk,ZodNaN:()=>$k,ZodNanoID:()=>tk,ZodNever:()=>Ok,ZodNonOptional:()=>Xk,ZodNull:()=>Tk,ZodNullable:()=>qk,ZodNumber:()=>vk,ZodNumberFormat:()=>yk,ZodObject:()=>Mk,ZodOptional:()=>Gk,ZodPipe:()=>eA,ZodPrefault:()=>Yk,ZodPreprocess:()=>nA,ZodPromise:()=>oA,ZodReadonly:()=>rA,ZodRealError:()=>GE,ZodRecord:()=>Rk,ZodSet:()=>Bk,ZodString:()=>WO,ZodStringFormat:()=>GO,ZodSuccess:()=>Zk,ZodSymbol:()=>Ck,ZodTemplateLiteral:()=>iA,ZodTransform:()=>Wk,ZodTuple:()=>Lk,ZodType:()=>Q,ZodULID:()=>ik,ZodURL:()=>$O,ZodUUID:()=>QO,ZodUndefined:()=>wk,ZodUnion:()=>Nk,ZodUnknown:()=>Dk,ZodVoid:()=>kk,ZodXID:()=>ak,ZodXor:()=>Pk,_ZodString:()=>UO,_default:()=>SO,_function:()=>FO,any:()=>XD,array:()=>Y,base64:()=>kD,base64url:()=>AD,bigint:()=>WD,boolean:()=>UD,catch:()=>EO,check:()=>IO,cidrv4:()=>DD,cidrv6:()=>OD,clone:()=>Hd,codec:()=>kO,coerce:()=>WA,compile:()=>zx,config:()=>Rf,core:()=>AE,creditCard:()=>MD,cuid:()=>yD,cuid2:()=>bD,custom:()=>LO,date:()=>eO,decode:()=>QE,decodeAsync:()=>eD,deepPartial:()=>IA,describe:()=>lA,discriminatedUnion:()=>oO,e164:()=>jD,email:()=>lD,emoji:()=>_D,encode:()=>ZE,encodeAsync:()=>$E,endsWith:()=>Cw,enum:()=>mO,exactOptional:()=>yO,file:()=>gO,flattenError:()=>Zf,float32:()=>zD,float64:()=>BD,formatError:()=>Qf,fromJSONSchema:()=>MA,function:()=>FO,getDiscriminatedOption:()=>Zh,getErrorMap:()=>mA,globalRegistry:()=>Ix,gt:()=>aw,gte:()=>ow,guid:()=>uD,hash:()=>LD,hex:()=>ID,hostname:()=>FD,httpUrl:()=>gD,includes:()=>xw,input:()=>VA,instanceof:()=>BO,int:()=>RD,int32:()=>VD,int64:()=>GD,intersection:()=>sO,invertCodec:()=>AO,ipv4:()=>wD,ipv6:()=>ED,iso:()=>vA,json:()=>VO,jwt:()=>ND,keyof:()=>tO,ksuid:()=>CD,lazy:()=>NO,length:()=>_w,literal:()=>Z,locales:()=>kx,looseObject:()=>rO,looseRecord:()=>dO,lowercase:()=>yw,lt:()=>rw,lte:()=>iw,mac:()=>TD,map:()=>fO,maxLength:()=>hw,maxSize:()=>fw,memoizer:()=>G_,meta:()=>uA,mime:()=>Ew,minLength:()=>gw,minSize:()=>pw,multipleOf:()=>dw,nan:()=>DO,nanoid:()=>vD,nativeEnum:()=>hO,negative:()=>cw,never:()=>QD,nonnegative:()=>uw,nonoptional:()=>wO,nonpositive:()=>lw,normalize:()=>Ow,null:()=>YD,nullable:()=>bO,nullish:()=>xO,number:()=>J,object:()=>X,optional:()=>vO,output:()=>HA,overwrite:()=>Dw,parse:()=>qE,parseAsync:()=>JE,partialRecord:()=>uO,pipe:()=>OO,positive:()=>sw,prefault:()=>CO,preprocess:()=>HO,prettifyError:()=>tp,promise:()=>PO,properties:()=>Tw,property:()=>ww,readonly:()=>jO,record:()=>lO,refine:()=>RO,regex:()=>vw,regexes:()=>Vp,registry:()=>jx,safeDecode:()=>nD,safeDecodeAsync:()=>iD,safeEncode:()=>tD,safeEncodeAsync:()=>rD,safeParse:()=>YE,safeParseAsync:()=>XE,set:()=>pO,setErrorMap:()=>pA,size:()=>mw,slugify:()=>Mw,startsWith:()=>Sw,strictObject:()=>nO,string:()=>q,stringFormat:()=>PD,stringbool:()=>dA,success:()=>TO,superRefine:()=>zO,symbol:()=>qD,templateLiteral:()=>MO,toJSONSchema:()=>FT,toLowerCase:()=>Aw,toUpperCase:()=>jw,toZod:()=>_d,transform:()=>_O,treeifyError:()=>$f,trim:()=>kw,tuple:()=>cO,uint32:()=>HD,uint64:()=>KD,ulid:()=>xD,undefined:()=>JD,union:()=>iO,unknown:()=>ZD,uppercase:()=>bw,url:()=>hD,util:()=>md,uuid:()=>dD,uuidv4:()=>fD,uuidv6:()=>pD,uuidv7:()=>mD,validate:()=>Sp,validateAsync:()=>Cp,void:()=>$D,xid:()=>SD,xor:()=>aO}),QA=o((()=>{jE(),fA(),BE(),KE(),aD(),_A(),TE(),FA(),LA(),UA(),Ax(),CA(),XA()})),$A=o((()=>{QA(),QA()})),ej=c({$brand:()=>Uf,$input:()=>Px,$output:()=>Nx,NEVER:()=>Bf,TimePrecision:()=>fT,ZodAny:()=>Ek,ZodArray:()=>jk,ZodBase64:()=>fk,ZodBase64URL:()=>pk,ZodBigInt:()=>xk,ZodBigIntFormat:()=>Sk,ZodBoolean:()=>bk,ZodCIDRv4:()=>uk,ZodCIDRv6:()=>dk,ZodCUID:()=>nk,ZodCUID2:()=>rk,ZodCatch:()=>Qk,ZodCodec:()=>tA,ZodCompileAsyncError:()=>$S,ZodCompileUnsupportedError:()=>eC,ZodCreditCard:()=>hk,ZodCustom:()=>cA,ZodCustomStringFormat:()=>_k,ZodDate:()=>Ak,ZodDefault:()=>Jk,ZodDiscriminatedUnion:()=>Fk,ZodE164:()=>mk,ZodEmail:()=>XO,ZodEmoji:()=>ek,ZodEnum:()=>Vk,ZodError:()=>WE,ZodExactOptional:()=>Kk,ZodFile:()=>Uk,ZodFirstPartyTypeKind:()=>gA,ZodFunction:()=>sA,ZodGUID:()=>ZO,ZodIPv4:()=>sk,ZodIPv6:()=>lk,ZodISODate:()=>qO,ZodISODateTime:()=>KO,ZodISODuration:()=>YO,ZodISOTime:()=>JO,ZodIntersection:()=>Ik,ZodIssueCode:()=>hA,ZodJWT:()=>gk,ZodKSUID:()=>ok,ZodLazy:()=>aA,ZodLiteral:()=>Hk,ZodMAC:()=>ck,ZodMap:()=>zk,ZodNaN:()=>$k,ZodNanoID:()=>tk,ZodNever:()=>Ok,ZodNonOptional:()=>Xk,ZodNull:()=>Tk,ZodNullable:()=>qk,ZodNumber:()=>vk,ZodNumberFormat:()=>yk,ZodObject:()=>Mk,ZodOptional:()=>Gk,ZodPipe:()=>eA,ZodPrefault:()=>Yk,ZodPreprocess:()=>nA,ZodPromise:()=>oA,ZodReadonly:()=>rA,ZodRealError:()=>GE,ZodRecord:()=>Rk,ZodSet:()=>Bk,ZodString:()=>WO,ZodStringFormat:()=>GO,ZodSuccess:()=>Zk,ZodSymbol:()=>Ck,ZodTemplateLiteral:()=>iA,ZodTransform:()=>Wk,ZodTuple:()=>Lk,ZodType:()=>Q,ZodULID:()=>ik,ZodURL:()=>$O,ZodUUID:()=>QO,ZodUndefined:()=>wk,ZodUnion:()=>Nk,ZodUnknown:()=>Dk,ZodVoid:()=>kk,ZodXID:()=>ak,ZodXor:()=>Pk,_ZodString:()=>UO,_default:()=>SO,_function:()=>FO,any:()=>XD,array:()=>Y,base64:()=>kD,base64url:()=>AD,bigint:()=>WD,boolean:()=>UD,catch:()=>EO,check:()=>IO,cidrv4:()=>DD,cidrv6:()=>OD,clone:()=>Hd,codec:()=>kO,coerce:()=>WA,compile:()=>zx,config:()=>Rf,core:()=>AE,creditCard:()=>MD,cuid:()=>yD,cuid2:()=>bD,custom:()=>LO,date:()=>eO,decode:()=>QE,decodeAsync:()=>eD,deepPartial:()=>IA,default:()=>ZA,describe:()=>lA,discriminatedUnion:()=>oO,e164:()=>jD,email:()=>lD,emoji:()=>_D,encode:()=>ZE,encodeAsync:()=>$E,endsWith:()=>Cw,enum:()=>mO,exactOptional:()=>yO,file:()=>gO,flattenError:()=>Zf,float32:()=>zD,float64:()=>BD,formatError:()=>Qf,fromJSONSchema:()=>MA,function:()=>FO,getDiscriminatedOption:()=>Zh,getErrorMap:()=>mA,globalRegistry:()=>Ix,gt:()=>aw,gte:()=>ow,guid:()=>uD,hash:()=>LD,hex:()=>ID,hostname:()=>FD,httpUrl:()=>gD,includes:()=>xw,input:()=>VA,instanceof:()=>BO,int:()=>RD,int32:()=>VD,int64:()=>GD,intersection:()=>sO,invertCodec:()=>AO,ipv4:()=>wD,ipv6:()=>ED,iso:()=>vA,json:()=>VO,jwt:()=>ND,keyof:()=>tO,ksuid:()=>CD,lazy:()=>NO,length:()=>_w,literal:()=>Z,locales:()=>kx,looseObject:()=>rO,looseRecord:()=>dO,lowercase:()=>yw,lt:()=>rw,lte:()=>iw,mac:()=>TD,map:()=>fO,maxLength:()=>hw,maxSize:()=>fw,memoizer:()=>G_,meta:()=>uA,mime:()=>Ew,minLength:()=>gw,minSize:()=>pw,multipleOf:()=>dw,nan:()=>DO,nanoid:()=>vD,nativeEnum:()=>hO,negative:()=>cw,never:()=>QD,nonnegative:()=>uw,nonoptional:()=>wO,nonpositive:()=>lw,normalize:()=>Ow,null:()=>YD,nullable:()=>bO,nullish:()=>xO,number:()=>J,object:()=>X,optional:()=>vO,output:()=>HA,overwrite:()=>Dw,parse:()=>qE,parseAsync:()=>JE,partialRecord:()=>uO,pipe:()=>OO,positive:()=>sw,prefault:()=>CO,preprocess:()=>HO,prettifyError:()=>tp,promise:()=>PO,properties:()=>Tw,property:()=>ww,readonly:()=>jO,record:()=>lO,refine:()=>RO,regex:()=>vw,regexes:()=>Vp,registry:()=>jx,safeDecode:()=>nD,safeDecodeAsync:()=>iD,safeEncode:()=>tD,safeEncodeAsync:()=>rD,safeParse:()=>YE,safeParseAsync:()=>XE,set:()=>pO,setErrorMap:()=>pA,size:()=>mw,slugify:()=>Mw,startsWith:()=>Sw,strictObject:()=>nO,string:()=>q,stringFormat:()=>PD,stringbool:()=>dA,success:()=>TO,superRefine:()=>zO,symbol:()=>qD,templateLiteral:()=>MO,toJSONSchema:()=>FT,toLowerCase:()=>Aw,toUpperCase:()=>jw,toZod:()=>_d,transform:()=>_O,treeifyError:()=>$f,trim:()=>kw,tuple:()=>cO,uint32:()=>HD,uint64:()=>KD,ulid:()=>xD,undefined:()=>JD,union:()=>iO,unknown:()=>ZD,uppercase:()=>bw,url:()=>hD,util:()=>md,uuid:()=>dD,uuidv4:()=>fD,uuidv6:()=>pD,uuidv7:()=>mD,validate:()=>Sp,validateAsync:()=>Cp,void:()=>$D,xid:()=>SD,xor:()=>aO,z:()=>ZA}),tj=o((()=>{QA(),$A()}));tj();var nj=`io.modelcontextprotocol/related-task`,rj=LO(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),ij=iO([q(),J().int()]),aj=q();rO({ttl:J().optional(),pollInterval:J().optional()});var oj=X({ttl:J().optional()}),sj=X({taskId:q()}),cj=rO({progressToken:ij.optional(),[nj]:sj.optional()}),lj=X({_meta:cj.optional()}),uj=lj.extend({task:oj.optional()}),dj=e=>uj.safeParse(e).success,fj=X({method:q(),params:lj.loose().optional()}),pj=X({_meta:cj.optional()}),mj=X({method:q(),params:pj.loose().optional()}),hj=rO({_meta:cj.optional()}),gj=iO([q(),J().int()]),_j=X({jsonrpc:Z(`2.0`),id:gj,...fj.shape}).strict(),vj=e=>_j.safeParse(e).success,yj=X({jsonrpc:Z(`2.0`),...mj.shape}).strict(),bj=e=>yj.safeParse(e).success,xj=X({jsonrpc:Z(`2.0`),id:gj,result:hj}).strict(),Sj=e=>xj.safeParse(e).success,Cj;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Cj||={});var wj=X({jsonrpc:Z(`2.0`),id:gj.optional(),error:X({code:J().int(),message:q(),data:ZD().optional()})}).strict(),Tj=e=>wj.safeParse(e).success,Ej=iO([_j,yj,xj,wj]);iO([xj,wj]);var Dj=hj.strict(),Oj=pj.extend({requestId:gj.optional(),reason:q().optional()}),kj=mj.extend({method:Z(`notifications/cancelled`),params:Oj}),Aj=X({icons:Y(X({src:q(),mimeType:q().optional(),sizes:Y(q()).optional(),theme:mO([`light`,`dark`]).optional()})).optional()}),jj=X({name:q(),title:q().optional()}),Mj=jj.extend({...jj.shape,...Aj.shape,version:q(),websiteUrl:q().optional(),description:q().optional()}),Nj=HO(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,sO(X({form:sO(X({applyDefaults:UD().optional()}),lO(q(),ZD())).optional(),url:rj.optional()}),lO(q(),ZD()).optional())),Pj=rO({list:rj.optional(),cancel:rj.optional(),requests:rO({sampling:rO({createMessage:rj.optional()}).optional(),elicitation:rO({create:rj.optional()}).optional()}).optional()}),Fj=rO({list:rj.optional(),cancel:rj.optional(),requests:rO({tools:rO({call:rj.optional()}).optional()}).optional()}),Ij=X({experimental:lO(q(),rj).optional(),sampling:X({context:rj.optional(),tools:rj.optional()}).optional(),elicitation:Nj.optional(),roots:X({listChanged:UD().optional()}).optional(),tasks:Pj.optional(),extensions:lO(q(),rj).optional()}),Lj=lj.extend({protocolVersion:q(),capabilities:Ij,clientInfo:Mj}),Rj=fj.extend({method:Z(`initialize`),params:Lj}),zj=X({experimental:lO(q(),rj).optional(),logging:rj.optional(),completions:rj.optional(),prompts:X({listChanged:UD().optional()}).optional(),resources:X({subscribe:UD().optional(),listChanged:UD().optional()}).optional(),tools:X({listChanged:UD().optional()}).optional(),tasks:Fj.optional(),extensions:lO(q(),rj).optional()}),Bj=hj.extend({protocolVersion:q(),capabilities:zj,serverInfo:Mj,instructions:q().optional()}),Vj=mj.extend({method:Z(`notifications/initialized`),params:pj.optional()}),Hj=fj.extend({method:Z(`ping`),params:lj.optional()}),Uj=X({progress:J(),total:vO(J()),message:vO(q())}),Wj=X({...pj.shape,...Uj.shape,progressToken:ij}),Gj=mj.extend({method:Z(`notifications/progress`),params:Wj}),Kj=lj.extend({cursor:aj.optional()}),qj=fj.extend({params:Kj.optional()}),Jj=hj.extend({nextCursor:aj.optional()}),Yj=mO([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Xj=X({taskId:q(),status:Yj,ttl:iO([J(),YD()]),createdAt:q(),lastUpdatedAt:q(),pollInterval:vO(J()),statusMessage:vO(q())}),Zj=hj.extend({task:Xj}),Qj=pj.merge(Xj),$j=mj.extend({method:Z(`notifications/tasks/status`),params:Qj}),eM=fj.extend({method:Z(`tasks/get`),params:lj.extend({taskId:q()})}),tM=hj.merge(Xj),nM=fj.extend({method:Z(`tasks/result`),params:lj.extend({taskId:q()})});hj.loose();var rM=qj.extend({method:Z(`tasks/list`)}),iM=Jj.extend({tasks:Y(Xj)}),aM=fj.extend({method:Z(`tasks/cancel`),params:lj.extend({taskId:q()})}),oM=hj.merge(Xj),sM=X({uri:q(),mimeType:vO(q()),_meta:lO(q(),ZD()).optional()}),cM=sM.extend({text:q()}),lM=q().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),uM=sM.extend({blob:lM}),dM=mO([`user`,`assistant`]),fM=X({audience:Y(dM).optional(),priority:J().min(0).max(1).optional(),lastModified:yA({offset:!0}).optional()}),pM=X({...jj.shape,...Aj.shape,uri:q(),description:vO(q()),mimeType:vO(q()),size:vO(J()),annotations:fM.optional(),_meta:vO(rO({}))}),mM=X({...jj.shape,...Aj.shape,uriTemplate:q(),description:vO(q()),mimeType:vO(q()),annotations:fM.optional(),_meta:vO(rO({}))}),hM=qj.extend({method:Z(`resources/list`)}),gM=Jj.extend({resources:Y(pM)}),_M=qj.extend({method:Z(`resources/templates/list`)}),vM=Jj.extend({resourceTemplates:Y(mM)}),yM=lj.extend({uri:q()}),bM=yM,xM=fj.extend({method:Z(`resources/read`),params:bM}),SM=hj.extend({contents:Y(iO([cM,uM]))}),CM=mj.extend({method:Z(`notifications/resources/list_changed`),params:pj.optional()}),wM=yM,TM=fj.extend({method:Z(`resources/subscribe`),params:wM}),EM=yM,DM=fj.extend({method:Z(`resources/unsubscribe`),params:EM}),OM=pj.extend({uri:q()}),kM=mj.extend({method:Z(`notifications/resources/updated`),params:OM}),AM=X({name:q(),description:vO(q()),required:vO(UD())}),jM=X({...jj.shape,...Aj.shape,description:vO(q()),arguments:vO(Y(AM)),_meta:vO(rO({}))}),MM=qj.extend({method:Z(`prompts/list`)}),NM=Jj.extend({prompts:Y(jM)}),PM=lj.extend({name:q(),arguments:lO(q(),q()).optional()}),FM=fj.extend({method:Z(`prompts/get`),params:PM}),IM=X({type:Z(`text`),text:q(),annotations:fM.optional(),_meta:lO(q(),ZD()).optional()}),LM=X({type:Z(`image`),data:lM,mimeType:q(),annotations:fM.optional(),_meta:lO(q(),ZD()).optional()}),RM=X({type:Z(`audio`),data:lM,mimeType:q(),annotations:fM.optional(),_meta:lO(q(),ZD()).optional()}),zM=X({type:Z(`tool_use`),name:q(),id:q(),input:lO(q(),ZD()),_meta:lO(q(),ZD()).optional()}),BM=X({type:Z(`resource`),resource:iO([cM,uM]),annotations:fM.optional(),_meta:lO(q(),ZD()).optional()}),VM=pM.extend({type:Z(`resource_link`)}),HM=iO([IM,LM,RM,VM,BM]),UM=X({role:dM,content:HM}),WM=hj.extend({description:q().optional(),messages:Y(UM)}),GM=mj.extend({method:Z(`notifications/prompts/list_changed`),params:pj.optional()}),KM=X({title:q().optional(),readOnlyHint:UD().optional(),destructiveHint:UD().optional(),idempotentHint:UD().optional(),openWorldHint:UD().optional()}),qM=X({taskSupport:mO([`required`,`optional`,`forbidden`]).optional()}),JM=X({...jj.shape,...Aj.shape,description:q().optional(),inputSchema:X({type:Z(`object`),properties:lO(q(),rj).optional(),required:Y(q()).optional()}).catchall(ZD()),outputSchema:X({type:Z(`object`),properties:lO(q(),rj).optional(),required:Y(q()).optional()}).catchall(ZD()).optional(),annotations:KM.optional(),execution:qM.optional(),_meta:lO(q(),ZD()).optional()}),YM=qj.extend({method:Z(`tools/list`)}),XM=Jj.extend({tools:Y(JM)}),ZM=hj.extend({content:Y(HM).default([]),structuredContent:lO(q(),ZD()).optional(),isError:UD().optional()});ZM.or(hj.extend({toolResult:ZD()}));var QM=uj.extend({name:q(),arguments:lO(q(),ZD()).optional()}),$M=fj.extend({method:Z(`tools/call`),params:QM}),eN=mj.extend({method:Z(`notifications/tools/list_changed`),params:pj.optional()});X({autoRefresh:UD().default(!0),debounceMs:J().int().nonnegative().default(300)});var tN=mO([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),nN=lj.extend({level:tN}),rN=fj.extend({method:Z(`logging/setLevel`),params:nN}),iN=pj.extend({level:tN,logger:q().optional(),data:ZD()}),aN=mj.extend({method:Z(`notifications/message`),params:iN}),oN=X({hints:Y(X({name:q().optional()})).optional(),costPriority:J().min(0).max(1).optional(),speedPriority:J().min(0).max(1).optional(),intelligencePriority:J().min(0).max(1).optional()}),sN=X({mode:mO([`auto`,`required`,`none`]).optional()}),cN=X({type:Z(`tool_result`),toolUseId:q().describe(`The unique identifier for the corresponding tool call.`),content:Y(HM).default([]),structuredContent:X({}).loose().optional(),isError:UD().optional(),_meta:lO(q(),ZD()).optional()}),lN=oO(`type`,[IM,LM,RM]),uN=oO(`type`,[IM,LM,RM,zM,cN]),dN=X({role:dM,content:iO([uN,Y(uN)]),_meta:lO(q(),ZD()).optional()}),fN=uj.extend({messages:Y(dN),modelPreferences:oN.optional(),systemPrompt:q().optional(),includeContext:mO([`none`,`thisServer`,`allServers`]).optional(),temperature:J().optional(),maxTokens:J().int(),stopSequences:Y(q()).optional(),metadata:rj.optional(),tools:Y(JM).optional(),toolChoice:sN.optional()}),pN=fj.extend({method:Z(`sampling/createMessage`),params:fN}),mN=hj.extend({model:q(),stopReason:vO(mO([`endTurn`,`stopSequence`,`maxTokens`]).or(q())),role:dM,content:lN}),hN=hj.extend({model:q(),stopReason:vO(mO([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(q())),role:dM,content:iO([uN,Y(uN)])}),gN=X({type:Z(`boolean`),title:q().optional(),description:q().optional(),default:UD().optional()}),_N=X({type:Z(`string`),title:q().optional(),description:q().optional(),minLength:J().optional(),maxLength:J().optional(),format:mO([`email`,`uri`,`date`,`date-time`]).optional(),default:q().optional()}),vN=X({type:mO([`number`,`integer`]),title:q().optional(),description:q().optional(),minimum:J().optional(),maximum:J().optional(),default:J().optional()}),yN=X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),default:q().optional()}),bN=X({type:Z(`string`),title:q().optional(),description:q().optional(),oneOf:Y(X({const:q(),title:q()})),default:q().optional()}),xN=iO([iO([X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),enumNames:Y(q()).optional(),default:q().optional()}),iO([yN,bN]),iO([X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({type:Z(`string`),enum:Y(q())}),default:Y(q()).optional()}),X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({anyOf:Y(X({const:q(),title:q()}))}),default:Y(q()).optional()})])]),gN,_N,vN]),SN=iO([uj.extend({mode:Z(`form`).optional(),message:q(),requestedSchema:X({type:Z(`object`),properties:lO(q(),xN),required:Y(q()).optional()})}),uj.extend({mode:Z(`url`),message:q(),elicitationId:q(),url:q().url()})]),CN=fj.extend({method:Z(`elicitation/create`),params:SN}),wN=pj.extend({elicitationId:q()}),TN=mj.extend({method:Z(`notifications/elicitation/complete`),params:wN}),EN=hj.extend({action:mO([`accept`,`decline`,`cancel`]),content:HO(e=>e===null?void 0:e,lO(q(),iO([q(),J(),UD(),Y(q())])).optional())}),DN=X({type:Z(`ref/resource`),uri:q()}),ON=X({type:Z(`ref/prompt`),name:q()}),kN=lj.extend({ref:iO([ON,DN]),argument:X({name:q(),value:q()}),context:X({arguments:lO(q(),q()).optional()}).optional()}),AN=fj.extend({method:Z(`completion/complete`),params:kN}),jN=hj.extend({completion:rO({values:Y(q()).max(100),total:vO(J().int()),hasMore:vO(UD())})}),MN=X({uri:q().startsWith(`file://`),name:q().optional(),_meta:lO(q(),ZD()).optional()}),NN=fj.extend({method:Z(`roots/list`),params:lj.optional()}),PN=hj.extend({roots:Y(MN)}),FN=mj.extend({method:Z(`notifications/roots/list_changed`),params:pj.optional()});iO([Hj,Rj,AN,rN,FM,MM,hM,_M,xM,TM,DM,$M,YM,eM,nM,rM,aM]),iO([kj,Gj,Vj,FN,$j]),iO([Dj,mN,hN,EN,PN,tM,iM,Zj]),iO([Hj,pN,CN,NN,eM,nM,rM,aM]),iO([kj,Gj,aN,kM,CM,eN,GM,$j,TN]),iO([Dj,Bj,jN,WM,NM,gM,vM,SM,ZM,XM,tM,iM,Zj]);var IN=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Cj.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new LN(e.elicitations,n)}return new e(t,n,r)}},LN=class extends IN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Cj.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function RN(e){return e===`completed`||e===`failed`||e===`cancelled`}function zN(e){let t=LE(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=RE(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function BN(e,t){let n=IE(e,t);if(!n.success)throw n.error;return n.data}var VN=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(kj,e=>{this._oncancel(e)}),this.setNotificationHandler(Gj,e=>{this._onprogress(e)}),this.setRequestHandler(Hj,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(eM,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new IN(Cj.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(nM,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new IN(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new IN(Cj.InvalidParams,`Task not found: ${r}`);if(!RN(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(RN(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[nj]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(rM,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new IN(Cj.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(aM,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new IN(Cj.InvalidParams,`Task not found: ${e.params.taskId}`);if(RN(n.status))throw new IN(Cj.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new IN(Cj.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof IN?e:new IN(Cj.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),IN.fromError(Cj.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Sj(e)||Tj(e)?this._onresponse(e):vj(e)?this._onrequest(e,t):bj(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=IN.fromError(Cj.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[nj]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Cj.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=dj(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new IN(Cj.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Cj.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),Sj(e)?n(e):n(new IN(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Sj(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),Sj(e)?r(e):r(IN.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof IN?e:new IN(Cj.InternalError,String(e))}}return}let i;try{let r=await this.request(e,Zj,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new IN(Cj.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},RN(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new IN(Cj.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new IN(Cj.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof IN?e:new IN(Cj.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[nj]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof IN?e:new IN(Cj.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=IE(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(IN.fromError(Cj.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},tM,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},iM,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},oM,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[nj]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[nj]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[nj]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=zN(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=BN(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=zN(e);this._notificationHandlers.set(n,n=>{let r=BN(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&vj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new IN(Cj.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new IN(Cj.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new IN(Cj.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new IN(Cj.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=$j.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),RN(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new IN(Cj.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(RN(a.status))throw new IN(Cj.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=$j.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),RN(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function HN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function UN(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=HN(a)&&HN(i)?{...a,...i}:i}return n}var WN=`modulepreload`,GN=function(e,t){return new URL(e,t).href},KN={},qN=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=GN(t,n),t=s(t),t in KN)return;KN[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:WN,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};tj(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var JN=class extends VN{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},YN=`2026-01-26`,XN=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Ej.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},ZN=iO([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),QN=iO([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),$N=lO(iO([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}if(r.count>1&&e.reused===`ref`){a(n);continue}}e.external&&(e.sharedDefsExtractedFor=e.external)}function CT(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;CT(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}function wT(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function TT(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!kT.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??wT(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}Md(n,r,e.length===1?e[0]:TT(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=wT(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ET(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of kT)if(t in e)return;let n=t.filter(e=>AT.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=TT(t);else{let e=n[0],i=AT.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>TT([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,_T(e,r))}function DT(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):_T(i,s),_T(i,a),t._zod.parent===o)for(let e in i)e!==`$ref`&&e!==`allOf`&&(e in a||delete i[e]);if(s.$ref&&n.def)for(let e in i)e!==`$ref`&&e!==`allOf`&&e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e!==`$ref`&&e!==`allOf`&&e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())CT(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ET(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}_T(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,Md(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:MT(t,`input`,e.processors),output:MT(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function OT(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return OT(r.element,n);if(r.type===`set`)return OT(r.valueType,n);if(r.type===`lazy`)return OT(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return OT(r.innerType,n);if(r.type===`intersection`)return OT(r.left,n)||OT(r.right,n);if(r.type===`record`||r.type===`map`)return OT(r.keyType,n)||OT(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:OT(r.in,n)||OT(r.out,n);if(r.type===`object`){for(let e in r.shape)if(OT(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(OT(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(OT(e,n))return!0;return!!(r.rest&&OT(r.rest,n))}return!1}var kT,AT,jT,MT,NT=o((()=>{Bx(),H(),kT=new Set([`type`,`properties`,`required`,`additionalProperties`]),AT=[`oneOf`,`anyOf`],jT=(e,t={})=>n=>{let r=vT({...n,processors:t});return bT(e,r),ST(r,e),DT(r,e)},MT=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=vT({...i??{},target:a,io:t,processors:n});return bT(e,o),ST(o,e),DT(o,e)}}));function PT(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?PT(t.out):t.type===`catch`?PT(t.innerType):e._zod.optin}function FT(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=FT(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>FT(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Im:Fm).source),p):p}function IT(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of mE.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=FT(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}function LT(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(yT(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),vE):JSON.parse(o)}function RT(e,t){if(`_idmap`in e){let n=e,r=vT({...t,processors:DE}),i={};for(let e of n._idmap.entries()){let[t,n]=e;bT(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;ST(r,n),Md(a,t,DT(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=vT({...t,processors:DE});return bT(e,n),ST(n,e),DT(n,e)}var zT,BT,VT,HT,UT,WT,GT,KT,qT,JT,YT,XT,ZT,QT,$T,eE,tE,nE,rE,iE,aE,oE,sE,cE,lE,uE,dE,fE,pE,mE,hE,gE,_E,vE,yE,bE,xE,SE,CE,wE,TE,EE,DE,OE=o((()=>{ih(),NT(),H(),zT={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},BT=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=e._zod.bag;if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zT[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c];e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},VT=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;i.type=typeof s==`string`&&s.includes(`int`)?`integer`:`number`;let d=typeof u==`number`&&u>=(a??-1/0),f=typeof l==`number`&&l<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;d?p?(i.minimum=u,i.exclusiveMinimum=!0):i.exclusiveMinimum=u:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=l,i.exclusiveMaximum=!0):i.exclusiveMaximum=l:typeof o==`number`&&(i.maximum=o),typeof c==`number`&&(Number.isFinite(c)&&c!==0?i.multipleOf=Math.abs(c):yT(e,t,i,r,`A multipleOf divisor of ${c} cannot be represented in JSON Schema`))},HT=(e,t,n,r)=>{n.type=`boolean`},UT=(e,t,n,r)=>{yT(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},WT=(e,t,n,r)=>{yT(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},GT=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},KT=(e,t,n,r)=>{yT(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},qT=(e,t,n,r)=>{yT(e,t,n,r,`Void cannot be represented in JSON Schema`)},JT=(e,t,n,r)=>{n.not={}},YT=(e,t,n,r)=>{},XT=(e,t,n,r)=>{},ZT=(e,t,n,r)=>{yT(e,t,n,r,`Date cannot be represented in JSON Schema`)},QT=(e,t,n,r)=>{let i=e._zod.def,a=wd(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},$T=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(yT(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(yT(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0){if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a}},eE=(e,t,n,r)=>{yT(e,t,n,r,`NaN cannot be represented in JSON Schema`)},tE=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},nE=(e,t,n,r)=>{let i=n,a={type:`string`,format:`binary`,contentEncoding:`binary`},{minimum:o,maximum:s,mime:c}=e._zod.bag;o!==void 0&&(a.minLength=o),s!==void 0&&(a.maxLength=s),c?c.length===1?(a.contentMediaType=c[0],Object.assign(i,a)):(Object.assign(i,a),i.anyOf=c.map(e=>({contentMediaType:e}))):Object.assign(i,a)},rE=(e,t,n,r)=>{n.type=`boolean`},iE=(e,t,n,r)=>{yT(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},aE=(e,t,n,r)=>{yT(e,t,n,r,`Function types cannot be represented in JSON Schema`)},oE=(e,t,n,r)=>{yT(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},sE=(e,t,n,r)=>{yT(e,t,n,r,`Map cannot be represented in JSON Schema`)},cE=(e,t,n,r)=>{yT(e,t,n,r,`Set cannot be represented in JSON Schema`)},lE=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=e._zod.bag;typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=bT(a.element,t,{...r,path:[...r.path,`items`]})},uE=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&yT(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)Md(i.properties,e,bT(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=new Set(Object.keys(o)),c=new Set([...s].filter(e=>{let n=a.shape[e];return t.io===`input`?PT(n)===void 0:n._zod.optout===void 0}));c.size>0&&(i.required=Array.from(c)),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=bT(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},dE=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>bT(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},fE=(e,t,n,r)=>{let i=e._zod.def,a=bT(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=bT(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},pE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>bT(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?bT(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?PT(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=e._zod.bag;typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)},mE=new WeakMap,hE=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=o._zod.bag?.patterns;if(a.mode===`loose`&&s&&s.size>0){let e=bT(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)Md(i.patternProperties,t.source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=bT(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=mE.get(t);n||(n=[],mE.set(t,n),t.deferred.push(()=>IT(t))),n.push(e)}i.additionalProperties=bT(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&PT(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},gE=(e,t,n,r)=>{let i=e._zod.def,a=bT(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},_E=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},vE=Symbol(),yE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=LT(i.defaultValue,e,t,n,r);o!==vE&&(n.default=o)},bE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=LT(i.defaultValue,e,t,n,r);o!==vE&&(n._prefault=o)},xE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{yT(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},SE=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;bT(o,t,r);let s=t.seen.get(e);s.ref=o},CE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},wE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},TE=(e,t,n,r)=>{let i=e._zod.def;bT(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},EE=(e,t,n,r)=>{let i=e._zod.innerType;bT(i,t,r);let a=t.seen.get(e);a.ref=i},DE={string:BT,number:VT,boolean:HT,bigint:UT,symbol:WT,null:GT,undefined:KT,void:qT,never:JT,any:YT,unknown:XT,date:ZT,enum:QT,literal:$T,nan:eE,template_literal:tE,file:nE,success:rE,custom:iE,function:aE,transform:oE,map:sE,set:cE,array:lE,object:uE,union:dE,intersection:fE,tuple:pE,record:hE,nullable:gE,nonoptional:_E,default:yE,prefault:bE,catch:xE,pipe:SE,readonly:CE,promise:wE,optional:TE,lazy:EE}})),kE,AE=o((()=>{OE(),NT(),kE=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let t=e?.target??`draft-2020-12`;t===`draft-4`&&(t=`draft-04`),t===`draft-7`&&(t=`draft-07`),this.ctx=vT({processors:DE,target:t,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,t={path:[],schemaPath:[]}){return bT(e,this.ctx,t)}emit(e,t){t&&(t.cycles&&(this.ctx.cycles=t.cycles),t.reused&&(this.ctx.reused=t.reused),t.external&&(this.ctx.external=t.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,ST(this.ctx,e);let{"~standard":n,...r}=DT(this.ctx,e);return r}}})),jE=c({}),ME=o((()=>{})),NE=c({$ZodAny:()=>r_,$ZodArray:()=>c_,$ZodAsyncError:()=>qf,$ZodBase64:()=>Hg,$ZodBase64URL:()=>Ug,$ZodBigInt:()=>Qg,$ZodBigIntFormat:()=>$g,$ZodBoolean:()=>Zg,$ZodCIDRv4:()=>Bg,$ZodCIDRv6:()=>Vg,$ZodCUID:()=>Dg,$ZodCUID2:()=>Og,$ZodCatch:()=>M_,$ZodCheck:()=>oh,$ZodCheckBigIntFormat:()=>mh,$ZodCheckEndsWith:()=>Dh,$ZodCheckGreaterThan:()=>dh,$ZodCheckIncludes:()=>Th,$ZodCheckLengthEquals:()=>bh,$ZodCheckLessThan:()=>uh,$ZodCheckLowerCase:()=>Ch,$ZodCheckMaxLength:()=>vh,$ZodCheckMaxSize:()=>hh,$ZodCheckMimeType:()=>kh,$ZodCheckMinLength:()=>yh,$ZodCheckMinSize:()=>gh,$ZodCheckMultipleOf:()=>fh,$ZodCheckNumberFormat:()=>ph,$ZodCheckOverwrite:()=>Ah,$ZodCheckProperty:()=>Oh,$ZodCheckRegex:()=>Sh,$ZodCheckSizeEquals:()=>_h,$ZodCheckStartsWith:()=>Eh,$ZodCheckStringFormat:()=>xh,$ZodCheckUpperCase:()=>wh,$ZodCodec:()=>F_,$ZodCreditCard:()=>Kg,$ZodCustom:()=>H_,$ZodCustomStringFormat:()=>Jg,$ZodCyclicError:()=>X_,$ZodDate:()=>s_,$ZodDefault:()=>O_,$ZodDiscriminatedUnion:()=>h_,$ZodE164:()=>Wg,$ZodEmail:()=>Sg,$ZodEmoji:()=>Tg,$ZodEncodeError:()=>Jf,$ZodEnum:()=>x_,$ZodError:()=>up,$ZodExactOptional:()=>E_,$ZodFile:()=>C_,$ZodFunction:()=>z_,$ZodGUID:()=>bg,$ZodIPv4:()=>Ig,$ZodIPv6:()=>Rg,$ZodISODate:()=>Ng,$ZodISODateTime:()=>Mg,$ZodISODuration:()=>Fg,$ZodISOTime:()=>Pg,$ZodIntersection:()=>g_,$ZodJWT:()=>qg,$ZodKSUID:()=>jg,$ZodLazy:()=>V_,$ZodLiteral:()=>S_,$ZodMAC:()=>zg,$ZodMap:()=>y_,$ZodNaN:()=>N_,$ZodNanoID:()=>Eg,$ZodNever:()=>a_,$ZodNonOptional:()=>A_,$ZodNull:()=>n_,$ZodNullable:()=>D_,$ZodNumber:()=>Yg,$ZodNumberFormat:()=>Xg,$ZodObject:()=>d_,$ZodObjectJIT:()=>f_,$ZodOptional:()=>T_,$ZodPipe:()=>P_,$ZodPrefault:()=>k_,$ZodPreprocess:()=>I_,$ZodPromise:()=>B_,$ZodReadonly:()=>L_,$ZodRealError:()=>dp,$ZodRecord:()=>v_,$ZodRegistry:()=>Rx,$ZodSet:()=>b_,$ZodString:()=>vg,$ZodStringFormat:()=>yg,$ZodSuccess:()=>j_,$ZodSymbol:()=>e_,$ZodTemplateLiteral:()=>R_,$ZodTransform:()=>w_,$ZodTuple:()=>__,$ZodType:()=>W,$ZodULID:()=>kg,$ZodURL:()=>wg,$ZodUUID:()=>xg,$ZodUndefined:()=>t_,$ZodUnion:()=>p_,$ZodUnknown:()=>i_,$ZodVoid:()=>o_,$ZodXID:()=>Ag,$ZodXor:()=>m_,$brand:()=>Kf,$constructor:()=>U,$input:()=>Lx,$output:()=>Ix,Doc:()=>Mh,INVALID:()=>eC,JSONSchema:()=>jE,JSONSchemaGenerator:()=>kE,NEVER:()=>Uf,TimePrecision:()=>hT,URL_BAD_FORMAT:()=>1,URL_UNPARSEABLE:()=>2,ZodCompileAsyncError:()=>nC,ZodCompileUnsupportedError:()=>rC,_any:()=>$C,_array:()=>Iw,_base64:()=>OC,_base64url:()=>kC,_bigint:()=>KC,_boolean:()=>WC,_catch:()=>tT,_check:()=>uT,_cidrv4:()=>EC,_cidrv6:()=>DC,_coercedBigint:()=>qC,_coercedBoolean:()=>GC,_coercedDate:()=>iw,_coercedNumber:()=>RC,_coercedString:()=>cC,_creditCard:()=>jC,_cuid:()=>vC,_cuid2:()=>yC,_custom:()=>sT,_date:()=>rw,_decode:()=>kp,_decodeAsync:()=>Np,_default:()=>Qw,_discriminatedUnion:()=>zw,_e164:()=>AC,_email:()=>lC,_emoji:()=>gC,_encode:()=>Dp,_encodeAsync:()=>jp,_endsWith:()=>Ew,_enum:()=>Gw,_file:()=>Jw,_float32:()=>BC,_float64:()=>VC,_gt:()=>cw,_gte:()=>lw,_guid:()=>uC,_includes:()=>ww,_int:()=>zC,_int32:()=>HC,_int64:()=>JC,_intersection:()=>Bw,_ipv4:()=>CC,_ipv6:()=>wC,_isoDate:()=>PC,_isoDateTime:()=>NC,_isoDuration:()=>IC,_isoTime:()=>FC,_jwt:()=>MC,_ksuid:()=>SC,_lazy:()=>aT,_length:()=>bw,_literal:()=>qw,_lowercase:()=>Sw,_lt:()=>ow,_lte:()=>sw,_mac:()=>TC,_map:()=>Uw,_max:()=>sw,_maxLength:()=>vw,_maxSize:()=>hw,_mime:()=>kw,_min:()=>lw,_minLength:()=>yw,_minSize:()=>gw,_multipleOf:()=>mw,_nan:()=>aw,_nanoid:()=>_C,_nativeEnum:()=>Kw,_negative:()=>dw,_never:()=>tw,_nonnegative:()=>pw,_nonoptional:()=>$w,_nonpositive:()=>fw,_normalize:()=>jw,_null:()=>QC,_nullable:()=>Zw,_number:()=>LC,_optional:()=>Xw,_overwrite:()=>Aw,_parse:()=>hp,_parseAsync:()=>_p,_pipe:()=>nT,_positive:()=>uw,_promise:()=>oT,_properties:()=>Ow,_property:()=>Dw,_readonly:()=>rT,_record:()=>Hw,_refine:()=>cT,_regex:()=>xw,_safeDecode:()=>Lp,_safeDecodeAsync:()=>Vp,_safeEncode:()=>Fp,_safeEncodeAsync:()=>zp,_safeParse:()=>yp,_safeParseAsync:()=>xp,_set:()=>Ww,_size:()=>_w,_slugify:()=>Fw,_startsWith:()=>Tw,_string:()=>sC,_stringFormat:()=>mT,_stringbool:()=>pT,_success:()=>eT,_superRefine:()=>lT,_symbol:()=>XC,_templateLiteral:()=>iT,_toLowerCase:()=>Nw,_toUpperCase:()=>Pw,_transform:()=>Yw,_trim:()=>Mw,_tuple:()=>Vw,_uint32:()=>UC,_uint64:()=>YC,_ulid:()=>bC,_undefined:()=>ZC,_union:()=>Lw,_unknown:()=>ew,_uppercase:()=>Cw,_url:()=>hC,_uuid:()=>dC,_uuidv4:()=>fC,_uuidv6:()=>pC,_uuidv7:()=>mC,_void:()=>nw,_xid:()=>xC,_xor:()=>Rw,clone:()=>Gd,compile:()=>Hx,compileFn:()=>Wx,config:()=>Vf,createStandardJSONSchemaMethod:()=>MT,createToJSONSchemaMethod:()=>jT,decode:()=>Ap,decodeAsync:()=>Pp,describe:()=>dT,encode:()=>Op,encodeAsync:()=>Mp,extractDefs:()=>ST,finalize:()=>DT,flattenError:()=>ep,formatError:()=>tp,getDiscriminatedOption:()=>eg,globalConfig:()=>Yf,globalRegistry:()=>zx,handleUnrepresentable:()=>yT,initializeContext:()=>vT,isBackEdge:()=>Y_,isRecursiveSchema:()=>K_,isValidBase64:()=>Uh,isValidBase64URL:()=>Wh,isValidCIDRv6:()=>Hh,isValidCreditCard:()=>Kh,isValidIPv6:()=>Vh,isValidJWT:()=>qh,locales:()=>Mx,memoizer:()=>J_,mergeValues:()=>tg,meta:()=>fT,parse:()=>gp,parseAsync:()=>vp,parseURLObject:()=>Lh,prettifyError:()=>ip,process:()=>bT,regexes:()=>Wp,registry:()=>Px,safeDecode:()=>Rp,safeDecodeAsync:()=>Hp,safeEncode:()=>Ip,safeEncodeAsync:()=>Bp,safeParse:()=>bp,safeParseAsync:()=>Sp,standardProps:()=>Ih,stripTabAndNewline:()=>Rh,toDotPath:()=>rp,toJSONSchema:()=>RT,toZod:()=>bd,treeifyError:()=>np,urlHostnameOk:()=>zh,urlProtocolOk:()=>Bh,util:()=>_d,validate:()=>Tp,validateAsync:()=>Ep,version:()=>Ph}),PE=o((()=>{Xf(),Up(),fp(),U_(),rv(),jh(),Fh(),H(),ih(),Nx(),Bx(),Nh(),oC(),gT(),NT(),OE(),AE(),ME()}));function FE(e,t){let n=typeof t==`function`?t:(e,n)=>{let r=t[e._zod.def.type];return r?r(e,n):e},r=new Map;function i(e){let t=r.get(e);if(t===IE)return new V_({type:`lazy`,getter:()=>r.get(e)});if(t!==void 0)return t;r.set(e,IE);let i=a(e),o=n(i,i!==e);return r.set(e,o),o}function a(e){let t=e._zod.def;switch(t.type){case`object`:{let n=t.shape,r=Object.keys(n),a=!1,o={};for(let e of r){let t=i(n[e]);t!==n[e]&&(a=!0),o[e]=t}let s=t.catchall;return t.catchall&&(s=i(t.catchall),s!==t.catchall&&(a=!0)),a?Gd(e,{...t,shape:o,catchall:s}):e}case`array`:{let n=i(t.element);return n===t.element?e:Gd(e,{...t,element:n})}case`tuple`:{let n=t.items,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}let o=t.rest;return t.rest&&(o=i(t.rest),o!==t.rest&&(r=!0)),r?Gd(e,{...t,items:a,rest:o}):e}case`record`:case`map`:{let n=i(t.keyType),r=i(t.valueType);return n===t.keyType&&r===t.valueType?e:Gd(e,{...t,keyType:n,valueType:r})}case`set`:{let n=i(t.valueType);return n===t.valueType?e:Gd(e,{...t,valueType:n})}case`union`:{let n=t.options,r=!1,a=[];for(let e of n){let t=i(e);t!==e&&(r=!0),a.push(t)}return r?Gd(e,{...t,options:a}):e}case`intersection`:{let n=i(t.left),r=i(t.right);return n===t.left&&r===t.right?e:Gd(e,{...t,left:n,right:r})}case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:{let n=i(t.innerType);return n===t.innerType?e:Gd(e,{...t,innerType:n})}case`pipe`:{let n=i(t.in),r=i(t.out);return n===t.in&&r===t.out?e:Gd(e,{...t,in:n,out:r})}case`function`:{let n=i(t.input),r=i(t.output);return n===t.input&&r===t.output?e:Gd(e,{...t,input:n,output:r})}case`lazy`:{let n=t.getter,{_cachedInner:r,...a}=t;return Gd(e,{...a,getter:()=>i(n())})}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:return e;default:return e}}return i(e)}var IE,LE=o((()=>{U_(),H(),IE=Symbol(`z.visit/resolving`)}));Up();function RE(e){return!!e._zod}function zE(e,t){return RE(e)?bp(e,t):e.safeParse(t)}function BE(e){if(!e)return;let t;if(t=RE(e)?e._zod?.def?.shape:e.shape,t){if(typeof t==`function`)try{return t()}catch{return}return t}}function VE(e){if(RE(e)){let t=e._zod?.def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}}let t=e._def;if(t){if(t.value!==void 0)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}let n=e.value;if(n!==void 0)return n}var HE=c({endsWith:()=>Ew,gt:()=>cw,gte:()=>lw,includes:()=>ww,length:()=>bw,lowercase:()=>Sw,lt:()=>ow,lte:()=>sw,maxLength:()=>vw,maxSize:()=>hw,mime:()=>kw,minLength:()=>yw,minSize:()=>gw,multipleOf:()=>mw,negative:()=>dw,nonnegative:()=>pw,nonpositive:()=>fw,normalize:()=>jw,overwrite:()=>Aw,positive:()=>uw,properties:()=>Ow,property:()=>Dw,regex:()=>xw,size:()=>_w,slugify:()=>Fw,startsWith:()=>Tw,toLowerCase:()=>Nw,toUpperCase:()=>Pw,trim:()=>Mw,uppercase:()=>Cw}),UE=o((()=>{PE()}));function WE(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var GE,KE,qE,JE,YE=o((()=>{PE(),H(),GE=new WeakSet([Object.prototype,Error.prototype]),KE=(e,t)=>{up.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);GE.has(n)||(GE.add(n),WE(n,`format`,e=>t=>tp(e,t)),WE(n,`flatten`,e=>t=>ep(e,t)),WE(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,Td,2)}),WE(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,Td,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},qE=U(`ZodError`,KE),JE=U(`ZodError`,KE,void 0,{Parent:Error})})),XE,ZE,QE,$E,eD,tD,nD,rD,iD,aD,oD,sD,cD=o((()=>{PE(),YE(),XE=hp(JE),ZE=_p(JE),QE=yp(JE),$E=xp(JE),eD=Dp(JE),tD=kp(JE),nD=jp(JE),rD=Np(JE),iD=Fp(JE),aD=Lp(JE),oD=zp(JE),sD=Vp(JE)})),lD=c({ZodAny:()=>kk,ZodArray:()=>Pk,ZodBase64:()=>hk,ZodBase64URL:()=>gk,ZodBigInt:()=>wk,ZodBigIntFormat:()=>Tk,ZodBoolean:()=>Ck,ZodCIDRv4:()=>pk,ZodCIDRv6:()=>mk,ZodCUID:()=>ak,ZodCUID2:()=>ok,ZodCatch:()=>tA,ZodCodec:()=>iA,ZodCreditCard:()=>vk,ZodCustom:()=>dA,ZodCustomStringFormat:()=>bk,ZodDate:()=>Nk,ZodDefault:()=>Zk,ZodDiscriminatedUnion:()=>Rk,ZodE164:()=>_k,ZodEmail:()=>$O,ZodEmoji:()=>rk,ZodEnum:()=>Wk,ZodExactOptional:()=>Yk,ZodFile:()=>Kk,ZodFunction:()=>uA,ZodGUID:()=>ek,ZodIPv4:()=>uk,ZodIPv6:()=>fk,ZodISODate:()=>XO,ZodISODateTime:()=>YO,ZodISODuration:()=>QO,ZodISOTime:()=>ZO,ZodIntersection:()=>zk,ZodJWT:()=>yk,ZodKSUID:()=>lk,ZodLazy:()=>cA,ZodLiteral:()=>Gk,ZodMAC:()=>dk,ZodMap:()=>Hk,ZodNaN:()=>nA,ZodNanoID:()=>ik,ZodNever:()=>jk,ZodNonOptional:()=>$k,ZodNull:()=>Ok,ZodNullable:()=>Xk,ZodNumber:()=>xk,ZodNumberFormat:()=>Sk,ZodObject:()=>Fk,ZodOptional:()=>Jk,ZodPipe:()=>rA,ZodPrefault:()=>Qk,ZodPreprocess:()=>aA,ZodPromise:()=>lA,ZodReadonly:()=>oA,ZodRecord:()=>Vk,ZodSet:()=>Uk,ZodString:()=>qO,ZodStringFormat:()=>JO,ZodSuccess:()=>eA,ZodSymbol:()=>Ek,ZodTemplateLiteral:()=>sA,ZodTransform:()=>qk,ZodTuple:()=>Bk,ZodType:()=>Q,ZodULID:()=>sk,ZodURL:()=>nk,ZodUUID:()=>tk,ZodUndefined:()=>Dk,ZodUnion:()=>Ik,ZodUnknown:()=>Ak,ZodVoid:()=>Mk,ZodXID:()=>ck,ZodXor:()=>Lk,_ZodString:()=>KO,_default:()=>TO,_function:()=>RO,any:()=>$D,array:()=>Y,base64:()=>MD,base64url:()=>ND,bigint:()=>qD,boolean:()=>KD,catch:()=>kO,check:()=>zO,cidrv4:()=>AD,cidrv6:()=>jD,codec:()=>MO,creditCard:()=>FD,cuid:()=>SD,cuid2:()=>CD,custom:()=>BO,date:()=>rO,describe:()=>fA,discriminatedUnion:()=>lO,e164:()=>PD,email:()=>fD,emoji:()=>bD,enum:()=>_O,exactOptional:()=>SO,file:()=>yO,float32:()=>HD,float64:()=>UD,function:()=>RO,guid:()=>pD,hash:()=>BD,hex:()=>zD,hostname:()=>RD,httpUrl:()=>yD,instanceof:()=>UO,int:()=>VD,int32:()=>WD,int64:()=>JD,intersection:()=>uO,invertCodec:()=>NO,ipv4:()=>DD,ipv6:()=>kD,json:()=>WO,jwt:()=>ID,keyof:()=>iO,ksuid:()=>ED,lazy:()=>IO,literal:()=>Z,looseObject:()=>oO,looseRecord:()=>mO,mac:()=>OD,map:()=>hO,meta:()=>pA,nan:()=>AO,nanoid:()=>xD,nativeEnum:()=>vO,never:()=>tO,nonoptional:()=>DO,null:()=>QD,nullable:()=>CO,nullish:()=>wO,number:()=>J,object:()=>X,optional:()=>xO,partialRecord:()=>pO,pipe:()=>jO,prefault:()=>EO,preprocess:()=>GO,promise:()=>LO,readonly:()=>PO,record:()=>fO,refine:()=>VO,set:()=>gO,strictObject:()=>aO,string:()=>q,stringFormat:()=>LD,stringbool:()=>mA,success:()=>OO,superRefine:()=>HO,symbol:()=>XD,templateLiteral:()=>FO,transform:()=>bO,tuple:()=>dO,uint32:()=>GD,uint64:()=>YD,ulid:()=>wD,undefined:()=>ZD,union:()=>sO,unknown:()=>eO,url:()=>vD,uuid:()=>mD,uuidv4:()=>hD,uuidv6:()=>gD,uuidv7:()=>_D,void:()=>nO,xid:()=>TD,xor:()=>cO});function uD(){Yf.localeError||Vf(Rv())}function dD(){Yf.memoizer||Vf({memoizer:J_()})}function q(e){return sC(qO,e)}function fD(e){return lC($O,e)}function pD(e){return uC(ek,e)}function mD(e){return dC(tk,e)}function hD(e){return fC(tk,e)}function gD(e){return pC(tk,e)}function _D(e){return mC(tk,e)}function vD(e){return hC(nk,e)}function yD(e){return hC(nk,{protocol:Om,hostname:Dm,...R(e)})}function bD(e){return gC(rk,e)}function xD(e){return _C(ik,e)}function SD(e){return vC(ak,e)}function CD(e){return yC(ok,e)}function wD(e){return bC(sk,e)}function TD(e){return xC(ck,e)}function ED(e){return SC(lk,e)}function DD(e){return CC(uk,e)}function OD(e){return TC(dk,e)}function kD(e){return wC(fk,e)}function AD(e){return EC(pk,e)}function jD(e){return DC(mk,e)}function MD(e){return OC(hk,e)}function ND(e){return kC(gk,e)}function PD(e){return AC(_k,e)}function FD(e){return jC(vk,e)}function ID(e){return MC(yk,e)}function LD(e,t,n={}){return mT(bk,e,t,n)}function RD(e){return mT(bk,`hostname`,Em,e)}function zD(e){return mT(bk,`hex`,Hm,e)}function BD(e,t){let n=`${e}_${t?.enc??`hex`}`,r=Wp[n];if(!r)throw Error(`Unrecognized hash format: ${n}`);return mT(bk,n,r,t)}function J(e){return LC(xk,e)}function VD(e){return zC(Sk,e)}function HD(e){return BC(Sk,e)}function UD(e){return VC(Sk,e)}function WD(e){return HC(Sk,e)}function GD(e){return UC(Sk,e)}function KD(e){return WC(Ck,e)}function qD(e){return KC(wk,e)}function JD(e){return JC(Tk,e)}function YD(e){return YC(Tk,e)}function XD(e){return XC(Ek,e)}function ZD(e){return ZC(Dk,e)}function QD(e){return QC(Ok,e)}function $D(){return $C(kk)}function eO(){return ew(Ak)}function tO(e){return tw(jk,e)}function nO(e){return nw(Mk,e)}function rO(e){return rw(Nk,e)}function Y(e,t){return Iw(Pk,e,t)}function iO(e){let t=e._zod.def.shape;return _O(Object.keys(t))}function X(e,t){let n={type:`object`,shape:e??{},...R(t)};return new Fk(n)}function aO(e,t){return new Fk({type:`object`,shape:e,catchall:tO(),...R(t)})}function oO(e,t){return new Fk({type:`object`,shape:e,catchall:eO(),...R(t)})}function sO(e,t){return new Ik({type:`union`,options:e,...R(t)})}function cO(e,t){return new Lk({type:`union`,options:e,inclusive:!1,...R(t)})}function lO(e,t,n){return new Rk({type:`union`,options:t,discriminator:e,...R(n)})}function uO(e,t){return new zk({type:`intersection`,left:e,right:t})}function dO(e,t,n){let r=t instanceof W;return new Bk({type:`tuple`,items:e,rest:r?t:null,...R(r?n:t)})}function fO(e,t,n){return!t||!t._zod?new Vk({type:`record`,keyType:q(),valueType:e,...R(t)}):new Vk({type:`record`,keyType:e,valueType:t,...R(n)})}function pO(e,t,n){return new Vk({type:`record`,keyType:e,valueType:t,...R(n),partial:!0})}function mO(e,t,n){return new Vk({type:`record`,keyType:e,valueType:t,mode:`loose`,...R(n)})}function hO(e,t,n){return new Hk({type:`map`,keyType:e,valueType:t,...R(n)})}function gO(e,t){return new Uk({type:`set`,valueType:e,...R(t)})}function _O(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new Wk({type:`enum`,entries:n,...R(t)})}function vO(e,t){return new Wk({type:`enum`,entries:e,...R(t)})}function Z(e,t){return new Gk({type:`literal`,values:Array.isArray(e)?e:[e],...R(t)})}function yO(e){return Jw(Kk,e)}function bO(e){return new qk({type:`transform`,transform:e})}function xO(e){return new Jk({type:`optional`,innerType:e})}function SO(e){return new Yk({type:`optional`,innerType:e})}function CO(e){return new Xk({type:`nullable`,innerType:e})}function wO(e){return xO(CO(e))}function TO(e,t){return new Zk({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():Hd(t)}})}function EO(e,t){return new Qk({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():Hd(t)}})}function DO(e,t){return new $k({type:`nonoptional`,innerType:e,...R(t)})}function OO(e){return new eA({type:`success`,innerType:e})}function kO(e,t){return new tA({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Tf(t)})}function AO(e){return aw(nA,e)}function jO(e,t){return new rA({type:`pipe`,in:e,out:t})}function MO(e,t,n){return new iA({type:`pipe`,in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function NO(e){let t=e._zod.def;return new iA({type:`pipe`,in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}function PO(e){return new oA({type:`readonly`,innerType:e})}function FO(e,t){return new sA({type:`template_literal`,parts:e,...R(t)})}function IO(e){return new cA({type:`lazy`,getter:e})}function LO(e){return new lA({type:`promise`,innerType:e})}function RO(e){return new uA({type:`function`,input:Array.isArray(e?.input)?dO(e?.input):e?.input??Y(eO()),output:e?.output??eO()})}function zO(e){let t=new oh({check:`custom`});return t._zod.check=e,t}function BO(e,t){return sT(dA,e??(()=>!0),t)}function VO(e,t={}){return cT(dA,e,t)}function HO(e,t){return lT(e,t)}function UO(e,t={}){let n=new dA({type:`custom`,check:`custom`,fn:t=>t instanceof e,abort:!0,...R(t)});return n._zod.bag.Class=e,n._zod.check=t=>{t.value instanceof e||t.issues.push({code:`invalid_type`,expected:e.name,input:t.value,inst:n,path:[...n._zod.def.path??[]]})},n}function WO(e){let t=IO(()=>sO([q(e),J(),KD(),QD(),Y(t),fO(q(),t)]));return t}function GO(e,t){return new aA({type:`pipe`,in:bO(e),out:t})}var Q,KO,qO,JO,YO,XO,ZO,QO,$O,ek,tk,nk,rk,ik,ak,ok,sk,ck,lk,uk,dk,fk,pk,mk,hk,gk,_k,vk,yk,bk,xk,Sk,Ck,wk,Tk,Ek,Dk,Ok,kk,Ak,jk,Mk,Nk,Pk,Fk,Ik,Lk,Rk,zk,Bk,Vk,Hk,Uk,Wk,Gk,Kk,qk,Jk,Yk,Xk,Zk,Qk,$k,eA,tA,nA,rA,iA,aA,oA,sA,cA,lA,uA,dA,fA,pA,mA,hA=o((()=>{PE(),OE(),NT(),Bv(),UE(),cD(),Q=U(`ZodType`,(e,t)=>(uD(),W.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(Nd(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Gd(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(VO(e,t))},superRefine(e,t){return this.check(HO(e,t))},overwrite(e){return this.check(Aw(e))},optional(){return xO(this)},exactOptional(){return SO(this)},nullable(){return CO(this)},nullish(){return xO(CO(this))},nonoptional(e){return DO(this,e)},array(){return Y(this)},or(e){return sO([this,e])},and(e){return uO(this,e)},transform(e){return jO(this,bO(e))},default(e){return TO(this,e)},prefault(e){return EO(this,e)},catch(e){return kO(this,e)},pipe(e){return jO(this,e)},readonly(){return PO(this)},describe(e){let t=this.clone();return zx.add(t,{description:e}),t},meta(...e){if(e.length===0)return zx.get(this);let t=this.clone();return zx.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return xf(this,`~standard`,{...Ih(this),jsonSchema:{input:MT(this,`input`),output:MT(this,`output`)}})},set"~standard"(e){bf(this,`~standard`,e)},parse:function e(t,n){return XE(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await ZE(this,t,n,{callee:e})},safeParse(e,t){return QE(this,e,t)},async safeParseAsync(e,t){return $E(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){bf(this,`spa`,e)},encode:function e(t,n){return eD(this,t,n,{callee:e})},decode:function e(t,n){return tD(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await nD(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await rD(this,t,n,{callee:e})},safeEncode(e,t){return iD(this,e,t)},safeDecode(e,t){return aD(this,e,t)},async safeEncodeAsync(e,t){return oD(this,e,t)},async safeDecodeAsync(e,t){return sD(this,e,t)},toJSONSchema(e){return jT(this,{})(e)},get description(){return zx.get(this)?.description},get _def(){return this._zod.def}}),KO=U(`_ZodString`,(e,t)=>{vg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>BT(e,t,n,r);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null},{regex(...e){return this.check(xw(...e))},includes(...e){return this.check(ww(...e))},startsWith(...e){return this.check(Tw(...e))},endsWith(...e){return this.check(Ew(...e))},min(...e){return this.check(yw(...e))},max(...e){return this.check(vw(...e))},length(...e){return this.check(bw(...e))},nonempty(...e){return this.check(yw(1,...e))},lowercase(e){return this.check(Sw(e))},uppercase(e){return this.check(Cw(e))},trim(){return this.check(Mw())},normalize(...e){return this.check(jw(...e))},toLowerCase(){return this.check(Nw())},toUpperCase(){return this.check(Pw())},slugify(){return this.check(Fw())}}),qO=U(`ZodString`,(e,t)=>{vg.init(e,t),KO.init(e,t)},{email(e){return this.check(lC($O,e))},url(e){return this.check(hC(nk,e))},jwt(e){return this.check(MC(yk,e))},emoji(e){return this.check(gC(rk,e))},guid(e){return this.check(uC(ek,e))},uuid(e){return this.check(dC(tk,e))},uuidv4(e){return this.check(fC(tk,e))},uuidv6(e){return this.check(pC(tk,e))},uuidv7(e){return this.check(mC(tk,e))},nanoid(e){return this.check(_C(ik,e))},cuid(e){return this.check(vC(ak,e))},cuid2(e){return this.check(yC(ok,e))},ulid(e){return this.check(bC(sk,e))},base64(e){return this.check(OC(hk,e))},base64url(e){return this.check(kC(gk,e))},xid(e){return this.check(xC(ck,e))},ksuid(e){return this.check(SC(lk,e))},ipv4(e){return this.check(CC(uk,e))},ipv6(e){return this.check(wC(fk,e))},cidrv4(e){return this.check(EC(pk,e))},cidrv6(e){return this.check(DC(mk,e))},e164(e){return this.check(AC(_k,e))},datetime(e){return this.check(NC(YO,e))},date(e){return this.check(PC(XO,e))},time(e){return this.check(FC(ZO,e))},duration(e){return this.check(IC(QO,e))}}),JO=U(`ZodStringFormat`,(e,t)=>{yg.init(e,t),KO.init(e,t)}),YO=U(`ZodISODateTime`,(e,t)=>{Mg.init(e,t),JO.init(e,t)}),XO=U(`ZodISODate`,(e,t)=>{Ng.init(e,t),JO.init(e,t)}),ZO=U(`ZodISOTime`,(e,t)=>{Pg.init(e,t),JO.init(e,t)}),QO=U(`ZodISODuration`,(e,t)=>{Fg.init(e,t),JO.init(e,t)}),$O=U(`ZodEmail`,(e,t)=>{Sg.init(e,t),JO.init(e,t)}),ek=U(`ZodGUID`,(e,t)=>{bg.init(e,t),JO.init(e,t)}),tk=U(`ZodUUID`,(e,t)=>{xg.init(e,t),JO.init(e,t)}),nk=U(`ZodURL`,(e,t)=>{wg.init(e,t),JO.init(e,t)}),rk=U(`ZodEmoji`,(e,t)=>{Tg.init(e,t),JO.init(e,t)}),ik=U(`ZodNanoID`,(e,t)=>{Eg.init(e,t),JO.init(e,t)}),ak=U(`ZodCUID`,(e,t)=>{Dg.init(e,t),JO.init(e,t)}),ok=U(`ZodCUID2`,(e,t)=>{Og.init(e,t),JO.init(e,t)}),sk=U(`ZodULID`,(e,t)=>{kg.init(e,t),JO.init(e,t)}),ck=U(`ZodXID`,(e,t)=>{Ag.init(e,t),JO.init(e,t)}),lk=U(`ZodKSUID`,(e,t)=>{jg.init(e,t),JO.init(e,t)}),uk=U(`ZodIPv4`,(e,t)=>{Ig.init(e,t),JO.init(e,t)}),dk=U(`ZodMAC`,(e,t)=>{zg.init(e,t),JO.init(e,t)}),fk=U(`ZodIPv6`,(e,t)=>{Rg.init(e,t),JO.init(e,t)}),pk=U(`ZodCIDRv4`,(e,t)=>{Bg.init(e,t),JO.init(e,t)}),mk=U(`ZodCIDRv6`,(e,t)=>{Vg.init(e,t),JO.init(e,t)}),hk=U(`ZodBase64`,(e,t)=>{Hg.init(e,t),JO.init(e,t)}),gk=U(`ZodBase64URL`,(e,t)=>{Ug.init(e,t),JO.init(e,t)}),_k=U(`ZodE164`,(e,t)=>{Wg.init(e,t),JO.init(e,t)}),vk=U(`ZodCreditCard`,(e,t)=>{Kg.init(e,t),JO.init(e,t)}),yk=U(`ZodJWT`,(e,t)=>{qg.init(e,t),JO.init(e,t)}),bk=U(`ZodCustomStringFormat`,(e,t)=>{Jg.init(e,t),JO.init(e,t)}),xk=U(`ZodNumber`,(e,t)=>{Yg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>VT(e,t,n,r);let n=e._zod.bag;e.minValue=Math.max(n.minimum??-1/0,n.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n.maximum??1/0,n.exclusiveMaximum??1/0)??null,e.isInt=(n.format??``).includes(`int`)||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null},{gt(e,t){return this.check(cw(e,t))},gte(e,t){return this.check(lw(e,t))},min(e,t){return this.check(lw(e,t))},lt(e,t){return this.check(ow(e,t))},lte(e,t){return this.check(sw(e,t))},max(e,t){return this.check(sw(e,t))},int(e){return this.check(VD(e))},safe(e){return this.check(VD(e))},positive(e){return this.check(cw(0,e))},nonnegative(e){return this.check(lw(0,e))},negative(e){return this.check(ow(0,e))},nonpositive(e){return this.check(sw(0,e))},multipleOf(e,t){return this.check(mw(e,t))},step(e,t){return this.check(mw(e,t))},finite(){return this}}),Sk=U(`ZodNumberFormat`,(e,t)=>{Xg.init(e,t),xk.init(e,t)}),Ck=U(`ZodBoolean`,(e,t)=>{Zg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>HT(e,t,n,r)}),wk=U(`ZodBigInt`,(e,t)=>{Qg.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>UT(e,t,n,r);let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null},{gte(e,t){return this.check(lw(e,t))},min(e,t){return this.check(lw(e,t))},gt(e,t){return this.check(cw(e,t))},lt(e,t){return this.check(ow(e,t))},lte(e,t){return this.check(sw(e,t))},max(e,t){return this.check(sw(e,t))},positive(e){return this.check(cw(BigInt(0),e))},negative(e){return this.check(ow(BigInt(0),e))},nonpositive(e){return this.check(sw(BigInt(0),e))},nonnegative(e){return this.check(lw(BigInt(0),e))},multipleOf(e,t){return this.check(mw(e,t))}}),Tk=U(`ZodBigIntFormat`,(e,t)=>{$g.init(e,t),wk.init(e,t)}),Ek=U(`ZodSymbol`,(e,t)=>{e_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>WT(e,t,n,r)}),Dk=U(`ZodUndefined`,(e,t)=>{t_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>KT(e,t,n,r)}),Ok=U(`ZodNull`,(e,t)=>{n_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>GT(e,t,n,r)}),kk=U(`ZodAny`,(e,t)=>{r_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>YT(e,t,n,r)}),Ak=U(`ZodUnknown`,(e,t)=>{i_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>XT(e,t,n,r)}),jk=U(`ZodNever`,(e,t)=>{a_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>JT(e,t,n,r)}),Mk=U(`ZodVoid`,(e,t)=>{o_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qT(e,t,n,r)}),Nk=U(`ZodDate`,(e,t)=>{s_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ZT(e,t,n,r),e.min=(t,n)=>e.check(lw(t,n)),e.max=(t,n)=>e.check(sw(t,n));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null}),Pk=U(`ZodArray`,(e,t)=>{dD(),c_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>lE(e,t,n,r),e.element=t.element},{min(e,t){return this.check(yw(e,t))},nonempty(e){return this.check(yw(1,e))},max(e,t){return this.check(vw(e,t))},length(e,t){return this.check(bw(e,t))},unwrap(){return this.element}}),Fk=U(`ZodObject`,(e,t)=>{dD(),f_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>uE(e,t,n,r),wf(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return _O(Object.keys(this._zod.def.shape))},catchall(e){return this.clone({...this._zod.def,catchall:e})},passthrough(){return this.clone({...this._zod.def,catchall:eO()})},loose(){return this.clone({...this._zod.def,catchall:eO()})},strict(){return this.clone({...this._zod.def,catchall:tO()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(e){return Xd(this,e)},safeExtend(e){return Zd(this,e)},merge(e){return Qd(this,e)},pick(e){return Jd(this,e)},omit(e){return Yd(this,e)},partial(...e){return $d(Jk,this,e[0])},exactPartial(...e){return $d(Yk,this,e[0],`exactPartial`)},required(...e){return ef($k,this,e[0])}}),Ik=U(`ZodUnion`,(e,t)=>{p_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dE(e,t,n,r),e.options=t.options}),Lk=U(`ZodXor`,(e,t)=>{Ik.init(e,t),m_.init(e,t),e._zod.processJSONSchema=(t,n,r)=>dE(e,t,n,r),e.options=t.options}),Rk=U(`ZodDiscriminatedUnion`,(e,t)=>{Ik.init(e,t),h_.init(e,t)}),zk=U(`ZodIntersection`,(e,t)=>{g_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>fE(e,t,n,r)}),Bk=U(`ZodTuple`,(e,t)=>{dD(),__.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>pE(e,t,n,r)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw Error(`.partial() cannot be used on tuple schemas containing refinements`);return this.clone({...e,items:e.items.map(e=>new Jk({type:`optional`,innerType:e}))})}}),Vk=U(`ZodRecord`,(e,t)=>{dD(),v_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType}),Hk=U(`ZodMap`,(e,t)=>{dD(),y_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>sE(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...t)=>e.check(gw(...t)),e.nonempty=t=>e.check(gw(1,t)),e.max=(...t)=>e.check(hw(...t)),e.size=(...t)=>e.check(_w(...t))}),Uk=U(`ZodSet`,(e,t)=>{dD(),b_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cE(e,t,n,r),e.min=(...t)=>e.check(gw(...t)),e.nonempty=t=>e.check(gw(1,t)),e.max=(...t)=>e.check(hw(...t)),e.size=(...t)=>e.check(_w(...t))}),Wk=U(`ZodEnum`,(e,t)=>{x_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>QT(e,t,n,r),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Wk({...t,checks:[],...R(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Wk({...t,checks:[],...R(r),entries:i})}}),Gk=U(`ZodLiteral`,(e,t)=>{S_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>$T(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})}),Kk=U(`ZodFile`,(e,t)=>{C_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>nE(e,t,n,r),e.min=(t,n)=>e.check(gw(t,n)),e.max=(t,n)=>e.check(hw(t,n)),e.mime=(t,n)=>e.check(kw(Array.isArray(t)?t:[t],n))}),qk=U(`ZodTransform`,(e,t)=>{dD(),w_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>oE(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new Jf(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(df(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(df(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}}),Jk=U(`ZodOptional`,(e,t)=>{T_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Yk=U(`ZodExactOptional`,(e,t)=>{E_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>TE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Xk=U(`ZodNullable`,(e,t)=>{D_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>gE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),Zk=U(`ZodDefault`,(e,t)=>{O_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>yE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap}),Qk=U(`ZodPrefault`,(e,t)=>{k_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),$k=U(`ZodNonOptional`,(e,t)=>{A_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>_E(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),eA=U(`ZodSuccess`,(e,t)=>{j_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),tA=U(`ZodCatch`,(e,t)=>{M_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap}),nA=U(`ZodNaN`,(e,t)=>{N_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>eE(e,t,n,r)}),rA=U(`ZodPipe`,(e,t)=>{P_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>SE(e,t,n,r),e.in=t.in,e.out=t.out}),iA=U(`ZodCodec`,(e,t)=>{rA.init(e,t),F_.init(e,t)}),aA=U(`ZodPreprocess`,(e,t)=>{rA.init(e,t),I_.init(e,t)}),oA=U(`ZodReadonly`,(e,t)=>{L_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>CE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),sA=U(`ZodTemplateLiteral`,(e,t)=>{R_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>tE(e,t,n,r)}),cA=U(`ZodLazy`,(e,t)=>{V_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>EE(e,t,n,r),e.unwrap=()=>e._zod.def.getter()}),lA=U(`ZodPromise`,(e,t)=>{B_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wE(e,t,n,r),e.unwrap=()=>e._zod.def.innerType}),uA=U(`ZodFunction`,(e,t)=>{z_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>aE(e,t,n,r)}),dA=U(`ZodCustom`,(e,t)=>{H_.init(e,t),Q.init(e,t),e._zod.processJSONSchema=(t,n,r)=>iE(e,t,n,r)}),fA=dT,pA=fT,mA=(...e)=>pT({Codec:iA,Boolean:Ck,String:qO},...e)}));function gA(e){Vf({customError:e})}function _A(){return Vf().customError}var vA,yA,bA=o((()=>{PE(),vA={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},yA||={}})),xA=c({ZodISODate:()=>XO,ZodISODateTime:()=>YO,ZodISODuration:()=>QO,ZodISOTime:()=>ZO,date:()=>CA,datetime:()=>SA,duration:()=>TA,time:()=>wA});function SA(e){return NC(YO,e)}function CA(e){return PC(XO,e)}function wA(e){return FC(ZO,e)}function TA(e){return IC(QO,e)}var EA=o((()=>{PE(),hA()}));function DA(e,t){let n=e.$schema;return n===`https://json-schema.org/draft/2020-12/schema`?`draft-2020-12`:n===`http://json-schema.org/draft-07/schema#`?`draft-7`:n===`http://json-schema.org/draft-04/schema#`?`draft-4`:t??`draft-2020-12`}function OA(e,t){return e.map((e,n)=>ne).check(e=>{let n=e.value;if(typeof n==`object`&&n&&!Array.isArray(n))for(let r of Object.getOwnPropertyNames(n)){let n=t.safeParse(r);n.success||e.issues.push({code:`invalid_key`,origin:`record`,issues:n.error.issues,input:r,path:[r],continue:!0})}}).pipe(e)}function MA(e,t){if(e!==!1)return e===void 0||e===!0?$.any():PA(e,t)}function NA(e,t){if(e.not!==void 0){if(typeof e.not==`object`&&Object.keys(e.not).length===0)return $.never();throw Error(`not is not supported in Zod (except { not: {} } for never)`)}if(e.unevaluatedItems!==void 0)throw Error(`unevaluatedItems is not supported`);if(e.unevaluatedProperties!==void 0)throw Error(`unevaluatedProperties is not supported`);if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw Error(`Conditional schemas (if/then/else) are not supported`);if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw Error(`dependentSchemas and dependentRequired are not supported`);if(e.$ref){let n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return $.lazy(()=>{if(!t.refs.has(n))throw Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let r=PA(AA(n,t),t);return t.refs.set(n,r),t.processing.delete(n),r}if(e.enum!==void 0){let n=e.enum;if(t.version===`openapi-3.0`&&e.nullable===!0&&n.length===1&&n[0]===null)return $.null();if(n.length===0)return $.never();if(n.length===1)return $.literal(n[0]);if(n.every(e=>typeof e==`string`))return $.enum(n);let r=n.map(e=>$.literal(e));return r.length<2?r[0]:$.union([r[0],r[1],...r.slice(2)])}if(e.const!==void 0)return $.literal(e.const);let n=e.type;if(Array.isArray(n)){let r=n.map(n=>NA({...e,type:n},t));return r.length===0?$.never():r.length===1?r[0]:$.union(r)}if(!n)return $.any();let r;switch(n){case`string`:{let t=$.string();if(e.format){let n=e.format;n===`email`?t=t.check($.email()):n===`uri`||n===`uri-reference`?t=t.check($.url()):n===`uuid`||n===`guid`?t=t.check($.uuid()):n===`date-time`?t=t.check($.iso.datetime({offset:!0})):n===`date`?t=t.check($.iso.date()):n===`time`?t=t.check($.regex(LA)):n===`duration`?t=t.check($.iso.duration()):n===`hostname`?t=t.check($.hostname()):n===`ipv4`?t=t.check($.ipv4()):n===`ipv6`?t=t.check($.ipv6()):n===`mac`?t=t.check($.mac()):n===`cidr`?t=t.check($.cidrv4()):n===`cidr-v6`?t=t.check($.cidrv6()):n===`base64`?t=t.check($.base64()):n===`base64url`?t=t.check($.base64url()):n===`e164`?t=t.check($.e164()):n===`credit_card`?t=t.check($.creditCard()):n===`jwt`?t=t.check($.jwt()):n===`emoji`?t=t.check($.emoji()):n===`nanoid`?t=t.check($.nanoid()):n===`cuid`?t=t.check($.cuid()):n===`cuid2`?t=t.check($.cuid2()):n===`ulid`?t=t.check($.ulid()):n===`xid`?t=t.check($.xid()):n===`ksuid`&&(t=t.check($.ksuid()))}typeof e.minLength==`number`&&(t=t.min(e.minLength)),typeof e.maxLength==`number`&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),r=t;break}case`number`:case`integer`:{let t=n===`integer`?$.number().int():$.number();typeof e.minimum==`number`&&e.exclusiveMinimum!==!0&&(t=t.min(e.minimum)),typeof e.maximum==`number`&&e.exclusiveMaximum!==!0&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum==`number`?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum==`number`&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum==`number`?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum==`number`&&(t=t.lt(e.maximum)),typeof e.multipleOf==`number`&&(t=t.multipleOf(e.multipleOf)),r=t;break}case`boolean`:r=$.boolean();break;case`null`:r=$.null();break;case`object`:{let n={},i=e.properties||{},a=new Set(e.required||[]),o=typeof e.additionalProperties==`object`?PA(e.additionalProperties,t):void 0;for(let[e,r]of Object.entries(i)){let i=PA(r,t);Md(n,e,a.has(e)?i:i.optional())}if(e.patternProperties){let i=e.patternProperties,a=Object.keys(i),o=[];for(let e of a){let n=PA(i[e],t),r=$.string().regex(new RegExp(e));o.push($.looseRecord(r,n))}let s=[];if(Object.keys(n).length>0&&s.push($.object(n).passthrough()),s.push(...o),s.length===0)r=$.object({}).passthrough();else if(s.length===1)r=s[0];else{let e=$.intersection(s[0],s[1]);for(let t=2;tnew RegExp(e)),i=r;r=r.check(n=>{if(!Vd(n.value))return;let r=[];for(let i of Object.keys(n.value))e.includes(i)||t.some(e=>e.test(i))||r.push(i);r.length&&n.issues.push({code:`unrecognized_keys`,keys:r,input:n.value,inst:i})})}}else{let t=$.object(n);r=e.additionalProperties===!1?t.strict():o?t.catchall(o):t.passthrough()}if(e.propertyNames!==void 0&&e.propertyNames!==!0){let n=typeof e.propertyNames==`object`&&e.propertyNames.type===void 0?{type:`string`,...e.propertyNames}:e.propertyNames;r=jA(r,PA(n,t))}break}case`array`:{let n=e.prefixItems,i=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems==`number`?e.minItems:0,o=OA(n.map(e=>PA(e,t)),a),s=Array.isArray(i)?void 0:MA(i,t),c=$.tuple(o);r=s?c.rest(s):c,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(Array.isArray(i)){let n=typeof e.minItems==`number`?e.minItems:0,a=OA(i.map(e=>PA(e,t)),n),o=MA(e.additionalItems,t),s=$.tuple(a);r=o?s.rest(o):s,typeof e.minItems==`number`&&(r=r.check($.minLength(e.minItems))),typeof e.maxItems==`number`&&(r=r.check($.maxLength(e.maxItems)))}else if(i!==void 0){let n=PA(i,t),a=$.array(n);typeof e.minItems==`number`&&(a=a.min(e.minItems)),typeof e.maxItems==`number`&&(a=a.max(e.maxItems)),r=a}else r=$.array($.any());break}default:throw Error(`Unsupported type: ${n}`)}return r}function PA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n=NA(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let i=e.anyOf.map(e=>PA(e,t)),a=$.union(i);n=r?$.intersection(n,a):a}if(e.oneOf&&Array.isArray(e.oneOf)){let i=e.oneOf.map(e=>PA(e,t)),a=$.xor(i);n=r?$.intersection(n,a):a}if(e.allOf&&Array.isArray(e.allOf)){if(e.allOf.length===0)n=r?n:$.any();else{let i=r?n:PA(e.allOf[0],t),a=+!r;for(let n=a;n0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function FA(e,t){if(typeof e==`boolean`)return e?$.any():$.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw Error(`fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas`)}let r={version:DA(n,t?.defaultTarget),defs:n.$defs||n.definitions||{},refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??zx};return PA(n,r)}var $,IA,LA,RA=o((()=>{Bx(),H(),UE(),EA(),hA(),$={...lD,...HE,iso:xA},IA=new Set(`$schema.$ref.$defs.definitions.$id.id.$comment.$anchor.$vocabulary.$dynamicRef.$dynamicAnchor.type.enum.const.anyOf.oneOf.allOf.not.properties.required.additionalProperties.patternProperties.propertyNames.minProperties.maxProperties.items.prefixItems.additionalItems.minItems.maxItems.uniqueItems.contains.minContains.maxContains.minLength.maxLength.pattern.format.minimum.maximum.exclusiveMinimum.exclusiveMaximum.multipleOf.description.default.contentEncoding.contentMediaType.contentSchema.unevaluatedItems.unevaluatedProperties.if.then.else.dependentSchemas.dependentRequired.nullable.readOnly`.split(`.`)),LA=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/}));function zA(e){return FE(e,{object:e=>e.partial(),union:e=>{let t=e._zod.def;return t.discriminator===void 0?e:sO(t.options)}})}var BA=o((()=>{LE(),hA()}));function VA(e,t){if(!t?.length)return e;let n=e._zod.def;return Gd(e,Nd(n,{checks:[...n.checks??[],...t]}),{parent:!0})}function HA(e){return VA(e.out,e.checks)}function UA(e){return e.in._zod.traits.has(`$ZodTransform`)?HA(e):e.in}function WA(e){return FE(e,{pipe:e=>UA(e._zod.def),default:(e,t)=>t?xO(e._zod.def.innerType):e,catch:(e,t)=>t?e._zod.def.innerType:e})}function GA(e){return FE(e,{pipe:e=>HA(e._zod.def),prefault:(e,t)=>t?e._zod.def.innerType:e})}var KA=o((()=>{H(),LE(),hA()})),qA=c({bigint:()=>ZA,boolean:()=>XA,date:()=>QA,number:()=>YA,string:()=>JA});function JA(e){return cC(qO,e)}function YA(e){return RC(xk,e)}function XA(e){return GC(Ck,e)}function ZA(e){return qC(wk,e)}function QA(e){return iw(Nk,e)}var $A=o((()=>{PE(),hA()})),ej=c({$brand:()=>Kf,$input:()=>Lx,$output:()=>Ix,NEVER:()=>Uf,TimePrecision:()=>hT,ZodAny:()=>kk,ZodArray:()=>Pk,ZodBase64:()=>hk,ZodBase64URL:()=>gk,ZodBigInt:()=>wk,ZodBigIntFormat:()=>Tk,ZodBoolean:()=>Ck,ZodCIDRv4:()=>pk,ZodCIDRv6:()=>mk,ZodCUID:()=>ak,ZodCUID2:()=>ok,ZodCatch:()=>tA,ZodCodec:()=>iA,ZodCompileAsyncError:()=>nC,ZodCompileUnsupportedError:()=>rC,ZodCreditCard:()=>vk,ZodCustom:()=>dA,ZodCustomStringFormat:()=>bk,ZodDate:()=>Nk,ZodDefault:()=>Zk,ZodDiscriminatedUnion:()=>Rk,ZodE164:()=>_k,ZodEmail:()=>$O,ZodEmoji:()=>rk,ZodEnum:()=>Wk,ZodError:()=>qE,ZodExactOptional:()=>Yk,ZodFile:()=>Kk,ZodFirstPartyTypeKind:()=>yA,ZodFunction:()=>uA,ZodGUID:()=>ek,ZodIPv4:()=>uk,ZodIPv6:()=>fk,ZodISODate:()=>XO,ZodISODateTime:()=>YO,ZodISODuration:()=>QO,ZodISOTime:()=>ZO,ZodIntersection:()=>zk,ZodIssueCode:()=>vA,ZodJWT:()=>yk,ZodKSUID:()=>lk,ZodLazy:()=>cA,ZodLiteral:()=>Gk,ZodMAC:()=>dk,ZodMap:()=>Hk,ZodNaN:()=>nA,ZodNanoID:()=>ik,ZodNever:()=>jk,ZodNonOptional:()=>$k,ZodNull:()=>Ok,ZodNullable:()=>Xk,ZodNumber:()=>xk,ZodNumberFormat:()=>Sk,ZodObject:()=>Fk,ZodOptional:()=>Jk,ZodPipe:()=>rA,ZodPrefault:()=>Qk,ZodPreprocess:()=>aA,ZodPromise:()=>lA,ZodReadonly:()=>oA,ZodRealError:()=>JE,ZodRecord:()=>Vk,ZodSet:()=>Uk,ZodString:()=>qO,ZodStringFormat:()=>JO,ZodSuccess:()=>eA,ZodSymbol:()=>Ek,ZodTemplateLiteral:()=>sA,ZodTransform:()=>qk,ZodTuple:()=>Bk,ZodType:()=>Q,ZodULID:()=>sk,ZodURL:()=>nk,ZodUUID:()=>tk,ZodUndefined:()=>Dk,ZodUnion:()=>Ik,ZodUnknown:()=>Ak,ZodVoid:()=>Mk,ZodXID:()=>ck,ZodXor:()=>Lk,_ZodString:()=>KO,_default:()=>TO,_function:()=>RO,any:()=>$D,array:()=>Y,base64:()=>MD,base64url:()=>ND,bigint:()=>qD,boolean:()=>KD,catch:()=>kO,check:()=>zO,cidrv4:()=>AD,cidrv6:()=>jD,clone:()=>Gd,codec:()=>MO,coerce:()=>qA,compile:()=>Hx,config:()=>Vf,core:()=>NE,creditCard:()=>FD,cuid:()=>SD,cuid2:()=>CD,custom:()=>BO,date:()=>rO,decode:()=>tD,decodeAsync:()=>rD,deepPartial:()=>zA,describe:()=>fA,discriminatedUnion:()=>lO,e164:()=>PD,email:()=>fD,emoji:()=>bD,encode:()=>eD,encodeAsync:()=>nD,endsWith:()=>Ew,enum:()=>_O,exactOptional:()=>SO,file:()=>yO,flattenError:()=>ep,float32:()=>HD,float64:()=>UD,formatError:()=>tp,fromJSONSchema:()=>FA,function:()=>RO,getDiscriminatedOption:()=>eg,getErrorMap:()=>_A,globalRegistry:()=>zx,gt:()=>cw,gte:()=>lw,guid:()=>pD,hash:()=>BD,hex:()=>zD,hostname:()=>RD,httpUrl:()=>yD,includes:()=>ww,input:()=>WA,instanceof:()=>UO,int:()=>VD,int32:()=>WD,int64:()=>JD,intersection:()=>uO,invertCodec:()=>NO,ipv4:()=>DD,ipv6:()=>kD,iso:()=>xA,json:()=>WO,jwt:()=>ID,keyof:()=>iO,ksuid:()=>ED,lazy:()=>IO,length:()=>bw,literal:()=>Z,locales:()=>Mx,looseObject:()=>oO,looseRecord:()=>mO,lowercase:()=>Sw,lt:()=>ow,lte:()=>sw,mac:()=>OD,map:()=>hO,maxLength:()=>vw,maxSize:()=>hw,memoizer:()=>J_,meta:()=>pA,mime:()=>kw,minLength:()=>yw,minSize:()=>gw,multipleOf:()=>mw,nan:()=>AO,nanoid:()=>xD,nativeEnum:()=>vO,negative:()=>dw,never:()=>tO,nonnegative:()=>pw,nonoptional:()=>DO,nonpositive:()=>fw,normalize:()=>jw,null:()=>QD,nullable:()=>CO,nullish:()=>wO,number:()=>J,object:()=>X,optional:()=>xO,output:()=>GA,overwrite:()=>Aw,parse:()=>XE,parseAsync:()=>ZE,partialRecord:()=>pO,pipe:()=>jO,positive:()=>uw,prefault:()=>EO,preprocess:()=>GO,prettifyError:()=>ip,promise:()=>LO,properties:()=>Ow,property:()=>Dw,readonly:()=>PO,record:()=>fO,refine:()=>VO,regex:()=>xw,regexes:()=>Wp,registry:()=>Px,safeDecode:()=>aD,safeDecodeAsync:()=>sD,safeEncode:()=>iD,safeEncodeAsync:()=>oD,safeParse:()=>QE,safeParseAsync:()=>$E,set:()=>gO,setErrorMap:()=>gA,size:()=>_w,slugify:()=>Fw,startsWith:()=>Tw,strictObject:()=>aO,string:()=>q,stringFormat:()=>LD,stringbool:()=>mA,success:()=>OO,superRefine:()=>HO,symbol:()=>XD,templateLiteral:()=>FO,toJSONSchema:()=>RT,toLowerCase:()=>Nw,toUpperCase:()=>Pw,toZod:()=>bd,transform:()=>bO,treeifyError:()=>np,trim:()=>Mw,tuple:()=>dO,uint32:()=>GD,uint64:()=>YD,ulid:()=>wD,undefined:()=>ZD,union:()=>sO,unknown:()=>eO,uppercase:()=>Cw,url:()=>vD,util:()=>_d,uuid:()=>mD,uuidv4:()=>hD,uuidv6:()=>gD,uuidv7:()=>_D,validate:()=>Tp,validateAsync:()=>Ep,void:()=>nO,xid:()=>TD,xor:()=>cO}),tj=o((()=>{PE(),hA(),UE(),YE(),cD(),bA(),OE(),RA(),BA(),KA(),Nx(),EA(),$A()})),nj=o((()=>{tj(),tj()})),rj=c({$brand:()=>Kf,$input:()=>Lx,$output:()=>Ix,NEVER:()=>Uf,TimePrecision:()=>hT,ZodAny:()=>kk,ZodArray:()=>Pk,ZodBase64:()=>hk,ZodBase64URL:()=>gk,ZodBigInt:()=>wk,ZodBigIntFormat:()=>Tk,ZodBoolean:()=>Ck,ZodCIDRv4:()=>pk,ZodCIDRv6:()=>mk,ZodCUID:()=>ak,ZodCUID2:()=>ok,ZodCatch:()=>tA,ZodCodec:()=>iA,ZodCompileAsyncError:()=>nC,ZodCompileUnsupportedError:()=>rC,ZodCreditCard:()=>vk,ZodCustom:()=>dA,ZodCustomStringFormat:()=>bk,ZodDate:()=>Nk,ZodDefault:()=>Zk,ZodDiscriminatedUnion:()=>Rk,ZodE164:()=>_k,ZodEmail:()=>$O,ZodEmoji:()=>rk,ZodEnum:()=>Wk,ZodError:()=>qE,ZodExactOptional:()=>Yk,ZodFile:()=>Kk,ZodFirstPartyTypeKind:()=>yA,ZodFunction:()=>uA,ZodGUID:()=>ek,ZodIPv4:()=>uk,ZodIPv6:()=>fk,ZodISODate:()=>XO,ZodISODateTime:()=>YO,ZodISODuration:()=>QO,ZodISOTime:()=>ZO,ZodIntersection:()=>zk,ZodIssueCode:()=>vA,ZodJWT:()=>yk,ZodKSUID:()=>lk,ZodLazy:()=>cA,ZodLiteral:()=>Gk,ZodMAC:()=>dk,ZodMap:()=>Hk,ZodNaN:()=>nA,ZodNanoID:()=>ik,ZodNever:()=>jk,ZodNonOptional:()=>$k,ZodNull:()=>Ok,ZodNullable:()=>Xk,ZodNumber:()=>xk,ZodNumberFormat:()=>Sk,ZodObject:()=>Fk,ZodOptional:()=>Jk,ZodPipe:()=>rA,ZodPrefault:()=>Qk,ZodPreprocess:()=>aA,ZodPromise:()=>lA,ZodReadonly:()=>oA,ZodRealError:()=>JE,ZodRecord:()=>Vk,ZodSet:()=>Uk,ZodString:()=>qO,ZodStringFormat:()=>JO,ZodSuccess:()=>eA,ZodSymbol:()=>Ek,ZodTemplateLiteral:()=>sA,ZodTransform:()=>qk,ZodTuple:()=>Bk,ZodType:()=>Q,ZodULID:()=>sk,ZodURL:()=>nk,ZodUUID:()=>tk,ZodUndefined:()=>Dk,ZodUnion:()=>Ik,ZodUnknown:()=>Ak,ZodVoid:()=>Mk,ZodXID:()=>ck,ZodXor:()=>Lk,_ZodString:()=>KO,_default:()=>TO,_function:()=>RO,any:()=>$D,array:()=>Y,base64:()=>MD,base64url:()=>ND,bigint:()=>qD,boolean:()=>KD,catch:()=>kO,check:()=>zO,cidrv4:()=>AD,cidrv6:()=>jD,clone:()=>Gd,codec:()=>MO,coerce:()=>qA,compile:()=>Hx,config:()=>Vf,core:()=>NE,creditCard:()=>FD,cuid:()=>SD,cuid2:()=>CD,custom:()=>BO,date:()=>rO,decode:()=>tD,decodeAsync:()=>rD,deepPartial:()=>zA,default:()=>ej,describe:()=>fA,discriminatedUnion:()=>lO,e164:()=>PD,email:()=>fD,emoji:()=>bD,encode:()=>eD,encodeAsync:()=>nD,endsWith:()=>Ew,enum:()=>_O,exactOptional:()=>SO,file:()=>yO,flattenError:()=>ep,float32:()=>HD,float64:()=>UD,formatError:()=>tp,fromJSONSchema:()=>FA,function:()=>RO,getDiscriminatedOption:()=>eg,getErrorMap:()=>_A,globalRegistry:()=>zx,gt:()=>cw,gte:()=>lw,guid:()=>pD,hash:()=>BD,hex:()=>zD,hostname:()=>RD,httpUrl:()=>yD,includes:()=>ww,input:()=>WA,instanceof:()=>UO,int:()=>VD,int32:()=>WD,int64:()=>JD,intersection:()=>uO,invertCodec:()=>NO,ipv4:()=>DD,ipv6:()=>kD,iso:()=>xA,json:()=>WO,jwt:()=>ID,keyof:()=>iO,ksuid:()=>ED,lazy:()=>IO,length:()=>bw,literal:()=>Z,locales:()=>Mx,looseObject:()=>oO,looseRecord:()=>mO,lowercase:()=>Sw,lt:()=>ow,lte:()=>sw,mac:()=>OD,map:()=>hO,maxLength:()=>vw,maxSize:()=>hw,memoizer:()=>J_,meta:()=>pA,mime:()=>kw,minLength:()=>yw,minSize:()=>gw,multipleOf:()=>mw,nan:()=>AO,nanoid:()=>xD,nativeEnum:()=>vO,negative:()=>dw,never:()=>tO,nonnegative:()=>pw,nonoptional:()=>DO,nonpositive:()=>fw,normalize:()=>jw,null:()=>QD,nullable:()=>CO,nullish:()=>wO,number:()=>J,object:()=>X,optional:()=>xO,output:()=>GA,overwrite:()=>Aw,parse:()=>XE,parseAsync:()=>ZE,partialRecord:()=>pO,pipe:()=>jO,positive:()=>uw,prefault:()=>EO,preprocess:()=>GO,prettifyError:()=>ip,promise:()=>LO,properties:()=>Ow,property:()=>Dw,readonly:()=>PO,record:()=>fO,refine:()=>VO,regex:()=>xw,regexes:()=>Wp,registry:()=>Px,safeDecode:()=>aD,safeDecodeAsync:()=>sD,safeEncode:()=>iD,safeEncodeAsync:()=>oD,safeParse:()=>QE,safeParseAsync:()=>$E,set:()=>gO,setErrorMap:()=>gA,size:()=>_w,slugify:()=>Fw,startsWith:()=>Tw,strictObject:()=>aO,string:()=>q,stringFormat:()=>LD,stringbool:()=>mA,success:()=>OO,superRefine:()=>HO,symbol:()=>XD,templateLiteral:()=>FO,toJSONSchema:()=>RT,toLowerCase:()=>Nw,toUpperCase:()=>Pw,toZod:()=>bd,transform:()=>bO,treeifyError:()=>np,trim:()=>Mw,tuple:()=>dO,uint32:()=>GD,uint64:()=>YD,ulid:()=>wD,undefined:()=>ZD,union:()=>sO,unknown:()=>eO,uppercase:()=>Cw,url:()=>vD,util:()=>_d,uuid:()=>mD,uuidv4:()=>hD,uuidv6:()=>gD,uuidv7:()=>_D,validate:()=>Tp,validateAsync:()=>Ep,void:()=>nO,xid:()=>TD,xor:()=>cO,z:()=>ej}),ij=o((()=>{tj(),nj()}));ij();var aj=`io.modelcontextprotocol/related-task`,oj=BO(e=>e!==null&&(typeof e==`object`||typeof e==`function`)),sj=sO([q(),J().int()]),cj=q();oO({ttl:J().optional(),pollInterval:J().optional()});var lj=X({ttl:J().optional()}),uj=X({taskId:q()}),dj=oO({progressToken:sj.optional(),[aj]:uj.optional()}),fj=X({_meta:dj.optional()}),pj=fj.extend({task:lj.optional()}),mj=e=>pj.safeParse(e).success,hj=X({method:q(),params:fj.loose().optional()}),gj=X({_meta:dj.optional()}),_j=X({method:q(),params:gj.loose().optional()}),vj=oO({_meta:dj.optional()}),yj=sO([q(),J().int()]),bj=X({jsonrpc:Z(`2.0`),id:yj,...hj.shape}).strict(),xj=e=>bj.safeParse(e).success,Sj=X({jsonrpc:Z(`2.0`),..._j.shape}).strict(),Cj=e=>Sj.safeParse(e).success,wj=X({jsonrpc:Z(`2.0`),id:yj,result:vj}).strict(),Tj=e=>wj.safeParse(e).success,Ej;(function(e){e[e.ConnectionClosed=-32e3]=`ConnectionClosed`,e[e.RequestTimeout=-32001]=`RequestTimeout`,e[e.ParseError=-32700]=`ParseError`,e[e.InvalidRequest=-32600]=`InvalidRequest`,e[e.MethodNotFound=-32601]=`MethodNotFound`,e[e.InvalidParams=-32602]=`InvalidParams`,e[e.InternalError=-32603]=`InternalError`,e[e.UrlElicitationRequired=-32042]=`UrlElicitationRequired`})(Ej||={});var Dj=X({jsonrpc:Z(`2.0`),id:yj.optional(),error:X({code:J().int(),message:q(),data:eO().optional()})}).strict(),Oj=e=>Dj.safeParse(e).success,kj=sO([bj,Sj,wj,Dj]);sO([wj,Dj]);var Aj=vj.strict(),jj=gj.extend({requestId:yj.optional(),reason:q().optional()}),Mj=_j.extend({method:Z(`notifications/cancelled`),params:jj}),Nj=X({icons:Y(X({src:q(),mimeType:q().optional(),sizes:Y(q()).optional(),theme:_O([`light`,`dark`]).optional()})).optional()}),Pj=X({name:q(),title:q().optional()}),Fj=Pj.extend({...Pj.shape,...Nj.shape,version:q(),websiteUrl:q().optional(),description:q().optional()}),Ij=GO(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,uO(X({form:uO(X({applyDefaults:KD().optional()}),fO(q(),eO())).optional(),url:oj.optional()}),fO(q(),eO()).optional())),Lj=oO({list:oj.optional(),cancel:oj.optional(),requests:oO({sampling:oO({createMessage:oj.optional()}).optional(),elicitation:oO({create:oj.optional()}).optional()}).optional()}),Rj=oO({list:oj.optional(),cancel:oj.optional(),requests:oO({tools:oO({call:oj.optional()}).optional()}).optional()}),zj=X({experimental:fO(q(),oj).optional(),sampling:X({context:oj.optional(),tools:oj.optional()}).optional(),elicitation:Ij.optional(),roots:X({listChanged:KD().optional()}).optional(),tasks:Lj.optional(),extensions:fO(q(),oj).optional()}),Bj=fj.extend({protocolVersion:q(),capabilities:zj,clientInfo:Fj}),Vj=hj.extend({method:Z(`initialize`),params:Bj}),Hj=X({experimental:fO(q(),oj).optional(),logging:oj.optional(),completions:oj.optional(),prompts:X({listChanged:KD().optional()}).optional(),resources:X({subscribe:KD().optional(),listChanged:KD().optional()}).optional(),tools:X({listChanged:KD().optional()}).optional(),tasks:Rj.optional(),extensions:fO(q(),oj).optional()}),Uj=vj.extend({protocolVersion:q(),capabilities:Hj,serverInfo:Fj,instructions:q().optional()}),Wj=_j.extend({method:Z(`notifications/initialized`),params:gj.optional()}),Gj=hj.extend({method:Z(`ping`),params:fj.optional()}),Kj=X({progress:J(),total:xO(J()),message:xO(q())}),qj=X({...gj.shape,...Kj.shape,progressToken:sj}),Jj=_j.extend({method:Z(`notifications/progress`),params:qj}),Yj=fj.extend({cursor:cj.optional()}),Xj=hj.extend({params:Yj.optional()}),Zj=vj.extend({nextCursor:cj.optional()}),Qj=_O([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$j=X({taskId:q(),status:Qj,ttl:sO([J(),QD()]),createdAt:q(),lastUpdatedAt:q(),pollInterval:xO(J()),statusMessage:xO(q())}),eM=vj.extend({task:$j}),tM=gj.merge($j),nM=_j.extend({method:Z(`notifications/tasks/status`),params:tM}),rM=hj.extend({method:Z(`tasks/get`),params:fj.extend({taskId:q()})}),iM=vj.merge($j),aM=hj.extend({method:Z(`tasks/result`),params:fj.extend({taskId:q()})});vj.loose();var oM=Xj.extend({method:Z(`tasks/list`)}),sM=Zj.extend({tasks:Y($j)}),cM=hj.extend({method:Z(`tasks/cancel`),params:fj.extend({taskId:q()})}),lM=vj.merge($j),uM=X({uri:q(),mimeType:xO(q()),_meta:fO(q(),eO()).optional()}),dM=uM.extend({text:q()}),fM=q().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),pM=uM.extend({blob:fM}),mM=_O([`user`,`assistant`]),hM=X({audience:Y(mM).optional(),priority:J().min(0).max(1).optional(),lastModified:SA({offset:!0}).optional()}),gM=X({...Pj.shape,...Nj.shape,uri:q(),description:xO(q()),mimeType:xO(q()),size:xO(J()),annotations:hM.optional(),_meta:xO(oO({}))}),_M=X({...Pj.shape,...Nj.shape,uriTemplate:q(),description:xO(q()),mimeType:xO(q()),annotations:hM.optional(),_meta:xO(oO({}))}),vM=Xj.extend({method:Z(`resources/list`)}),yM=Zj.extend({resources:Y(gM)}),bM=Xj.extend({method:Z(`resources/templates/list`)}),xM=Zj.extend({resourceTemplates:Y(_M)}),SM=fj.extend({uri:q()}),CM=SM,wM=hj.extend({method:Z(`resources/read`),params:CM}),TM=vj.extend({contents:Y(sO([dM,pM]))}),EM=_j.extend({method:Z(`notifications/resources/list_changed`),params:gj.optional()}),DM=SM,OM=hj.extend({method:Z(`resources/subscribe`),params:DM}),kM=SM,AM=hj.extend({method:Z(`resources/unsubscribe`),params:kM}),jM=gj.extend({uri:q()}),MM=_j.extend({method:Z(`notifications/resources/updated`),params:jM}),NM=X({name:q(),description:xO(q()),required:xO(KD())}),PM=X({...Pj.shape,...Nj.shape,description:xO(q()),arguments:xO(Y(NM)),_meta:xO(oO({}))}),FM=Xj.extend({method:Z(`prompts/list`)}),IM=Zj.extend({prompts:Y(PM)}),LM=fj.extend({name:q(),arguments:fO(q(),q()).optional()}),RM=hj.extend({method:Z(`prompts/get`),params:LM}),zM=X({type:Z(`text`),text:q(),annotations:hM.optional(),_meta:fO(q(),eO()).optional()}),BM=X({type:Z(`image`),data:fM,mimeType:q(),annotations:hM.optional(),_meta:fO(q(),eO()).optional()}),VM=X({type:Z(`audio`),data:fM,mimeType:q(),annotations:hM.optional(),_meta:fO(q(),eO()).optional()}),HM=X({type:Z(`tool_use`),name:q(),id:q(),input:fO(q(),eO()),_meta:fO(q(),eO()).optional()}),UM=X({type:Z(`resource`),resource:sO([dM,pM]),annotations:hM.optional(),_meta:fO(q(),eO()).optional()}),WM=gM.extend({type:Z(`resource_link`)}),GM=sO([zM,BM,VM,WM,UM]),KM=X({role:mM,content:GM}),qM=vj.extend({description:q().optional(),messages:Y(KM)}),JM=_j.extend({method:Z(`notifications/prompts/list_changed`),params:gj.optional()}),YM=X({title:q().optional(),readOnlyHint:KD().optional(),destructiveHint:KD().optional(),idempotentHint:KD().optional(),openWorldHint:KD().optional()}),XM=X({taskSupport:_O([`required`,`optional`,`forbidden`]).optional()}),ZM=X({...Pj.shape,...Nj.shape,description:q().optional(),inputSchema:X({type:Z(`object`),properties:fO(q(),oj).optional(),required:Y(q()).optional()}).catchall(eO()),outputSchema:X({type:Z(`object`),properties:fO(q(),oj).optional(),required:Y(q()).optional()}).catchall(eO()).optional(),annotations:YM.optional(),execution:XM.optional(),_meta:fO(q(),eO()).optional()}),QM=Xj.extend({method:Z(`tools/list`)}),$M=Zj.extend({tools:Y(ZM)}),eN=vj.extend({content:Y(GM).default([]),structuredContent:fO(q(),eO()).optional(),isError:KD().optional()});eN.or(vj.extend({toolResult:eO()}));var tN=pj.extend({name:q(),arguments:fO(q(),eO()).optional()}),nN=hj.extend({method:Z(`tools/call`),params:tN}),rN=_j.extend({method:Z(`notifications/tools/list_changed`),params:gj.optional()});X({autoRefresh:KD().default(!0),debounceMs:J().int().nonnegative().default(300)});var iN=_O([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),aN=fj.extend({level:iN}),oN=hj.extend({method:Z(`logging/setLevel`),params:aN}),sN=gj.extend({level:iN,logger:q().optional(),data:eO()}),cN=_j.extend({method:Z(`notifications/message`),params:sN}),lN=X({hints:Y(X({name:q().optional()})).optional(),costPriority:J().min(0).max(1).optional(),speedPriority:J().min(0).max(1).optional(),intelligencePriority:J().min(0).max(1).optional()}),uN=X({mode:_O([`auto`,`required`,`none`]).optional()}),dN=X({type:Z(`tool_result`),toolUseId:q().describe(`The unique identifier for the corresponding tool call.`),content:Y(GM).default([]),structuredContent:X({}).loose().optional(),isError:KD().optional(),_meta:fO(q(),eO()).optional()}),fN=lO(`type`,[zM,BM,VM]),pN=lO(`type`,[zM,BM,VM,HM,dN]),mN=X({role:mM,content:sO([pN,Y(pN)]),_meta:fO(q(),eO()).optional()}),hN=pj.extend({messages:Y(mN),modelPreferences:lN.optional(),systemPrompt:q().optional(),includeContext:_O([`none`,`thisServer`,`allServers`]).optional(),temperature:J().optional(),maxTokens:J().int(),stopSequences:Y(q()).optional(),metadata:oj.optional(),tools:Y(ZM).optional(),toolChoice:uN.optional()}),gN=hj.extend({method:Z(`sampling/createMessage`),params:hN}),_N=vj.extend({model:q(),stopReason:xO(_O([`endTurn`,`stopSequence`,`maxTokens`]).or(q())),role:mM,content:fN}),vN=vj.extend({model:q(),stopReason:xO(_O([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(q())),role:mM,content:sO([pN,Y(pN)])}),yN=X({type:Z(`boolean`),title:q().optional(),description:q().optional(),default:KD().optional()}),bN=X({type:Z(`string`),title:q().optional(),description:q().optional(),minLength:J().optional(),maxLength:J().optional(),format:_O([`email`,`uri`,`date`,`date-time`]).optional(),default:q().optional()}),xN=X({type:_O([`number`,`integer`]),title:q().optional(),description:q().optional(),minimum:J().optional(),maximum:J().optional(),default:J().optional()}),SN=X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),default:q().optional()}),CN=X({type:Z(`string`),title:q().optional(),description:q().optional(),oneOf:Y(X({const:q(),title:q()})),default:q().optional()}),wN=sO([sO([X({type:Z(`string`),title:q().optional(),description:q().optional(),enum:Y(q()),enumNames:Y(q()).optional(),default:q().optional()}),sO([SN,CN]),sO([X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({type:Z(`string`),enum:Y(q())}),default:Y(q()).optional()}),X({type:Z(`array`),title:q().optional(),description:q().optional(),minItems:J().optional(),maxItems:J().optional(),items:X({anyOf:Y(X({const:q(),title:q()}))}),default:Y(q()).optional()})])]),yN,bN,xN]),TN=sO([pj.extend({mode:Z(`form`).optional(),message:q(),requestedSchema:X({type:Z(`object`),properties:fO(q(),wN),required:Y(q()).optional()})}),pj.extend({mode:Z(`url`),message:q(),elicitationId:q(),url:q().url()})]),EN=hj.extend({method:Z(`elicitation/create`),params:TN}),DN=gj.extend({elicitationId:q()}),ON=_j.extend({method:Z(`notifications/elicitation/complete`),params:DN}),kN=vj.extend({action:_O([`accept`,`decline`,`cancel`]),content:GO(e=>e===null?void 0:e,fO(q(),sO([q(),J(),KD(),Y(q())])).optional())}),AN=X({type:Z(`ref/resource`),uri:q()}),jN=X({type:Z(`ref/prompt`),name:q()}),MN=fj.extend({ref:sO([jN,AN]),argument:X({name:q(),value:q()}),context:X({arguments:fO(q(),q()).optional()}).optional()}),NN=hj.extend({method:Z(`completion/complete`),params:MN}),PN=vj.extend({completion:oO({values:Y(q()).max(100),total:xO(J().int()),hasMore:xO(KD())})}),FN=X({uri:q().startsWith(`file://`),name:q().optional(),_meta:fO(q(),eO()).optional()}),IN=hj.extend({method:Z(`roots/list`),params:fj.optional()}),LN=vj.extend({roots:Y(FN)}),RN=_j.extend({method:Z(`notifications/roots/list_changed`),params:gj.optional()});sO([Gj,Vj,NN,oN,RM,FM,vM,bM,wM,OM,AM,nN,QM,rM,aM,oM,cM]),sO([Mj,Jj,Wj,RN,nM]),sO([Aj,_N,vN,kN,LN,iM,sM,eM]),sO([Gj,gN,EN,IN,rM,aM,oM,cM]),sO([Mj,Jj,cN,MM,EM,rN,JM,nM,ON]),sO([Aj,Uj,PN,qM,IM,yM,xM,TM,eN,$M,iM,sM,eM]);var zN=class e extends Error{constructor(e,t,n){super(`MCP error ${e}: ${t}`),this.code=e,this.data=n,this.name=`McpError`}static fromError(t,n,r){if(t===Ej.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new BN(e.elicitations,n)}return new e(t,n,r)}},BN=class extends zN{constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(Ej.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}};function VN(e){return e===`completed`||e===`failed`||e===`cancelled`}function HN(e){let t=BE(e)?.method;if(!t)throw Error(`Schema is missing a method literal`);let n=VE(t);if(typeof n!=`string`)throw Error(`Schema method literal must be a string`);return n}function UN(e,t){let n=zE(e,t);if(!n.success)throw n.error;return n.data}var WN=class{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(Mj,e=>{this._oncancel(e)}),this.setNotificationHandler(Jj,e=>{this._onprogress(e)}),this.setRequestHandler(Gj,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(rM,async(e,t)=>{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new zN(Ej.InvalidParams,`Failed to retrieve task: Task not found`);return{...n}}),this.setRequestHandler(aM,async(e,t)=>{let n=async()=>{let r=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(r,t.sessionId);){if(e.type===`response`||e.type===`error`){let t=e.message,n=t.id,r=this._requestResolvers.get(n);if(r){if(this._requestResolvers.delete(n),e.type===`response`)r(t);else{let e=t;r(new zN(e.error.code,e.error.message,e.error.data))}}else{let t=e.type===`response`?`Response`:`Error`;this._onerror(Error(`${t} handler missing for request ${n}`))}continue}await this._transport?.send(e.message,{relatedRequestId:t.requestId})}}let i=await this._taskStore.getTask(r,t.sessionId);if(!i)throw new zN(Ej.InvalidParams,`Task not found: ${r}`);if(!VN(i.status))return await this._waitForTaskUpdate(r,t.signal),await n();if(VN(i.status)){let e=await this._taskStore.getTaskResult(r,t.sessionId);return this._clearTaskQueue(r),{...e,_meta:{...e._meta,[aj]:{taskId:r}}}}return await n()};return await n()}),this.setRequestHandler(oM,async(e,t)=>{try{let{tasks:n,nextCursor:r}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:n,nextCursor:r,_meta:{}}}catch(e){throw new zN(Ej.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(cM,async(e,t)=>{try{let n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new zN(Ej.InvalidParams,`Task not found: ${e.params.taskId}`);if(VN(n.status))throw new zN(Ej.InvalidParams,`Cannot cancel task in terminal status: ${n.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,`cancelled`,`Client cancelled task execution.`,t.sessionId),this._clearTaskQueue(e.params.taskId);let r=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!r)throw new zN(Ej.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...r}}catch(e){throw e instanceof zN?e:new zN(Ej.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){e.params.requestId&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let n=Date.now()-t.startTime;if(t.maxTotalTimeout&&n>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),zN.fromError(Ej.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:n});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){let t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw Error(`Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.`);this._transport=e;let t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};let n=this.transport?.onerror;this._transport.onerror=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Tj(e)||Oj(e)?this._onresponse(e):xj(e)?this._onrequest(e,t):Cj(e)?this._onnotification(e):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){let e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(let e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();for(let e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();let t=zN.fromError(Ej.ConnectionClosed,`Connection closed`);this._transport=void 0,this.onclose?.();for(let n of e.values())n(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){let t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;t!==void 0&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let n=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,r=this._transport,i=e.params?._meta?.[aj]?.taskId;if(n===void 0){let t={jsonrpc:`2.0`,id:e.id,error:{code:Ej.MethodNotFound,message:`Method not found`}};i&&this._taskMessageQueue?this._enqueueTaskMessage(i,{type:`error`,message:t,timestamp:Date.now()},r?.sessionId).catch(e=>this._onerror(Error(`Failed to enqueue error response: ${e}`))):r?.send(t).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)));return}let a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);let o=mj(e.params)?e.params.task:void 0,s=this._taskStore?this.requestTaskStore(e,r?.sessionId):void 0,c={signal:a.signal,sessionId:r?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;let n={relatedRequestId:e.id};i&&(n.relatedTask={taskId:i}),await this.notification(t,n)},sendRequest:async(t,n,r)=>{if(a.signal.aborted)throw new zN(Ej.ConnectionClosed,`Request was cancelled`);let o={...r,relatedRequestId:e.id};i&&!o.relatedTask&&(o.relatedTask={taskId:i});let c=o.relatedTask?.taskId??i;return c&&s&&await s.updateTaskStatus(c,`input_required`),await this.request(t,n,o)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:i,taskStore:s,taskRequestedTtl:o?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{o&&this.assertTaskHandlerCapability(e.method)}).then(()=>n(e,c)).then(async t=>{if(a.signal.aborted)return;let n={result:t,jsonrpc:`2.0`,id:e.id};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`response`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)},async t=>{if(a.signal.aborted)return;let n={jsonrpc:`2.0`,id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:Ej.InternalError,message:t.message??`Internal error`,...t.data!==void 0&&{data:t.data}}};i&&this._taskMessageQueue?await this._enqueueTaskMessage(i,{type:`error`,message:n,timestamp:Date.now()},r?.sessionId):await r?.send(n)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(e.id)===a&&this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._requestResolvers.get(t);if(n){this._requestResolvers.delete(t),Tj(e)?n(e):n(new zN(e.error.code,e.error.message,e.error.data));return}let r=this._responseHandlers.get(t);if(r===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t);let i=!1;if(Tj(e)&&e.result&&typeof e.result==`object`){let n=e.result;if(n.task&&typeof n.task==`object`){let e=n.task;typeof e.taskId==`string`&&(i=!0,this._taskProgressTokens.set(e.taskId,t))}}i||this._progressHandlers.delete(t),Tj(e)?r(e):r(zN.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(e,t,n){let{task:r}=n??{};if(!r){try{yield{type:`result`,result:await this.request(e,t,n)}}catch(e){yield{type:`error`,error:e instanceof zN?e:new zN(Ej.InternalError,String(e))}}return}let i;try{let r=await this.request(e,eM,n);if(r.task)i=r.task.taskId,yield{type:`taskCreated`,task:r.task};else throw new zN(Ej.InternalError,`Task creation did not return a task`);for(;;){let e=await this.getTask({taskId:i},n);if(yield{type:`taskStatus`,task:e},VN(e.status)){e.status===`completed`?yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)}:e.status===`failed`?yield{type:`error`,error:new zN(Ej.InternalError,`Task ${i} failed`)}:e.status===`cancelled`&&(yield{type:`error`,error:new zN(Ej.InternalError,`Task ${i} was cancelled`)});return}if(e.status===`input_required`){yield{type:`result`,result:await this.getTaskResult({taskId:i},t,n)};return}let r=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,r)),n?.signal?.throwIfAborted()}}catch(e){yield{type:`error`,error:e instanceof zN?e:new zN(Ej.InternalError,String(e))}}}request(e,t,n){let{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a,task:o,relatedTask:s}=n??{};return new Promise((c,l)=>{let u=e=>{l(e)};if(!this._transport){u(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(e.method),o&&this.assertTaskCapability(e.method)}catch(e){u(e);return}n?.signal?.throwIfAborted();let d=this._requestMessageId++,f={...e,jsonrpc:`2.0`,id:d};n?.onprogress&&(this._progressHandlers.set(d,n.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:d}}),o&&(f.params={...f.params,task:o}),s&&(f.params={...f.params,_meta:{...f.params?._meta||{},[aj]:s}});let p=e=>{this._responseHandlers.delete(d),this._progressHandlers.delete(d),this._cleanupTimeout(d),this._transport?.send({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:d,reason:String(e)}},{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))),l(e instanceof zN?e:new zN(Ej.RequestTimeout,String(e)))};this._responseHandlers.set(d,e=>{if(!n?.signal?.aborted){if(e instanceof Error)return l(e);try{let n=zE(t,e.result);n.success?c(n.data):l(n.error)}catch(e){l(e)}}}),n?.signal?.addEventListener(`abort`,()=>{p(n?.signal?.reason)});let m=n?.timeout??6e4;this._setupTimeout(d,m,n?.maxTotalTimeout,()=>p(zN.fromError(Ej.RequestTimeout,`Request timed out`,{timeout:m})),n?.resetTimeoutOnProgress??!1);let h=s?.taskId;h?(this._requestResolvers.set(d,e=>{let t=this._responseHandlers.get(d);t?t(e):this._onerror(Error(`Response handler missing for side-channeled request ${d}`))}),this._enqueueTaskMessage(h,{type:`request`,message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(d),l(e)})):this._transport.send(f,{relatedRequestId:r,resumptionToken:i,onresumptiontoken:a}).catch(e=>{this._cleanupTimeout(d),l(e)})})}async getTask(e,t){return this.request({method:`tasks/get`,params:e},iM,t)}async getTaskResult(e,t,n){return this.request({method:`tasks/result`,params:e},t,n)}async listTasks(e,t){return this.request({method:`tasks/list`,params:e},sM,t)}async cancelTask(e,t){return this.request({method:`tasks/cancel`,params:e},lM,t)}async notification(e,t){if(!this._transport)throw Error(`Not connected`);this.assertNotificationCapability(e.method);let n=t?.relatedTask?.taskId;if(n){let r={...e,jsonrpc:`2.0`,params:{...e.params,_meta:{...e.params?._meta||{},[aj]:t.relatedTask}}};await this._enqueueTaskMessage(n,{type:`notification`,message:r,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;this._pendingDebouncedNotifications.add(e.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let n={...e,jsonrpc:`2.0`};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[aj]:t.relatedTask}}}),this._transport?.send(n,t).catch(e=>this._onerror(e))});return}let r={...e,jsonrpc:`2.0`};t?.relatedTask&&(r={...r,params:{...r.params,_meta:{...r.params?._meta||{},[aj]:t.relatedTask}}}),await this._transport.send(r,t)}setRequestHandler(e,t){let n=HN(e);this.assertRequestHandlerCapability(n),this._requestHandlers.set(n,(n,r)=>{let i=UN(e,n);return Promise.resolve(t(i,r))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){let n=HN(e);this._notificationHandlers.set(n,n=>{let r=UN(e,n);return Promise.resolve(t(r))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){let t=this._taskProgressTokens.get(e);t!==void 0&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,n){if(!this._taskStore||!this._taskMessageQueue)throw Error(`Cannot enqueue task message: taskStore and taskMessageQueue are not configured`);let r=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,n,r)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){let n=await this._taskMessageQueue.dequeueAll(e,t);for(let t of n)if(t.type===`request`&&xj(t.message)){let n=t.message.id,r=this._requestResolvers.get(n);r?(r(new zN(Ej.InternalError,`Task cancelled or completed`)),this._requestResolvers.delete(n)):this._onerror(Error(`Resolver missing for request ${n} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let n=this._options?.defaultTaskPollInterval??1e3;try{let t=await this._taskStore?.getTask(e);t?.pollInterval&&(n=t.pollInterval)}catch{}return new Promise((e,r)=>{if(t.aborted){r(new zN(Ej.InvalidRequest,`Request cancelled`));return}let i=setTimeout(e,n);t.addEventListener(`abort`,()=>{clearTimeout(i),r(new zN(Ej.InvalidRequest,`Request cancelled`))},{once:!0})})}requestTaskStore(e,t){let n=this._taskStore;if(!n)throw Error(`No task store configured`);return{createTask:async r=>{if(!e)throw Error(`No request provided`);return await n.createTask(r,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{let r=await n.getTask(e,t);if(!r)throw new zN(Ej.InvalidParams,`Failed to retrieve task: Task not found`);return r},storeTaskResult:async(e,r,i)=>{await n.storeTaskResult(e,r,i,t);let a=await n.getTask(e,t);if(a){let t=nM.parse({method:`notifications/tasks/status`,params:a});await this.notification(t),VN(a.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>n.getTaskResult(e,t),updateTaskStatus:async(e,r,i)=>{let a=await n.getTask(e,t);if(!a)throw new zN(Ej.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if(VN(a.status))throw new zN(Ej.InvalidParams,`Cannot update task "${e}" from terminal status "${a.status}" to "${r}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await n.updateTaskStatus(e,r,i,t);let o=await n.getTask(e,t);if(o){let t=nM.parse({method:`notifications/tasks/status`,params:o});await this.notification(t),VN(o.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>n.listTasks(e,t)}}};function GN(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function KN(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=GN(a)&&GN(i)?{...a,...i}:i}return n}var qN=`modulepreload`,JN=function(e,t){return new URL(e,t).href},YN={},XN=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=JN(t,n),t=s(t),t in YN)return;YN[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:qN,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};ij(),(e=>typeof d<`u`?d:typeof Proxy<`u`?new Proxy(e,{get:(e,t)=>(typeof d<`u`?d:e)[t]}):e)(function(e){if(typeof d<`u`)return d.apply(this,arguments);throw Error(`Dynamic require of "`+e+`" is not supported`)});var ZN=class extends WN{_registeredMethods=new Set;_eventSlots=new Map;onEventDispatch(e,t){}_ensureEventSlot(e){let t=this._eventSlots.get(e);if(!t){let n=this.eventSchemas[e];if(!n)throw Error(`Unknown event: ${String(e)}`);t={listeners:[]},this._eventSlots.set(e,t);let r=n.shape.method.value;this._registeredMethods.add(r);let i=t;super.setNotificationHandler(n,t=>{let n=t.params;this.onEventDispatch(e,n),i.onHandler?.(n);for(let e of[...i.listeners])e(n)})}return t}setEventHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", …) to add multiple listeners without replacing.`),n.onHandler=t}getEventHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}setRequestHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setRequestHandler`),super.setRequestHandler(e,t)};setNotificationHandler=(e,t)=>{this._assertMethodNotRegistered(e,`setNotificationHandler`),super.setNotificationHandler(e,t)};warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}replaceRequestHandler=(e,t)=>{let n=e.shape.method.value;this._registeredMethods.add(n),super.setRequestHandler(e,t)};_assertMethodNotRegistered(e,t){let n=e.shape.method.value;if(this._registeredMethods.has(n))throw Error(`Handler for "${n}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._registeredMethods.add(n)}},QN=`2026-01-26`,$N=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=kj.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},eP=sO([Z(`light`),Z(`dark`)]).describe(`Color theme preference for the host environment.`),tP=sO([Z(`inline`),Z(`fullscreen`),Z(`pip`)]).describe(`Display mode for UI presentation.`),nP=fO(sO([Z(`--color-background-primary`),Z(`--color-background-secondary`),Z(`--color-background-tertiary`),Z(`--color-background-inverse`),Z(`--color-background-ghost`),Z(`--color-background-info`),Z(`--color-background-danger`),Z(`--color-background-success`),Z(`--color-background-warning`),Z(`--color-background-disabled`),Z(`--color-text-primary`),Z(`--color-text-secondary`),Z(`--color-text-tertiary`),Z(`--color-text-inverse`),Z(`--color-text-ghost`),Z(`--color-text-info`),Z(`--color-text-danger`),Z(`--color-text-success`),Z(`--color-text-warning`),Z(`--color-text-disabled`),Z(`--color-border-primary`),Z(`--color-border-secondary`),Z(`--color-border-tertiary`),Z(`--color-border-inverse`),Z(`--color-border-ghost`),Z(`--color-border-info`),Z(`--color-border-danger`),Z(`--color-border-success`),Z(`--color-border-warning`),Z(`--color-border-disabled`),Z(`--color-ring-primary`),Z(`--color-ring-secondary`),Z(`--color-ring-inverse`),Z(`--color-ring-info`),Z(`--color-ring-danger`),Z(`--color-ring-success`),Z(`--color-ring-warning`),Z(`--font-sans`),Z(`--font-mono`),Z(`--font-weight-normal`),Z(`--font-weight-medium`),Z(`--font-weight-semibold`),Z(`--font-weight-bold`),Z(`--font-text-xs-size`),Z(`--font-text-sm-size`),Z(`--font-text-md-size`),Z(`--font-text-lg-size`),Z(`--font-heading-xs-size`),Z(`--font-heading-sm-size`),Z(`--font-heading-md-size`),Z(`--font-heading-lg-size`),Z(`--font-heading-xl-size`),Z(`--font-heading-2xl-size`),Z(`--font-heading-3xl-size`),Z(`--font-text-xs-line-height`),Z(`--font-text-sm-line-height`),Z(`--font-text-md-line-height`),Z(`--font-text-lg-line-height`),Z(`--font-heading-xs-line-height`),Z(`--font-heading-sm-line-height`),Z(`--font-heading-md-line-height`),Z(`--font-heading-lg-line-height`),Z(`--font-heading-xl-line-height`),Z(`--font-heading-2xl-line-height`),Z(`--font-heading-3xl-line-height`),Z(`--border-radius-xs`),Z(`--border-radius-sm`),Z(`--border-radius-md`),Z(`--border-radius-lg`),Z(`--border-radius-xl`),Z(`--border-radius-full`),Z(`--border-width-regular`),Z(`--shadow-hairline`),Z(`--shadow-sm`),Z(`--shadow-md`),Z(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),iO([q(),JD()]).describe(`Style variables for theming MCP apps. +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`),sO([q(),ZD()]).describe(`Style variables for theming MCP apps. Individual style keys are optional - hosts may provide any subset of these values. Values are strings containing CSS values (colors, sizes, font stacks, etc.). @@ -75,10 +75,10 @@ Values are strings containing CSS values (colors, sizes, font stacks, etc.). Note: This type uses \`Record\` rather than \`Partial>\` -for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:q().describe(`URL to open in the host's browser`)})});var eP=X({isError:UD().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),tP=X({isError:UD().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),nP=X({isError:UD().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var rP=X({connectDomains:Y(q()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). +for compatibility with Zod schema generation. Both are functionally equivalent for validation.`);X({method:Z(`ui/open-link`),params:X({url:q().describe(`URL to open in the host's browser`)})});var rP=X({isError:KD().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),iP=X({isError:KD().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),aP=X({isError:KD().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();X({method:Z(`ui/notifications/sandbox-proxy-ready`),params:X({})});var oP=X({connectDomains:Y(q()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket). - Maps to CSP \`connect-src\` directive -- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(q()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(q()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(q()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),iP=X({camera:X({}).optional().describe(`Request camera access. +- Empty or omitted → no network connections (secure default)`),resourceDomains:Y(q()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\n\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\n- Wildcard subdomains supported: `https://*.example.com`\n- Empty or omitted → no network resources (secure default)"),frameDomains:Y(q()).optional().describe("Origins for nested iframes.\n\n- Maps to CSP `frame-src` directive\n- Empty or omitted → no nested iframes allowed (`frame-src 'none'`)"),baseUriDomains:Y(q()).optional().describe("Allowed base URIs for the document.\n\n- Maps to CSP `base-uri` directive\n- Empty or omitted → only same origin allowed (`base-uri 'self'`)")}),sP=X({camera:X({}).optional().describe(`Request camera access. Maps to Permission Policy \`camera\` feature.`),microphone:X({}).optional().describe(`Request microphone access. @@ -86,7 +86,7 @@ Maps to Permission Policy \`geolocation\` feature.`),clipboardWrite:X({}).optional().describe(`Request clipboard write access. -Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:J().optional().describe(`New width in pixels.`),height:J().optional().describe(`New height in pixels.`)})});var aP=X({method:Z(`ui/notifications/tool-input`),params:X({arguments:lO(q(),ZD().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),oP=X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:lO(q(),ZD().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),sP=X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:q().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),cP=X({fonts:q().optional()}),lP=X({variables:$N.optional().describe(`CSS variables for theming the app.`),css:cP.optional().describe(`CSS blocks that apps can inject.`)}),uP=X({method:Z(`ui/resource-teardown`),params:X({})});lO(q(),ZD());var dP=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var fP=X({experimental:lO(q(),lO(q(),XD()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:UD().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:UD().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:iP.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:rP.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:dP.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:dP.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),pP=X({experimental:lO(q(),lO(q(),XD()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:X({listChanged:UD().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(QN).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:rP.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:iP.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:q().optional().describe(`Dedicated origin for view sandbox. +Maps to Permission Policy \`clipboard-write\` feature.`)});X({method:Z(`ui/notifications/size-changed`),params:X({width:J().optional().describe(`New width in pixels.`),height:J().optional().describe(`New height in pixels.`)})});var cP=X({method:Z(`ui/notifications/tool-input`),params:X({arguments:fO(q(),eO().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),lP=X({method:Z(`ui/notifications/tool-input-partial`),params:X({arguments:fO(q(),eO().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),uP=X({method:Z(`ui/notifications/tool-cancelled`),params:X({reason:q().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),dP=X({fonts:q().optional()}),fP=X({variables:nP.optional().describe(`CSS variables for theming the app.`),css:dP.optional().describe(`CSS blocks that apps can inject.`)}),pP=X({method:Z(`ui/resource-teardown`),params:X({})});fO(q(),eO());var mP=X({text:X({}).optional().describe(`Host supports text content blocks.`),image:X({}).optional().describe(`Host supports image content blocks.`),audio:X({}).optional().describe(`Host supports audio content blocks.`),resource:X({}).optional().describe(`Host supports resource content blocks.`),resourceLink:X({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:X({}).optional().describe(`Host supports structured content.`)});X({method:Z(`ui/notifications/request-teardown`),params:X({}).optional()});var hP=X({experimental:fO(q(),fO(q(),$D()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:X({}).optional().describe(`Host supports opening external URLs.`),downloadFile:X({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:X({listChanged:KD().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:X({listChanged:KD().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:X({}).optional().describe(`Host accepts log messages.`),sandbox:X({permissions:sP.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:oP.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:mP.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model's context for future turns.`),message:mP.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:X({tools:X({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),gP=X({experimental:fO(q(),fO(q(),$D()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:X({listChanged:KD().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:Y(tP).optional().describe(`Display modes the app supports.`)});X({method:Z(`ui/notifications/initialized`),params:X({}).optional()}),X({csp:oP.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:sP.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:q().optional().describe(`Dedicated origin for view sandbox. Useful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists. @@ -94,16 +94,16 @@ - Hash-based subdomains (e.g., \`{hash}.claudemcpcontent.com\`) - URL-derived subdomains (e.g., \`www-example-com.oaiusercontent.com\`) -If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:UD().optional().describe(`Visual boundary preference - true if view prefers a visible border. +If omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:KD().optional().describe(`Visual boundary preference - true if view prefers a visible border. Boolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts' defaults may vary. - \`true\`: request visible border + background - \`false\`: request no visible border + background -- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:QN.describe(`The display mode being requested.`)})});var mP=X({mode:QN.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),hP=iO([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:q().optional(),visibility:Y(hP).optional().describe(`Who can access this tool. Default: ["model", "app"] +- omitted: host decides border`)}),X({method:Z(`ui/request-display-mode`),params:X({mode:tP.describe(`The display mode being requested.`)})});var _P=X({mode:tP.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),vP=sO([Z(`model`),Z(`app`)]).describe(`Tool visibility scope - who can access the tool.`);X({resourceUri:q().optional(),visibility:Y(vP).optional().describe(`Who can access this tool. Default: ["model", "app"] - "model": Tool visible to and callable by the agent -- "app": Tool callable by the app from this server only`),csp:QD().optional(),permissions:QD().optional()}),X({mimeTypes:Y(q()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(iO([BM,VM])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(HM).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:q().describe(`HTML content to load into the inner iframe.`),sandbox:q().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:rP.optional().describe(`CSP configuration from resource metadata.`),permissions:iP.optional().describe(`Sandbox permissions from resource metadata.`)})});var gP=X({method:Z(`ui/notifications/tool-result`),params:ZM.describe(`Standard MCP tool execution result.`)}),_P=X({toolInfo:X({id:gj.optional().describe(`JSON-RPC id of the tools/call request.`),tool:JM.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:ZN.optional().describe(`Current color theme preference.`),styles:lP.optional().describe(`Style configuration for theming the app.`),displayMode:QN.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(QN).optional().describe(`Display modes the host supports.`),containerDimensions:iO([X({height:J().describe(`Fixed container height in pixels.`)}),X({maxHeight:iO([J(),JD()]).optional().describe(`Maximum container height in pixels.`)})]).and(iO([X({width:J().describe(`Fixed container width in pixels.`)}),X({maxWidth:iO([J(),JD()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other -container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:q().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:q().optional().describe(`User's timezone in IANA format.`),userAgent:q().optional().describe(`Host application identifier.`),platform:iO([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:UD().optional().describe(`Whether the device supports touch input.`),hover:UD().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:J().describe(`Top safe area inset in pixels.`),right:J().describe(`Right safe area inset in pixels.`),bottom:J().describe(`Bottom safe area inset in pixels.`),left:J().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),vP=X({method:Z(`ui/notifications/host-context-changed`),params:_P.describe(`Partial context update containing only changed fields.`)});X({method:Z(`ui/update-model-context`),params:X({content:Y(HM).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:lO(q(),ZD().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:Mj.describe(`App identification (name and version).`),appCapabilities:pP.describe(`Features and capabilities this app provides.`),protocolVersion:q().describe(`Protocol version this app supports.`)})});var yP=X({protocolVersion:q().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Mj.describe(`Host application identification and version.`),hostCapabilities:fP.describe(`Features and capabilities provided by the host.`),hostContext:_P.describe(`Rich context about the host environment.`)}).passthrough(),bP={target:`draft-2020-12`};async function xP(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](bP);if(n.vendor===`zod`){let{z:n}=await qN(async()=>{let{z:e}=await Promise.resolve().then(()=>(tj(),ej));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function SP(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var CP=class e extends JN{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:aP,toolinputpartial:oP,toolresult:gP,toolcancelled:sP,hostcontextchanged:vP};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||Rf({jitless:!0}),this.setRequestHandler(Hj,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=UN(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await SP(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await SP(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await xP(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await xP(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(uP,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler($M,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(YM,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},ZM,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},SM,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},gM,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?hN:mN;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},nP,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Dj,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},eP,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},tP,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},mP,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new XN(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:YN}},yP,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function wP({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,E.useState)(null),[s,c]=(0,E.useState)(!1),[l,u]=(0,E.useState)(null);return(0,E.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new XN(window.parent,window.parent);if(s=new CP(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function TP(e){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)({}),[a,o]=(0,E.useState)(),[s,c]=(0,E.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=wP({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,E.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function EP(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}function DP(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=TP(`Fanout trace detail`),[o,s]=(0,E.useState)(`waterfall`),c=r?.theme===`dark`;return(0,M.jsxs)(ed,{dark:c,children:[(0,M.jsx)(td,{title:i?.data.trace_id?`Trace ${MP(i.data.trace_id)}`:`Trace analysis`,summary:i?`${i.data.spans.length} spans across ${i.data.services.length} services`:void 0,onRefresh:()=>t(`trace_detail`),disabled:!e}),(0,M.jsx)(nd,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Finding a representative trace…`:void 0,retry:()=>void t(`trace_detail`)}),i&&i.data.spans.length===0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(id,{tall:!0,icon:(0,M.jsx)(Eu,{size:20,weight:`duotone`}),title:`No traces in this window`,children:`Try a wider time window.`}),(0,M.jsx)(ad,{left:pd(i.provenance.window),right:`No traces found`})]}),i&&i.data.spans.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(Dl,{cols:{base:2,sm:4},spacing:`sm`,px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,M.jsx)(od,{label:`Duration`,value:fd(i.data.duration_ms)}),(0,M.jsx)(od,{label:`Spans`,value:dd.format(i.data.spans.length)}),(0,M.jsx)(od,{label:`Services`,value:dd.format(i.data.services.length)}),(0,M.jsx)(od,{label:`Status`,value:i.data.has_error?`Error`:`OK`,color:i.data.has_error?`bad`:`ok`})]}),(0,M.jsx)(rd,{active:o,onChange:s,items:[{id:`waterfall`,label:`Waterfall`,count:i.data.spans.length},{id:`flame`,label:`Flame graph`},{id:`logs`,label:`Correlated logs`,count:i.data.logs.length}]}),o===`waterfall`&&(0,M.jsx)(OP,{spans:i.data.spans,dark:c,onSpan:t=>EP(e,`Investigate span ${t.span_id} (${t.service} ${t.operation}) in trace ${i.data.trace_id}.`)}),o===`flame`&&(0,M.jsx)(kP,{spans:i.data.spans,dark:c,onSpan:t=>EP(e,`Investigate span ${t.span_id} (${t.service} ${t.operation}) in trace ${i.data.trace_id}.`)}),o===`logs`&&(0,M.jsx)(jP,{entries:i.data.logs}),(0,M.jsx)(ad,{left:pd(i.provenance.window),right:`Trace ${MP(i.data.trace_id)}`})]})]})}function OP({spans:e,dark:t,onSpan:n}){let r=Math.min(...e.map(e=>new Date(e.start).valueOf())),i=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),a=Math.max(i-r,1),o=sd(e,8);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(I.ScrollContainer,{minWidth:680,children:(0,M.jsxs)(I,{highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,M.jsx)(I.Thead,{children:(0,M.jsxs)(I.Tr,{children:[(0,M.jsx)(I.Th,{w:230,children:`Operation`}),(0,M.jsx)(I.Th,{children:`Timeline`}),(0,M.jsx)(I.Th,{w:90,ta:`right`,children:`Duration`})]})}),(0,M.jsx)(I.Tbody,{children:o.pageItems.map(e=>{let i=(new Date(e.start).valueOf()-r)/a*100,o=Math.max(e.duration_ms/a*100,.6),s=e.status.toUpperCase().includes(`ERROR`);return(0,M.jsxs)(I.Tr,{tabIndex:0,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&n(e)},style:{cursor:`pointer`},children:[(0,M.jsx)(I.Td,{children:(0,M.jsxs)(uc,{gap:`xs`,wrap:`nowrap`,children:[(0,M.jsx)(P,{w:8,h:8,bg:ld(e.service,t),style:{borderRadius:`50%`,flex:`0 0 auto`}}),(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(vc,{fw:600,size:`sm`,truncate:!0,children:e.operation}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]})]})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vl,{label:`${e.service} · ${e.operation} · ${fd(e.duration_ms)}`,withArrow:!0,children:(0,M.jsx)(P,{pos:`relative`,h:14,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,M.jsx)(P,{pos:`absolute`,left:`${i}%`,w:`${Math.min(o,100-i)}%`,h:`100%`,bg:s?`bad`:ld(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})})}),(0,M.jsx)(I.Td,{ta:`right`,children:(0,M.jsx)(vc,{size:`sm`,ff:`monospace`,children:fd(e.duration_ms)})})]},e.span_id)})})]})}),(0,M.jsx)(cd,{...o,onChange:o.setPage})]})}function kP({spans:e,dark:t,onSpan:n}){let r=(0,E.useMemo)(()=>AP(e),[e]),i=[...new Set(e.map(e=>e.service))];return(0,M.jsxs)(jl,{px:{base:`md`,sm:`lg`},pb:`md`,gap:`xs`,children:[(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(uc,{gap:`md`,children:i.map(e=>(0,M.jsxs)(uc,{gap:5,children:[(0,M.jsx)(P,{w:8,h:8,bg:ld(e,t),style:{borderRadius:`50%`}}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e})]},e))}),(0,M.jsx)(xc,{variant:`light`,children:fd(r.total)})]}),(0,M.jsx)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,children:(0,M.jsxs)(P,{miw:760,children:[(0,M.jsx)(P,{pos:`relative`,h:22,mb:4,children:[0,25,50,75,100].map(e=>(0,M.jsx)(vc,{pos:`absolute`,left:`${e}%`,c:`dimmed`,size:`xs`,style:{transform:e===100?`translateX(-100%)`:e?`translateX(-50%)`:void 0},children:fd(r.total*e/100)},e))}),(0,M.jsxs)(P,{pos:`relative`,h:Math.max(150,r.laneCount*36+12),bg:`var(--mantine-color-default-hover)`,style:{overflow:`hidden`,borderRadius:`var(--mantine-radius-md)`},children:[[0,25,50,75,100].map(e=>(0,M.jsx)(P,{pos:`absolute`,left:`${e}%`,top:0,bottom:0,style:{borderLeft:`1px solid var(--mantine-color-default-border)`}},e)),r.frames.map(({span:e,lane:r,left:i,width:a})=>{let o=e.status.toUpperCase().includes(`ERROR`),s=a<7;return(0,M.jsx)(vl,{label:`${e.service} · ${e.operation} · ${fd(e.duration_ms)}`,withArrow:!0,children:(0,M.jsx)(Ac,{variant:`filled`,color:o?`bad`:ld(e.service,t),pos:`absolute`,left:`${i}%`,top:r*36+6,w:`${Math.max(a,.35)}%`,h:30,px:s?2:`xs`,size:`compact-xs`,onClick:()=>n(e),style:{overflow:`hidden`,minWidth:3},children:(0,M.jsxs)(vc,{component:`span`,size:`xs`,fw:700,truncate:!0,children:[s?``:e.operation,a>=12?` · ${fd(e.duration_ms)}`:``]})})},e.span_id)})]})]})})}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:`Width represents wall-clock duration; lanes preserve span hierarchy without overlap.`})]})}function AP(e){let t=Math.min(...e.map(e=>new Date(e.start).valueOf())),n=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),r=Math.max(n-t,1),i=new Map(e.map(e=>[e.span_id,e])),a=(e,t=new Set)=>{if(!e.parent_span_id||t.has(e.span_id))return 0;let n=i.get(e.parent_span_id);return n?(t.add(e.span_id),1+a(n,t)):0},o=e.map(e=>{let n=new Date(e.start).valueOf();return{span:e,depth:a(e),start:n,end:n+e.duration_ms,left:(n-t)/r*100,width:e.duration_ms/r*100}}).sort((e,t)=>e.depth-t.depth||e.start-t.start||t.span.duration_ms-e.span.duration_ms),s=[],c=0;for(let e of[...new Set(o.map(e=>e.depth))].sort((e,t)=>e-t)){let t=[];for(let n of o.filter(t=>t.depth===e)){let e=t.findIndex(e=>e<=n.start);e===-1&&(e=t.length),t[e]=n.end,s.push({...n,lane:c+e})}c+=Math.max(t.length,1)}return{frames:s,laneCount:c,total:r}}function jP({entries:e}){let t=sd(e,6);return e.length===0?(0,M.jsx)(id,{tall:!0,icon:(0,M.jsx)(wu,{size:20,weight:`duotone`}),title:`No correlated logs`,children:`No logs in this window carry the selected trace ID.`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(I.ScrollContainer,{minWidth:620,children:(0,M.jsxs)(I,{striped:!0,verticalSpacing:`xs`,children:[(0,M.jsx)(I.Thead,{children:(0,M.jsxs)(I.Tr,{children:[(0,M.jsx)(I.Th,{children:`Time`}),(0,M.jsx)(I.Th,{children:`Level`}),(0,M.jsx)(I.Th,{children:`Service`}),(0,M.jsx)(I.Th,{children:`Message`})]})}),(0,M.jsx)(I.Tbody,{children:t.pageItems.map((e,n)=>(0,M.jsxs)(I.Tr,{children:[(0,M.jsx)(I.Td,{style:{whiteSpace:`nowrap`},children:(0,M.jsx)(vc,{size:`xs`,ff:`monospace`,children:new Date(e.time).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(xc,{size:`sm`,color:ud(e.severity),variant:`light`,children:e.severity||`LOG`})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vc,{fw:600,size:`sm`,children:e.service})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vc,{size:`sm`,lineClamp:2,title:e.body,children:e.body})})]},`${e.time}-${t.from+n}`))})]})}),(0,M.jsx)(cd,{...t,onChange:t.setPage})]})}function MP(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}(0,Au.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(E.StrictMode,{children:(0,M.jsx)(DP,{})})); +- "app": Tool callable by the app from this server only`),csp:tO().optional(),permissions:tO().optional()}),X({mimeTypes:Y(q()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),X({method:Z(`ui/download-file`),params:X({contents:Y(sO([UM,WM])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),X({method:Z(`ui/message`),params:X({role:Z(`user`).describe(`Message role, currently only "user" is supported.`),content:Y(GM).describe(`Message content blocks (text, image, etc.).`)})}),X({method:Z(`ui/notifications/sandbox-resource-ready`),params:X({html:q().describe(`HTML content to load into the inner iframe.`),sandbox:q().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:oP.optional().describe(`CSP configuration from resource metadata.`),permissions:sP.optional().describe(`Sandbox permissions from resource metadata.`)})});var yP=X({method:Z(`ui/notifications/tool-result`),params:eN.describe(`Standard MCP tool execution result.`)}),bP=X({toolInfo:X({id:yj.optional().describe(`JSON-RPC id of the tools/call request.`),tool:ZM.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:eP.optional().describe(`Current color theme preference.`),styles:fP.optional().describe(`Style configuration for theming the app.`),displayMode:tP.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:Y(tP).optional().describe(`Display modes the host supports.`),containerDimensions:sO([X({height:J().describe(`Fixed container height in pixels.`)}),X({maxHeight:sO([J(),ZD()]).optional().describe(`Maximum container height in pixels.`)})]).and(sO([X({width:J().describe(`Fixed container width in pixels.`)}),X({maxWidth:sO([J(),ZD()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other +container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:q().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:q().optional().describe(`User's timezone in IANA format.`),userAgent:q().optional().describe(`Host application identifier.`),platform:sO([Z(`web`),Z(`desktop`),Z(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:X({touch:KD().optional().describe(`Whether the device supports touch input.`),hover:KD().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:X({top:J().describe(`Top safe area inset in pixels.`),right:J().describe(`Right safe area inset in pixels.`),bottom:J().describe(`Bottom safe area inset in pixels.`),left:J().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),xP=X({method:Z(`ui/notifications/host-context-changed`),params:bP.describe(`Partial context update containing only changed fields.`)});X({method:Z(`ui/update-model-context`),params:X({content:Y(GM).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:fO(q(),eO().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),X({method:Z(`ui/initialize`),params:X({appInfo:Fj.describe(`App identification (name and version).`),appCapabilities:gP.describe(`Features and capabilities this app provides.`),protocolVersion:q().describe(`Protocol version this app supports.`)})});var SP=X({protocolVersion:q().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Fj.describe(`Host application identification and version.`),hostCapabilities:hP.describe(`Features and capabilities provided by the host.`),hostContext:bP.describe(`Rich context about the host environment.`)}).passthrough(),CP={target:`draft-2020-12`};async function wP(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](CP);if(n.vendor===`zod`){let{z:n}=await XN(async()=>{let{z:e}=await Promise.resolve().then(()=>(ij(),rj));return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function TP(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}var EP=class e extends ZN{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:cP,toolinputpartial:lP,toolresult:yP,toolcancelled:uP,hostcontextchanged:xP};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||Vf({jitless:!0}),this.setRequestHandler(Gj,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=KN(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await TP(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await TP(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await wP(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await wP(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(pP,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(nN,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(QM,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){if(e===`sampling/createMessage`&&!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`)}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},eN,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},TM,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},yM,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?vN:_N;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},aP,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Aj,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},rP,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},iP,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},_P,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new $N(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:QN}},SP,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function DP({appInfo:e,capabilities:t,onAppCreated:n,autoResize:r=!0,strict:i}){let[a,o]=(0,E.useState)(null),[s,c]=(0,E.useState)(!1),[l,u]=(0,E.useState)(null);return(0,E.useEffect)(()=>{let a=!0,s;async function l(){try{let l=new $N(window.parent,window.parent);if(s=new EP(e,t,{autoResize:r,strict:i}),n?.(s),await s.connect(l),!a){s.close();return}o(s),c(!0),u(null)}catch(e){a&&(o(null),c(!1),u(e instanceof Error?e:Error(`Failed to connect`)))}}return l(),()=>{a=!1,s?.close()}},[]),{app:a,isConnected:s,error:l}}function OP(e){let[t,n]=(0,E.useState)(null),[r,i]=(0,E.useState)({}),[a,o]=(0,E.useState)(),[s,c]=(0,E.useState)(null);function l(e){if(e.isError){c(`This view could not be refreshed. Please try again.`);return}c(null),n(e.structuredContent)}let u=DP({appInfo:{name:e,version:`1.0.0`},capabilities:{},onAppCreated:e=>{e.ontoolinput=e=>{i(e.arguments??{})},e.ontoolresult=l,e.onhostcontextchanged=e=>o(t=>({...t,...e})),e.onerror=e=>{console.error(`MCP app error`,e),c(`This view could not be refreshed. Please try again.`)}}});(0,E.useEffect)(()=>{u.app&&o(u.app.getHostContext())},[u.app]);async function d(e){if(u.app)try{l(await u.app.callServerTool({name:e,arguments:r}))}catch(t){console.error(`Tool call ${e} failed`,t),c(`This view could not be refreshed. Please try again.`)}}return{...u,result:t,toolInput:r,host:a,toolError:s,callTool:d}}async function kP(e,t){e&&await e.sendMessage({role:`user`,content:[{type:`text`,text:t}]})}function AP(){let{app:e,callTool:t,error:n,host:r,result:i,toolError:a}=OP(`Fanout trace detail`),[o,s]=(0,E.useState)(`waterfall`),c=r?.theme===`dark`;return(0,M.jsxs)(ed,{dark:c,children:[(0,M.jsx)(td,{title:i?.data.trace_id?`Trace ${FP(i.data.trace_id)}`:`Trace analysis`,summary:i?`${i.data.spans.length} spans across ${i.data.services.length} services`:void 0,onRefresh:()=>t(`trace_detail`),disabled:!e}),(0,M.jsx)(nd,{error:a??(n?`This view could not be loaded. Please try again.`:null),loading:!i&&!n&&!a?`Finding a representative trace…`:void 0,retry:()=>void t(`trace_detail`)}),i&&i.data.spans.length===0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(id,{tall:!0,icon:(0,M.jsx)(Eu,{size:20,weight:`duotone`}),title:`No traces in this window`,children:`Try a wider time window.`}),(0,M.jsx)(ad,{left:md(i.provenance.window),right:`No traces found`})]}),i&&i.data.spans.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(Dl,{cols:{base:2,sm:4},spacing:`sm`,px:{base:`md`,sm:`lg`},pb:`md`,children:[(0,M.jsx)(od,{label:`Duration`,value:pd(i.data.duration_ms)}),(0,M.jsx)(od,{label:`Spans`,value:fd.format(i.data.spans.length)}),(0,M.jsx)(od,{label:`Services`,value:fd.format(i.data.services.length)}),(0,M.jsx)(od,{label:`Status`,value:i.data.has_error?`Error`:`OK`,color:i.data.has_error?`bad`:`ok`})]}),(0,M.jsx)(rd,{active:o,onChange:s,items:[{id:`waterfall`,label:`Waterfall`,count:i.data.spans.length},{id:`flame`,label:`Flame graph`},{id:`logs`,label:`Correlated logs`,count:i.data.logs.length}]}),o===`waterfall`&&(0,M.jsx)(jP,{spans:i.data.spans,dark:c,onSpan:t=>kP(e,`Investigate span ${t.span_id} (${t.service} ${t.operation}) in trace ${i.data.trace_id}.`)}),o===`flame`&&(0,M.jsx)(MP,{spans:i.data.spans,dark:c,onSpan:t=>kP(e,`Investigate span ${t.span_id} (${t.service} ${t.operation}) in trace ${i.data.trace_id}.`)}),o===`logs`&&(0,M.jsx)(PP,{entries:i.data.logs}),(0,M.jsx)(ad,{left:md(i.provenance.window),right:`Trace ${FP(i.data.trace_id)}`})]})]})}function jP({spans:e,dark:t,onSpan:n}){let r=Math.min(...e.map(e=>new Date(e.start).valueOf())),i=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),a=Math.max(i-r,1),o=sd(e,8);return(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(I.ScrollContainer,{minWidth:680,children:(0,M.jsxs)(I,{highlightOnHover:!0,verticalSpacing:`sm`,children:[(0,M.jsx)(I.Thead,{children:(0,M.jsxs)(I.Tr,{children:[(0,M.jsx)(I.Th,{w:230,children:`Operation`}),(0,M.jsx)(I.Th,{children:`Timeline`}),(0,M.jsx)(I.Th,{w:90,ta:`right`,children:`Duration`})]})}),(0,M.jsx)(I.Tbody,{children:o.pageItems.map(e=>{let i=(new Date(e.start).valueOf()-r)/a*100,o=Math.max(e.duration_ms/a*100,.6),s=e.status.toUpperCase().includes(`ERROR`);return(0,M.jsxs)(I.Tr,{tabIndex:0,onClick:()=>n(e),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&n(e)},style:{cursor:`pointer`},children:[(0,M.jsx)(I.Td,{children:(0,M.jsxs)(uc,{gap:`xs`,wrap:`nowrap`,children:[(0,M.jsx)(P,{w:8,h:8,bg:ud(e.service,t),style:{borderRadius:`50%`,flex:`0 0 auto`}}),(0,M.jsxs)(P,{miw:0,children:[(0,M.jsx)(vc,{fw:600,size:`sm`,truncate:!0,children:e.operation}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]})]})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vl,{label:`${e.service} · ${e.operation} · ${pd(e.duration_ms)}`,withArrow:!0,children:(0,M.jsx)(P,{pos:`relative`,h:14,bg:`var(--mantine-color-default-hover)`,role:`img`,"aria-label":`${e.operation} on ${e.service} took ${pd(e.duration_ms)}`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,M.jsx)(P,{pos:`absolute`,left:`${i}%`,w:`${Math.min(o,100-i)}%`,h:`100%`,bg:s?`bad`:ud(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})})}),(0,M.jsx)(I.Td,{ta:`right`,children:(0,M.jsx)(vc,{size:`sm`,ff:`monospace`,children:pd(e.duration_ms)})})]},e.span_id)})})]})}),(0,M.jsx)(ld,{...o,onChange:o.setPage})]})}function MP({spans:e,dark:t,onSpan:n}){let r=(0,E.useMemo)(()=>NP(e),[e]),i=[...new Set(e.map(e=>e.service))];return(0,M.jsxs)(jl,{px:{base:`md`,sm:`lg`},pb:`md`,gap:`xs`,children:[(0,M.jsxs)(uc,{justify:`space-between`,children:[(0,M.jsx)(uc,{gap:`md`,children:i.map(e=>(0,M.jsxs)(uc,{gap:5,children:[(0,M.jsx)(P,{w:8,h:8,bg:ud(e,t),style:{borderRadius:`50%`}}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:e})]},e))}),(0,M.jsx)(xc,{variant:`light`,children:pd(r.total)})]}),(0,M.jsx)(_s,{withBorder:!0,radius:`md`,p:`sm`,children:(0,M.jsx)(us,{type:`auto`,offsetScrollbars:!0,children:(0,M.jsxs)(P,{miw:760,children:[(0,M.jsx)(P,{pos:`relative`,h:22,mb:4,children:[0,25,50,75,100].map(e=>(0,M.jsx)(vc,{pos:`absolute`,left:`${e}%`,c:`dimmed`,size:`xs`,style:{transform:e===100?`translateX(-100%)`:e?`translateX(-50%)`:void 0},children:pd(r.total*e/100)},e))}),(0,M.jsxs)(P,{pos:`relative`,h:Math.max(150,r.laneCount*36+12),bg:`var(--mantine-color-default-hover)`,style:{overflow:`hidden`,borderRadius:`var(--mantine-radius-md)`},children:[[0,25,50,75,100].map(e=>(0,M.jsx)(P,{pos:`absolute`,left:`${e}%`,top:0,bottom:0,style:{borderLeft:`1px solid var(--mantine-color-default-border)`}},e)),r.frames.map(({span:e,lane:r,left:i,width:a})=>{let o=e.status.toUpperCase().includes(`ERROR`),s=a<7;return(0,M.jsx)(vl,{label:`${e.service} · ${e.operation} · ${pd(e.duration_ms)}`,withArrow:!0,children:(0,M.jsx)(Ac,{variant:`filled`,color:o?`bad`:ud(e.service,t),"aria-label":`${e.operation} · ${e.service} · ${pd(e.duration_ms)}`,pos:`absolute`,left:`${i}%`,top:r*36+6,w:`${Math.max(a,.35)}%`,h:30,px:s?2:`xs`,size:`compact-xs`,onClick:()=>n(e),style:{overflow:`hidden`,minWidth:3},children:(0,M.jsxs)(vc,{component:`span`,size:`xs`,fw:700,truncate:!0,children:[s?``:e.operation,a>=12?` · ${pd(e.duration_ms)}`:``]})})},e.span_id)})]})]})})}),(0,M.jsx)(vc,{c:`dimmed`,size:`xs`,children:`Width represents wall-clock duration; lanes preserve span hierarchy without overlap.`})]})}function NP(e){let t=Math.min(...e.map(e=>new Date(e.start).valueOf())),n=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),r=Math.max(n-t,1),i=new Map(e.map(e=>[e.span_id,e])),a=(e,t=new Set)=>{if(!e.parent_span_id||t.has(e.span_id))return 0;let n=i.get(e.parent_span_id);return n?(t.add(e.span_id),1+a(n,t)):0},o=e.map(e=>{let n=new Date(e.start).valueOf();return{span:e,depth:a(e),start:n,end:n+e.duration_ms,left:(n-t)/r*100,width:e.duration_ms/r*100}}).sort((e,t)=>e.depth-t.depth||e.start-t.start||t.span.duration_ms-e.span.duration_ms),s=[],c=0;for(let e of[...new Set(o.map(e=>e.depth))].sort((e,t)=>e-t)){let t=[];for(let n of o.filter(t=>t.depth===e)){let e=t.findIndex(e=>e<=n.start);e===-1&&(e=t.length),t[e]=n.end,s.push({...n,lane:c+e})}c+=Math.max(t.length,1)}return{frames:s,laneCount:c,total:r}}function PP({entries:e}){let t=sd(e,6);return e.length===0?(0,M.jsx)(id,{tall:!0,icon:(0,M.jsx)(wu,{size:20,weight:`duotone`}),title:`No correlated logs`,children:`No logs in this window carry the selected trace ID.`}):(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(I.ScrollContainer,{minWidth:620,children:(0,M.jsxs)(I,{striped:!0,verticalSpacing:`xs`,children:[(0,M.jsx)(I.Thead,{children:(0,M.jsxs)(I.Tr,{children:[(0,M.jsxs)(I.Th,{children:[`Time (`,hd(t.pageItems[0]?.time),`)`]}),(0,M.jsx)(I.Th,{children:`Level`}),(0,M.jsx)(I.Th,{children:`Service`}),(0,M.jsx)(I.Th,{children:`Message`})]})}),(0,M.jsx)(I.Tbody,{children:t.pageItems.map((e,n)=>(0,M.jsxs)(I.Tr,{children:[(0,M.jsx)(I.Td,{style:{whiteSpace:`nowrap`},children:(0,M.jsx)(vc,{size:`xs`,ff:`monospace`,title:gd(e.time),children:new Date(e.time).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`,second:`2-digit`})})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(xc,{size:`sm`,color:dd(e.severity),variant:`light`,children:e.severity||`LOG`})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vc,{fw:600,size:`sm`,children:e.service})}),(0,M.jsx)(I.Td,{children:(0,M.jsx)(vc,{size:`sm`,lineClamp:2,title:e.body,children:e.body})})]},`${e.time}-${t.from+n}`))})]})}),(0,M.jsx)(ld,{...t,onChange:t.setPage})]})}function FP(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}(0,Au.createRoot)(document.getElementById(`root`)).render((0,M.jsx)(E.StrictMode,{children:(0,M.jsx)(AP,{})}));
diff --git a/internal/ui/dist/assets/chat-DuN0TFYv.js b/internal/ui/dist/assets/chat-B-nb-Yp3.js similarity index 53% rename from internal/ui/dist/assets/chat-DuN0TFYv.js rename to internal/ui/dist/assets/chat-B-nb-Yp3.js index 3fb853fc9..fe17fa291 100644 --- a/internal/ui/dist/assets/chat-DuN0TFYv.js +++ b/internal/ui/dist/assets/chat-B-nb-Yp3.js @@ -1,8 +1,8 @@ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/mcp-app-frame-BZJusU6-.js","assets/brand-MzZ03bSa.js","assets/auth-BeUORN-q.js","assets/use-computed-color-scheme-6JIsge00.js"])))=>i.map(i=>d[i]); -import{$ as e,C as t,St as n,_ as r,_t as i,a,c as o,d as s,f as c,gt as l,h as u,i as d,j as f,k as p,l as m,mt as h,n as g,o as _,p as v,r as y,s as b,u as x,x as S,y as C,yt as w}from"./brand-MzZ03bSa.js";import{t as T}from"./Tooltip-BJiO7C_G.js";import{a as E,o as D,t as O}from"./preload-helper-BL3qEkUh.js";import{n as k,t as ee}from"./copy-Bzg2uCpz.js";function te(){return`development`}var A=n(l(),1),j=h(),ne=[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`,`boxSizing`,`fontFamily`,`fontSize`,`fontStyle`,`fontWeight`,`letterSpacing`,`lineHeight`,`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`,`tabSize`,`textIndent`,`textRendering`,`textTransform`,`width`,`wordBreak`,`wordSpacing`,`scrollbarGutter`],re={"min-height":`0`,"max-height":`none`,height:`0`,visibility:`hidden`,overflow:`hidden`,position:`absolute`,"z-index":`-1000`,top:`0`,right:`0`,display:`block`};function M(e){Object.keys(re).forEach(t=>{e.style.setProperty(t,re[t],`important`)})}function ie(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of ne)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var N=null;function ae(e,t,n=1,r=1/0){N||(N=document.createElement(`textarea`),N.setAttribute(`tabindex`,`-1`),N.setAttribute(`aria-hidden`,`true`),N.setAttribute(`aria-label`,`autosize measurement`),M(N)),N.parentNode===null&&document.body.appendChild(N);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{N.style[e]=o[e]}),M(N),N.value=t;let c=s===`border-box`?N.scrollHeight+a:N.scrollHeight-i;N.value=t,c=s===`border-box`?N.scrollHeight+a:N.scrollHeight-i,N.value=`x`;let l=N.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function oe({maxRows:t,minRows:n,onChange:r,ref:i,...a}){let o=a.value!==void 0,s=(0,A.useRef)(null),c=e(s,i),l=(0,A.useRef)(0),u=(0,A.useRef)(0),d=()=>{let e=s.current;if(!e)return;let r=ie(e);if(!r)return;let[i]=ae(r,e.value||e.placeholder||`x`,n,t);l.current!==i&&(l.current=i,e.style.setProperty(`height`,`${i}px`,`important`))},f=e=>{o||d(),r?.(e)};return(0,A.useLayoutEffect)(d),(0,A.useEffect)(()=>{let e=()=>d();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,A.useEffect)(()=>{let e=s.current;if(!e||typeof ResizeObserver>`u`)return;u.current=e.offsetWidth;let t=new ResizeObserver(()=>{s.current&&s.current.offsetWidth!==u.current&&(u.current=s.current.offsetWidth,d())});return t.observe(e),()=>t.disconnect()},[]),(0,A.useEffect)(()=>{let e=()=>d();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,A.useEffect)(()=>{let e=e=>{if(s.current?.form===e.target&&!o){let e=s.current.value;requestAnimationFrame(()=>{s.current&&e!==s.current.value&&d()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[o]),(0,j.jsx)(`textarea`,{rows:n,...a,onChange:f,ref:c})}var se=t(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=f([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&te()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,j.jsx)(v,{component:l?oe:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});se.classes=v.classes,se.displayName=`@mantine/core/Textarea`;var ce={root:`m_d08caa0`},le=t(e=>{let t=f(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t;return(0,j.jsx)(S,{...p({name:`Typography`,classes:ce,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s})(`root`),...c})});le.classes=ce,le.displayName=`@mantine/core/Typography`;var ue=new Map([[`bold`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),A.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),de=new Map([[`bold`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),A.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,A.createElement(A.Fragment,null,A.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),fe=A.forwardRef((e,t)=>A.createElement(a,{ref:t,...e,weights:ue}));fe.displayName=`PaperPlaneTiltIcon`;var pe=fe,me=A.forwardRef((e,t)=>A.createElement(a,{ref:t,...e,weights:de}));me.displayName=`StopIcon`;var he=me;function ge(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var _e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ve=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ye={};function be(e,t){return((t||ye).jsx?ve:_e).test(e)}var xe=/[ \t\n\f\r]/g;function Se(e){return typeof e==`object`?e.type===`text`&&Ce(e.value):Ce(e)}function Ce(e){return e.replace(xe,``)===``}var we=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};we.prototype.normal={},we.prototype.property={},we.prototype.space=void 0;function Te(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new we(n,r,t)}function Ee(e){return e.toLowerCase()}var P=class{constructor(e,t){this.attribute=t,this.property=e}};P.prototype.attribute=``,P.prototype.booleanish=!1,P.prototype.boolean=!1,P.prototype.commaOrSpaceSeparated=!1,P.prototype.commaSeparated=!1,P.prototype.defined=!1,P.prototype.mustUseProperty=!1,P.prototype.number=!1,P.prototype.overloadedBoolean=!1,P.prototype.property=``,P.prototype.spaceSeparated=!1,P.prototype.space=void 0;var De=w({boolean:()=>F,booleanish:()=>I,commaOrSpaceSeparated:()=>z,commaSeparated:()=>Ae,number:()=>L,overloadedBoolean:()=>ke,spaceSeparated:()=>R}),Oe=0,F=je(),I=je(),ke=je(),L=je(),R=je(),Ae=je(),z=je();function je(){return 2**++Oe}var Me=Object.keys(De),Ne=class extends P{constructor(e,t,n,r){let i=-1;if(super(e,t),Pe(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&qe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ke,Xe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ke.test(e)){let n=e.replace(Ge,Ye);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ne}return new i(r,t)}function Ye(e){return`-`+e.toLowerCase()}function Xe(e){return e.charAt(1).toUpperCase()}var Ze=Te([Ie,ze,Ve,He,Ue],`html`),Qe=Te([Ie,Be,Ve,He,Ue],`svg`);function $e(e){return e.join(` `).trim()}var et=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` -`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),tt=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(et());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),nt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),rt=i(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(tt()),r=nt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),it=ot(`end`),at=ot(`start`);function ot(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function st(e){let t=at(e),n=it(e);if(t&&n)return{start:t,end:n}}function ct(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ut(e.position):`start`in e||`end`in e?ut(e):`line`in e||`column`in e?lt(e):``}function lt(e){return dt(e&&e.line)+`:`+dt(e&&e.column)}function ut(e){return lt(e&&e.start)+`-`+lt(e&&e.end)}function dt(e){return e&&typeof e==`number`?e:1}var B=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ct(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};B.prototype.file=``,B.prototype.name=``,B.prototype.reason=``,B.prototype.message=``,B.prototype.stack=``,B.prototype.column=void 0,B.prototype.line=void 0,B.prototype.ancestors=void 0,B.prototype.cause=void 0,B.prototype.fatal=void 0,B.prototype.place=void 0,B.prototype.ruleId=void 0,B.prototype.source=void 0;var ft=n(rt(),1),pt={}.hasOwnProperty,mt=new Map,ht=/[A-Z]/g,gt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),_t=new Set([`td`,`th`]),vt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function yt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=At(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=kt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Qe:Ze,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=bt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function bt(e,t,n){if(t.type===`element`)return xt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return St(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return wt(e,t,n);if(t.type===`mdxjsEsm`)return Ct(e,t);if(t.type===`root`)return Tt(e,t,n);if(t.type===`text`)return Et(e,t)}function xt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Qe,e.schema=i),e.ancestors.push(t);let a=It(e,t.tagName,!1),o=jt(e,t),s=Nt(e,t);return gt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Se(e)})),Dt(e,o,a,t),Ot(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function St(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Lt(e,t.position)}function Ct(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lt(e,t.position)}function wt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Qe,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:It(e,t.name,!0),o=Mt(e,t),s=Nt(e,t);return Dt(e,o,a,t),Ot(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Tt(e,t,n){let r={};return Ot(r,Nt(e,t)),e.create(t,e.Fragment,r,n)}function Et(e,t){return t.value}function Dt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ot(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function kt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function At(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=at(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function jt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&pt.call(t.properties,i)){let a=Pt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&_t.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Mt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Lt(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Lt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Nt(e,t){let n=[],r=-1,i=e.passKeys?new Map:mt;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(V(e,e.length,0,t),e):t}var Yt={}.hasOwnProperty;function Xt(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function U(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var W=cn(/[A-Za-z]/),G=cn(/[\dA-Za-z]/),en=cn(/[#-'*+\--9=?A-Z^-~]/);function tn(e){return e!==null&&(e<32||e===127)}var nn=cn(/\d/),rn=cn(/[\dA-Fa-f]/),an=cn(/[!-/:-@[-`{-~]/);function K(e){return e!==null&&e<-2}function q(e){return e!==null&&(e<0||e===32)}function J(e){return e===-2||e===-1||e===32}var on=cn(/\p{P}|\p{S}/u),sn=cn(/\s/);function cn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ln(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function Y(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return J(r)?(e.enter(n),s(r)):t(r)}function s(r){return J(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hn(e,t,n){return Y(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function gn(e){if(e===null||q(e)||sn(e))return 1;if(on(e))return 2}function _n(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};xn(d,-c),xn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=H(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=H(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=H(l,_n(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=H(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=H(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,V(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&J(t)?Y(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||K(t)?e.check(Pn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||K(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),J(t)?Y(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),J(t)?Y(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||K(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ln(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Rn={name:`codeIndented`,tokenize:Bn},zn={partial:!0,tokenize:Vn};function Bn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),Y(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):K(t)?e.attempt(zn,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||K(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Vn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):Y(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):K(e)?i(e):n(e)}}var Hn={name:`codeText`,previous:Wn,resolve:Un,tokenize:Gn};function Un(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&qn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),qn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),qn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function tr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||tn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||K(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||q(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):K(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||K(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!J(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function rr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),Y(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||K(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ir(e,t){let n;return r;function r(i){return K(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):J(i)?Y(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ar={name:`definition`,tokenize:sr},or={partial:!0,tokenize:cr};function sr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return nr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=U(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return q(t)?ir(e,l)(t):l(t)}function l(t){return tr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(or,d,d)(t)}function d(t){return J(t)?Y(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||K(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function cr(e,t,n){return r;function r(t){return q(t)?ir(e,i)(t):n(t)}function i(t){return rr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return J(t)?Y(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||K(e)?t(e):n(e)}}var lr={name:`hardBreakEscape`,tokenize:ur};function ur(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return K(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var dr={name:`headingAtx`,resolve:fr,tokenize:pr};function fr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},V(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function pr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||q(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||K(n)?(e.exit(`atxHeading`),t(n)):J(n)?Y(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||q(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var mr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),hr=[`pre`,`script`,`style`,`textarea`],gr={concrete:!0,name:`htmlFlow`,resolveTo:yr,tokenize:br},_r={partial:!0,tokenize:Sr},vr={partial:!0,tokenize:xr};function yr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function br(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:M):W(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):W(a)?(e.consume(a),i=4,r.interrupt?t:M):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:M):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return W(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||q(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&hr.includes(l)?(i=1,r.interrupt?t(s):O(s)):mr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||G(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return J(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||W(t)?(e.consume(t),b):J(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):J(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):J(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||K(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||q(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||J(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||K(t)?O(t):J(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),ie):t===63&&i===3?(e.consume(t),M):t===93&&i===5?(e.consume(t),re):K(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(_r,N,k)(t)):t===null||K(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(vr,ee,N)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||K(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),M):O(t)}function j(t){return t===47?(e.consume(t),o=``,ne):O(t)}function ne(t){if(t===62){let n=o.toLowerCase();return hr.includes(n)?(e.consume(t),ie):O(t)}return W(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ne):O(t)}function re(t){return t===93?(e.consume(t),M):O(t)}function M(t){return t===62?(e.consume(t),ie):t===45&&i===2?(e.consume(t),M):O(t)}function ie(t){return t===null||K(t)?(e.exit(`htmlFlowData`),N(t)):(e.consume(t),ie)}function N(n){return e.exit(`htmlFlow`),t(n)}}function xr(e,t,n){let r=this;return i;function i(t){return K(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Sr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(wn,t,n)}}var Cr={name:`htmlText`,tokenize:wr};function wr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):W(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):W(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):K(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):K(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):K(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):K(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return W(t)?(e.consume(t),S):n(t)}function S(t){return t===45||G(t)?(e.consume(t),S):C(t)}function C(t){return K(t)?(o=C,j(t)):J(t)?(e.consume(t),C):A(t)}function w(t){return t===45||G(t)?(e.consume(t),w):t===47||t===62||q(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||W(t)?(e.consume(t),E):K(t)?(o=T,j(t)):J(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||G(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):K(t)?(o=D,j(t)):J(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):K(t)?(o=O,j(t)):J(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):K(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||q(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||q(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ne}function ne(t){return J(t)?Y(e,re,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):re(t)}function re(t){return e.enter(`htmlTextData`),o(t)}}var Tr={name:`labelEnd`,resolveAll:kr,resolveTo:Ar,tokenize:jr},Er={tokenize:Mr},Dr={tokenize:Nr},Or={tokenize:Pr};function kr(e){let t=-1,n=[];for(;++t=3&&(a===null||K(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),J(t)?Y(e,s,`whitespace`)(t):s(t))}}var X={continuation:{tokenize:Kr},exit:Jr,name:`list`,tokenize:Gr},Ur={partial:!0,tokenize:Yr},Wr={partial:!0,tokenize:qr};function Gr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:nn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Vr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return nn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(wn,r.interrupt?n:u,e.attempt(Ur,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return J(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Kr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(wn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Y(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!J(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,Y(e,e.attempt(X,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function qr(e,t,n){let r=this;return Y(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Jr(e){e.exit(this.containerState.type)}function Yr(e,t,n){let r=this;return Y(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!J(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Xr={name:`setextUnderline`,resolveTo:Zr,tokenize:Qr};function Zr(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Qr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),J(t)?Y(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||K(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var $r={tokenize:ei};function ei(e){let t=this,n=e.attempt(wn,r,e.attempt(this.parser.constructs.flowInitial,i,Y(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ti={resolveAll:ai()},ni=ii(`string`),ri=ii(`text`);function ii(e){return{resolveAll:ai(e===`text`?oi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++ihi,contentInitial:()=>li,disable:()=>gi,document:()=>ci,flow:()=>di,flowInitial:()=>ui,insideSpan:()=>mi,string:()=>fi,text:()=>pi}),ci={42:X,43:X,45:X,48:X,49:X,50:X,51:X,52:X,53:X,54:X,55:X,56:X,57:X,62:En},li={91:ar},ui={[-2]:Rn,[-1]:Rn,32:Rn},di={35:dr,42:Vr,45:[Xr,Vr],60:gr,61:Xr,95:Vr,96:Fn,126:Fn},fi={38:Mn,92:An},pi={[-5]:zr,[-4]:zr,[-3]:zr,33:Fr,38:Mn,42:vn,60:[Sn,Cr],91:Lr,92:[lr,An],93:Tr,95:vn,96:Hn},mi={null:[vn,ti]},hi={null:[42,95]},gi={null:[]};function _i(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=H(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=_n(a,l.events,l),l.events):[]}function f(e,t){return yi(p(e),t)}function p(e){return vi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function yi(e,t){let n=-1,r=[],i;for(;++n{e.style.setProperty(t,N[t],`important`)})}function ie(e){let t=window.getComputedStyle(e);if(t===null)return null;let n={};for(let e of ne)n[e]=t[e];return n.boxSizing===``?null:{sizingStyle:n,paddingSize:parseFloat(n.paddingBottom)+parseFloat(n.paddingTop),borderSize:parseFloat(n.borderBottomWidth)+parseFloat(n.borderTopWidth)}}var P=null;function ae(e,t,n=1,r=1/0){P||(P=document.createElement(`textarea`),P.setAttribute(`tabindex`,`-1`),P.setAttribute(`aria-hidden`,`true`),P.setAttribute(`aria-label`,`autosize measurement`),re(P)),P.parentNode===null&&document.body.appendChild(P);let{paddingSize:i,borderSize:a,sizingStyle:o}=e,{boxSizing:s}=o;Object.keys(o).forEach(e=>{P.style[e]=o[e]}),re(P),P.value=t;let c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i;P.value=t,c=s===`border-box`?P.scrollHeight+a:P.scrollHeight-i,P.value=`x`;let l=P.scrollHeight-i,u=l*n;s===`border-box`&&(u=u+i+a),c=Math.max(u,c);let d=l*r;return s===`border-box`&&(d=d+i+a),c=Math.min(d,c),[c,l]}function oe({maxRows:t,minRows:n,onChange:r,ref:i,...a}){let o=a.value!==void 0,s=(0,j.useRef)(null),c=e(s,i),l=(0,j.useRef)(0),u=(0,j.useRef)(0),d=()=>{let e=s.current;if(!e)return;let r=ie(e);if(!r)return;let[i]=ae(r,e.value||e.placeholder||`x`,n,t);l.current!==i&&(l.current=i,e.style.setProperty(`height`,`${i}px`,`important`))},f=e=>{o||d(),r?.(e)};return(0,j.useLayoutEffect)(d),(0,j.useEffect)(()=>{let e=()=>d();return window.addEventListener(`resize`,e),()=>window.removeEventListener(`resize`,e)},[]),(0,j.useEffect)(()=>{let e=s.current;if(!e||typeof ResizeObserver>`u`)return;u.current=e.offsetWidth;let t=new ResizeObserver(()=>{s.current&&s.current.offsetWidth!==u.current&&(u.current=s.current.offsetWidth,d())});return t.observe(e),()=>t.disconnect()},[]),(0,j.useEffect)(()=>{let e=()=>d();return document.fonts.addEventListener(`loadingdone`,e),()=>document.fonts.removeEventListener(`loadingdone`,e)},[]),(0,j.useEffect)(()=>{let e=e=>{if(s.current?.form===e.target&&!o){let e=s.current.value;requestAnimationFrame(()=>{s.current&&e!==s.current.value&&d()})}};return document.body.addEventListener(`reset`,e),()=>document.body.removeEventListener(`reset`,e)},[o]),(0,M.jsx)(`textarea`,{rows:n,...a,onChange:f,ref:c})}var se=t(e=>{let{autosize:t,maxRows:n,minRows:r,__staticSelector:i,resize:a,bottomSection:o,bottomSectionProps:s,...c}=f([`Input`,`InputWrapper`,`Textarea`],null,e),l=t&&A()!==`test`,u=l?{maxRows:n,minRows:r}:{};return(0,M.jsx)(v,{component:l?oe:`textarea`,...c,__staticSelector:i||`Textarea`,__bottomSection:o,__bottomSectionProps:s,multiline:!0,"data-no-overflow":t&&n===void 0||void 0,__vars:{"--input-resize":a},...u})});se.classes=v.classes,se.displayName=`@mantine/core/Textarea`;var ce={root:`m_d08caa0`},le=t(e=>{let t=f(`Typography`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,attributes:s,...c}=t;return(0,M.jsx)(S,{...p({name:`Typography`,classes:ce,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:s})(`root`),...c})});le.classes=ce,le.displayName=`@mantine/core/Typography`;var ue=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z`}))]]),de=new Map([[`bold`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,36H56A20,20,0,0,0,36,56V200a20,20,0,0,0,20,20H200a20,20,0,0,0,20-20V56A20,20,0,0,0,200,36Zm-4,160H60V60H196Z`}))],[`duotone`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M208,56V200a8,8,0,0,1-8,8H56a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H200A8,8,0,0,1,208,56Z`,opacity:`0.2`}),j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`fill`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`}))],[`light`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,42H56A14,14,0,0,0,42,56V200a14,14,0,0,0,14,14H200a14,14,0,0,0,14-14V56A14,14,0,0,0,200,42Zm2,158a2,2,0,0,1-2,2H56a2,2,0,0,1-2-2V56a2,2,0,0,1,2-2H200a2,2,0,0,1,2,2Z`}))],[`regular`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,40H56A16,16,0,0,0,40,56V200a16,16,0,0,0,16,16H200a16,16,0,0,0,16-16V56A16,16,0,0,0,200,40Zm0,160H56V56H200V200Z`}))],[`thin`,j.createElement(j.Fragment,null,j.createElement(`path`,{d:`M200,44H56A12,12,0,0,0,44,56V200a12,12,0,0,0,12,12H200a12,12,0,0,0,12-12V56A12,12,0,0,0,200,44Zm4,156a4,4,0,0,1-4,4H56a4,4,0,0,1-4-4V56a4,4,0,0,1,4-4H200a4,4,0,0,1,4,4Z`}))]]),fe=j.forwardRef((e,t)=>j.createElement(a,{ref:t,...e,weights:ue}));fe.displayName=`PaperPlaneTiltIcon`;var pe=fe,me=j.forwardRef((e,t)=>j.createElement(a,{ref:t,...e,weights:de}));me.displayName=`StopIcon`;var he=me;function ge(e,t){let n=t||{};return(e[e.length-1]===``?[...e,``]:e).join((n.padRight?` `:``)+`,`+(n.padLeft===!1?``:` `)).trim()}var _e=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ve=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ye={};function be(e,t){return((t||ye).jsx?ve:_e).test(e)}var xe=/[ \t\n\f\r]/g;function Se(e){return typeof e==`object`?e.type===`text`&&Ce(e.value):Ce(e)}function Ce(e){return e.replace(xe,``)===``}var we=class{constructor(e,t,n){this.normal=t,this.property=e,n&&(this.space=n)}};we.prototype.normal={},we.prototype.property={},we.prototype.space=void 0;function Te(e,t){let n={},r={};for(let t of e)Object.assign(n,t.property),Object.assign(r,t.normal);return new we(n,r,t)}function Ee(e){return e.toLowerCase()}var F=class{constructor(e,t){this.attribute=t,this.property=e}};F.prototype.attribute=``,F.prototype.booleanish=!1,F.prototype.boolean=!1,F.prototype.commaOrSpaceSeparated=!1,F.prototype.commaSeparated=!1,F.prototype.defined=!1,F.prototype.mustUseProperty=!1,F.prototype.number=!1,F.prototype.overloadedBoolean=!1,F.prototype.property=``,F.prototype.spaceSeparated=!1,F.prototype.space=void 0;var De=w({boolean:()=>I,booleanish:()=>L,commaOrSpaceSeparated:()=>B,commaSeparated:()=>Ae,number:()=>R,overloadedBoolean:()=>ke,spaceSeparated:()=>z}),Oe=0,I=je(),L=je(),ke=je(),R=je(),z=je(),Ae=je(),B=je();function je(){return 2**++Oe}var Me=Object.keys(De),Ne=class extends F{constructor(e,t,n,r){let i=-1;if(super(e,t),Pe(this,`space`,r),typeof n==`number`)for(;++i4&&n.slice(0,4)===`data`&&qe.test(t)){if(t.charAt(4)===`-`){let e=t.slice(5).replace(Ke,Xe);r=`data`+e.charAt(0).toUpperCase()+e.slice(1)}else{let e=t.slice(4);if(!Ke.test(e)){let n=e.replace(Ge,Ye);n.charAt(0)!==`-`&&(n=`-`+n),t=`data`+n}}i=Ne}return new i(r,t)}function Ye(e){return`-`+e.toLowerCase()}function Xe(e){return e.charAt(1).toUpperCase()}var Ze=Te([Ie,ze,Ve,He,Ue],`html`),Qe=Te([Ie,Be,Ve,He,Ue],`svg`);function $e(e){return e.join(` `).trim()}var et=i(((e,t)=>{var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,i=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,l=/^\s+|\s+$/g;function u(e,t){if(typeof e!=`string`)throw TypeError(`First argument must be a string`);if(!e)return[];t||={};var l=1,u=1;function f(e){var t=e.match(r);t&&(l+=t.length);var n=e.lastIndexOf(` +`);u=~n?e.length-n:u+e.length}function p(){var e={line:l,column:u};return function(t){return t.position=new m(e),_(),t}}function m(e){this.start=e,this.end={line:l,column:u},this.source=t.source}m.prototype.content=e;function h(n){var r=Error(t.source+`:`+l+`:`+u+`: `+n);if(r.reason=n,r.filename=t.source,r.line=l,r.column=u,r.source=e,!t.silent)throw r}function g(t){var n=t.exec(e);if(n){var r=n[0];return f(r),e=e.slice(r.length),n}}function _(){g(i)}function v(e){var t;for(e||=[];t=y();)t!==!1&&e.push(t);return e}function y(){var t=p();if(e.charAt(0)==`/`&&e.charAt(1)==`*`){for(var n=2;e.charAt(n)!=``&&(e.charAt(n)!=`*`||e.charAt(n+1)!=`/`);)++n;if(n+=2,e.charAt(n-1)===``)return h(`End of comment missing`);var r=e.slice(2,n-2);return u+=2,f(r),e=e.slice(n),u+=2,t({type:`comment`,comment:r})}}function b(){var e=p(),t=g(a);if(t){if(y(),!g(o))return h(`property missing ':'`);var r=g(s),i=e({type:`declaration`,property:d(t[0].replace(n,``)),value:r?d(r[0].replace(n,``)):``});return g(c),i}}function x(){var e=[];v(e);for(var t;t=b();)t!==!1&&(e.push(t),v(e));return e}return _(),x()}function d(e){return e?e.replace(l,``):``}t.exports=u})),tt=i((e=>{var t=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var n=t(et());function r(e,t){let r=null;if(!e||typeof e!=`string`)return r;let i=(0,n.default)(e),a=typeof t==`function`;return i.forEach(e=>{if(e.type!==`declaration`)return;let{property:n,value:i}=e;a?t(n,i,e):i&&(r||={},r[n]=i)}),r}})),nt=i((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,a=/^-(ms)-/,o=function(e){return!e||r.test(e)||t.test(e)},s=function(e,t){return t.toUpperCase()},c=function(e,t){return`${t}-`};e.camelCase=function(e,t){return t===void 0&&(t={}),o(e)?e:(e=e.toLowerCase(),e=t.reactCompat?e.replace(a,c):e.replace(i,c),e.replace(n,s))}})),rt=i(((e,t)=>{var n=(e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(tt()),r=nt();function i(e,t){var i={};return!e||typeof e!=`string`||(0,n.default)(e,function(e,n){e&&n&&(i[(0,r.camelCase)(e,t)]=n)}),i}i.default=i,t.exports=i})),it=ot(`end`),at=ot(`start`);function ot(e){return t;function t(t){let n=t&&t.position&&t.position[e]||{};if(typeof n.line==`number`&&n.line>0&&typeof n.column==`number`&&n.column>0)return{line:n.line,column:n.column,offset:typeof n.offset==`number`&&n.offset>-1?n.offset:void 0}}}function st(e){let t=at(e),n=it(e);if(t&&n)return{start:t,end:n}}function ct(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?ut(e.position):`start`in e||`end`in e?ut(e):`line`in e||`column`in e?lt(e):``}function lt(e){return dt(e&&e.line)+`:`+dt(e&&e.column)}function ut(e){return lt(e&&e.start)+`-`+lt(e&&e.end)}function dt(e){return e&&typeof e==`number`?e:1}var V=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=ct(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};V.prototype.file=``,V.prototype.name=``,V.prototype.reason=``,V.prototype.message=``,V.prototype.stack=``,V.prototype.column=void 0,V.prototype.line=void 0,V.prototype.ancestors=void 0,V.prototype.cause=void 0,V.prototype.fatal=void 0,V.prototype.place=void 0,V.prototype.ruleId=void 0,V.prototype.source=void 0;var ft=n(rt(),1),pt={}.hasOwnProperty,mt=new Map,ht=/[A-Z]/g,gt=new Set([`table`,`tbody`,`thead`,`tfoot`,`tr`]),_t=new Set([`td`,`th`]),vt=`https://github.com/syntax-tree/hast-util-to-jsx-runtime`;function yt(e,t){if(!t||t.Fragment===void 0)throw TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,r;if(t.development){if(typeof t.jsxDEV!=`function`)throw TypeError("Expected `jsxDEV` in options when `development: true`");r=At(n,t.jsxDEV)}else{if(typeof t.jsx!=`function`)throw TypeError("Expected `jsx` in production options");if(typeof t.jsxs!=`function`)throw TypeError("Expected `jsxs` in production options");r=kt(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||`react`,evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space===`svg`?Qe:Ze,stylePropertyNameCase:t.stylePropertyNameCase||`dom`,tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=bt(i,e,void 0);return a&&typeof a!=`string`?a:i.create(e,i.Fragment,{children:a||void 0},void 0)}function bt(e,t,n){if(t.type===`element`)return xt(e,t,n);if(t.type===`mdxFlowExpression`||t.type===`mdxTextExpression`)return St(e,t);if(t.type===`mdxJsxFlowElement`||t.type===`mdxJsxTextElement`)return wt(e,t,n);if(t.type===`mdxjsEsm`)return Ct(e,t);if(t.type===`root`)return Tt(e,t,n);if(t.type===`text`)return Et(e,t)}function xt(e,t,n){let r=e.schema,i=r;t.tagName.toLowerCase()===`svg`&&r.space===`html`&&(i=Qe,e.schema=i),e.ancestors.push(t);let a=It(e,t.tagName,!1),o=jt(e,t),s=Nt(e,t);return gt.has(t.tagName)&&(s=s.filter(function(e){return typeof e!=`string`||!Se(e)})),Dt(e,o,a,t),Ot(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function St(e,t){if(t.data&&t.data.estree&&e.evaluater){let n=t.data.estree.body[0];return n.type,e.evaluater.evaluateExpression(n.expression)}Lt(e,t.position)}function Ct(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Lt(e,t.position)}function wt(e,t,n){let r=e.schema,i=r;t.name===`svg`&&r.space===`html`&&(i=Qe,e.schema=i),e.ancestors.push(t);let a=t.name===null?e.Fragment:It(e,t.name,!0),o=Mt(e,t),s=Nt(e,t);return Dt(e,o,a,t),Ot(o,s),e.ancestors.pop(),e.schema=r,e.create(t,a,o,n)}function Tt(e,t,n){let r={};return Ot(r,Nt(e,t)),e.create(t,e.Fragment,r,n)}function Et(e,t){return t.value}function Dt(e,t,n,r){typeof n!=`string`&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Ot(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function kt(e,t,n){return r;function r(e,r,i,a){let o=Array.isArray(i.children)?n:t;return a?o(r,i,a):o(r,i)}}function At(e,t){return n;function n(n,r,i,a){let o=Array.isArray(i.children),s=at(n);return t(r,i,a,o,{columnNumber:s?s.column-1:void 0,fileName:e,lineNumber:s?s.line:void 0},void 0)}}function jt(e,t){let n={},r,i;for(i in t.properties)if(i!==`children`&&pt.call(t.properties,i)){let a=Pt(e,i,t.properties[i]);if(a){let[i,o]=a;e.tableCellAlignToStyle&&i===`align`&&typeof o==`string`&&_t.has(t.tagName)?r=o:n[i]=o}}if(r){let t=n.style||={};t[e.stylePropertyNameCase===`css`?`text-align`:`textAlign`]=r}return n}function Mt(e,t){let n={};for(let r of t.attributes)if(r.type===`mdxJsxExpressionAttribute`){if(r.data&&r.data.estree&&e.evaluater){let t=r.data.estree.body[0];t.type;let i=t.expression;i.type;let a=i.properties[0];a.type,Object.assign(n,e.evaluater.evaluateExpression(a.argument))}else Lt(e,t.position)}else{let i=r.name,a;if(r.value&&typeof r.value==`object`){if(r.value.data&&r.value.data.estree&&e.evaluater){let t=r.value.data.estree.body[0];t.type,a=e.evaluater.evaluateExpression(t.expression)}else Lt(e,t.position)}else a=r.value===null||r.value;n[i]=a}return n}function Nt(e,t){let n=[],r=-1,i=e.passKeys?new Map:mt;for(;++ri?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a0?(H(e,e.length,0,t),e):t}var Yt={}.hasOwnProperty;function Xt(e){let t={},n=-1;for(;++n13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function W(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var G=cn(/[A-Za-z]/),K=cn(/[\dA-Za-z]/),en=cn(/[#-'*+\--9=?A-Z^-~]/);function tn(e){return e!==null&&(e<32||e===127)}var nn=cn(/\d/),rn=cn(/[\dA-Fa-f]/),an=cn(/[!-/:-@[-`{-~]/);function q(e){return e!==null&&e<-2}function J(e){return e!==null&&(e<0||e===32)}function Y(e){return e===-2||e===-1||e===32}var on=cn(/\p{P}|\p{S}/u),sn=cn(/\s/);function cn(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ln(e){let t=[],n=-1,r=0,i=0;for(;++n55295&&a<57344){let t=e.charCodeAt(n+1);a<56320&&t>56319&&t<57344?(o=String.fromCharCode(a,t),i=1):o=`�`}else o=String.fromCharCode(a);o&&=(t.push(e.slice(r,n),encodeURIComponent(o)),r=n+i+1,``),i&&=(n+=i,0)}return t.join(``)+e.slice(r)}function X(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return Y(r)?(e.enter(n),s(r)):t(r)}function s(r){return Y(r)&&a++o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;er;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function hn(e,t,n){return X(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function gn(e){if(e===null||J(e)||sn(e))return 1;if(on(e))return 2}function _n(e,t,n){let r=[],i=-1;for(;++i1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let d={...e[r][1].end},f={...e[n][1].start};xn(d,-c),xn(f,c),o={type:c>1?`strongSequence`:`emphasisSequence`,start:d,end:{...e[r][1].end}},s={type:c>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:f},a={type:c>1?`strongText`:`emphasisText`,start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?`strong`:`emphasis`,start:{...o.start},end:{...s.end}},e[r][1].end={...o.start},e[n][1].start={...s.end},l=[],e[r][1].end.offset-e[r][1].start.offset&&(l=U(l,[[`enter`,e[r][1],t],[`exit`,e[r][1],t]])),l=U(l,[[`enter`,i,t],[`enter`,o,t],[`exit`,o,t],[`enter`,a,t]]),l=U(l,_n(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),l=U(l,[[`exit`,a,t],[`enter`,s,t],[`exit`,s,t],[`exit`,i,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,l=U(l,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])):u=0,H(e,r-1,n-r+3,l),n=r+l.length-u-2;break}}for(n=-1;++n0&&Y(t)?X(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||q(t)?e.check(Pn,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||q(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),Y(t)?X(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),Y(t)?X(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||q(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}function Ln(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Rn={name:`codeIndented`,tokenize:Bn},zn={partial:!0,tokenize:Vn};function Bn(e,t,n){let r=this;return i;function i(t){return e.enter(`codeIndented`),X(e,a,`linePrefix`,5)(t)}function a(e){let t=r.events[r.events.length-1];return t&&t[1].type===`linePrefix`&&t[2].sliceSerialize(t[1],!0).length>=4?o(e):n(e)}function o(t){return t===null?c(t):q(t)?e.attempt(zn,o,c)(t):(e.enter(`codeFlowValue`),s(t))}function s(t){return t===null||q(t)?(e.exit(`codeFlowValue`),o(t)):(e.consume(t),s)}function c(n){return e.exit(`codeIndented`),t(n)}}function Vn(e,t,n){let r=this;return i;function i(t){return r.parser.lazy[r.now().line]?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),i):X(e,a,`linePrefix`,5)(t)}function a(e){let a=r.events[r.events.length-1];return a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(e):q(e)?i(e):n(e)}}var Hn={name:`codeText`,previous:Wn,resolve:Un,tokenize:Gn};function Un(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return ethis.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&qn(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),qn(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),qn(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function tr(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||tn(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||q(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||J(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):q(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||q(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!Y(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function rr(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),X(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||q(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ir(e,t){let n;return r;function r(i){return q(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):Y(i)?X(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ar={name:`definition`,tokenize:sr},or={partial:!0,tokenize:cr};function sr(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return nr.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=W(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return J(t)?ir(e,l)(t):l(t)}function l(t){return tr(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(or,d,d)(t)}function d(t){return Y(t)?X(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||q(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function cr(e,t,n){return r;function r(t){return J(t)?ir(e,i)(t):n(t)}function i(t){return rr(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return Y(t)?X(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||q(e)?t(e):n(e)}}var lr={name:`hardBreakEscape`,tokenize:ur};function ur(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return q(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var dr={name:`headingAtx`,resolve:fr,tokenize:pr};function fr(e,t){let n=e.length-2,r=3,i,a;return e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r&&(i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`},H(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])),e}function pr(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||J(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||q(n)?(e.exit(`atxHeading`),t(n)):Y(n)?X(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||J(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var mr=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),hr=[`pre`,`script`,`style`,`textarea`],gr={concrete:!0,name:`htmlFlow`,resolveTo:yr,tokenize:br},_r={partial:!0,tokenize:Sr},vr={partial:!0,tokenize:xr};function yr(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function br(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:N):G(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):G(a)?(e.consume(a),i=4,r.interrupt?t:N):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:N):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return G(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||J(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&hr.includes(l)?(i=1,r.interrupt?t(s):O(s)):mr.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||K(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return Y(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||G(t)?(e.consume(t),b):Y(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):Y(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):Y(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||q(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||J(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||Y(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||q(t)?O(t):Y(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),A):t===60&&i===1?(e.consume(t),j):t===62&&i===4?(e.consume(t),re):t===63&&i===3?(e.consume(t),N):t===93&&i===5?(e.consume(t),ne):q(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(_r,ie,k)(t)):t===null||q(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(vr,ee,ie)(t)}function ee(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),te}function te(t){return t===null||q(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function A(t){return t===45?(e.consume(t),N):O(t)}function j(t){return t===47?(e.consume(t),o=``,M):O(t)}function M(t){if(t===62){let n=o.toLowerCase();return hr.includes(n)?(e.consume(t),re):O(t)}return G(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),M):O(t)}function ne(t){return t===93?(e.consume(t),N):O(t)}function N(t){return t===62?(e.consume(t),re):t===45&&i===2?(e.consume(t),N):O(t)}function re(t){return t===null||q(t)?(e.exit(`htmlFlowData`),ie(t)):(e.consume(t),re)}function ie(n){return e.exit(`htmlFlow`),t(n)}}function xr(e,t,n){let r=this;return i;function i(t){return q(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a):n(t)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}function Sr(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(wn,t,n)}}var Cr={name:`htmlText`,tokenize:wr};function wr(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):G(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):G(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):q(t)?(o=d,j(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?A(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):q(t)?(o=h,j(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?A(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?A(t):q(t)?(o=v,j(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):q(t)?(o=y,j(t)):(e.consume(t),y)}function b(e){return e===62?A(e):y(e)}function x(t){return G(t)?(e.consume(t),S):n(t)}function S(t){return t===45||K(t)?(e.consume(t),S):C(t)}function C(t){return q(t)?(o=C,j(t)):Y(t)?(e.consume(t),C):A(t)}function w(t){return t===45||K(t)?(e.consume(t),w):t===47||t===62||J(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),A):t===58||t===95||G(t)?(e.consume(t),E):q(t)?(o=T,j(t)):Y(t)?(e.consume(t),T):A(t)}function E(t){return t===45||t===46||t===58||t===95||K(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):q(t)?(o=D,j(t)):Y(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):q(t)?(o=O,j(t)):Y(t)?(e.consume(t),O):(e.consume(t),ee)}function k(t){return t===i?(e.consume(t),i=void 0,te):t===null?n(t):q(t)?(o=k,j(t)):(e.consume(t),k)}function ee(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||J(t)?T(t):(e.consume(t),ee)}function te(e){return e===47||e===62||J(e)?T(e):n(e)}function A(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function j(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),M}function M(t){return Y(t)?X(e,ne,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):ne(t)}function ne(t){return e.enter(`htmlTextData`),o(t)}}var Tr={name:`labelEnd`,resolveAll:kr,resolveTo:Ar,tokenize:jr},Er={tokenize:Mr},Dr={tokenize:Nr},Or={tokenize:Pr};function kr(e){let t=-1,n=[];for(;++t=3&&(a===null||q(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),Y(t)?X(e,s,`whitespace`)(t):s(t))}}var Z={continuation:{tokenize:Kr},exit:Jr,name:`list`,tokenize:Gr},Ur={partial:!0,tokenize:Yr},Wr={partial:!0,tokenize:qr};function Gr(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:nn(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Vr,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return nn(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(wn,r.interrupt?n:u,e.attempt(Ur,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return Y(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function Kr(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(wn,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,X(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!Y(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Wr,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,X(e,e.attempt(Z,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function qr(e,t,n){let r=this;return X(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function Jr(e){e.exit(this.containerState.type)}function Yr(e,t,n){let r=this;return X(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!Y(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var Xr={name:`setextUnderline`,resolveTo:Zr,tokenize:Qr};function Zr(e,t){let n=e.length,r,i,a;for(;n--;)if(e[n][0]===`enter`){if(e[n][1].type===`content`){r=n;break}e[n][1].type===`paragraph`&&(i=n)}else e[n][1].type===`content`&&e.splice(n,1),!a&&e[n][1].type===`definition`&&(a=n);let o={type:`setextHeading`,start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type=`setextHeadingText`,a?(e.splice(i,0,[`enter`,o,t]),e.splice(a+1,0,[`exit`,e[r][1],t]),e[r][1].end={...e[a][1].end}):e[r][1]=o,e.push([`exit`,o,t]),e}function Qr(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),Y(t)?X(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||q(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var $r={tokenize:ei};function ei(e){let t=this,n=e.attempt(wn,r,e.attempt(this.parser.constructs.flowInitial,i,X(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Xn,i)),`linePrefix`)));return n;function r(r){if(r===null){e.consume(r);return}return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var ti={resolveAll:ai()},ni=ii(`string`),ri=ii(`text`);function ii(e){return{resolveAll:ai(e===`text`?oi:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null){t.consume(e);return}return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++ihi,contentInitial:()=>li,disable:()=>gi,document:()=>ci,flow:()=>di,flowInitial:()=>ui,insideSpan:()=>mi,string:()=>fi,text:()=>pi}),ci={42:Z,43:Z,45:Z,48:Z,49:Z,50:Z,51:Z,52:Z,53:Z,54:Z,55:Z,56:Z,57:Z,62:En},li={91:ar},ui={[-2]:Rn,[-1]:Rn,32:Rn},di={35:dr,42:Vr,45:[Xr,Vr],60:gr,61:Xr,95:Vr,96:Fn,126:Fn},fi={38:Mn,92:An},pi={[-5]:zr,[-4]:zr,[-3]:zr,33:Fr,38:Mn,42:vn,60:[Sn,Cr],91:Lr,92:[lr,An],93:Tr,95:vn,96:Hn},mi={null:[vn,ti]},hi={null:[42,95]},gi={null:[]};function _i(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=U(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=_n(a,l.events,l),l.events):[]}function f(e,t){return yi(p(e),t)}function p(e){return vi(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){let e;for(;r._index-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function yi(e,t){let n=-1,r=[],i;for(;++n0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ni).call(a,void 0,e[0])}for(r.position={start:Ai(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ai(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0){let e=a.tokenStack[a.tokenStack.length-1];(e[1]||Ni).call(a,void 0,e[0])}for(r.position={start:Ai(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Ai(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},d=-1;++d0&&(r.className=[`language-`+i[0]]);let a={type:`element`,tagName:`code`,properties:r,children:[{type:`text`,value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:`element`,tagName:`pre`,properties:{},children:[a]},e.patch(t,a),a}function Ri(e,t){let n={type:`element`,tagName:`del`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zi(e,t){let n={type:`element`,tagName:`em`,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Bi(e,t){let n=typeof e.options.clobberPrefix==`string`?e.options.clobberPrefix:`user-content-`,r=String(t.identifier).toUpperCase(),i=ln(r.toLowerCase()),a=e.footnoteOrder.indexOf(r),o,s=e.footnoteCounts.get(r);s===void 0?(s=0,e.footnoteOrder.push(r),o=e.footnoteOrder.length):o=a+1,s+=1,e.footnoteCounts.set(r,s);let c={type:`element`,tagName:`a`,properties:{href:`#`+n+`fn-`+i,id:n+`fnref-`+i+(s>1?`-`+s:``),dataFootnoteRef:!0,ariaDescribedBy:[`footnote-label`]},children:[{type:`text`,value:String(o)}]};e.patch(t,c);let l={type:`element`,tagName:`sup`,properties:{},children:[c]};return e.patch(t,l),e.applyData(t,l)}function Vi(e,t){let n={type:`element`,tagName:`h`+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function Hi(e,t){if(e.options.allowDangerousHtml){let n={type:`raw`,value:t.value};return e.patch(t,n),e.applyData(t,n)}}function Ui(e,t){let n=t.referenceType,r=`]`;if(n===`collapsed`?r+=`[]`:n===`full`&&(r+=`[`+(t.label||t.identifier)+`]`),t.type===`imageReference`)return[{type:`text`,value:`![`+t.alt+r}];let i=e.all(t),a=i[0];a&&a.type===`text`?a.value=`[`+a.value:i.unshift({type:`text`,value:`[`});let o=i[i.length-1];return o&&o.type===`text`?o.value+=r:i.push({type:`text`,value:r}),i}function Wi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ui(e,t);let i={src:ln(r.url||``),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`img`,properties:i,children:[]};return e.patch(t,a),e.applyData(t,a)}function Gi(e,t){let n={src:ln(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`img`,properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function Ki(e,t){let n={type:`text`,value:t.value.replace(/\r?\n|\r/g,` `)};e.patch(t,n);let r={type:`element`,tagName:`code`,properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function qi(e,t){let n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return Ui(e,t);let i={href:ln(r.url||``)};r.title!==null&&r.title!==void 0&&(i.title=r.title);let a={type:`element`,tagName:`a`,properties:i,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function Ji(e,t){let n={href:ln(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let r={type:`element`,tagName:`a`,properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Yi(e,t,n){let r=e.all(t),i=n?Xi(n):Zi(t),a={},o=[];if(typeof t.checked==`boolean`){let e=r[0],n;e&&e.type===`element`&&e.tagName===`p`?n=e:(n={type:`element`,tagName:`p`,properties:{},children:[]},r.unshift(n)),n.children.length>0&&n.children.unshift({type:`text`,value:` `}),n.children.unshift({type:`element`,tagName:`input`,properties:{type:`checkbox`,checked:t.checked,disabled:!0},children:[]}),a.className=[`task-list-item`]}let s=-1;for(;++s0&&n.push({type:`text`,value:` `}),n}function Ya(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Xa(e,t){let n=Wa(e,t),r=n.one(e,void 0),i=ka(n),a=Array.isArray(r)?{type:`root`,children:r}:r||{type:`root`,children:[]};return i&&(`children`in a,a.children.push({type:`text`,value:` -`},i)),a}function Za(e,t){return e&&`run`in e?async function(n,r){let i=Xa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xa(n,{file:r,...e||t})}}function Qa(e){if(e)throw e}var $a=n(i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Z={basename:ro,dirname:io,extname:ao,join:oo,sep:`/`};function ro(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);lo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function io(e){if(lo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ao(e){lo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function oo(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function co(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function lo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var uo={cwd:fo};function fo(){return`/`}function po(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function mo(e){if(typeof e==`string`)e=new URL(e);else if(!po(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ho(e)}function ho(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];eo(o)&&eo(r)&&(r=(0,$a.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function To(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Eo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Do(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oo(e){if(!eo(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ko(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ao(e){return jo(e)?e:new _o(e)}function jo(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Mo(e){return typeof e==`string`||No(e)}function No(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Po=[],Fo={allowDangerousHtml:!0},Io=/^(https?|ircs?|mailto|xmpp)$/i,Lo=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ro(e){let t=zo(e),n=Bo(e);return Vo(t.runSync(t.parse(n),n),e)}function zo(e){let t=e.rehypePlugins||Po,n=e.remarkPlugins||Po,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fo}:Fo;return wo().use(Pi).use(n).use(Za,r).use(t)}function Bo(e){let t=e.children||``,n=new _o;return typeof t==`string`?n.value=t:``+t,n}function Vo(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ho;for(let e of Lo)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Va(e,l),yt(e,{Fragment:j.Fragment,components:i,ignoreInvalidStyle:!0,jsx:j.jsx,jsxs:j.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Vt)if(Object.hasOwn(Vt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Vt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ho(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Io.test(e.slice(0,t))?e:``}function Uo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wo(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Go(e,t,n){let r=Aa((n||{}).ignore||[]),i=Ko(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Uo(e,`(`),a=Uo(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function us(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||sn(n)||on(n))&&(!t||n!==47)}bs.peek=ys;function ds(){this.buffer()}function fs(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ps(){this.buffer()}function ms(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function hs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=U(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gs(e){this.exit(e)}function _s(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=U(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vs(e){this.exit(e)}function ys(){return`[`}function bs(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function xs(){return{enter:{gfmFootnoteCallString:ds,gfmFootnoteCall:fs,gfmFootnoteDefinitionLabelString:ps,gfmFootnoteDefinition:ms},exit:{gfmFootnoteCallString:hs,gfmFootnoteCall:gs,gfmFootnoteDefinitionLabelString:_s,gfmFootnoteDefinition:vs}}}function Ss(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bs},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` +`},i)),a}function Za(e,t){return e&&`run`in e?async function(n,r){let i=Xa(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Xa(n,{file:r,...e||t})}}function Qa(e){if(e)throw e}var $a=n(i(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});ft.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}var Q={basename:ro,dirname:io,extname:ao,join:oo,sep:`/`};function ro(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);lo(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function io(e){if(lo(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function ao(e){lo(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}continue}n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function oo(...e){let t=-1,n;for(;++t0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function co(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function lo(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var uo={cwd:fo};function fo(){return`/`}function po(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function mo(e){if(typeof e==`string`)e=new URL(e);else if(!po(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return ho(e)}function ho(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n0){let[r,...a]=t,o=n[i][1];eo(o)&&eo(r)&&(r=(0,$a.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function To(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Eo(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function Do(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Oo(e){if(!eo(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function ko(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ao(e){return jo(e)?e:new _o(e)}function jo(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Mo(e){return typeof e==`string`||No(e)}function No(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Po=[],Fo={allowDangerousHtml:!0},Io=/^(https?|ircs?|mailto|xmpp)$/i,Lo=[{from:`astPlugins`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowDangerousHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`allowNode`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowElement`},{from:`allowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`allowedElements`},{from:`className`,id:`remove-classname`},{from:`disallowedTypes`,id:`replace-allownode-allowedtypes-and-disallowedtypes`,to:`disallowedElements`},{from:`escapeHtml`,id:`remove-buggy-html-in-markdown-parser`},{from:`includeElementIndex`,id:`#remove-includeelementindex`},{from:`includeNodeIndex`,id:`change-includenodeindex-to-includeelementindex`},{from:`linkTarget`,id:`remove-linktarget`},{from:`plugins`,id:`change-plugins-to-remarkplugins`,to:`remarkPlugins`},{from:`rawSourcePos`,id:`#remove-rawsourcepos`},{from:`renderers`,id:`change-renderers-to-components`,to:`components`},{from:`source`,id:`change-source-to-children`,to:`children`},{from:`sourcePos`,id:`#remove-sourcepos`},{from:`transformImageUri`,id:`#add-urltransform`,to:`urlTransform`},{from:`transformLinkUri`,id:`#add-urltransform`,to:`urlTransform`}];function Ro(e){let t=zo(e),n=Bo(e);return Vo(t.runSync(t.parse(n),n),e)}function zo(e){let t=e.rehypePlugins||Po,n=e.remarkPlugins||Po,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Fo}:Fo;return wo().use(Pi).use(n).use(Za,r).use(t)}function Bo(e){let t=e.children||``,n=new _o;return typeof t==`string`?n.value=t:``+t,n}function Vo(e,t){let n=t.allowedElements,r=t.allowElement,i=t.components,a=t.disallowedElements,o=t.skipHtml,s=t.unwrapDisallowed,c=t.urlTransform||Ho;for(let e of Lo)Object.hasOwn(t,e.from)&&``+e.from+(e.to?"use `"+e.to+"` instead":`remove it`)+e.id;return Va(e,l),yt(e,{Fragment:M.Fragment,components:i,ignoreInvalidStyle:!0,jsx:M.jsx,jsxs:M.jsxs,passKeys:!0,passNode:!0});function l(e,t,i){if(e.type===`raw`&&i&&typeof t==`number`)return o?i.children.splice(t,1):i.children[t]={type:`text`,value:e.value},t;if(e.type===`element`){let t;for(t in Vt)if(Object.hasOwn(Vt,t)&&Object.hasOwn(e.properties,t)){let n=e.properties[t],r=Vt[t];(r===null||r.includes(e.tagName))&&(e.properties[t]=c(String(n||``),t,e))}}if(e.type===`element`){let o=n?!n.includes(e.tagName):a?a.includes(e.tagName):!1;if(!o&&r&&typeof t==`number`&&(o=!r(e,t,i)),o&&i&&typeof t==`number`)return s&&e.children?i.children.splice(t,1,...e.children):i.children.splice(t,1),t}}}function Ho(e){let t=e.indexOf(`:`),n=e.indexOf(`?`),r=e.indexOf(`#`),i=e.indexOf(`/`);return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||Io.test(e.slice(0,t))?e:``}function Uo(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Wo(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}function Go(e,t,n){let r=Aa((n||{}).ignore||[]),i=Ko(t),a=-1;for(;++a0?{type:`text`,value:a}:void 0),a===!1?r.lastIndex=n+1:(s!==n&&u.push({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a)?u.push(...a):a&&u.push(a),s=n+d[0].length,l=!0),!r.global)break;d=r.exec(e.value)}return l?(s?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Uo(e,`(`),a=Uo(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function us(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||sn(n)||on(n))&&(!t||n!==47)}bs.peek=ys;function ds(){this.buffer()}function fs(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function ps(){this.buffer()}function ms(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function hs(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gs(e){this.exit(e)}function _s(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=W(this.sliceSerialize(e)).toLowerCase(),n.label=t}function vs(e){this.exit(e)}function ys(){return`[`}function bs(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function xs(){return{enter:{gfmFootnoteCallString:ds,gfmFootnoteCall:fs,gfmFootnoteDefinitionLabelString:ps,gfmFootnoteDefinition:ms},exit:{gfmFootnoteCallString:hs,gfmFootnoteCall:gs,gfmFootnoteDefinitionLabelString:_s,gfmFootnoteDefinition:vs}}}function Ss(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:bs},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?` `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?ws:Cs))),s(),o}}function Cs(e,t,n){return t===0?e:ws(e,t,n)}function ws(e,t,n){return(n?``:` `)+e}var Ts=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];As.peek=js;function Es(){return{canContainEols:[`delete`],enter:{strikethrough:Os},exit:{strikethrough:ks}}}function Ds(){return{unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Ts}],handlers:{delete:As}}}function Os(e){this.enter({type:`delete`,children:[]},e)}function ks(e){this.exit(e)}function As(e,t,n,r){let i=n.createTracker(r),a=n.enter(`strikethrough`),o=i.move(`~~`);return o+=n.containerPhrasing(e,{...i.current(),before:o,after:`~`}),o+=i.move(`~~`),a(),o}function js(){return`~`}function Ms(e){return e.length}function Ns(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ms,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++ul&&(l=e[u].length);++ac[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++dc[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Ls);return i(),o}function Ls(e,t,n){return`>`+(n?``:` `)+e}function Rs(e,t){return zs(e,t.inConstruct,!0)&&!zs(e,t.notInConstruct,!1)}function zs(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function ic(){return`!`}ac.peek=oc;function ac(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function oc(){return`!`}sc.peek=cc;function sc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a\u007F]/.test(e.url))}uc.peek=dc;function uc(e,t,n,r){let i=Ks(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r),s,c;if(lc(e,n)){let t=n.stack;n.stack=[],s=n.enter(`autolink`);let r=o.move(`<`);return r+=o.move(n.containerPhrasing(e,{before:r,after:`>`,...o.current()})),r+=o.move(`>`),s(),n.stack=t,r}s=n.enter(`link`),c=n.enter(`label`);let l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function dc(e,t,n){return lc(e,n)?`<`:`[`}fc.peek=pc;function fc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=[],o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function pc(){return`[`}function mc(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function hc(e){let t=mc(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function gc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function _c(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function vc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?gc(n):mc(n),s=e.ordered?o===`.`?`)`:`.`:hc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),_c(n)===o&&t){let t=-1;for(;++t-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function xc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}var Sc=Aa([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Cc(e,t,n,r){return(e.children.some(function(e){return Sc(e)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function wc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Tc.peek=Ec;function Tc(e,t,n,r){let i=wc(n),a=n.enter(`strong`),o=n.createTracker(r),s=o.move(i+i),c=o.move(n.containerPhrasing(e,{after:i,before:s,...o.current()})),l=c.charCodeAt(0),u=Xs(r.before.charCodeAt(r.before.length-1),l,i);u.inside&&(c=Ys(l)+c.slice(1));let d=c.charCodeAt(c.length-1),f=Xs(r.after.charCodeAt(0),d,i);f.inside&&(c=c.slice(0,-1)+Ys(d));let p=o.move(i+i);return a(),n.attentionEncodeSurroundingInfo={after:f.outside,before:u.outside},s+c+p}function Ec(e,t,n){return n.options.strong||`*`}function Dc(e,t,n,r){return n.safe(e.value,r)}function Oc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function kc(e,t,n){let r=(_c(n)+(n.options.ruleSpaces?` `:``)).repeat(Oc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Ac={blockquote:Is,break:Bs,code:Ws,definition:qs,emphasis:Zs,hardBreak:Bs,heading:ec,html:tc,image:rc,imageReference:ac,inlineCode:sc,link:uc,linkReference:fc,list:vc,listItem:bc,paragraph:xc,root:Cc,strong:Tc,text:Dc,thematicBreak:kc};function jc(){return{enter:{table:Mc,tableData:Ic,tableHeader:Ic,tableRow:Pc},exit:{codeText:Lc,table:Nc,tableData:Fc,tableHeader:Fc,tableRow:Fc}}}function Mc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Nc(e){this.exit(e),this.data.inTable=void 0}function Pc(e){this.enter({type:`tableRow`,children:[]},e)}function Fc(e){this.exit(e)}function Ic(e){this.enter({type:`tableCell`,children:[]},e)}function Lc(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Rc));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Rc(e,t){return t===`|`?t:e}function zc(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:` `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(` -`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Ns(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var hl={tokenize:Cl,partial:!0};function gl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:bl,continuation:{tokenize:xl},exit:Sl}},text:{91:{name:`gfmFootnoteCall`,tokenize:yl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:_l,resolveTo:vl}}}}function _l(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=U(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function vl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function yl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||q(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(U(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return q(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function bl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||q(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=U(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return q(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Y(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function xl(e,t,n){return e.check(wn,t,e.attempt(hl,t,n))}function Sl(e){e.exit(`gfmFootnoteDefinition`)}function Cl(e,t,n){let r=this;return Y(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function wl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=gn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Tl=class{constructor(){this.map=[]}add(e,t,n){El(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function El(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):K(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):J(t)?Y(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||q(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,J(t)?Y(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return J(t)?Y(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||K(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return J(t)?Y(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||K(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||K(n)?(e.exit(`tableRow`),t(n)):J(n)?Y(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||q(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Al(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Tl;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Nl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Ml(e,t,n,r,i){let a=[],o=Nl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Nl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Pl={name:`tasklistCheck`,tokenize:Il};function Fl(){return{text:{91:Pl}}}function Il(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return q(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return K(r)?t(r):J(r)?e.check({tokenize:Ll},t,n)(r):n(r)}}function Ll(e,t,n){return Y(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function Rl(e){return Xt([el(),gl(),wl(e),Ol(),Fl()])}var zl={};function Bl(e){let t=this,n=e||zl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(Rl(n)),a.push(Gc()),o.push(Kc(n))}var Vl=(0,A.lazy)(()=>O(()=>import(`./mcp-app-frame-BZJusU6-.js`),__vite__mapDeps([0,1,2,3]))),Hl=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function Ul(e){return{observability_overview:`System health`,service_topology:`Service map`,service_performance:`Performance`,trace_detail:`Trace analysis`,search_logs:`Logs`}[e]??`System analysis`}function Wl(){let{agentAvailable:e,messages:t,messageTimes:n,ready:i,running:a,activity:l,error:d,threadMissing:f,bottomRef:p,send:h,retry:g,reloadThread:v,newThread:y}=E();if(!e)return(0,j.jsx)(o,{size:`sm`,py:96,children:(0,j.jsx)(C,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,j.jsxs)(b,{gap:`md`,children:[(0,j.jsx)(s,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,j.jsx)(_,{order:1,fz:28,children:`Chat is not configured`}),(0,j.jsx)(s,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,j.jsx)(x,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let w=t.filter(e=>e.role!==`tool`);return(0,j.jsxs)(S,{className:`chat-pane`,children:[(0,j.jsx)(S,{className:`chat-scroll`,children:(0,j.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,children:[f&&(0,j.jsx)(c,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,j.jsxs)(u,{justify:`space-between`,children:[(0,j.jsx)(s,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,j.jsx)(x,{size:`compact-sm`,variant:`light`,onClick:y,children:`New chat`})]})}),!f&&!i&&d&&(0,j.jsx)(Gl,{message:d,onRetry:v,onNewThread:y}),!f&&!i&&!d&&(0,j.jsxs)(m,{mih:`40vh`,children:[(0,j.jsx)(r,{size:`sm`}),(0,j.jsx)(s,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!f&&i&&(0,j.jsxs)(j.Fragment,{children:[w.length===0&&(0,j.jsx)(ql,{onSelect:h}),(0,j.jsxs)(b,{gap:`lg`,"aria-live":`polite`,children:[w.map(e=>(0,j.jsx)(Jl,{message:e,time:n[e.id],send:h},e.id)),a&&(0,j.jsxs)(u,{gap:`xs`,children:[(0,j.jsx)(r,{type:`dots`,size:`sm`}),(0,j.jsx)(s,{c:`dimmed`,size:`sm`,children:l||`Analyzing your system`})]}),d&&(0,j.jsx)(Gl,{message:d,onRetry:g}),(0,j.jsx)(`div`,{ref:p})]})]})]})}),!f&&(0,j.jsx)(Kl,{})]})}function Gl({message:e,onRetry:t,onNewThread:n}){return(0,j.jsx)(c,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,j.jsxs)(u,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,j.jsx)(s,{size:`sm`,children:e}),(0,j.jsxs)(u,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,j.jsx)(x,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,j.jsx)(x,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function Kl(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,stop:a,ready:c,running:l}=E();return(0,j.jsx)(S,{className:`chat-composer`,children:(0,j.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},children:[(0,j.jsx)(C,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,j.jsxs)(u,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,j.jsx)(se,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:l?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!c,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),l?(0,j.jsx)(T,{label:`Stop`,children:(0,j.jsx)(D,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:a,children:(0,j.jsx)(he,{size:16,weight:`fill`})})}):(0,j.jsx)(D,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!c,"aria-label":`Send message`,children:(0,j.jsx)(pe,{size:17,weight:`fill`})})]})}),(0,j.jsx)(s,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function ql({onSelect:e}){return(0,j.jsxs)(b,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,j.jsx)(g,{size:`large`}),(0,j.jsx)(_,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,j.jsx)(u,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:Hl.map(t=>(0,j.jsx)(x,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function Jl({message:e,time:t,send:n}){if(e.role===`activity`){let t=e;return t.activityType===`mcp-app`?(0,j.jsx)(C,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},"aria-label":Ul(t.content.toolName),children:(0,j.jsx)(A.Suspense,{fallback:(0,j.jsx)(m,{mih:180,children:(0,j.jsx)(r,{size:`sm`})}),children:(0,j.jsx)(Vl,{content:t.content,onMessage:n})})}):null}let i=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!i&&e.role===`assistant`)return null;let a=e.role===`user`,o=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,j.jsxs)(S,{className:`chat-message`,"data-role":a?`user`:`assistant`,children:[a?(0,j.jsx)(C,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,j.jsx)(s,{style:{whiteSpace:`pre-wrap`},children:i})}):(0,j.jsx)(le,{className:`chat-markdown`,children:(0,j.jsx)(Ro,{remarkPlugins:[Bl],components:Xl,children:i})}),(0,j.jsxs)(u,{className:`chat-message-meta`,gap:6,justify:a?`flex-end`:`flex-start`,mt:4,children:[o&&(0,j.jsx)(s,{c:`dimmed`,size:`xs`,children:o}),!a&&(0,j.jsx)(Yl,{text:i,label:`Copy message`})]})]})}function Yl({text:e,label:t}){let{state:n,copy:r}=ee();return(0,j.jsx)(T,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,j.jsx)(D,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,j.jsx)(d,{size:13,weight:`bold`}):(0,j.jsx)(y,{size:13})})})}var Xl={table:({children:e})=>(0,j.jsx)(S,{className:`chat-table`,children:(0,j.jsx)(k,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,j.jsx)(k.Thead,{children:e}),tbody:({children:e})=>(0,j.jsx)(k.Tbody,{children:e}),tr:({children:e})=>(0,j.jsx)(k.Tr,{children:e}),th:({children:e})=>(0,j.jsx)(k.Th,{children:e}),td:({children:e})=>(0,j.jsx)(k.Td,{children:e}),pre:({children:e})=>(0,j.jsx)(Zl,{children:e}),a:({href:e,children:t})=>(0,j.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function Zl({children:e}){let t=Ql(e);return(0,j.jsxs)(S,{className:`chat-code`,pos:`relative`,children:[(0,j.jsx)(S,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,j.jsx)(Yl,{text:t,label:`Copy code`})}),(0,j.jsx)(`pre`,{children:e})]})}function Ql(e){return typeof e==`string`?e:Array.isArray(e)?e.map(Ql).join(``):e&&typeof e==`object`&&`props`in e?Ql(e.props.children):``}export{Wl as t}; \ No newline at end of file +`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return Ns(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var gl={tokenize:wl,partial:!0};function _l(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:xl,continuation:{tokenize:Sl},exit:Cl}},text:{91:{name:`gfmFootnoteCall`,tokenize:bl},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:vl,resolveTo:yl}}}}function vl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=W(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function yl(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function bl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||J(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(W(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return J(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function xl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||J(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=W(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return J(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),X(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Sl(e,t,n){return e.check(wn,t,e.attempt(gl,t,n))}function Cl(e){e.exit(`gfmFootnoteDefinition`)}function wl(e,t,n){let r=this;return X(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Tl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=gn(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var El=class{constructor(){this.map=[]}add(e,t,n){Dl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0}};function Dl(e,t,n,r){let i=0;if(n!==0||r.length!==0){for(;i-1;){let e=r.events[t][1].type;if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124?u(e):(o=!0,a+=1,u(e))}function u(t){return t===null?n(t):q(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Y(t)?X(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||J(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Y(t)?X(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Y(t)?X(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||q(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Y(t)?X(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||q(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||q(n)?(e.exit(`tableRow`),t(n)):Y(n)?X(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||J(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function jl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new El;for(;++nn[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Pl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Nl(e,t,n,r,i){let a=[],o=Pl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Pl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Fl={name:`tasklistCheck`,tokenize:Ll};function Il(){return{text:{91:Fl}}}function Ll(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return J(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return q(r)?t(r):Y(r)?e.check({tokenize:Rl},t,n)(r):n(r)}}function Rl(e,t,n){return X(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function zl(e){return Xt([tl(),_l(),Tl(e),kl(),Il()])}var Bl={};function Vl(e){let t=this,n=e||Bl,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(zl(n)),a.push(Gc()),o.push(Kc(n))}var Hl=64,Ul=300;function Wl(){let e=(0,j.useRef)(null),t=(0,j.useRef)(!0),n=(0,j.useRef)(()=>{}),r=(0,j.useRef)(null),i=(0,j.useCallback)(()=>{let n=e.current;n&&t.current&&(n.scrollTop=n.scrollHeight)},[]);return{scrollRef:(0,j.useCallback)(r=>{if(n.current(),e.current=r,!r)return;let i=0,a=!1,o=()=>{i=Date.now()},s=()=>{a=!0},c=()=>{a=!1},l=()=>{r.scrollHeight-r.clientHeight-r.scrollTop<=Hl?t.current=!0:(a||Date.now()-i{r.removeEventListener(`scroll`,l),r.removeEventListener(`wheel`,o),r.removeEventListener(`touchmove`,o),r.removeEventListener(`keydown`,o),r.removeEventListener(`pointerdown`,s),window.removeEventListener(`pointerup`,c),n.current=()=>{}},t.current=!0,r.scrollTop=r.scrollHeight},[]),contentRef:(0,j.useCallback)(e=>{r.current?.disconnect(),r.current=null,e&&(r.current=new ResizeObserver(i),r.current.observe(e))},[i]),toBottom:(0,j.useCallback)(()=>{t.current=!0,i()},[i])}}var Gl=(0,j.lazy)(()=>O(()=>import(`./mcp-app-frame-BZJusU6-.js`),__vite__mapDeps([0,1,2,3]))),Kl=[`Summarize system health for the last hour`,`Find the source of elevated errors`,`Map the current service dependencies`,`Show the slowest endpoints`];function ql(e){return{observability_overview:`System health`,service_topology:`Service map`,service_performance:`Performance`,trace_detail:`Trace analysis`,search_logs:`Logs`}[e]??`System analysis`}function Jl(){let{agentAvailable:e,messages:t,messageTimes:n,ready:i,running:a,activity:l,error:d,threadMissing:f,send:p,retry:h,reloadThread:g,newThread:v}=E(),{scrollRef:y,contentRef:w,toBottom:T}=Wl(),D=t.filter(e=>e.role===`user`).at(-1)?.id;if((0,j.useEffect)(()=>{D&&T()},[D,T]),!e)return(0,M.jsx)(o,{size:`sm`,py:96,children:(0,M.jsx)(C,{withBorder:!0,radius:`lg`,p:{base:`xl`,sm:40},children:(0,M.jsxs)(b,{gap:`md`,children:[(0,M.jsx)(s,{c:`brand`,fw:700,size:`xs`,tt:`uppercase`,lts:`0.12em`,children:`Optional capability`}),(0,M.jsx)(_,{order:1,fz:28,children:`Chat is not configured`}),(0,M.jsx)(s,{c:`dimmed`,children:`Add an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.`}),(0,M.jsx)(x,{component:`a`,href:`/dashboards`,variant:`light`,mt:`sm`,children:`Open dashboards`})]})})});let O=t.filter(e=>e.role!==`tool`);return(0,M.jsxs)(S,{className:`chat-pane`,children:[(0,M.jsx)(S,{className:`chat-scroll`,ref:y,tabIndex:0,role:`log`,"aria-label":`Conversation`,children:(0,M.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},py:`lg`,ref:w,children:[f&&(0,M.jsx)(c,{color:`warn`,radius:`lg`,title:`This chat no longer exists`,children:(0,M.jsxs)(u,{justify:`space-between`,children:[(0,M.jsx)(s,{size:`sm`,children:`It was deleted, or the link is wrong.`}),(0,M.jsx)(x,{size:`compact-sm`,variant:`light`,onClick:v,children:`New chat`})]})}),!f&&!i&&d&&(0,M.jsx)(Yl,{message:d,onRetry:g,onNewThread:v}),!f&&!i&&!d&&(0,M.jsxs)(m,{mih:`40vh`,children:[(0,M.jsx)(r,{size:`sm`}),(0,M.jsx)(s,{c:`dimmed`,size:`sm`,ml:`sm`,children:`Loading chat`})]}),!f&&i&&(0,M.jsxs)(M.Fragment,{children:[O.length===0&&(0,M.jsx)(Zl,{onSelect:p}),(0,M.jsxs)(b,{gap:`lg`,"aria-live":`polite`,children:[O.map(e=>(0,M.jsx)(Ql,{message:e,time:n[e.id],send:p},e.id)),a&&(0,M.jsxs)(u,{gap:`xs`,children:[(0,M.jsx)(r,{type:`dots`,size:`sm`}),(0,M.jsx)(s,{c:`dimmed`,size:`sm`,children:l||`Analyzing your system`})]}),d&&(0,M.jsx)(Yl,{message:d,onRetry:h})]})]})]})}),!f&&(0,M.jsx)(Xl,{})]})}function Yl({message:e,onRetry:t,onNewThread:n}){return(0,M.jsx)(c,{color:`bad`,radius:`lg`,title:`Something went wrong`,children:(0,M.jsxs)(u,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,M.jsx)(s,{size:`sm`,children:e}),(0,M.jsxs)(u,{gap:`xs`,wrap:`nowrap`,children:[n&&(0,M.jsx)(x,{size:`compact-sm`,variant:`subtle`,color:`bad`,onClick:n,children:`New chat`}),(0,M.jsx)(x,{size:`compact-sm`,variant:`light`,color:`bad`,onClick:t,children:`Retry`})]})]})})}function Xl(){let{input:e,setInput:t,inputRef:n,submit:r,send:i,stop:a,ready:c,running:l}=E();return(0,M.jsx)(S,{className:`chat-composer`,children:(0,M.jsxs)(o,{size:880,px:{base:`md`,sm:`xl`},children:[(0,M.jsx)(C,{component:`form`,onSubmit:r,className:`chat-composer-field`,withBorder:!0,radius:24,py:6,pl:`lg`,pr:6,children:(0,M.jsxs)(u,{align:`flex-end`,gap:`xs`,wrap:`nowrap`,children:[(0,M.jsx)(se,{ref:n,"aria-label":`Message Fanout`,value:e,onChange:e=>t(e.currentTarget.value),onKeyDown:t=>{t.key===`Enter`&&!t.shiftKey&&(t.preventDefault(),i(e))},placeholder:l?`Fanout is working…`:`Ask about health, errors, or latency…`,disabled:!c,autosize:!0,minRows:1,maxRows:8,variant:`unstyled`,flex:1}),l?(0,M.jsx)(T,{label:`Stop`,children:(0,M.jsx)(D,{type:`button`,variant:`default`,size:40,radius:`xl`,"aria-label":`Stop`,onClick:a,children:(0,M.jsx)(he,{size:16,weight:`fill`})})}):(0,M.jsx)(D,{type:`submit`,variant:`filled`,size:40,radius:`xl`,disabled:!e.trim()||!c,"aria-label":`Send message`,children:(0,M.jsx)(pe,{size:17,weight:`fill`})})]})}),(0,M.jsx)(s,{c:`dimmed`,size:`xs`,ta:`center`,mt:6,children:`Enter to send, Shift+Enter for a new line`})]})})}function Zl({onSelect:e}){return(0,M.jsxs)(b,{align:`center`,gap:`md`,pt:{base:32,sm:88},pb:`xl`,ta:`center`,children:[(0,M.jsx)(g,{size:`large`}),(0,M.jsx)(_,{order:1,fz:24,fw:500,lh:1.25,maw:560,children:`What do you want to know about your system?`}),(0,M.jsx)(u,{justify:`center`,gap:`xs`,mt:`xs`,maw:720,children:Kl.map(t=>(0,M.jsx)(x,{variant:`default`,size:`sm`,radius:`xl`,onClick:()=>void e(t),children:t},t))})]})}function Ql({message:e,time:t,send:n}){if(e.role===`activity`){let t=e;return t.activityType===`mcp-app`?(0,M.jsx)(C,{withBorder:!0,radius:`lg`,style:{overflow:`hidden`},"aria-label":ql(t.content.toolName),children:(0,M.jsx)(j.Suspense,{fallback:(0,M.jsx)(m,{mih:180,children:(0,M.jsx)(r,{size:`sm`})}),children:(0,M.jsx)(Gl,{content:t.content,onMessage:n})})}):null}let i=typeof e.content==`string`?e.content:JSON.stringify(e.content);if(!i&&e.role===`assistant`)return null;let a=e.role===`user`,o=t?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(t)):``;return(0,M.jsxs)(S,{className:`chat-message`,"data-role":a?`user`:`assistant`,children:[a?(0,M.jsx)(C,{radius:`lg`,px:`md`,py:`sm`,bg:`var(--mantine-color-brand-light)`,maw:`70%`,ml:`auto`,w:`fit-content`,children:(0,M.jsx)(s,{style:{whiteSpace:`pre-wrap`},children:i})}):(0,M.jsx)(le,{className:`chat-markdown`,children:(0,M.jsx)(Ro,{remarkPlugins:[Vl],components:eu,children:i})}),(0,M.jsxs)(u,{className:`chat-message-meta`,gap:6,justify:a?`flex-end`:`flex-start`,mt:4,children:[o&&t&&(0,M.jsx)(s,{c:`dimmed`,size:`xs`,title:ee(t),children:o}),!a&&(0,M.jsx)($l,{text:i,label:`Copy message`})]})]})}function $l({text:e,label:t}){let{state:n,copy:r}=te();return(0,M.jsx)(T,{label:n===`failed`?`Could not copy`:n===`copied`?`Copied`:t,children:(0,M.jsx)(D,{variant:`subtle`,color:`gray`,size:`sm`,"aria-label":t,"data-state":n===`idle`?void 0:n,onClick:()=>r(e),children:n===`copied`?(0,M.jsx)(d,{size:13,weight:`bold`}):(0,M.jsx)(y,{size:13})})})}var eu={table:({children:e})=>(0,M.jsx)(S,{className:`chat-table`,children:(0,M.jsx)(k,{striped:!0,highlightOnHover:!0,withTableBorder:!0,verticalSpacing:`xs`,fz:`sm`,children:e})}),thead:({children:e})=>(0,M.jsx)(k.Thead,{children:e}),tbody:({children:e})=>(0,M.jsx)(k.Tbody,{children:e}),tr:({children:e})=>(0,M.jsx)(k.Tr,{children:e}),th:({children:e})=>(0,M.jsx)(k.Th,{children:e}),td:({children:e})=>(0,M.jsx)(k.Td,{children:e}),pre:({children:e})=>(0,M.jsx)(tu,{children:e}),a:({href:e,children:t})=>(0,M.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:t})};function tu({children:e}){let t=nu(e);return(0,M.jsxs)(S,{className:`chat-code`,pos:`relative`,children:[(0,M.jsx)(S,{className:`chat-code-actions`,pos:`absolute`,top:6,right:6,children:(0,M.jsx)($l,{text:t,label:`Copy code`})}),(0,M.jsx)(`pre`,{children:e})]})}function nu(e){return typeof e==`string`?e:Array.isArray(e)?e.map(nu).join(``):e&&typeof e==`object`&&`props`in e?nu(e.props.children):``}export{Jl as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-B6mb73V8.js b/internal/ui/dist/assets/chat._threadId-B6mb73V8.js new file mode 100644 index 000000000..18391c737 --- /dev/null +++ b/internal/ui/dist/assets/chat._threadId-B6mb73V8.js @@ -0,0 +1 @@ +import{t as e}from"./chat-B-nb-Yp3.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat._threadId-DvqxaiRx.js b/internal/ui/dist/assets/chat._threadId-DvqxaiRx.js deleted file mode 100644 index 3dfc4a5ee..000000000 --- a/internal/ui/dist/assets/chat._threadId-DvqxaiRx.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-DuN0TFYv.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-B6mb73V8.js b/internal/ui/dist/assets/chat.index-B6mb73V8.js new file mode 100644 index 000000000..18391c737 --- /dev/null +++ b/internal/ui/dist/assets/chat.index-B6mb73V8.js @@ -0,0 +1 @@ +import{t as e}from"./chat-B-nb-Yp3.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/chat.index-DvqxaiRx.js b/internal/ui/dist/assets/chat.index-DvqxaiRx.js deleted file mode 100644 index 3dfc4a5ee..000000000 --- a/internal/ui/dist/assets/chat.index-DvqxaiRx.js +++ /dev/null @@ -1 +0,0 @@ -import{t as e}from"./chat-DuN0TFYv.js";var t=e;export{t as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboard-7dM548yK.js b/internal/ui/dist/assets/dashboard-BfR0ACHf.js similarity index 52% rename from internal/ui/dist/assets/dashboard-7dM548yK.js rename to internal/ui/dist/assets/dashboard-BfR0ACHf.js index 7770f0727..df5055250 100644 --- a/internal/ui/dist/assets/dashboard-7dM548yK.js +++ b/internal/ui/dist/assets/dashboard-BfR0ACHf.js @@ -1,24 +1,24 @@ -import{$ as e,A as t,C as n,D as r,E as i,K as a,N as o,O as s,R as c,S as l,St as u,T as d,X as f,Y as p,_ as m,_t as h,a as g,at as _,ct as v,d as y,dt as b,et as x,f as S,gt as C,h as w,ht as T,i as E,it as D,j as O,k,l as A,lt as j,m as M,mt as N,o as P,p as ee,pt as te,r as ne,s as re,st as ie,u as ae,w as oe,x as se,y as ce,yt as le}from"./brand-MzZ03bSa.js";import{c as ue,i as F,o as I}from"./auth-BeUORN-q.js";import{A as de,C as fe,D as pe,E as me,M as he,S as ge,T as _e,_ as ve,b as ye,c as be,f as xe,g as Se,h as Ce,i as we,l as Te,m as Ee,n as De,o as Oe,p as ke,s as Ae,u as je,v as Me,w as Ne,x as Pe,y as Fe}from"./tokens-CvbGYJRX.js";import{S as Ie,T as Le,o as Re,t as ze,w as Be,x as Ve}from"./Tooltip-BJiO7C_G.js";import{t as He}from"./use-computed-color-scheme-6JIsge00.js";import{O as Ue,V as We,i as Ge,k as Ke,n as qe,t as Je}from"./api-Be5Lq4YA.js";import{o as Ye}from"./preload-helper-BL3qEkUh.js";import{n as Xe,t as Ze}from"./copy-Bzg2uCpz.js";import{n as Qe,t as $e}from"./WarningCircle.es-DDq2AFnK.js";var L=u(C(),1),R=N();function et(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function tt(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}function nt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=O(`Flex`,null,e),{classNames:n,className:a,style:l,styles:u,unstyled:f,vars:p,gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=k({name:`Flex`,classes:st,props:t,className:a,style:l,classNames:n,styles:u,unstyled:f,attributes:x,vars:p}),w=o(),T=d(),E=i({styleProps:{gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b},theme:w,data:ot}),D=c(),A=D&&E.hasResponsiveStyles?r(E.styles,E.media):T;return(0,R.jsxs)(R.Fragment,{children:[E.hasResponsiveStyles&&(0,R.jsx)(s,{selector:`.${A}`,styles:E.styles,media:E.media,deduplicate:D}),(0,R.jsx)(se,{...C(`root`,{className:A,style:j(E.inlineStyles)}),...S})]})});ct.classes=st,ct.displayName=`@mantine/core/Flex`;function lt(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>lt(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function ut(e){return e?e.map(e=>lt(e)):[]}function dt(e){return e.reduce((e,t)=>`group`in t?{...e,...dt(t.items)}:(e[`${t.value}`]=t,e),{})}var ft={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},pt={error:null},mt=f((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ie(t,`combobox-chevron-size`),"--combobox-chevron-color":n?a(n,e):void 0}})),ht=n(e=>{let t=O(`ComboboxChevron`,pt,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=k({name:`ComboboxChevron`,classes:ft,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:mt,attributes:u,rootSelector:`chevron`});return(0,R.jsx)(se,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,R.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});ht.classes=ft,ht.varsResolver=mt,ht.displayName=`@mantine/core/ComboboxChevron`;var[gt,_t]=Be(`Combobox component was not found in tree`);function vt({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,R.jsx)(M.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}vt.displayName=`@mantine/core/ComboboxClearButton`;var yt=n(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=O(`ComboboxDropdown`,null,e),s=_t();return(0,R.jsx)(me.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});yt.classes=ft,yt.displayName=`@mantine/core/ComboboxDropdown`;var bt={refProp:`ref`},xt=n(e=>{let{children:t,refProp:n,ref:r}=O(`ComboboxDropdownTarget`,bt,e);if(_t(),!Le(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,R.jsx)(me.Target,{ref:r,refProp:n,children:t})});xt.displayName=`@mantine/core/ComboboxDropdownTarget`;var St=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxEmpty`,null,e);return(0,R.jsx)(se,{..._t().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});St.classes=ft,St.displayName=`@mantine/core/ComboboxEmpty`;function Ct({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=_t(),[c,l]=(0,L.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var wt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Tt=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxEventsTarget`,wt,t),d=Ve(n);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=_t();return(0,L.cloneElement)(d,{...Ct({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u,[r]:e(l,f.store.targetRef,Ie(d))})});Tt.displayName=`@mantine/core/ComboboxEventsTarget`;var Et=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxFooter`,null,e);return(0,R.jsx)(se,{..._t().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Et.classes=ft,Et.displayName=`@mantine/core/ComboboxFooter`;var Dt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=O(`ComboboxGroup`,null,e),u=_t(),d=x(c),f=s!=null&&s!==!1&&s!==``;return(0,R.jsxs)(se,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,R.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Dt.classes=ft,Dt.displayName=`@mantine/core/ComboboxGroup`;var Ot=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxHeader`,null,e);return(0,R.jsx)(se,{..._t().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Ot.classes=ft,Ot.displayName=`@mantine/core/ComboboxHeader`;function kt({value:e,valuesDivider:t=`,`,...n}){return(0,R.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}kt.displayName=`@mantine/core/ComboboxHiddenInput`;var At=n(e=>{let t=O(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=_t(),_=(0,L.useId)(),v=c||_;return(0,R.jsx)(se,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});At.classes=ft,At.displayName=`@mantine/core/ComboboxOption`;var jt=n(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=O(`ComboboxOptions`,null,e),l=_t(),u=x(a);return(0,L.useEffect)(()=>{l.store.setListId(u)},[u]),(0,R.jsx)(se,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});jt.classes=ft,jt.displayName=`@mantine/core/ComboboxOptions`;var Mt={withAriaAttributes:!0,withKeyboardNavigation:!0},Nt=n(t=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,onClick:c,withKeyboardNavigation:l,size:u,ref:d,...f}=O(`ComboboxSearch`,Mt,t),p=_t(),m=p.getStyles(`search`),h=Ct({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:s,onClick:c,autoComplete:`off`});return(0,R.jsx)(M,{ref:e(d,p.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},r],size:u||p.size,...h,...f,__staticSelector:`Combobox`})});Nt.classes=ft,Nt.displayName=`@mantine/core/ComboboxSearch`;var Pt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Ft=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxTarget`,Pt,t),d=Ve(n);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=_t(),p=(0,L.cloneElement)(d,{...Ct({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u});return(0,R.jsx)(me.Target,{refProp:r,ref:e(l,f.store.targetRef),children:p})});Ft.displayName=`@mantine/core/ComboboxTarget`;function It(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Lt(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,L.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,L.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,L.useCallback)(()=>{let e=it(f.current),t=nt(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,L.useCallback)(e=>{let t=it(f.current),n=nt(`#${l.current}`,t),r=n?rt(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,L.useCallback)(()=>{let e=it(f.current),t=nt(`#${l.current} [data-combobox-active]`,e);if(t){let n=rt(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,L.useCallback)(()=>{let e=it(f.current),t=rt(`#${l.current} [data-combobox-option]`,e);return b(Lt(u.current,t,a))},[b,a]),C=(0,L.useCallback)(()=>{let e=it(f.current),t=rt(`#${l.current} [data-combobox-option]`,e);return b(It(u.current,t,a))},[b,a]),w=(0,L.useCallback)(()=>{let e=it(f.current),t=rt(`#${l.current} [data-combobox-option]`,e);return b(Rt(t))},[b]),T=(0,L.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=it(f.current),r=rt(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=it(f.current),r=rt(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,L.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,L.useCallback)(()=>{let e=it(f.current);(rt(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,L.useCallback)(e=>{l.current=e},[]),k=(0,L.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,L.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,L.useCallback)(()=>u.current,[]);return(0,L.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var Bt={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Vt=f((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:b(n),"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)}})),Ht=e=>{let t=O(`Combobox`,Bt,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=zt(),x=o||b,S=k({name:p||`Combobox`,classes:ft,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Vt}),C=()=>{l?.(),x.closeDropdown()};return(0,R.jsx)(gt,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,R.jsx)(me,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Ht.extend=e=>e,Ht.classes=ft,Ht.varsResolver=Vt,Ht.displayName=`@mantine/core/Combobox`,Ht.Target=Ft,Ht.Dropdown=yt,Ht.Options=jt,Ht.Option=At,Ht.Search=Nt,Ht.Empty=St,Ht.Chevron=ht,Ht.Footer=Et,Ht.Header=Ot,Ht.EventsTarget=Tt,Ht.DropdownTarget=xt,Ht.Group=Dt,Ht.ClearButton=vt,Ht.HiddenInput=kt;function Ut(e){return`group`in e}function Wt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function Kt(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Ut(n))Kt(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function qt(e,t){return Array.isArray(e)?e.includes(t):e===t}function Jt({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Ut(e)){let s=qt(r,e.value),c=t&&(s?(0,R.jsx)(_e,{className:ft.optionsDropdownCheckIcon}):n?(0,R.jsx)(`div`,{className:ft.optionsDropdownCheckPlaceholder}):null),l=(0,R.jsxs)(R.Fragment,{children:[i===`left`&&c,(0,R.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,R.jsx)(Ht.Option,{value:e.value,disabled:e.disabled,className:p({[ft.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,R.jsx)(Jt,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,R.jsx)(Ht.Group,{label:e.group,children:s})}function Yt({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=_t();Kt(e);let x=typeof i==`string`?(r||Wt)({options:e,search:l?i:``,limit:a??1/0}):e,S=Gt(x),C=x.map((e,t)=>(0,R.jsx)(Jt,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Ut(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,R.jsx)(Ht.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,R.jsxs)(Ht.Options,{labelledBy:g,"aria-label":y,children:[c?(0,R.jsx)(Re.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,R.jsx)(Ht.Empty,{children:m})]})})}function Xt(e){let t=e.currentTarget;return it(t).activeElement!==t}function Zt(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}var[Qt,$t]=Be(`Progress.Root component was not found in tree`),en={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},tn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ProgressLabel`,null,e);return(0,R.jsx)(se,{...$t().getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});tn.classes=en,tn.displayName=`@mantine/core/ProgressLabel`;var nn=f((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":ie(t,`progress-size`),"--progress-radius":n===void 0?void 0:_(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),rn=n(e=>{let t=O(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=k({name:`Progress`,classes:en,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:nn});return(0,R.jsx)(Qt,{value:{getStyles:m,autoContrast:c},children:(0,R.jsx)(se,{mod:[{orientation:u},f],...m(`root`),...p})})});rn.classes=en,rn.varsResolver=nn,rn.displayName=`@mantine/core/ProgressRoot`;var an={withAria:!0},on=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:s,value:c,withAria:l,color:u,striped:d,animated:f,mod:p,...m}=O(`ProgressSection`,an,e),h=$t(),g=o(),_=l?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-valuetext":`${c}%`}:{};return(0,R.jsx)(se,{...h.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...m,..._,mod:[{striped:d||f,animated:f},p],__vars:{"--progress-section-size":`${c}%`,"--progress-section-color":a(u,g),"--progress-label-color":at(h.autoContrast,g)?pe({color:u,theme:g,autoContrast:h.autoContrast}):void 0}})});on.classes=en,on.displayName=`@mantine/core/ProgressSection`;var sn=n(e=>{let n=O(`Progress`,null,e),{value:r,classNames:i,styles:a,vars:o,color:s,striped:c,animated:l,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:p}=t({classNames:i,styles:a,props:n});return(0,R.jsx)(rn,{classNames:f,styles:p,vars:o,...d,children:(0,R.jsx)(on,{value:r,color:s,striped:c,animated:l,"aria-label":u})})});sn.classes=en,sn.displayName=`@mantine/core/Progress`,sn.Section=on,sn.Root=rn,sn.Label=tn;var cn={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},ln=oe(e=>{let n=O([`Input`,`InputWrapper`,`Select`],cn,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:D,maxDropdownHeight:k,floatingHeight:A,size:j,searchable:M,rightSection:N,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,name:ie,form:ae,searchValue:oe,defaultSearchValue:se,onSearchChange:ce,allowDeselect:le,error:F,rightSectionPointerEvents:I,id:de,clearable:fe,clearSectionMode:pe,clearButtonProps:me,hiddenInputProps:he,renderOption:ge,onClear:_e,autoComplete:ve,scrollAreaProps:ye,__defaultRightSection:be,__clearSection:xe,__clearable:Se,chevronColor:Ce,autoSelectOnBlur:we,openOnFocus:Te,attributes:Ee,...De}=n,Oe=(0,L.useMemo)(()=>ut(h),[h]),ke=(0,L.useRef)({}),Ae=(0,L.useMemo)(()=>dt(Oe),[Oe]),je=x(de),[Me,Ne,Pe]=ue({value:g,defaultValue:_,finalValue:null,onChange:m}),Fe=Me==null?void 0:`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`],Ie=tt(Fe),[Le,Re,ze]=ue({value:oe,defaultValue:se,finalValue:Fe?Fe.label:``,onChange:ce}),Be=zt({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y?Be.selectFirstOption():Be.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(Be.resetSelectedOption,0)}}),Ve=e=>{Re(e),Be.resetSelectedOption()},{resolvedClassNames:He,resolvedStyles:Ue}=t({props:n,styles:i,classNames:r});(0,L.useEffect)(()=>{v&&Be.selectFirstOption()},[v,Le]),(0,L.useEffect)(()=>{g===null&&Ve(``),g!=null&&Fe&&(Ie?.value!==Fe.value||Ie?.label!==Fe.label)&&Ve(Fe.label)},[g,Fe]),(0,L.useEffect)(()=>{!Pe&&!ze&&Ve(Me==null?``:`${Me}`in Ae?Ae[`${Me}`]?.label:ke.current[`${Me}`]?.label||``)},[Ae,Me]),(0,L.useEffect)(()=>{Me&&`${Me}`in Ae&&(ke.current[`${Me}`]=Ae[`${Me}`])},[Ae,Me]);let We=(0,R.jsx)(Ht.ClearButton,{...me,onClear:()=>{Ne(null,null),Ve(``),_e?.()}}),Ge=fe&&Me!=null&&!w&&!C;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Ht,{store:Be,__staticSelector:`Select`,classNames:He,styles:Ue,unstyled:a,readOnly:C,size:j,attributes:Ee,floatingHeight:A,keepMounted:we,onOptionSubmit:e=>{b?.(e);let t=le&&`${Ae[e].value}`==`${Me}`?null:Ae[e],n=t?t.value:null;n!==Me&&Ne(n,t),!Pe&&Ve(n==null?``:t?.label||``),Be.closeDropdown()},...S,children:[(0,R.jsx)(Ht.Target,{targetType:M?`input`:`button`,autoComplete:ve,withExpandedAttribute:!0,children:(0,R.jsx)(ee,{id:je,__defaultRightSection:(0,R.jsx)(Ht.Chevron,{size:j,error:F,unstyled:a,color:Ce}),__clearSection:We,__clearable:Ge,__clearSectionMode:pe,rightSection:N,rightSectionPointerEvents:I||`none`,...De,size:j,__staticSelector:`Select`,disabled:w,readOnly:C||!M,value:Le,onChange:e=>{if(Xt(e)){if(!C){let t=Zt(Ae,e.currentTarget.value);t&&`${t.value}`!=`${Me}`&&(Ne(t.value,t),!Pe&&Ve(t.label))}return}Ve(e.currentTarget.value),Be.openDropdown(),v&&Be.selectFirstOption()},onFocus:e=>{Te&&M&&Be.openDropdown(),d?.(e)},onBlur:e=>{we&&Be.clickSelectedOption(),M&&Be.closeDropdown();let t=Me!=null&&(`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`]);Ve(t&&t.label||``),f?.(e)},onClick:e=>{M?Be.openDropdown():Be.toggleDropdown(),p?.(e)},classNames:He,styles:Ue,unstyled:a,pointer:!M,error:F,attributes:Ee})}),(0,R.jsx)(Yt,{data:Oe,hidden:C||w,filter:T,search:Le,limit:E,hiddenWhenEmpty:!re,withScrollArea:D,maxDropdownHeight:k,filterOptions:!!M&&Fe?.label!==Le,value:Me,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,unstyled:a,labelId:De.label?`${je}-label`:void 0,"aria-label":De.label?void 0:De[`aria-label`],renderOption:ge,scrollAreaProps:ye})]}),(0,R.jsx)(Ht.HiddenInput,{value:Me,name:ie,form:ae,disabled:w,...he})]})});ln.classes={...ee.classes,...Ht.classes},ln.displayName=`@mantine/core/Select`;function un(e){if(e!==void 0)return typeof e==`number`?b(e):e}function dn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let c=o(),l=t===void 0?e:t,u=r!==void 0,d=j({"--sg-spacing-x":v(et(e)),"--sg-spacing-y":v(et(l)),"--sg-auto-rows":i,...u?{"--sg-min-col-width":un(r)}:{"--sg-cols":et(n)?.toString()}}),f=te(c.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof l==`object`&&l[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(l[r])),!u&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:d,media:de(te(f),c.breakpoints).filter(e=>te(f[e.value]).length>0).map(e=>({query:`(min-width: ${c.breakpoints[e.value]})`,styles:f[e.value]})),selector:a})}function fn(e){return typeof e==`object`&&e?te(e):[]}function pn(e){return e.sort((e,t)=>he(e)-he(t))}function mn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return pn(Array.from(new Set([...fn(e),...fn(t),...r===void 0?fn(n):[]])))}function hn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,c=r!==void 0,l=j({"--sg-spacing-x":v(et(e)),"--sg-spacing-y":v(et(o)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":un(r)}:{"--sg-cols":et(n)?.toString()}}),u=mn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),d=u.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(o[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:l,container:u.map(e=>({query:`simple-grid (min-width: ${e})`,styles:d[e]})),selector:a})}var gn={container:`m_925c2d2c`,root:`m_2415a157`},_n={cols:1,spacing:`md`,type:`media`},vn=n(e=>{let t=O(`SimpleGrid`,_n,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:f,minColWidth:p,autoFlow:m,autoRows:h,attributes:g,..._}=t,v=k({name:`SimpleGrid`,classes:gn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s}),y=d(),b=p===void 0?void 0:m||`auto-fill`;return f===`container`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(hn,{...t,selector:`.${y}`}),(0,R.jsx)(`div`,{...v(`container`),children:(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(dn,{...t,selector:`.${y}`}),(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})]})});vn.classes=gn,vn.displayName=`@mantine/core/SimpleGrid`;var yn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),bn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),xn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),Sn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),Cn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:yn}));Cn.displayName=`ArrowUpRightIcon`;var wn=Cn,Tn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:bn}));Tn.displayName=`CaretDownIcon`;var En=Tn,Dn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:xn}));Dn.displayName=`ListMagnifyingGlassIcon`;var On=Dn,kn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:Sn}));kn.displayName=`SlidersHorizontalIcon`;var An=kn;function jn(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function Mn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Nn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=jn(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=Mn(r,u,s[0]),f=Mn(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Pn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=jn(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Ln(d,0,s-r),f=Ln(f,0,l-i),{x:d,y:f}}function Fn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=jn(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function In(e,t,n){let{margin:r,rowHeight:i}=e,a=jn(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function Ln(e,t,n){return Math.max(Math.min(e,n),t)}function Rn(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function zn(e,t){for(let n=0;nRn(e,t))}function Vn(e,t){return t===`horizontal`?Un(e):t===`vertical`||t===`wrap`?Hn(e):[...e]}function Hn(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function Un(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function Wn(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function Gn(e,t){for(let n=0;ne.static===!0)}function qn(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function Jn(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;zn(n,i);)i.y++}}return e}function Qn(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=Vn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=Bn(d,t),p=f.length>0;if(p&&c)return Jn(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return Qn(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return Qn(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return Qn(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:Qn(e,n,l,u,r,c,i)}function er(e,t,n){return Math.max(t,Math.min(n,e))}var tr=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:er(t,0,Math.max(0,r-e.w)),y:er(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:er(t,1,Math.max(1,o)),h:er(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:er(t,e.minW??1,e.maxW??1/0),h:er(n,e.minH??1,e.maxH??1/0)}}}];function nr(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function rr(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function ir({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function ar({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function or(e){return e*100+`%`}function sr(e,t,n,r){return e+n>r?t:n}function cr(e,t,n){return e<0?t:n}function lr(e){return Math.max(0,e)}function ur(e){return Math.max(0,e)}var dr=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:cr(o,e.height,i),top:ur(o)}},fr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:sr(e.left,e.width,o,n),left:lr(i)}},pr=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:ur(r),left:0}:{height:i,width:a,top:ur(r),left:o}},mr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:cr(r,e.height,a),top:ur(r)}},hr={n:dr,ne:(e,t,n)=>dr(e,fr(e,t,n)),e:fr,se:(e,t,n)=>mr(e,fr(e,t,n)),s:mr,sw:(e,t,n)=>mr(e,pr(e,t)),w:pr,nw:(e,t,n)=>dr(e,pr(e,t))};function gr(e,t,n,r){let i=hr[e];return i?i(t,{...t,...n},r):n}var _r={type:`transform`,scale:1,calcStyle(e){return ir(e)}},vr={type:`absolute`,scale:1,calcStyle(e){return ar(e)}};function yr(e){return{type:`transform`,scale:e,calcStyle(e){return ir(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var br=_r,xr={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},Sr={enabled:!0,bounded:!1,threshold:3},Cr={enabled:!0,handles:[`se`]},wr={enabled:!1,defaultItem:{w:1,h:1}};function Tr(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??Kn(e).length>0;for(let i=o+1;it.y+t.h)break;Rn(t,o)&&Tr(e,o,n+t[a],r,s)}}t[r]=n}function Er(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!zn(e,t);)t.y--;let i;for(;(i=zn(e,t))!==void 0;)Tr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Dr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!zn(e,t);)t.x--;let i;for(;(i=zn(e,t))!==void 0;)if(Tr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!zn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Or={type:`vertical`,allowOverlap:!1,compact(e,t){let n=Kn(e),r=Wn(n),i=Hn(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Ir(e,t){let n=Fr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Lr(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Rr(e,t,n,r,i,a){let o=e[n];if(o)return Jn(o);let s=e[r],c=Fr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Vr=h(((e,t)=>{var n=Br();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Hr=h(((e,t)=>{t.exports=Vr()()})),Ur=u(Hr(),1),Wr=u(T(),1);function Gr(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&Gr(e.changedTouches,e=>t===e.identifier)}function hi(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function gi(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function _i(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??gi();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +import{$ as e,A as t,C as n,D as r,E as i,K as a,N as o,O as s,R as c,S as l,St as u,T as d,X as f,Y as p,_ as m,_t as h,a as g,at as _,ct as v,d as y,dt as b,et as x,f as S,gt as C,h as w,ht as T,i as E,it as D,j as O,k,l as A,lt as j,m as M,mt as N,o as P,p as ee,pt as te,r as ne,s as re,st as ie,u as ae,w as oe,x as se,y as ce,yt as le}from"./brand-MzZ03bSa.js";import{c as ue,i as F,o as I}from"./auth-BeUORN-q.js";import{C as de,D as fe,E as pe,N as me,O as he,S as ge,T as _e,_ as ve,b as ye,c as be,f as xe,g as Se,h as Ce,i as we,j as Te,l as Ee,m as De,n as Oe,o as ke,p as Ae,s as je,u as Me,v as Ne,w as Pe,x as Fe,y as Ie}from"./tokens-DNprTSRA.js";import{S as Le,T as Re,o as ze,t as Be,w as Ve,x as He}from"./Tooltip-BJiO7C_G.js";import{t as Ue}from"./use-computed-color-scheme-6JIsge00.js";import{O as We,V as Ge,i as Ke,k as qe,n as Je,t as Ye}from"./api-Be5Lq4YA.js";import{o as Xe}from"./preload-helper-BL3qEkUh.js";import{a as Ze,c as Qe,i as $e,n as et,o as tt,r as nt,s as rt,t as it}from"./format-urrStEsn.js";import{n as at,t as ot}from"./WarningCircle.es-DDq2AFnK.js";var L=u(C(),1),R=N();function st(e){return typeof e==`object`&&e?`base`in e?e.base:void 0:e}function ct(e){let t=(0,L.useRef)(void 0);return(0,L.useEffect)(()=>{t.current=e},[e]),t.current}function lt(e,t=document){let n=t.querySelector(e);if(n)return n;let r=t.querySelectorAll(`*`);for(let t=0;t{let t=O(`Flex`,null,e),{classNames:n,className:a,style:l,styles:u,unstyled:f,vars:p,gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b,attributes:x,...S}=t,C=k({name:`Flex`,classes:mt,props:t,className:a,style:l,classNames:n,styles:u,unstyled:f,attributes:x,vars:p}),w=o(),T=d(),E=i({styleProps:{gap:m,rowGap:h,columnGap:g,align:_,justify:v,wrap:y,direction:b},theme:w,data:pt}),D=c(),A=D&&E.hasResponsiveStyles?r(E.styles,E.media):T;return(0,R.jsxs)(R.Fragment,{children:[E.hasResponsiveStyles&&(0,R.jsx)(s,{selector:`.${A}`,styles:E.styles,media:E.media,deduplicate:D}),(0,R.jsx)(se,{...C(`root`,{className:A,style:j(E.inlineStyles)}),...S})]})});ht.classes=mt,ht.displayName=`@mantine/core/Flex`;function gt(e){return typeof e==`string`?{value:e,label:e}:typeof e==`object`&&`value`in e&&!(`label`in e)?{value:e.value,label:`${e.value}`,disabled:e.disabled}:typeof e==`object`&&`group`in e?{group:e.group,items:e.items.map(e=>gt(e))}:typeof e==`number`||typeof e==`bigint`||typeof e==`boolean`?{value:e,label:`${e}`}:e}function _t(e){return e?e.map(e=>gt(e)):[]}function vt(e){return e.reduce((e,t)=>`group`in t?{...e,...vt(t.items)}:(e[`${t.value}`]=t,e),{})}var yt={dropdown:`m_88b62a41`,search:`m_985517d8`,options:`m_b2821a6e`,option:`m_92253aa5`,empty:`m_2530cd1d`,header:`m_858f94bd`,footer:`m_82b967cb`,group:`m_254f3e4f`,groupLabel:`m_2bb2e9e5`,chevron:`m_2943220b`,optionsDropdownOption:`m_390b5f4`,optionsDropdownCheckIcon:`m_8ee53fc2`,optionsDropdownCheckPlaceholder:`m_a530ee0a`},bt={error:null},xt=f((e,{size:t,color:n})=>({chevron:{"--combobox-chevron-size":ie(t,`combobox-chevron-size`),"--combobox-chevron-color":n?a(n,e):void 0}})),St=n(e=>{let t=O(`ComboboxChevron`,bt,e),{size:n,error:r,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,attributes:u,mod:d,...f}=t,p=k({name:`ComboboxChevron`,classes:yt,props:t,style:i,className:a,classNames:o,styles:s,unstyled:c,vars:l,varsResolver:xt,attributes:u,rootSelector:`chevron`});return(0,R.jsx)(se,{component:`svg`,...f,...p(`chevron`),size:n,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,mod:[`combobox-chevron`,{error:r},d],children:(0,R.jsx)(`path`,{d:`M4.93179 5.43179C4.75605 5.60753 4.75605 5.89245 4.93179 6.06819C5.10753 6.24392 5.39245 6.24392 5.56819 6.06819L7.49999 4.13638L9.43179 6.06819C9.60753 6.24392 9.89245 6.24392 10.0682 6.06819C10.2439 5.89245 10.2439 5.60753 10.0682 5.43179L7.81819 3.18179C7.73379 3.0974 7.61933 3.04999 7.49999 3.04999C7.38064 3.04999 7.26618 3.0974 7.18179 3.18179L4.93179 5.43179ZM10.0682 9.56819C10.2439 9.39245 10.2439 9.10753 10.0682 8.93179C9.89245 8.75606 9.60753 8.75606 9.43179 8.93179L7.49999 10.8636L5.56819 8.93179C5.39245 8.75606 5.10753 8.75606 4.93179 8.93179C4.75605 9.10753 4.75605 9.39245 4.93179 9.56819L7.18179 11.8182C7.35753 11.9939 7.64245 11.9939 7.81819 11.8182L10.0682 9.56819Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})});St.classes=yt,St.varsResolver=xt,St.displayName=`@mantine/core/ComboboxChevron`;var[Ct,wt]=Ve(`Combobox component was not found in tree`);function Tt({onMouseDown:e,onClick:t,onClear:n,...r}){return(0,R.jsx)(M.ClearButton,{tabIndex:-1,"aria-hidden":!0,...r,onMouseDown:t=>{t.preventDefault(),e?.(t)},onClick:e=>{n(),t?.(e)}})}Tt.displayName=`@mantine/core/ComboboxClearButton`;var Et=n(e=>{let{classNames:t,styles:n,className:r,style:i,hidden:a,...o}=O(`ComboboxDropdown`,null,e),s=wt();return(0,R.jsx)(fe.Dropdown,{...o,role:`presentation`,"data-hidden":a||void 0,"data-floating-height":s.floatingHeight||void 0,...s.getStyles(`dropdown`,{className:r,style:i,classNames:t,styles:n})})});Et.classes=yt,Et.displayName=`@mantine/core/ComboboxDropdown`;var Dt={refProp:`ref`},Ot=n(e=>{let{children:t,refProp:n,ref:r}=O(`ComboboxDropdownTarget`,Dt,e);if(wt(),!Re(t))throw Error(`Combobox.DropdownTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return(0,R.jsx)(fe.Target,{ref:r,refProp:n,children:t})});Ot.displayName=`@mantine/core/ComboboxDropdownTarget`;var kt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxEmpty`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`empty`,{className:n,classNames:t,styles:i,style:r}),...o})});kt.classes=yt,kt.displayName=`@mantine/core/ComboboxEmpty`;function At({onKeyDown:e,onClick:t,withKeyboardNavigation:n,withAriaAttributes:r,withExpandedAttribute:i,targetType:a,autoComplete:o}){let s=wt(),[c,l]=(0,L.useState)(null),u=t=>{if(e?.(t),!s.readOnly&&n){if(t.nativeEvent.isComposing)return;if(t.nativeEvent.code===`ArrowDown`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectNextOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`ArrowUp`&&(t.preventDefault(),s.store.dropdownOpened?l(s.store.selectPreviousOption()):(s.store.openDropdown(`keyboard`),l(s.store.selectActiveOption()),s.store.updateSelectedOptionIndex(`selected`,{scrollIntoView:!0}))),t.nativeEvent.code===`Enter`||t.nativeEvent.code===`NumpadEnter`){if(t.nativeEvent.keyCode===229)return;let e=s.store.getSelectedOptionIndex();s.store.dropdownOpened&&e!==-1?(t.preventDefault(),s.store.clickSelectedOption()):a===`button`&&(t.preventDefault(),s.store.openDropdown(`keyboard`))}t.key===`Escape`&&s.store.closeDropdown(`keyboard`),t.nativeEvent.code===`Space`&&a===`button`&&(t.preventDefault(),s.store.toggleDropdown(`keyboard`))}},d=r?{...i?{role:`combobox`}:{},"aria-haspopup":`listbox`,"aria-expanded":i?!!(s.store.listId&&s.store.dropdownOpened):void 0,"aria-controls":s.store.dropdownOpened&&s.store.listId?s.store.listId:void 0,"aria-activedescendant":s.store.dropdownOpened&&c||void 0,autoComplete:o,"data-expanded":s.store.dropdownOpened||void 0,"data-mantine-stop-propagation":s.store.dropdownOpened||void 0}:{},f=e=>{a===`button`&&e.currentTarget.focus(),t?.(e)};return{...d,onKeyDown:u,onClick:f}}var jt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Mt=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxEventsTarget`,jt,t),d=He(n);if(!d)throw Error(`Combobox.EventsTarget component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=wt();return(0,L.cloneElement)(d,{...At({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u,[r]:e(l,f.store.targetRef,Le(d))})});Mt.displayName=`@mantine/core/ComboboxEventsTarget`;var Nt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxFooter`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`footer`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Nt.classes=yt,Nt.displayName=`@mantine/core/ComboboxFooter`;var Pt=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,label:s,id:c,...l}=O(`ComboboxGroup`,null,e),u=wt(),d=x(c),f=s!=null&&s!==!1&&s!==``;return(0,R.jsxs)(se,{role:`group`,"aria-labelledby":f?d:void 0,...u.getStyles(`group`,{className:n,classNames:t,style:r,styles:i}),...l,children:[f&&(0,R.jsx)(`div`,{id:d,...u.getStyles(`groupLabel`,{classNames:t,styles:i}),children:s}),o]})});Pt.classes=yt,Pt.displayName=`@mantine/core/ComboboxGroup`;var Ft=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ComboboxHeader`,null,e);return(0,R.jsx)(se,{...wt().getStyles(`header`,{className:n,classNames:t,style:r,styles:i}),...o,onMouseDown:e=>{e.preventDefault()}})});Ft.classes=yt,Ft.displayName=`@mantine/core/ComboboxHeader`;function It({value:e,valuesDivider:t=`,`,...n}){return(0,R.jsx)(`input`,{type:`hidden`,value:Array.isArray(e)?e.join(t):e?`${e}`:``,...n})}It.displayName=`@mantine/core/ComboboxHiddenInput`;var Lt=n(e=>{let t=O(`ComboboxOption`,null,e),{classNames:n,className:r,style:i,styles:a,vars:o,onClick:s,id:c,active:l,onMouseDown:u,onMouseOver:d,disabled:f,selected:p,mod:m,...h}=t,g=wt(),_=(0,L.useId)(),v=c||_;return(0,R.jsx)(se,{...g.getStyles(`option`,{className:r,classNames:n,styles:a,style:i}),...h,id:v,mod:[`combobox-option`,{"combobox-active":l,"combobox-disabled":f,"combobox-selected":p},m],role:`option`,onClick:e=>{f?e.preventDefault():(g.onOptionSubmit?.(t.value,t),s?.(e))},onMouseDown:e=>{e.preventDefault(),u?.(e)},onMouseOver:e=>{g.resetSelectionOnOptionHover&&g.store.resetSelectedOption(),d?.(e)}})});Lt.classes=yt,Lt.displayName=`@mantine/core/ComboboxOption`;var Rt=n(e=>{let{classNames:t,className:n,style:r,styles:i,id:a,onMouseDown:o,labelledBy:s,...c}=O(`ComboboxOptions`,null,e),l=wt(),u=x(a);return(0,L.useEffect)(()=>{l.store.setListId(u)},[u]),(0,R.jsx)(se,{...l.getStyles(`options`,{className:n,style:r,classNames:t,styles:i}),...c,id:u,role:`listbox`,"aria-labelledby":s,onMouseDown:e=>{e.preventDefault(),o?.(e)}})});Rt.classes=yt,Rt.displayName=`@mantine/core/ComboboxOptions`;var zt={withAriaAttributes:!0,withKeyboardNavigation:!0},Bt=n(t=>{let{classNames:n,styles:r,unstyled:i,vars:a,withAriaAttributes:o,onKeyDown:s,onClick:c,withKeyboardNavigation:l,size:u,ref:d,...f}=O(`ComboboxSearch`,zt,t),p=wt(),m=p.getStyles(`search`),h=At({targetType:`input`,withAriaAttributes:o,withKeyboardNavigation:l,withExpandedAttribute:!1,onKeyDown:s,onClick:c,autoComplete:`off`});return(0,R.jsx)(M,{ref:e(d,p.store.searchRef),classNames:[{input:m.className},n],styles:[{input:m.style},r],size:u||p.size,...h,...f,__staticSelector:`Combobox`})});Bt.classes=yt,Bt.displayName=`@mantine/core/ComboboxSearch`;var Vt={refProp:`ref`,targetType:`input`,withKeyboardNavigation:!0,withAriaAttributes:!0,withExpandedAttribute:!1,autoComplete:`off`},Ht=n(t=>{let{children:n,refProp:r,withKeyboardNavigation:i,withAriaAttributes:a,withExpandedAttribute:o,targetType:s,autoComplete:c,ref:l,...u}=O(`ComboboxTarget`,Vt,t),d=He(n);if(!d)throw Error(`Combobox.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let f=wt(),p=(0,L.cloneElement)(d,{...At({targetType:s,withAriaAttributes:a,withKeyboardNavigation:i,withExpandedAttribute:o,onKeyDown:d.props.onKeyDown,onClick:d.props.onClick,autoComplete:c}),...u});return(0,R.jsx)(fe.Target,{refProp:r,ref:e(l,f.store.targetRef),children:p})});Ht.displayName=`@mantine/core/ComboboxTarget`;function Ut(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].hasAttribute(`data-combobox-disabled`))return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].hasAttribute(`data-combobox-disabled`))return e}return e}function Wt(e,t,n){for(let n=e+1;n{s||(c(!0),i?.(e))},[c,i,s]),_=(0,L.useCallback)((e=`unknown`)=>{s&&(c(!1),r?.(e))},[c,r,s]),v=(0,L.useCallback)((e=`unknown`)=>{s?_(e):g(e)},[_,g,s]),y=(0,L.useCallback)(()=>{let e=dt(f.current),t=lt(`#${l.current} [data-combobox-selected]`,e);t?.removeAttribute(`data-combobox-selected`),t?.removeAttribute(`aria-selected`)},[]),b=(0,L.useCallback)(e=>{let t=dt(f.current),n=lt(`#${l.current}`,t),r=n?ut(`[data-combobox-option]`,n):null;if(!r)return null;let i=e>=r.length?0:e<0?r.length-1:e;return u.current=i,r?.[i]&&!r[i].hasAttribute(`data-combobox-disabled`)?(y(),r[i].setAttribute(`data-combobox-selected`,`true`),r[i].setAttribute(`aria-selected`,`true`),r[i].scrollIntoView({block:`nearest`,behavior:o}),r[i].id):null},[o,y]),x=(0,L.useCallback)(()=>{let e=dt(f.current),t=lt(`#${l.current} [data-combobox-active]`,e);if(t){let n=ut(`#${l.current} [data-combobox-option]`,e).findIndex(e=>e===t);return b(n)}return b(0)},[b]),S=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Wt(u.current,t,a))},[b,a]),C=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Ut(u.current,t,a))},[b,a]),w=(0,L.useCallback)(()=>{let e=dt(f.current),t=ut(`#${l.current} [data-combobox-option]`,e);return b(Gt(t))},[b]),T=(0,L.useCallback)((e=`selected`,t)=>{if(typeof e==`number`){u.current=e;let n=dt(f.current),r=ut(`#${l.current} [data-combobox-option]`,n);t?.scrollIntoView&&r[e]?.scrollIntoView({block:`nearest`,behavior:o});return}h.current=window.setTimeout(()=>{let n=dt(f.current),r=ut(`#${l.current} [data-combobox-option]`,n),i=r.findIndex(t=>t.hasAttribute(`data-combobox-${e}`));u.current=i,t?.scrollIntoView&&r[i]?.scrollIntoView({block:`nearest`,behavior:o})},0)},[]),E=(0,L.useCallback)(()=>{u.current=-1,y()},[y]),D=(0,L.useCallback)(()=>{let e=dt(f.current);(ut(`#${l.current} [data-combobox-option]`,e)?.[u.current])?.click()},[]),O=(0,L.useCallback)(e=>{l.current=e},[]),k=(0,L.useCallback)(()=>{p.current=window.setTimeout(()=>d.current?.focus(),0)},[]),A=(0,L.useCallback)(()=>{m.current=window.setTimeout(()=>f.current?.focus(),0)},[]),j=(0,L.useCallback)(()=>u.current,[]);return(0,L.useEffect)(()=>()=>{window.clearTimeout(p.current),window.clearTimeout(m.current),window.clearTimeout(h.current)},[]),{dropdownOpened:s,openDropdown:g,closeDropdown:_,toggleDropdown:v,selectedOptionIndex:u.current,getSelectedOptionIndex:j,selectOption:b,selectFirstOption:w,selectActiveOption:x,selectNextOption:S,selectPreviousOption:C,resetSelectedOption:E,updateSelectedOptionIndex:T,listId:l.current,setListId:O,clickSelectedOption:D,searchRef:d,focusSearchInput:k,targetRef:f,focusTarget:A}}var qt={keepMounted:!0,keepMountedMode:`display-none`,withinPortal:!0,resetSelectionOnOptionHover:!1,width:`target`,transitionProps:{transition:`fade`,duration:0},size:`sm`},Jt=f((e,{size:t,dropdownPadding:n})=>({options:{"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)},dropdown:{"--combobox-padding":n===void 0?void 0:b(n),"--combobox-option-fz":D(t),"--combobox-option-padding":ie(t,`combobox-option-padding`)}})),Yt=e=>{let t=O(`Combobox`,qt,e),{classNames:n,styles:r,unstyled:i,children:a,store:o,vars:s,onOptionSubmit:c,onClose:l,size:u,dropdownPadding:d,resetSelectionOnOptionHover:f,__staticSelector:p,readOnly:m,attributes:h,floatingHeight:g,middlewares:_,...v}=t,y=g===`viewport`?{..._,flip:!1,size:{...typeof _?.size==`object`?_.size:{},padding:typeof _?.size==`object`&&_.size.padding!==void 0?_.size.padding:10,apply:({availableHeight:e,availableWidth:t,elements:n,...r})=>{n.floating.style.setProperty(`--combobox-floating-max-height`,`${e}px`);let i=_?.size;typeof i==`object`&&i.apply?i.apply({availableHeight:e,availableWidth:t,elements:n,...r}):i&&Object.assign(n.floating.style,{maxWidth:`${t}px`,maxHeight:`${e}px`})}}}:_,b=Kt(),x=o||b,S=k({name:p||`Combobox`,classes:yt,props:t,classNames:n,styles:r,unstyled:i,attributes:h,vars:s,varsResolver:Jt}),C=()=>{l?.(),x.closeDropdown()};return(0,R.jsx)(Ct,{value:{getStyles:S,store:x,onOptionSubmit:c,size:u,resetSelectionOnOptionHover:f,readOnly:m,floatingHeight:g},children:(0,R.jsx)(fe,{opened:x.dropdownOpened,...v,middlewares:y,onChange:e=>!e&&C(),withRoles:!1,unstyled:i,children:a})})};Yt.extend=e=>e,Yt.classes=yt,Yt.varsResolver=Jt,Yt.displayName=`@mantine/core/Combobox`,Yt.Target=Ht,Yt.Dropdown=Et,Yt.Options=Rt,Yt.Option=Lt,Yt.Search=Bt,Yt.Empty=kt,Yt.Chevron=St,Yt.Footer=Nt,Yt.Header=Ft,Yt.EventsTarget=Mt,Yt.DropdownTarget=Ot,Yt.Group=Pt,Yt.ClearButton=Tt,Yt.HiddenInput=It;function Xt(e){return`group`in e}function Zt({options:e,search:t,limit:n}){let r=t.trim().toLowerCase(),i=[];for(let a=0;a0)return!1;return!0}function $t(e,t=new Set){if(Array.isArray(e))for(let n of e)if(Xt(n))$t(n.items,t);else{if(n.value===void 0)throw Error(`[@mantine/core] Each option must have value property`);if(t.has(n.value))throw Error(`[@mantine/core] Duplicate options are not supported. Option with value "${n.value}" was provided more than once`);t.add(n.value)}}function en(e,t){return Array.isArray(e)?e.includes(t):e===t}function tn({data:e,withCheckIcon:t,withAlignedLabels:n,value:r,checkIconPosition:i,unstyled:a,renderOption:o}){if(!Xt(e)){let s=en(r,e.value),c=t&&(s?(0,R.jsx)(pe,{className:yt.optionsDropdownCheckIcon}):n?(0,R.jsx)(`div`,{className:yt.optionsDropdownCheckPlaceholder}):null),l=(0,R.jsxs)(R.Fragment,{children:[i===`left`&&c,(0,R.jsx)(`span`,{children:e.label}),i===`right`&&c]});return(0,R.jsx)(Yt.Option,{value:e.value,disabled:e.disabled,className:p({[yt.optionsDropdownOption]:!a}),"data-reverse":i===`right`||void 0,"data-checked":s||void 0,"aria-selected":s,active:s,children:typeof o==`function`?o({option:e,checked:s}):l})}let s=e.items.map(e=>(0,R.jsx)(tn,{data:e,value:r,unstyled:a,withCheckIcon:t,withAlignedLabels:n,checkIconPosition:i,renderOption:o},`${e.value}`));return(0,R.jsx)(Yt.Group,{label:e.group,children:s})}function nn({data:e,hidden:t,hiddenWhenEmpty:n,filter:r,search:i,limit:a,maxDropdownHeight:o,floatingHeight:s,withScrollArea:c=!0,filterOptions:l=!0,withCheckIcon:u=!1,withAlignedLabels:d=!1,value:f,checkIconPosition:p,nothingFoundMessage:m,unstyled:h,labelId:g,renderOption:_,scrollAreaProps:v,"aria-label":y}){let b=wt();$t(e);let x=typeof i==`string`?(r||Zt)({options:e,search:l?i:``,limit:a??1/0}):e,S=Qt(x),C=x.map((e,t)=>(0,R.jsx)(tn,{data:e,withCheckIcon:u,withAlignedLabels:d,value:f,checkIconPosition:p,unstyled:h,renderOption:_},Xt(e)?`group-${typeof e.group==`string`?e.group:t}`:`${e.value}`));return(0,R.jsx)(Yt.Dropdown,{hidden:t||n&&S,"data-composed":!0,children:(0,R.jsxs)(Yt.Options,{labelledBy:g,"aria-label":y,children:[c?(0,R.jsx)(ze.Autosize,{mah:(s??b.floatingHeight)===`viewport`?`var(--combobox-floating-options-max-height)`:o??220,type:`scroll`,scrollbarSize:`var(--combobox-padding)`,offsetScrollbars:`y`,...v,children:C}):C,S&&m&&(0,R.jsx)(Yt.Empty,{children:m})]})})}function rn(e){let t=e.currentTarget;return dt(t).activeElement!==t}function an(e,t){let n=t.trim().toLowerCase();if(n===``)return;let r=Object.values(e).filter(e=>!e.disabled&&e.label.trim().toLowerCase()===n);return r.length===1?r[0]:void 0}var[on,sn]=Ve(`Progress.Root component was not found in tree`),cn={root:`m_db6d6462`,section:`m_2242eb65`,"stripes-animation":`m_81a374bd`,"stripes-animation-vertical":`m_e0fb7a86`,label:`m_91e40b74`},ln=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=O(`ProgressLabel`,null,e);return(0,R.jsx)(se,{...sn().getStyles(`label`,{className:n,style:r,classNames:t,styles:i}),...o})});ln.classes=cn,ln.displayName=`@mantine/core/ProgressLabel`;var un=f((e,{size:t,radius:n,transitionDuration:r})=>({root:{"--progress-size":ie(t,`progress-size`),"--progress-radius":n===void 0?void 0:_(n),"--progress-transition-duration":typeof r==`number`?`${r}ms`:void 0}})),dn=n(e=>{let t=O(`ProgressRoot`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,autoContrast:c,transitionDuration:l,orientation:u,attributes:d,mod:f,...p}=t,m=k({name:`Progress`,classes:cn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:d,vars:s,varsResolver:un});return(0,R.jsx)(on,{value:{getStyles:m,autoContrast:c},children:(0,R.jsx)(se,{mod:[{orientation:u},f],...m(`root`),...p})})});dn.classes=cn,dn.varsResolver=un,dn.displayName=`@mantine/core/ProgressRoot`;var fn={withAria:!0},pn=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:s,value:c,withAria:l,color:u,striped:d,animated:f,mod:p,...m}=O(`ProgressSection`,fn,e),h=sn(),g=o(),_=l?{role:`progressbar`,"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":c,"aria-valuetext":`${c}%`}:{};return(0,R.jsx)(se,{...h.getStyles(`section`,{className:n,classNames:t,styles:i,style:r}),...m,..._,mod:[{striped:d||f,animated:f},p],__vars:{"--progress-section-size":`${c}%`,"--progress-section-color":a(u,g),"--progress-label-color":ft(h.autoContrast,g)?he({color:u,theme:g,autoContrast:h.autoContrast}):void 0}})});pn.classes=cn,pn.displayName=`@mantine/core/ProgressSection`;var mn=n(e=>{let n=O(`Progress`,null,e),{value:r,classNames:i,styles:a,vars:o,color:s,striped:c,animated:l,"aria-label":u,...d}=n,{resolvedClassNames:f,resolvedStyles:p}=t({classNames:i,styles:a,props:n});return(0,R.jsx)(dn,{classNames:f,styles:p,vars:o,...d,children:(0,R.jsx)(pn,{value:r,color:s,striped:c,animated:l,"aria-label":u})})});mn.classes=cn,mn.displayName=`@mantine/core/Progress`,mn.Section=pn,mn.Root=dn,mn.Label=ln;var hn={size:`sm`,withCheckIcon:!0,allowDeselect:!0,checkIconPosition:`left`,openOnFocus:!0},gn=oe(e=>{let n=O([`Input`,`InputWrapper`,`Select`],hn,e),{classNames:r,styles:i,unstyled:a,vars:o,dropdownOpened:s,defaultDropdownOpened:c,onDropdownClose:l,onDropdownOpen:u,onFocus:d,onBlur:f,onClick:p,onChange:m,data:h,value:g,defaultValue:_,selectFirstOptionOnChange:v,selectFirstOptionOnDropdownOpen:y,onOptionSubmit:b,comboboxProps:S,readOnly:C,disabled:w,filter:T,limit:E,withScrollArea:D,maxDropdownHeight:k,floatingHeight:A,size:j,searchable:M,rightSection:N,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,name:ie,form:ae,searchValue:oe,defaultSearchValue:se,onSearchChange:ce,allowDeselect:le,error:F,rightSectionPointerEvents:I,id:de,clearable:fe,clearSectionMode:pe,clearButtonProps:me,hiddenInputProps:he,renderOption:ge,onClear:_e,autoComplete:ve,scrollAreaProps:ye,__defaultRightSection:be,__clearSection:xe,__clearable:Se,chevronColor:Ce,autoSelectOnBlur:we,openOnFocus:Te,attributes:Ee,...De}=n,Oe=(0,L.useMemo)(()=>_t(h),[h]),ke=(0,L.useRef)({}),Ae=(0,L.useMemo)(()=>vt(Oe),[Oe]),je=x(de),[Me,Ne,Pe]=ue({value:g,defaultValue:_,finalValue:null,onChange:m}),Fe=Me==null?void 0:`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`],Ie=ct(Fe),[Le,Re,ze]=ue({value:oe,defaultValue:se,finalValue:Fe?Fe.label:``,onChange:ce}),Be=Kt({opened:s,defaultOpened:c,onDropdownOpen:()=>{u?.(),y?Be.selectFirstOption():Be.updateSelectedOptionIndex(`active`,{scrollIntoView:!0})},onDropdownClose:()=>{l?.(),setTimeout(Be.resetSelectedOption,0)}}),Ve=e=>{Re(e),Be.resetSelectedOption()},{resolvedClassNames:He,resolvedStyles:Ue}=t({props:n,styles:i,classNames:r});(0,L.useEffect)(()=>{v&&Be.selectFirstOption()},[v,Le]),(0,L.useEffect)(()=>{g===null&&Ve(``),g!=null&&Fe&&(Ie?.value!==Fe.value||Ie?.label!==Fe.label)&&Ve(Fe.label)},[g,Fe]),(0,L.useEffect)(()=>{!Pe&&!ze&&Ve(Me==null?``:`${Me}`in Ae?Ae[`${Me}`]?.label:ke.current[`${Me}`]?.label||``)},[Ae,Me]),(0,L.useEffect)(()=>{Me&&`${Me}`in Ae&&(ke.current[`${Me}`]=Ae[`${Me}`])},[Ae,Me]);let We=(0,R.jsx)(Yt.ClearButton,{...me,onClear:()=>{Ne(null,null),Ve(``),_e?.()}}),Ge=fe&&Me!=null&&!w&&!C;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsxs)(Yt,{store:Be,__staticSelector:`Select`,classNames:He,styles:Ue,unstyled:a,readOnly:C,size:j,attributes:Ee,floatingHeight:A,keepMounted:we,onOptionSubmit:e=>{b?.(e);let t=le&&`${Ae[e].value}`==`${Me}`?null:Ae[e],n=t?t.value:null;n!==Me&&Ne(n,t),!Pe&&Ve(n==null?``:t?.label||``),Be.closeDropdown()},...S,children:[(0,R.jsx)(Yt.Target,{targetType:M?`input`:`button`,autoComplete:ve,withExpandedAttribute:!0,children:(0,R.jsx)(ee,{id:je,__defaultRightSection:(0,R.jsx)(Yt.Chevron,{size:j,error:F,unstyled:a,color:Ce}),__clearSection:We,__clearable:Ge,__clearSectionMode:pe,rightSection:N,rightSectionPointerEvents:I||`none`,...De,size:j,__staticSelector:`Select`,disabled:w,readOnly:C||!M,value:Le,onChange:e=>{if(rn(e)){if(!C){let t=an(Ae,e.currentTarget.value);t&&`${t.value}`!=`${Me}`&&(Ne(t.value,t),!Pe&&Ve(t.label))}return}Ve(e.currentTarget.value),Be.openDropdown(),v&&Be.selectFirstOption()},onFocus:e=>{Te&&M&&Be.openDropdown(),d?.(e)},onBlur:e=>{we&&Be.clickSelectedOption(),M&&Be.closeDropdown();let t=Me!=null&&(`${Me}`in Ae?Ae[`${Me}`]:ke.current[`${Me}`]);Ve(t&&t.label||``),f?.(e)},onClick:e=>{M?Be.openDropdown():Be.toggleDropdown(),p?.(e)},classNames:He,styles:Ue,unstyled:a,pointer:!M,error:F,attributes:Ee})}),(0,R.jsx)(nn,{data:Oe,hidden:C||w,filter:T,search:Le,limit:E,hiddenWhenEmpty:!re,withScrollArea:D,maxDropdownHeight:k,filterOptions:!!M&&Fe?.label!==Le,value:Me,checkIconPosition:P,withCheckIcon:te,withAlignedLabels:ne,nothingFoundMessage:re,unstyled:a,labelId:De.label?`${je}-label`:void 0,"aria-label":De.label?void 0:De[`aria-label`],renderOption:ge,scrollAreaProps:ye})]}),(0,R.jsx)(Yt.HiddenInput,{value:Me,name:ie,form:ae,disabled:w,...he})]})});gn.classes={...ee.classes,...Yt.classes},gn.displayName=`@mantine/core/Select`;function _n(e){if(e!==void 0)return typeof e==`number`?b(e):e}function vn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let c=o(),l=t===void 0?e:t,u=r!==void 0,d=j({"--sg-spacing-x":v(st(e)),"--sg-spacing-y":v(st(l)),"--sg-auto-rows":i,...u?{"--sg-min-col-width":_n(r)}:{"--sg-cols":st(n)?.toString()}}),f=te(c.breakpoints).reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof l==`object`&&l[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(l[r])),!u&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:d,media:Te(te(f),c.breakpoints).filter(e=>te(f[e.value]).length>0).map(e=>({query:`(min-width: ${c.breakpoints[e.value]})`,styles:f[e.value]})),selector:a})}function yn(e){return typeof e==`object`&&e?te(e):[]}function bn(e){return e.sort((e,t)=>me(e)-me(t))}function xn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}){return bn(Array.from(new Set([...yn(e),...yn(t),...r===void 0?yn(n):[]])))}function Sn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r,autoRows:i,selector:a}){let o=t===void 0?e:t,c=r!==void 0,l=j({"--sg-spacing-x":v(st(e)),"--sg-spacing-y":v(st(o)),"--sg-auto-rows":i,...c?{"--sg-min-col-width":_n(r)}:{"--sg-cols":st(n)?.toString()}}),u=xn({spacing:e,verticalSpacing:t,cols:n,minColWidth:r}),d=u.reduce((t,r)=>(t[r]||(t[r]={}),typeof e==`object`&&e[r]!==void 0&&(t[r][`--sg-spacing-x`]=v(e[r])),typeof o==`object`&&o[r]!==void 0&&(t[r][`--sg-spacing-y`]=v(o[r])),!c&&typeof n==`object`&&n[r]!==void 0&&(t[r][`--sg-cols`]=n[r]),t),{});return(0,R.jsx)(s,{styles:l,container:u.map(e=>({query:`simple-grid (min-width: ${e})`,styles:d[e]})),selector:a})}var Cn={container:`m_925c2d2c`,root:`m_2415a157`},wn={cols:1,spacing:`md`,type:`media`},Tn=n(e=>{let t=O(`SimpleGrid`,wn,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,cols:c,verticalSpacing:l,spacing:u,type:f,minColWidth:p,autoFlow:m,autoRows:h,attributes:g,..._}=t,v=k({name:`SimpleGrid`,classes:Cn,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:g,vars:s}),y=d(),b=p===void 0?void 0:m||`auto-fill`;return f===`container`?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Sn,{...t,selector:`.${y}`}),(0,R.jsx)(`div`,{...v(`container`),children:(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})})]}):(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(vn,{...t,selector:`.${y}`}),(0,R.jsx)(se,{...v(`root`,{className:y}),..._,"data-auto-cols":b})]})});Tn.classes=Cn,Tn.displayName=`@mantine/core/SimpleGrid`;var En=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),Dn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216.49,104.49l-80,80a12,12,0,0,1-17,0l-80-80a12,12,0,0,1,17-17L128,159l71.51-71.52a12,12,0,0,1,17,17Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M208,96l-80,80L48,96Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M215.39,92.94A8,8,0,0,0,208,88H48a8,8,0,0,0-5.66,13.66l80,80a8,8,0,0,0,11.32,0l80-80A8,8,0,0,0,215.39,92.94ZM128,164.69,67.31,104H188.69Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,48,88H208a8,8,0,0,1,5.66,13.66Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M212.24,100.24l-80,80a6,6,0,0,1-8.48,0l-80-80a6,6,0,0,1,8.48-8.48L128,167.51l75.76-75.75a6,6,0,0,1,8.48,8.48Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M210.83,98.83l-80,80a4,4,0,0,1-5.66,0l-80-80a4,4,0,0,1,5.66-5.66L128,170.34l77.17-77.17a4,4,0,1,1,5.66,5.66Z`}))]]),On=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M28,64A12,12,0,0,1,40,52H216a12,12,0,0,1,0,24H40A12,12,0,0,1,28,64Zm12,76h64a12,12,0,0,0,0-24H40a12,12,0,0,0,0,24Zm80,40H40a12,12,0,0,0,0,24h80a12,12,0,0,0,0-24Zm120.49,20.49a12,12,0,0,1-17,0l-18.08-18.08a44,44,0,1,1,17-17l18.08,18.07A12,12,0,0,1,240.49,200.49ZM184,164a20,20,0,1,0-20-20A20,20,0,0,0,184,164Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M216,144a32,32,0,1,1-32-32A32,32,0,0,1,216,144Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,2.34L217.36,166A40,40,0,1,0,206,177.36l20.3,20.3a8,8,0,0,0,11.32-11.32Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M34,64a6,6,0,0,1,6-6H216a6,6,0,0,1,0,12H40A6,6,0,0,1,34,64Zm6,70h72a6,6,0,0,0,0-12H40a6,6,0,0,0,0,12Zm88,52H40a6,6,0,0,0,0,12h88a6,6,0,0,0,0-12Zm108.24,10.24a6,6,0,0,1-8.48,0l-21.49-21.48a38.06,38.06,0,1,1,8.49-8.49l21.48,21.49A6,6,0,0,1,236.24,196.24ZM184,170a26,26,0,1,0-26-26A26,26,0,0,0,184,170Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,64a8,8,0,0,1,8-8H216a8,8,0,0,1,0,16H40A8,8,0,0,1,32,64Zm8,72h72a8,8,0,0,0,0-16H40a8,8,0,0,0,0,16Zm88,48H40a8,8,0,0,0,0,16h88a8,8,0,0,0,0-16Zm109.66,13.66a8,8,0,0,1-11.32,0L206,177.36A40,40,0,1,1,217.36,166l20.3,20.3A8,8,0,0,1,237.66,197.66ZM184,168a24,24,0,1,0-24-24A24,24,0,0,0,184,168Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M36,64a4,4,0,0,1,4-4H216a4,4,0,0,1,0,8H40A4,4,0,0,1,36,64Zm4,68h72a4,4,0,0,0,0-8H40a4,4,0,0,0,0,8Zm88,56H40a4,4,0,0,0,0,8h88a4,4,0,0,0,0-8Zm106.83,6.83a4,4,0,0,1-5.66,0l-22.72-22.72a36.06,36.06,0,1,1,5.66-5.66l22.72,22.72A4,4,0,0,1,234.83,194.83ZM184,172a28,28,0,1,0-28-28A28,28,0,0,0,184,172Z`}))]]),kn=new Map([[`bold`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,92H70.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24H137.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24Zm64-24A12,12,0,1,1,92,80,12,12,0,0,1,104,68Zm112,96H201.94a36,36,0,0,0-67.88,0H40a12,12,0,0,0,0,24h94.06a36,36,0,0,0,67.88,0H216a12,12,0,0,0,0-24Zm-48,24a12,12,0,1,1,12-12A12,12,0,0,1,168,188Z`}))],[`duotone`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M128,80a24,24,0,1,1-24-24A24,24,0,0,1,128,80Zm40,72a24,24,0,1,0,24,24A24,24,0,0,0,168,152Z`,opacity:`0.2`}),L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`fill`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M32,80a8,8,0,0,1,8-8H77.17a28,28,0,0,1,53.66,0H216a8,8,0,0,1,0,16H130.83a28,28,0,0,1-53.66,0H40A8,8,0,0,1,32,80Zm184,88H194.83a28,28,0,0,0-53.66,0H40a8,8,0,0,0,0,16H141.17a28,28,0,0,0,53.66,0H216a8,8,0,0,0,0-16Z`}))],[`light`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,86H74.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12H133.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12Zm64-24A18,18,0,1,1,86,80,18,18,0,0,1,104,62ZM216,170H197.4a30,30,0,0,0-58.8,0H40a6,6,0,0,0,0,12h98.6a30,30,0,0,0,58.8,0H216a6,6,0,0,0,0-12Zm-48,24a18,18,0,1,1,18-18A18,18,0,0,1,168,194Z`}))],[`regular`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,88H73a32,32,0,0,0,62,0h81a8,8,0,0,0,0-16H135a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16Zm64-24A16,16,0,1,1,88,80,16,16,0,0,1,104,64ZM216,168H199a32,32,0,0,0-62,0H40a8,8,0,0,0,0,16h97a32,32,0,0,0,62,0h17a8,8,0,0,0,0-16Zm-48,24a16,16,0,1,1,16-16A16,16,0,0,1,168,192Z`}))],[`thin`,L.createElement(L.Fragment,null,L.createElement(`path`,{d:`M40,84H76.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8H131.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8Zm64-24A20,20,0,1,1,84,80,20,20,0,0,1,104,60ZM216,172H195.71a28,28,0,0,0-55.42,0H40a4,4,0,0,0,0,8H140.29a28,28,0,0,0,55.42,0H216a4,4,0,0,0,0-8Zm-48,24a20,20,0,1,1,20-20A20,20,0,0,1,168,196Z`}))]]),An=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:En}));An.displayName=`ArrowUpRightIcon`;var jn=An,Mn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:Dn}));Mn.displayName=`CaretDownIcon`;var Nn=Mn,Pn=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:On}));Pn.displayName=`ListMagnifyingGlassIcon`;var Fn=Pn,In=L.forwardRef((e,t)=>L.createElement(g,{ref:t,...e,weights:kn}));In.displayName=`SlidersHorizontalIcon`;var Ln=In;function Rn(e){let{margin:t,containerPadding:n,containerWidth:r,cols:i}=e;return(r-t[0]*(i-1)-n[0]*2)/i}function zn(e,t,n){return Number.isFinite(e)?Math.round(t*e+Math.max(0,e-1)*n):e}function Bn(e,t,n,r,i,a,o){let{margin:s,containerPadding:c,rowHeight:l}=e,u=Rn(e),d,f,p,m;if(o?(d=Math.round(o.width),f=Math.round(o.height)):(d=zn(r,u,s[0]),f=zn(i,l,s[1])),a?(p=Math.round(a.top),m=Math.round(a.left)):o?(p=Math.round(o.top),m=Math.round(o.left)):(p=Math.round((l+s[1])*n+c[1]),m=Math.round((u+s[0])*t+c[0])),!a&&!o){if(Number.isFinite(r)){let e=Math.round((u+s[0])*(t+r)+c[0])-m-d;e!==s[0]&&(d+=e-s[0])}if(Number.isFinite(i)){let e=Math.round((l+s[1])*(n+i)+c[1])-p-f;e!==s[1]&&(f+=e-s[1])}}return{top:p,left:m,width:d,height:f}}function Vn(e,t,n,r,i){let{margin:a,containerPadding:o,cols:s,rowHeight:c,maxRows:l}=e,u=Rn(e),d=Math.round((n-o[0])/(u+a[0])),f=Math.round((t-o[1])/(c+a[1]));return d=Wn(d,0,s-r),f=Wn(f,0,l-i),{x:d,y:f}}function Hn(e,t,n){let{margin:r,containerPadding:i,rowHeight:a}=e,o=Rn(e);return{x:Math.round((n-i[0])/(o+r[0])),y:Math.round((t-i[1])/(a+r[1]))}}function Un(e,t,n){let{margin:r,rowHeight:i}=e,a=Rn(e);return{w:Math.max(1,Math.round((t+r[0])/(a+r[0]))),h:Math.max(1,Math.round((n+r[1])/(i+r[1])))}}function Wn(e,t,n){return Math.max(Math.min(e,n),t)}function Gn(e,t){return!(e.i===t.i||e.x+e.w<=t.x||e.x>=t.x+t.w||e.y+e.h<=t.y||e.y>=t.y+t.h)}function Kn(e,t){for(let n=0;nGn(e,t))}function Jn(e,t){return t===`horizontal`?Xn(e):t===`vertical`||t===`wrap`?Yn(e):[...e]}function Yn(e){return[...e].sort((e,t)=>e.y===t.y?e.x-t.x:e.y-t.y)}function Xn(e){return[...e].sort((e,t)=>e.x===t.x?e.y-t.y:e.x-t.x)}function Zn(e){let t=0;for(let n=0;nt&&(t=e)}}return t}function Qn(e,t){for(let n=0;ne.static===!0)}function er(e){return{i:e.i,x:e.x,y:e.y,w:e.w,h:e.h,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,moved:!!e.moved,static:!!e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,constraints:e.constraints,isBounded:e.isBounded}}function tr(e){let t=Array(e.length);for(let n=0;nt.cols&&(i.x=t.cols-i.w),i.x<0&&(i.x=0,i.w=t.cols),!i.static)n.push(i);else for(;Kn(n,i);)i.y++}}return e}function ar(e,t,n,r,i,a,o,s,c){if(t.static&&t.isDraggable!==!0||t.y===r&&t.x===n)return[...e];let l=t.x,u=t.y;typeof n==`number`&&(t.x=n),typeof r==`number`&&(t.y=r),t.moved=!0;let d=Jn(e,o);(o===`vertical`&&typeof r==`number`?u>=r:o===`horizontal`&&typeof n==`number`&&l>=n)&&(d=d.reverse());let f=qn(d,t),p=f.length>0;if(p&&c)return tr(e);if(p&&a)return t.x=l,t.y=u,t.moved=!1,e;let m=[...e];for(let e=0;et.y,d=l!==void 0&&t.x+t.w>l.x;if(!l)return ar(e,n,o?a.x:void 0,s?a.y:void 0,r,c,i);if(u&&s)return ar(e,n,void 0,n.y+1,r,c,i);if(u&&i===null)return t.y=n.y,n.y+=n.h,[...e];if(d&&o)return ar(e,t,n.x,void 0,r,c,i)}let l=o?n.x+1:void 0,u=s?n.y+1:void 0;return l===void 0&&u===void 0?[...e]:ar(e,n,l,u,r,c,i)}function sr(e,t,n){return Math.max(t,Math.min(n,e))}var cr=[{name:`gridBounds`,constrainPosition(e,t,n,{cols:r,maxRows:i}){return{x:sr(t,0,Math.max(0,r-e.w)),y:sr(n,0,Math.max(0,i-e.h))}},constrainSize(e,t,n,r,{cols:i,maxRows:a}){let o=r===`w`||r===`nw`||r===`sw`?e.x+e.w:i-e.x,s=r===`n`||r===`nw`||r===`ne`?e.y+e.h:a-e.y;return{w:sr(t,1,Math.max(1,o)),h:sr(n,1,Math.max(1,s))}}},{name:`minMaxSize`,constrainSize(e,t,n){return{w:sr(t,e.minW??1,e.maxW??1/0),h:sr(n,e.minH??1,e.maxH??1/0)}}}];function lr(e,t,n,r,i){let a={x:n,y:r};for(let n of e)n.constrainPosition&&(a=n.constrainPosition(t,a.x,a.y,i));if(t.constraints)for(let e of t.constraints)e.constrainPosition&&(a=e.constrainPosition(t,a.x,a.y,i));return a}function ur(e,t,n,r,i,a){let o={w:n,h:r};for(let n of e)n.constrainSize&&(o=n.constrainSize(t,o.w,o.h,i,a));if(t.constraints)for(let e of t.constraints)e.constrainSize&&(o=e.constrainSize(t,o.w,o.h,i,a));return o}function dr({top:e,left:t,width:n,height:r}){let i=`translate(${t}px,${e}px)`;return{transform:i,WebkitTransform:i,MozTransform:i,msTransform:i,OTransform:i,width:`${n}px`,height:`${r}px`,position:`absolute`}}function fr({top:e,left:t,width:n,height:r}){return{top:`${e}px`,left:`${t}px`,width:`${n}px`,height:`${r}px`,position:`absolute`}}function pr(e){return e*100+`%`}function mr(e,t,n,r){return e+n>r?t:n}function hr(e,t,n){return e<0?t:n}function gr(e){return Math.max(0,e)}function _r(e){return Math.max(0,e)}var vr=(e,t,n)=>{let{left:r,height:i,width:a}=t,o=e.top-(i-e.height);return{left:r,width:a,height:hr(o,e.height,i),top:_r(o)}},yr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{top:r,height:a,width:mr(e.left,e.width,o,n),left:gr(i)}},br=(e,t,n)=>{let{top:r,height:i,width:a}=t,o=e.left+e.width-a;return o<0?{height:i,width:e.left+e.width,top:_r(r),left:0}:{height:i,width:a,top:_r(r),left:o}},xr=(e,t,n)=>{let{top:r,left:i,height:a,width:o}=t;return{width:o,left:i,height:hr(r,e.height,a),top:_r(r)}},Sr={n:vr,ne:(e,t,n)=>vr(e,yr(e,t,n)),e:yr,se:(e,t,n)=>xr(e,yr(e,t,n)),s:xr,sw:(e,t,n)=>xr(e,br(e,t)),w:br,nw:(e,t,n)=>vr(e,br(e,t))};function Cr(e,t,n,r){let i=Sr[e];return i?i(t,{...t,...n},r):n}var wr={type:`transform`,scale:1,calcStyle(e){return dr(e)}},Tr={type:`absolute`,scale:1,calcStyle(e){return fr(e)}};function Er(e){return{type:`transform`,scale:e,calcStyle(e){return dr(e)},calcDragPosition(t,n,r,i){return{left:(t-r)/e,top:(n-i)/e}}}}var Dr=wr,Or={cols:12,rowHeight:150,margin:[10,10],containerPadding:null,maxRows:1/0},kr={enabled:!0,bounded:!1,threshold:3},Ar={enabled:!0,handles:[`se`]},jr={enabled:!1,defaultItem:{w:1,h:1}};function Mr(e,t,n,r,i){let a=r===`x`?`w`:`h`;t[r]+=1;let o=e.findIndex(e=>e.i===t.i),s=i??$n(e).length>0;for(let i=o+1;it.y+t.h)break;Gn(t,o)&&Mr(e,o,n+t[a],r,s)}}t[r]=n}function Nr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0),t.y=Math.min(r,t.y);t.y>0&&!Kn(e,t);)t.y--;let i;for(;(i=Kn(e,t))!==void 0;)Mr(n,t,i.y+i.h,`y`);return t.y=Math.max(t.y,0),t}function Pr(e,t,n,r){for(t.x=Math.max(t.x,0),t.y=Math.max(t.y,0);t.x>0&&!Kn(e,t);)t.x--;let i;for(;(i=Kn(e,t))!==void 0;)if(Mr(r,t,i.x+i.w,`x`),t.x+t.w>n)for(t.x=n-t.w,t.y++;t.x>0&&!Kn(e,t);)t.x--;return t.x=Math.max(t.x,0),t}var Fr={type:`vertical`,allowOverlap:!1,compact(e,t){let n=$n(e),r=Zn(n),i=Yn(e),a=Array(e.length);for(let t=0;te[t]-e[n])}function Ur(e,t){let n=Hr(e),r=n[0];if(r===void 0)throw Error(`No breakpoints defined`);for(let i=1;ie[a]&&(r=a)}return r}function Wr(e,t){let n=t[e];if(n===void 0)throw Error(`ResponsiveReactGridLayout: \`cols\` entry for breakpoint ${String(e)} is missing!`);return n}function Gr(e,t,n,r,i,a){let o=e[n];if(o)return tr(o);let s=e[r],c=Hr(t),l=c.slice(c.indexOf(n));for(let t=0;t{t.exports=`SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED`})),Jr=h(((e,t)=>{var n=qr();function r(){}function i(){}i.resetWarningCache=r,t.exports=function(){function e(e,t,r,i,a,o){if(o!==n){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name=`Invariant Violation`,s}}e.isRequired=e;function t(){return e}var a={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:r};return a.PropTypes=a,a}})),Yr=h(((e,t)=>{t.exports=Jr()()})),Xr=u(Yr(),1),Zr=u(T(),1);function Qr(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&Qr(e.changedTouches,e=>t===e.identifier)}function Si(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function Ci(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function wi(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??Ci();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} -`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&bi(e.body,`react-draggable-transparent-selection`)}function vi(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{yi(e)}):yi(e)}function yi(e){if(e)try{e.body&&xi(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function bi(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function xi(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function Si(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:ki(r);let i=Ai(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+Jr(s.paddingLeft)+Jr(o.marginLeft),top:-i.offsetTop+Jr(s.paddingTop)+Jr(o.marginTop),right:li(a)-si(i)-i.offsetLeft+Jr(s.paddingRight)-Jr(o.marginRight),bottom:ci(a)-oi(i)-i.offsetTop+Jr(s.paddingBottom)-Jr(o.marginBottom)}}return qr(r.right)&&(t=Math.min(t,r.right)),qr(r.bottom)&&(n=Math.min(n,r.bottom)),qr(r.left)&&(t=Math.max(t,r.left)),qr(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Ci(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function wi(e){return e.props.axis===`both`||e.props.axis===`x`}function Ti(e){return e.props.axis===`both`||e.props.axis===`y`}function Ei(e,t,n){let r=typeof t==`number`?mi(e,t):null;if(typeof t==`number`&&!r)return null;let i=Ai(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return ui(r||e,a,n.props.scale)}function Di(e,t,n){let r=!qr(e.lastX),i=Ai(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Oi(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function ki(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Ai(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var ji=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Mi={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Ni=Mi.mouse,Pi=class extends L.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!ri(e.target,this.props.handle,t)||this.props.cancel&&ri(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=hi(e);this.touchIdentifier=r;let i=Ei(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Di(this,a,o);ji(`DraggableCore: handleDragStart: %j`,s),ji(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&_i(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,ii(n,Ni.move,this.handleDrag),ii(n,Ni.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Ei(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=Ci(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Di(this,n,r);if(ji(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Ei(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=Ci(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Di(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&vi(a.ownerDocument),ji(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(ji(`DraggableCore: Removing handlers`),ai(a.ownerDocument,Ni.move,this.handleDrag),ai(a.ownerDocument,Ni.stop,this.handleDragStop))},this.onMouseDown=e=>(Ni=Mi.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Ni=Mi.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Ni=Mi.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Ni=Mi.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&ii(e,Mi.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;ai(t,Mi.mouse.move,this.handleDrag),ai(t,Mi.touch.move,this.handleDrag),ai(t,Mi.mouse.stop,this.handleDragStop),ai(t,Mi.touch.stop,this.handleDragStop),ai(e,Mi.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&vi(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Wr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(ji(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return L.cloneElement(L.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Pi.displayName=`DraggableCore`,Pi.propTypes={allowAnyClick:Ur.default.bool,allowMobileScroll:Ur.default.bool,children:Ur.default.node.isRequired,disabled:Ur.default.bool,enableUserSelectHack:Ur.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Ur.default.arrayOf(Ur.default.number),handle:Ur.default.string,cancel:Ur.default.string,nodeRef:Ur.default.object,nonce:Ur.default.string,onStart:Ur.default.func,onDrag:Ur.default.func,onStop:Ur.default.func,onMouseDown:Ur.default.func,scale:Ur.default.number,className:Yr,style:Yr,transform:Yr},Pi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Fi=class extends L.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(ji(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Oi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;ji(`Draggable: onDrag: %j`,t);let n=Oi(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=Si(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Oi(this,t))===!1)return!1;ji(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(ji(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Wr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,g={x:wi(this)&&m?this.state.x:h.x,y:Ti(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=fi(g,c):d=di(g,c);let _=L.Children.only(n),v=p(_.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return L.createElement(Pi,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},L.cloneElement(_,{className:v,style:{..._.props.style,...d},transform:f}))}};Fi.displayName=`Draggable`,Fi.propTypes={...Pi.propTypes,axis:Ur.default.oneOf([`both`,`x`,`y`,`none`]),bounds:Ur.default.oneOfType([Ur.default.shape({left:Ur.default.number,right:Ur.default.number,top:Ur.default.number,bottom:Ur.default.number}),Ur.default.string,Ur.default.oneOf([!1])]),defaultClassName:Ur.default.string,defaultClassNameDragging:Ur.default.string,defaultClassNameDragged:Ur.default.string,defaultPosition:Ur.default.shape({x:Ur.default.number,y:Ur.default.number}),positionOffset:Ur.default.shape({x:Ur.default.oneOfType([Ur.default.number,Ur.default.string]),y:Ur.default.oneOfType([Ur.default.number,Ur.default.string])}),position:Ur.default.shape({x:Ur.default.number,y:Ur.default.number}),className:Yr,style:Yr,transform:Yr},Fi.defaultProps={...Pi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Ii=h(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{DraggableCore:()=>Oe,default:()=>ke}),t.exports=d(f);var p=u(C()),m=u(Hr()),h=u(T()),g=Ii();function _(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&_(e.changedTouches,e=>t===e.identifier)}function ce(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function le(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function ue(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??le();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} +`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&Di(e.body,`react-draggable-transparent-selection`)}function Ti(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{Ei(e)}):Ei(e)}function Ei(e){if(e)try{e.body&&Oi(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function Di(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function Oi(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function ki(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:Ii(r);let i=Li(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+ti(s.paddingLeft)+ti(o.marginLeft),top:-i.offsetTop+ti(s.paddingTop)+ti(o.marginTop),right:gi(a)-mi(i)-i.offsetLeft+ti(s.paddingRight)-ti(o.marginRight),bottom:hi(a)-pi(i)-i.offsetTop+ti(s.paddingBottom)-ti(o.marginBottom)}}return ei(r.right)&&(t=Math.min(t,r.right)),ei(r.bottom)&&(n=Math.min(n,r.bottom)),ei(r.left)&&(t=Math.max(t,r.left)),ei(r.top)&&(n=Math.max(n,r.top)),[t,n]}function Ai(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function ji(e){return e.props.axis===`both`||e.props.axis===`x`}function Mi(e){return e.props.axis===`both`||e.props.axis===`y`}function Ni(e,t,n){let r=typeof t==`number`?xi(e,t):null;if(typeof t==`number`&&!r)return null;let i=Li(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return _i(r||e,a,n.props.scale)}function Pi(e,t,n){let r=!ei(e.lastX),i=Li(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function Fi(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function Ii(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function Li(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Ri=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},zi={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},Bi=zi.mouse,Vi=class extends L.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!ui(e.target,this.props.handle,t)||this.props.cancel&&ui(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=Si(e);this.touchIdentifier=r;let i=Ni(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=Pi(this,a,o);Ri(`DraggableCore: handleDragStart: %j`,s),Ri(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&wi(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,di(n,Bi.move,this.handleDrag),di(n,Bi.stop,this.handleDragStop))},this.handleDrag=e=>{let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=Ai(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(Ri(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=Ni(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=Ai(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=Pi(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&Ti(a.ownerDocument),Ri(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Ri(`DraggableCore: Removing handlers`),fi(a.ownerDocument,Bi.move,this.handleDrag),fi(a.ownerDocument,Bi.stop,this.handleDragStop))},this.onMouseDown=e=>(Bi=zi.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(Bi=zi.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(Bi=zi.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(Bi=zi.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&di(e,zi.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;fi(t,zi.mouse.move,this.handleDrag),fi(t,zi.touch.move,this.handleDrag),fi(t,zi.mouse.stop,this.handleDragStop),fi(t,zi.touch.stop,this.handleDragStop),fi(e,zi.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&Ti(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Ri(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return L.cloneElement(L.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Vi.displayName=`DraggableCore`,Vi.propTypes={allowAnyClick:Xr.default.bool,allowMobileScroll:Xr.default.bool,children:Xr.default.node.isRequired,disabled:Xr.default.bool,enableUserSelectHack:Xr.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Xr.default.arrayOf(Xr.default.number),handle:Xr.default.string,cancel:Xr.default.string,nodeRef:Xr.default.object,nonce:Xr.default.string,onStart:Xr.default.func,onDrag:Xr.default.func,onStop:Xr.default.func,onMouseDown:Xr.default.func,scale:Xr.default.number,className:ni,style:ni,transform:ni},Vi.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var Hi=class extends L.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Ri(`Draggable: onDragStart: %j`,t),this.props.onStart(e,Fi(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Ri(`Draggable: onDrag: %j`,t);let n=Fi(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=ki(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,Fi(this,t))===!1)return!1;Ri(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Ri(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=Zr.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,g={x:ji(this)&&m?this.state.x:h.x,y:Mi(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=yi(g,c):d=vi(g,c);let _=L.Children.only(n),v=p(_.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return L.createElement(Vi,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},L.cloneElement(_,{className:v,style:{..._.props.style,...d},transform:f}))}};Hi.displayName=`Draggable`,Hi.propTypes={...Vi.propTypes,axis:Xr.default.oneOf([`both`,`x`,`y`,`none`]),bounds:Xr.default.oneOfType([Xr.default.shape({left:Xr.default.number,right:Xr.default.number,top:Xr.default.number,bottom:Xr.default.number}),Xr.default.string,Xr.default.oneOf([!1])]),defaultClassName:Xr.default.string,defaultClassNameDragging:Xr.default.string,defaultClassNameDragged:Xr.default.string,defaultPosition:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),positionOffset:Xr.default.shape({x:Xr.default.oneOfType([Xr.default.number,Xr.default.string]),y:Xr.default.oneOfType([Xr.default.number,Xr.default.string])}),position:Xr.default.shape({x:Xr.default.number,y:Xr.default.number}),className:ni,style:ni,transform:ni},Hi.defaultProps={...Vi.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1};var Ui=h(((e,t)=>{function n(e){var t,r,i=``;if(typeof e==`string`||typeof e==`number`)i+=e;else if(typeof e==`object`){if(Array.isArray(e)){var a=e.length;for(t=0;t{var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>{for(var n in t)r(e,n,{get:t[n],enumerable:!0})},l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(let c of a(t))!s.call(e,c)&&c!==n&&r(e,c,{get:()=>t[c],enumerable:!(o=i(t,c))||o.enumerable});return e},u=(e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)),d=e=>l(r({},`__esModule`,{value:!0}),e),f={};c(f,{DraggableCore:()=>Oe,default:()=>ke}),t.exports=d(f);var p=u(C()),m=u(Yr()),h=u(T()),g=Ui();function _(e,t){for(let n=0,r=e.length;n`u`)return``;let t=window.document?.documentElement?.style;if(!t||e in t)return``;for(let n=0;nt===e.identifier)||e.changedTouches&&_(e.changedTouches,e=>t===e.identifier)}function ce(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier}function le(){return typeof __webpack_nonce__<`u`?__webpack_nonce__:void 0}function ue(e,t){if(!e)return;let n=e.getElementById(`react-draggable-style-el`);if(!n){n=e.createElement(`style`),n.type=`text/css`,n.id=`react-draggable-style-el`;let r=t??le();r&&n.setAttribute(`nonce`,r),n.innerHTML=`.react-draggable-transparent-selection *::-moz-selection {all: inherit;} `,n.innerHTML+=`.react-draggable-transparent-selection *::selection {all: inherit;} -`,e.getElementsByTagName(`head`)[0].appendChild(n)}e.body&&de(e.body,`react-draggable-transparent-selection`)}function F(e){window.requestAnimationFrame?window.requestAnimationFrame(()=>{I(e)}):I(e)}function I(e){if(e)try{e.body&&fe(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function de(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function fe(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function pe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:be(r);let i=xe(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:ne(a)-ee(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:te(a)-P(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function me(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function he(e){return e.props.axis===`both`||e.props.axis===`x`}function ge(e){return e.props.axis===`both`||e.props.axis===`y`}function _e(e,t,n){let r=typeof t==`number`?se(e,t):null;if(typeof t==`number`&&!r)return null;let i=xe(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return re(r||e,a,n.props.scale)}function ve(e,t,n){let r=!y(e.lastX),i=xe(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ye(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function be(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function xe(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Se=u(C()),Ce=u(Hr()),we=u(T()),Te=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Ee={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},De=Ee.mouse,Oe=class extends Se.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=ce(e);this.touchIdentifier=r;let i=_e(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=ve(this,a,o);Te(`DraggableCore: handleDragStart: %j`,s),Te(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&ue(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,M(n,De.move,this.handleDrag),M(n,De.stop,this.handleDragStop))},this.handleDrag=e=>{let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=me(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(Te(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=me(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&F(a.ownerDocument),Te(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Te(`DraggableCore: Removing handlers`),N(a.ownerDocument,De.move,this.handleDrag),N(a.ownerDocument,De.stop,this.handleDragStop))},this.onMouseDown=e=>(De=Ee.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(De=Ee.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(De=Ee.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(De=Ee.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&M(e,Ee.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;N(t,Ee.mouse.move,this.handleDrag),N(t,Ee.touch.move,this.handleDrag),N(t,Ee.mouse.stop,this.handleDragStop),N(t,Ee.touch.stop,this.handleDragStop),N(e,Ee.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&F(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=we.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Te(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return Se.cloneElement(Se.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Oe.displayName=`DraggableCore`,Oe.propTypes={allowAnyClick:Ce.default.bool,allowMobileScroll:Ce.default.bool,children:Ce.default.node.isRequired,disabled:Ce.default.bool,enableUserSelectHack:Ce.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Ce.default.arrayOf(Ce.default.number),handle:Ce.default.string,cancel:Ce.default.string,nodeRef:Ce.default.object,nonce:Ce.default.string,onStart:Ce.default.func,onDrag:Ce.default.func,onStop:Ce.default.func,onMouseDown:Ce.default.func,scale:Ce.default.number,className:x,style:x,transform:x},Oe.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var ke=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Te(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ye(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Te(`Draggable: onDrag: %j`,t);let n=ye(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=pe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ye(this,t))===!1)return!1;Te(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Te(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:he(this)&&m?this.state.x:h.x,y:ge(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ae(_,c):d=ie(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(Oe,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};ke.displayName=`Draggable`,ke.propTypes={...Oe.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},ke.defaultProps={...Oe.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:Oe})})),Ri=h(((e,t)=>{var n=Li(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),zi=h((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(C());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Hr());Ri();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Vi=h((e=>{e.__esModule=!0,e.default=void 0;var t=o(C()),n=Ri(),r=zi(),i=Bi(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Hi=h((e=>{e.__esModule=!0,e.default=void 0;var t=s(C()),n=o(Hr()),r=o(Vi()),i=Bi(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Ui=h(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Vi().default,t.exports.ResizableBox=Hi().default})),Wi=h(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Gi=Ui(),Ki=Wi();function qi(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:o,maxRows:s,isDraggable:c,isResizable:l,isBounded:u,static:d,useCSSTransforms:f=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:M,resizeHandle:N,constraints:P=tr,layoutItem:ee,layout:te=[],onDragStart:ne,onDrag:re,onDragStop:ie,onResizeStart:ae,onResize:oe,onResizeStop:se}=e,[ce,le]=(0,L.useState)(!1),[ue,F]=(0,L.useState)(!1),I=(0,L.useRef)(null),de=(0,L.useRef)({left:0,top:0}),fe=(0,L.useRef)({top:0,left:0,width:0,height:0}),pe=(0,L.useRef)(void 0),me=(0,L.useRef)(te);me.current=te;let he=(0,L.useRef)(null),ge=(0,L.useRef)(null),_e=(0,L.useRef)(!1),ve=(0,L.useRef)({x:0,y:0}),ye=(0,L.useRef)(!1),be=(0,L.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:s,rowHeight:o}),[n,a,r,i,s,o]),xe=(0,L.useMemo)(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:o,margin:i,layout:[]}),[n,s,r,o,i]),Se=(0,L.useCallback)(()=>({...xe,layout:me.current}),[xe]),Ce=(0,L.useMemo)(()=>ee??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[ee,j,C,w,T,E,D,O,k,A]),we=(0,L.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(f)return ir(e);let t=ar(e);return m?{...t,left:or(e.left/r),width:or(e.width/r)}:t},[g,f,m,r]),Te=(0,L.useCallback)((e,{node:t})=>{if(!ne)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(de.current=l,_>0){let t=e;ve.current={x:t.clientX,y:t.clientY},_e.current=!0,ye.current=!1,le(!0);return}le(!0);let u=Fn(be,l.top,l.left),{x:d,y:f}=nr(P,Ce,u.x,u.y,Se());ne(j,d,f,{e,node:t,newPosition:l})},[ne,h,be,g,_,P,Ce,Se,j]),Ee=(0,L.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!re||!ce)return;let s=e;if(_e.current&&!ye.current){let n=s.clientX-ve.current.x,r=s.clientY-ve.current.y;if(Math.hypot(n,r)<_)return;if(ye.current=!0,_e.current=!1,ne){let n=Fn(be,de.current.top,de.current.left),{x:r,y:i}=nr(P,Ce,n.x,n.y,Se());ne(j,r,i,{e,node:t,newPosition:de.current})}}let c=de.current.top+a,l=de.current.left+n;if(u){let{offsetParent:e}=t;if(e){let t=e.clientHeight-Mn(E,o,i[1]);c=Ln(c,0,t);let n=jn(be),a=r-Mn(T,n,i[0]);l=Ln(l,0,a)}}let d={top:c,left:l};de.current=d;let f=Fn(be,c,l),{x:p,y:m}=nr(P,Ce,f.x,f.y,Se());re(j,p,m,{e,node:t,newPosition:d})},[re,ne,ce,_,u,E,o,i,be,r,T,j,P,Ce,Se]),De=(0,L.useCallback)((e,{node:t})=>{if(!ie||!ce)return;let n=_e.current;if(_e.current=!1,ye.current=!1,ve.current={x:0,y:0},n){le(!1),de.current={left:0,top:0};return}let{left:r,top:i}=de.current,a={top:i,left:r};le(!1),de.current={left:0,top:0};let o=Fn(be,i,r),{x:s,y:c}=nr(P,Ce,o.x,o.y,Se());ie(j,s,c,{e,node:t,newPosition:a})},[ie,ce,be,P,Ce,Se,j]);he.current=Te,ge.current=Ee;let Oe=(0,L.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ae:o===`onResize`?oe:se;if(!s)return;let c;c=t?gr(i,a,n,r):{...n,top:a.top,left:a.left},fe.current=c;let l=In(be,c.width,c.height),{w:u,h:d}=rr(P,Ce,l.w,l.h,i,Se());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ae,oe,se,r,be,j,P,Ce,Se]),ke=(0,L.useCallback)((e,t)=>{F(!0);let n=Nn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStart`)},[Oe,be,C,w,T,E]),Ae=(0,L.useCallback)((e,t)=>{let n=Nn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResize`)},[Oe,be,C,w,T,E]),je=(0,L.useCallback)((e,t)=>{F(!1),fe.current={top:0,left:0,width:0,height:0};let n=Nn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStop`)},[Oe,be,C,w,T,E]);(0,L.useEffect)(()=>{if(!v)return;let e=I.current;if(!e)return;let t=pe.current||{left:0,top:0},n=ce&&(v.left!==t.left||v.top!==t.top);if(!ce){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};he.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-de.current.left,deltaY:v.top-de.current.top,lastX:de.current.left,lastY:de.current.top,x:v.left,y:v.top};ge.current?.(v.e,t)}pe.current=v},[v,ce,j]);let Me=Nn(be,C,w,T,E,ce?de.current:null,ue?fe.current:null),Ne=L.Children.only(t),Pe=jn(be),Fe=[Mn(D,Pe,i[0]),Mn(k,o,i[1])],Ie=[Mn(O,Pe,i[0]),Mn(A,o,i[1])],Le=Ne.props,Re=Le.className,ze=Le.style,Be=L.cloneElement(Ne,{ref:I,className:p(`react-grid-item`,Re,y,{static:d,resizing:ue,"react-draggable":c,"react-draggable-dragging":ce,dropping:!!v,cssTransforms:f}),style:{...b,...ze,...we(Me)}}),Ve=N;return Be=(0,R.jsx)(Gi.Resizable,{draggableOpts:{disabled:!l},className:l?void 0:`react-resizable-hide`,width:Me.width,height:Me.height,minConstraints:Fe,maxConstraints:Ie,onResizeStart:ke,onResize:Ae,onResizeStop:je,transformScale:h,resizeHandles:M,handle:Ve,children:Be}),Be=(0,R.jsx)(Pi,{disabled:!c,onStart:Te,onDrag:Ee,onStop:De,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:I,children:Be}),Be}var Ji=()=>{},Yi=`react-grid-layout`,Xi=!1;try{Xi=/firefox/i.test(navigator.userAgent)}catch{}function Zi(e,t){let n=L.Children.toArray(e),r=L.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push(qn(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Wn(i),w:1,h:1})}});let o=Zn(i,{cols:n});return r.compact(o,n)}function $i(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:o,positionStrategy:s=br,compactor:c,constraints:l=tr,layout:u=[],droppingItem:d,autoSize:f=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=Ji,onDragStart:v=Ji,onDrag:y=Ji,onDragStop:b=Ji,onResizeStart:x=Ji,onResize:S=Ji,onResizeStop:C=Ji,onDrop:w=Ji,onDropDragOver:T=Ji}=e,E=(0,L.useMemo)(()=>({...xr,...r}),[r]),D=(0,L.useMemo)(()=>({...Sr,...i}),[i]),O=(0,L.useMemo)(()=>({...Cr,...a}),[a]),k=(0,L.useMemo)(()=>({...wr,...o}),[o]),{cols:A,rowHeight:j,maxRows:M,margin:N,containerPadding:P}=E,{enabled:ee,bounded:te,handle:ne,cancel:re,threshold:ie}=D,{enabled:ae,handles:oe,handleComponent:se}=O,{enabled:ce,defaultItem:le,onDragOver:ue}=k,F=c??Pr(`vertical`),I=F.type,de=F.allowOverlap,fe=F.preventCollision??!1,pe=(0,L.useMemo)(()=>d??{i:`__dropping-elem__`,...le},[d,le]),me=s.type===`transform`,he=s.scale,ge=P??N,[_e,ve]=(0,L.useState)(!1),[ye,be]=(0,L.useState)(()=>Qi(u,t,A,F)),[xe,Se]=(0,L.useState)(null),[Ce,we]=(0,L.useState)(!1),[Te,Ee]=(0,L.useState)(null),[De,Oe]=(0,L.useState)(),ke=(0,L.useRef)(null),Ae=(0,L.useRef)(null),je=(0,L.useRef)(null),Me=(0,L.useRef)(0),Ne=(0,L.useRef)(ye),Pe=(0,L.useRef)(u),Fe=(0,L.useRef)(t),Ie=(0,L.useRef)(I),Le=(0,L.useRef)(ye);Le.current=ye,(0,L.useEffect)(()=>{ve(!0),(0,Ki.deepEqual)(ye,u)||_(ye)},[]),(0,L.useEffect)(()=>{if(xe||Te)return;let e=!(0,Ki.deepEqual)(u,Pe.current),n=!Zi(t,Fe.current),r=I!==Ie.current;if(e||n||r){let n=Qi(e?u:ye,t,A,F);(0,Ki.deepEqual)(n,ye)||be(n)}Pe.current=u,Fe.current=t,Ie.current=I},[u,t,A,I,F,xe,Te,ye]),(0,L.useEffect)(()=>{if(!xe&&!(0,Ki.deepEqual)(ye,Ne.current)){Ne.current=ye;let e=ye.filter(e=>e.i!==pe.i);_(e)}},[ye,xe,_,pe.i]);let Re=(0,L.useMemo)(()=>{if(!f)return;let e=Wn(ye),t=ge[1];return e*j+(e-1)*N[1]+t*2+`px`},[f,ye,j,N,ge]),ze=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Gn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};ke.current=qn(a),je.current=i,Se(o),v(i,a,a,null,r.e,r.node)},[v]),Be=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=ke.current,o=Gn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=Qn(i,o,t,n,!0,fe,I,A,de);y(c,a,o,s,r.e,r.node),be(F.compact(c,A)),Se(s)},[fe,I,A,de,F,y]),Ve=(0,L.useCallback)((e,t,n,r)=>{if(!xe)return;let i=Le.current,a=ke.current,o=Gn(i,e);if(!o)return;let s=Qn(i,o,t,n,!0,fe,I,A,de),c=F.compact(s,A);b(c,a,o,null,r.e,r.node);let l=je.current;ke.current=null,je.current=null,Se(null),be(c),l&&!(0,Ki.deepEqual)(l,c)&&_(c)},[xe,fe,I,A,de,F,b,_]),He=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Gn(i,e);a&&(Ae.current=qn(a),je.current=i,we(!0),x(i,a,a,null,r.e,r.node))},[x]),Ue=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,{handle:o}=r,s=!1,c,l,[u,d]=Xn(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),fe&&!de&&Bn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=Qn(u,d,c,l,!0,fe,I,A,de));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),be(F.compact(f,A)),Se(p)},[fe,I,A,de,F,S]),We=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,o=Gn(i,e),s=F.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=je.current;Ae.current=null,je.current=null,Se(null),we(!1),be(s),c&&!(0,Ki.deepEqual)(c,s)&&_(s)},[A,F,C,_]),Ge=(0,L.useCallback)(()=>{let e=Le.current;if(!e.some(e=>e.i===pe.i)){Ee(null),Se(null),Oe(void 0);return}let t=F.compact(e.filter(e=>e.i!==pe.i),A);be(t),Ee(null),Se(null),Oe(void 0)},[pe.i,A,F]),Ke=(0,L.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),Xi&&!e.nativeEvent.target?.classList.contains(Yi))return!1;let t=ue?ue(e.nativeEvent):T(e);if(t===!1)return Te&&Ge(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...pe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:N,maxRows:M,rowHeight:j,containerWidth:n,containerPadding:ge},l=jn(c),u=Mn(o.w,l,N[0]),d=Mn(o.h,j,N[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/he,top:_/he,e:e.nativeEvent};if(Te)De&&(De.left!==v.left||De.top!==v.top)&&Oe(v);else{let e=Pn(c,_,g,o.w,o.h);Ee((0,R.jsx)(`div`,{},o.i)),Oe(v);let t=Le.current.filter(e=>e.i!==o.i);be([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[Te,De,pe,ue,T,Ge,he,A,N,M,j,n,ge]),qe=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current--,Me.current<0&&(Me.current=0),Me.current===0&&Ge()},[Ge]),Je=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current++},[]),Ye=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Le.current,n=t.find(e=>e.i===pe.i);Me.current=0,Ge(),w(t,n,e.nativeEvent)},[pe.i,Ge,w]),Xe=(0,L.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Gn(ye,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&ee,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ae,o=r.resizeHandles||[...oe],c=i&&te&&r.isBounded!==!1,u=se;return(0,R.jsx)(qi,{containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,cancel:re,handle:ne,onDragStart:ze,onDrag:Be,onDragStop:Ve,onResizeStart:He,onResize:Ue,onResizeStop:We,isDraggable:i,isResizable:a,isBounded:c,useCSSTransforms:me&&_e,usePercentages:!_e,transformScale:he,positionStrategy:s,dragThreshold:ie,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?De:void 0,resizeHandles:o,resizeHandle:u,constraints:l,layoutItem:r,layout:ye,children:e},r.i)},[ye,n,A,N,ge,M,j,re,ne,ze,Be,Ve,He,Ue,We,ee,ae,te,me,_e,he,s,ie,De,oe,se,l]),Ze=()=>xe?(0,R.jsx)(qi,{w:xe.w,h:xe.h,x:xe.x,y:xe.y,i:xe.i,className:`react-grid-placeholder ${Ce?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:me,transformScale:he,constraints:l,layout:ye,children:(0,R.jsx)(`div`,{})}):null,Qe=p(Yi,m),$e={height:Re,...h};return(0,R.jsxs)(`div`,{ref:g,className:Qe,style:$e,onDrop:ce?Ye:void 0,onDragLeave:ce?qe:void 0,onDragEnter:ce?Je:void 0,onDragOver:ce?Ke:void 0,children:[L.Children.map(t,e=>L.isValidElement(e)?Xe(e):null),ce&&Te&&Xe(Te,!0),Ze()]})}var ea={lg:1200,md:996,sm:768,xs:480,xxs:0},ta={lg:12,md:10,sm:6,xs:4,xxs:2},na=()=>{};function ra(e,t,n,r){let i=[];L.Children.forEach(t,t=>{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Wn(i),w:1,h:1})}});let a=Zn(i,{cols:n});return r.compact(a,n)}function ia(e){let{children:t,width:n,breakpoint:r,breakpoints:i=ea,cols:a=ta,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=na,onLayoutChange:p=na,onWidthChange:m=na,...h}=e,g=d??Pr(`vertical`),_=g.type,v=g.allowOverlap,y=(0,L.useMemo)(()=>r??Ir(i,n),[]),b=(0,L.useMemo)(()=>Lr(y,a),[y,a]),x=(0,L.useMemo)(()=>Rr(o,i,y,y,b,_),[]),[S,C]=(0,L.useState)(y),[w,T]=(0,L.useState)(b),[E,D]=(0,L.useState)(x),[O,k]=(0,L.useState)(o),A=(0,L.useRef)(n),j=(0,L.useRef)(r),M=(0,L.useRef)(i),N=(0,L.useRef)(a),P=(0,L.useRef)(o),ee=(0,L.useRef)(_),te=(0,L.useRef)(O);(0,L.useEffect)(()=>{te.current=O},[O]);let ne=(0,L.useMemo)(()=>(0,Ki.deepEqual)(o,P.current)?null:Rr(o,i,S,S,w,g),[o,i,S,w,g]),re=ne??E;(0,L.useEffect)(()=>{ne!==null&&(D(ne),k(o),te.current=o,P.current=o)},[ne,o]),(0,L.useEffect)(()=>{if(_!==ee.current){let e=g.compact(Jn(re),w),t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t),ee.current=_}},[_,g,re,w,v,S,p]),(0,L.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,Ki.deepEqual)(i,M.current),c=!(0,Ki.deepEqual)(a,N.current);if(e||o||s||c){let e=r??Ir(i,n),o=Lr(e,a),d=S;if(d!==e||s||c){let n={...te.current};n[d]||(n[d]=Jn(E));let r=Rr(n,i,e,d,o,g);r=ra(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),te.current=n,f(e,o),p(r,n)}let h=zr(l,e),_=u?zr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,M.current=i,N.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let ie=(0,L.useCallback)(e=>{let t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t)},[S,p]),ae=(0,L.useMemo)(()=>zr(l,S),[l,S]),oe=(0,L.useMemo)(()=>u===null?null:zr(u,S),[u,S]),se=(0,L.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ae,containerPadding:oe}),[w,s,c,ae,oe]);return(0,R.jsx)($i,{...h,width:n,gridConfig:se,compactor:g,onLayoutChange:ie,layout:re,children:t})}function aa(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:M,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae}=e,oe=h===void 0?`vertical`:h;v===!1&&(oe=null);let se={enabled:y,bounded:b,handle:x,cancel:S},ce={enabled:C,handles:w,handleComponent:T},le={enabled:E},ue;ue=D?O===1?_r:yr(O):vr;let F=Pr(oe,_,g);return(0,R.jsx)(ia,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:F,dragConfig:se,resizeConfig:ce,dropConfig:le,positionStrategy:ue,droppingItem:m,autoSize:k,className:A,style:j,innerRef:M,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae,children:t})}aa.displayName=`ResponsiveReactGridLayout`;var oa=aa,sa=`react-grid-layout`;function ca(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[o,s]=(0,L.useState)(1280),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(null);return(0,L.useEffect)(()=>{l(!0)},[]),(0,L.useEffect)(()=>{let e=u.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{s(e=>e===n?e:n),t=null})}});return n.observe(e),d.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[c]),n&&!c?(0,R.jsx)(`div`,{className:p(r,sa),style:i,ref:u}):(0,R.jsx)(e,{innerRef:u,className:r,style:i,...a,width:o})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function la(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function ua(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var da=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],fa={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function pa(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>pa(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>pa(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:la(e),w:t}}var ha=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function ga(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function _a(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${_a(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function va(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function ya(e){if(e>=2e3)return`bad`;if(e>=750)return`warn`}function ba(e){return e>=.05?`bad`:e>=.01?`warn`:`dimmed`}var xa=function(e,t){return xa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},xa(e,t)};function z(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);xa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Sa=`12px sans-serif`,Ca=20,wa=100,Ta=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function Ea(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Va&&(Ba=0),Ba++}function Ua(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function B(e){if(typeof e!=`object`||!e)return e;var t=e,n=ja.call(e);if(n===`[object Array]`){if(!yo(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?Ao.worker=!0:!Ao.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(Ao.node=!0,Ao.svgSupported=!0):jo(navigator.userAgent,Ao);function jo(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Mo=`.`,No=`___EC__COMPONENT__CONTAINER___`,Po=`___EC__EXTENDED_CLASS___`;function Fo(e){var t={main:``,sub:``};if(e){var n=e.split(Mo);t.main=n[0]||``,t.sub=n[1]||``}return t}function Io(e){ho(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Lo(e){return!!(e&&e[Po])}function Ro(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return zo(t)?n=function(e){z(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Ja(n,this)),V(n.prototype,e),n[Po]=!0,n.extend=this.extend,n.superCall=Uo,n.superApply=Wo,n.superClass=t,n}}function zo(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Bo(e,t){e.extend=t.extend}var Vo=Math.round(Math.random()*10);function Ho(e){var t=[`__\0is_clz`,Vo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Uo(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function Wo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Go(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){Io(r),e.prototype.type=r;var i=Fo(r);if(!i.sub)t[i.main]=e;else if(i.sub!==No){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[No]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Fo(e),r=[],i=t[n.main];return i&&i[No]?H(i,function(e,t){t!==No&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Fo(e).main]},e.getAllClassMainTypes=function(){var e=[];return H(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Fo(e).main];return n&&n[No]};function n(e){var n=t[e.main];return(!n||!n[No])&&(n=t[e.main]={},n[No]=!0),n}}function Ko(e,t){for(var n=0;n=0||i&&qa(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var qo=Ko([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Jo=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return qo(this,e,t)},e}(),Yo=function(){function e(e){this.value=e}return e}(),Xo=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Yo(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Zo=function(){function e(e){this._list=new Xo,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Yo(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),Qo=new Zo(50);function $o(e){if(typeof e==`string`){var t=Qo.get(e);return t&&t.image}return e}function es(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=Qo.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!ns(t)&&a.pending.push(o)):(t=Oa.loadImage(e,ts,ts),t.__zrImageSrc=e,Qo.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function ts(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Gs(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Gs(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Fs.x=Ls.x=t.x,Fs.y=Rs.y=t.y,Is.x=Rs.x=t.x+t.width,Is.y=Ls.y=t.y+t.height,Fs.transform(n),Rs.transform(n),Is.transform(n),Ls.transform(n),e.x=As(Fs.x,Is.x,Ls.x,Rs.x),e.y=As(Fs.y,Is.y,Ls.y,Rs.y);var s=js(Fs.x,Is.x,Ls.x,Rs.x),c=js(Fs.y,Is.y,Ls.y,Rs.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=is(e||[]),ss(e,e,ms(Zs,-t.x,-t.y)),ls(e,e,ms(Zs,r,i)),ss(e,e,ms(Zs,n.x,n.y)),e},e}(),Us=Z.create,Ws=Z.set,Gs=Z.copy,Ks=Z.calculateTransform,qs=Z.applyTransform,Js=Z.contain,Ys=new Z(0,0,0,0),Xs=new Z(0,0,0,0),Zs=[];function Qs(e,t,n,r,i,a,o,s){var c=Ms(t-n),l=Ms(r-e),u=As(c,l),d=Ns[i],f=Ns[1-i],p=Ps[i];t=l||!zs.bidirectional)&&(Bs[d]=-l,Bs[f]=0,zs.useDir&&zs.calcDirMTV())))}function $s(){var e=0,t=new ks,n=new ks,r={minTv:new ks,maxTv:new ks,useDir:!1,dirMinTv:new ks,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=js(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=ic)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=Oa.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?rc=ic:i>2&&rc++,t}}var rc=0,ic=5;function ac(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=nc(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function oc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=Oa.measureText(t,e.font).width,n.put(t,r)),r}function sc(e,t,n,r){var i=oc(ec(t),e),a=dc(t);return new Z(lc(0,i,n),uc(0,a,r),i,a)}function cc(e,t,n,r){var i=((e||``)+``).split(` -`);if(i.length===1)return sc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function pc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=fc(r[0],n.width),l+=fc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var mc=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function hc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` -`);a=gc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=oc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function _c(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=oc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?vc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=oc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function vc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=gc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)_c(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=ec(l),S=0;S<_.length;S++)w=Math.max(oc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var bc=function(){function e(){}return e}(),xc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Sc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Cc(e,t,n,r,i){var a=new Sc,o=Mc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=mc.lastIndex=0,h;(h=mc.exec(o))!=null;){var g=h.index;g>m&&wc(a,o.substring(m,g),t,p),wc(a,h[2],t,p,h[1]),m=mc.lastIndex}md){var ee=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` -`),l=!0),r.accumWidth=m}else{var h=Oc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` -`);for(var g=ec(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ec=Za(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Dc(e){return!Tc(e)||!!Ec[e]}function Oc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=ec(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function kc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Ac,lc(n,o,i),uc(r,s,a),o,s),Z.intersect(t,Ac,null,jc);var c=jc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=lc(c.x,c.width,i,!0),e.baseY=uc(c.y,c.height,a,!0)}}var Ac=new Z(0,0,0,0),jc={outIntersectRect:{},clamp:!0};function Mc(e){return e==null?e=``:e+=``}function Nc(e){var t=Mc(e.text),n=e.font;return Pc(e,oc(ec(n),t),dc(n),null)}function Pc(e,t,n,r){var i=new Z(lc(e.x||0,t,e.textAlign),uc(e.y||0,n,e.textBaseline),t,n),a=r??(Fc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Fc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var Ic=is,Lc=5e-5;function Rc(e){return e>Lc||e<-Lc}var zc=[],Bc=[],Vc=rs(),Hc=Math.abs,Uc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return Wc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Rc(this.rotation)||Rc(this.x)||Rc(this.y)||Rc(this.scaleX-1)||Rc(this.scaleY-1)||Rc(this.skewX)||Rc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(Ic(n),this.invTransform=null);return}n||=rs(),t?this.getLocalTransform(n):Ic(n),e&&(t?os(n,e,n):as(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||rs(),us(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(zc);var n=zc[0]<0?-1:1,r=zc[1]<0?-1:1,i=((zc[0]-n)*t+n)/zc[0]||0,a=((zc[1]-r)*t+r)/zc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||rs(),os(Bc,e.invTransform,t),t=Bc);var n=this.originX,r=this.originY;(n||r)&&(Vc[4]=n,Vc[5]=r,os(Bc,t,Vc),Bc[4]-=n,Bc[5]-=r,t=Bc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&Es(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&Es(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Hc(e[0]-1)>1e-10&&Hc(e[3]-1)>1e-10?Math.sqrt(Hc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){qc(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&cs(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),Wc=Uc.getLocalTransform;function Gc(){return new Uc}var Kc=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function qc(e,t){return Ga(e,t,Kc)}var Jc={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Jc.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Jc.bounceIn(e*2)*.5:Jc.bounceOut(e*2-1)*.5+.5}},Yc=Math.pow,Xc=Math.sqrt,Zc=1e-8,Qc=1e-4,$c=Xc(3),el=1/3,tl=ds(),nl=ds(),rl=ds();function il(e){return e>-Zc&&eZc||e<-Zc}function ol(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function sl(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function cl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(il(u)&&il(d)){if(il(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(il(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=Xc(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Yc(-y,el):Yc(y,el),b=b<0?-Yc(-b,el):Yc(b,el);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*Xc(u*u*u)),S=Math.acos(x)/3,C=Xc(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+$c*Math.sin(S)))/(3*o),T=(-s+C*(w-$c*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function ll(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(il(o)){if(al(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(il(u))i[0]=-a/(2*o);else if(u>0){var d=Xc(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function ul(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function dl(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;tl[0]=c,tl[1]=l;for(var v=0;v<1;v+=.05)nl[0]=ol(e,n,i,o,v),nl[1]=ol(t,r,a,s,v),g=Ts(tl,nl),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(il(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=Xc(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function gl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function _l(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function vl(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;tl[0]=o,tl[1]=s;for(var f=0;f<1;f+=.05){nl[0]=pl(e,n,i,f),nl[1]=pl(t,r,a,f);var p=Ts(tl,nl);p=0&&p=1?1:cl(0,r,a,1,e,s)&&ol(0,i,o,1,s[0])}}}var Sl=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Do,this.ondestroy=e.ondestroy||Do,this.onrestart=e.onrestart||Do,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Jc[e]||xl(e)},e}(),Cl={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function wl(e){return e=Math.round(e),e<0?0:e>255?255:e}function Tl(e){return e=Math.round(e),e<0?0:e>360?360:e}function El(e){return e<0?0:e>1?1:e}function Dl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?wl(parseFloat(t)/100*255):wl(parseInt(t,10))}function Ol(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?El(parseFloat(t)/100):El(parseFloat(t))}function kl(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Al(e,t,n){return e+(t-e)*n}function jl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Ml(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Nl=new Zo(20),Pl=null;function Fl(e,t){Pl&&Ml(Pl,t),Pl=Nl.put(e,Pl||t.slice())}function Il(e,t){if(e){t||=[];var n=Nl.get(e);if(n)return Ml(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in Cl)return Ml(t,Cl[r]),Fl(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){jl(t,0,0,0,1);return}return jl(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Fl(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){jl(t,0,0,0,1);return}return jl(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Fl(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?jl(t,+l[0],+l[1],+l[2],1):jl(t,0,0,0,1);u=Ol(l.pop());case`rgb`:if(l.length>=3)return jl(t,Dl(l[0]),Dl(l[1]),Dl(l[2]),l.length===3?u:Ol(l[3])),Fl(e,t),t;jl(t,0,0,0,1);return;case`hsla`:if(l.length!==4){jl(t,0,0,0,1);return}return l[3]=Ol(l[3]),Ll(l,t),Fl(e,t),t;case`hsl`:if(l.length!==3){jl(t,0,0,0,1);return}return Ll(l,t),Fl(e,t),t;default:return}}jl(t,0,0,0,1)}}function Ll(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=Ol(e[1]),i=Ol(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],jl(t,wl(kl(o,a,n+1/3)*255),wl(kl(o,a,n)*255),wl(kl(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Rl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function zl(e,t){var n=Il(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return Wl(n,n.length===4?`rgba`:`rgb`)}}function Bl(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=wl(Al(o[0],s[0],c)),n[1]=wl(Al(o[1],s[1],c)),n[2]=wl(Al(o[2],s[2],c)),n[3]=El(Al(o[3],s[3],c)),n}}function Vl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=Il(t[i]),s=Il(t[a]),c=r-i,l=Wl([wl(Al(o[0],s[0],c)),wl(Al(o[1],s[1],c)),wl(Al(o[2],s[2],c)),El(Al(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Hl(e,t,n,r){var i=Il(e);if(e)return i=Rl(i),t!=null&&(i[0]=Tl(K(t)?t(i[0]):t)),n!=null&&(i[1]=Ol(K(n)?n(i[1]):n)),r!=null&&(i[2]=Ol(K(r)?r(i[2]):r)),Wl(Ll(i),`rgba`)}function Ul(e,t){var n=Il(e);if(n&&t!=null)return n[3]=El(t),Wl(n,`rgba`)}function Wl(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Gl(e,t){var n=Il(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Kl=new Zo(100);function ql(e){if(q(e)){var t=Kl.get(e);return t||(t=zl(e,-.1),Kl.put(e,t)),t}if(co(e)){var n=V({},e);return n.colorStops=U(e.colorStops,function(e){return{offset:e.offset,color:zl(e.color,-.1)}}),n}return e}var Jl=Math.round;function Yl(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=Il(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var Xl=1e-4;function Zl(e){return e-Xl}function Ql(e){return Jl(e*1e3)/1e3}function $l(e){return Jl(e*1e4)/1e4}function eu(e){return`matrix(`+Ql(e[0])+`,`+Ql(e[1])+`,`+Ql(e[2])+`,`+Ql(e[3])+`,`+$l(e[4])+`,`+$l(e[5])+`)`}var tu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function nu(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function ru(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function iu(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function au(e){return e&&!!e.image}function ou(e){return e&&!!e.svgElement}function su(e){return au(e)||ou(e)}function cu(e){return e.type===`linear`}function lu(e){return e.type===`radial`}function uu(e){return e&&(e.type===`linear`||e.type===`radial`)}function du(e){return`url(#`+e+`)`}function fu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function pu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*Oo,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Jl(o*Oo)+`deg, `+Jl(s*Oo)+`deg)`),c.join(` `)}var mu=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),hu=Array.prototype.slice;function gu(e,t,n){return(t-e)*n+e}function _u(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Mu,s=t;if(Xa(t)){var c=Tu(t);o=c,(c===1&&!io(t[0])||c===2&&!io(t[0][0]))&&(a=!0)}else if(io(t)&&!lo(t))o=Eu;else if(q(t)){if(!isNaN(+t))o=Eu;else{var l=Il(t);l&&(s=l,o=ku)}}else if(co(t)){var u=V({},s);u.colorStops=U(t.colorStops,function(e){return{offset:e.offset,color:Il(e.color)}}),cu(t)?o=Au:lu(t)&&(o=ju),s=u}i===0?this.valType=o:(o!==this.valType||o===Mu)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:Jc[n]||xl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Pu(r),c=Nu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Fu:e[s];if((Pu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Pu(i))i===Du?_u(g,f[r],p[r],h):vu(g,f[r],p[r],h);else if(Nu(i)){var _=f[r],v=p[r],y=i===Au;e[s]={type:y?`linear`:`radial`,x:gu(_.x,v.x,h),y:gu(_.y,v.y,h),colorStops:U(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:gu(e.offset,n.offset,h),color:wu(_u([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=gu(_.x2,v.x2,h),e[s].y2=gu(_.y2,v.y2,h)):e[s].r=gu(_.r,v.r,h)}else if(c)_u(g,f[r],p[r],h),n||(e[s]=wu(g));else{var b=gu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===Eu?e[n]=e[n]+r:t===ku?(Il(e[n],Fu),yu(Fu,Fu,r,1),e[n]=wu(Fu)):t===Du?yu(e[n],e[n],r,1):t===Ou&&bu(e[n],e[n],r,1)},e}(),Lu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ua(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,eo(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Cu(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Cu(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Ru=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Uu:Hu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&Il(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,Wl(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=eo(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Gu,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Gu;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(qa(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ua(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=ad(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,sd(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=qa(r,e),a=qa(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var cd=`__zr_style_`+Math.round(Math.random()*10),ld={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},ud={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ld[cd]=!0;var dd=[`z`,`z2`,`invisible`],fd=[`invisible`],pd=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=eo(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Sd[0]=bd(i)*n+e,Sd[1]=yd(i)*r+t,Cd[0]=bd(a)*n+e,Cd[1]=yd(a)*r+t,l(s,Sd,Cd),u(c,Sd,Cd),i%=xd,i<0&&(i+=xd),a%=xd,a<0&&(a+=xd),i>a&&!o?a+=xd:ii&&(wd[0]=bd(p)*n+e,wd[1]=yd(p)*r+t,l(s,wd,s),u(c,wd,c))}var Md={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Nd=[],Pd=[],Fd=[],Id=[],Ld=[],Rd=[],zd=Math.min,Bd=Math.max,Vd=Math.cos,Hd=Math.sin,Ud=Math.abs,Wd=Math.PI,Gd=Wd*2,Kd=typeof Float32Array<`u`,qd=[];function Jd(e){return Math.round(e/Wd*1e8)/1e8%2*Wd}function Yd(e,t){var n=Jd(e[0]);n<0&&(n+=Gd);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Gd?i=n+Gd:t&&n-i>=Gd?i=n-Gd:!t&&n>i?i=n+(Gd-Jd(n-i)):t&&n0&&(this._ux=Ud(n/Bu/e)||0,this._uy=Ud(n/Bu/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Md.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Ud(e-this._xi),r=Ud(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Md.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Md.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Md.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),qd[0]=r,qd[1]=i,Yd(qd,a),r=qd[0],i=qd[1];var o=i-r;return this.addData(Md.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Vd(i)*n+e,this._yi=Hd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Md.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Md.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Kd&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Fd[0]=Fd[1]=Ld[0]=Ld[1]=Number.MAX_VALUE,Id[0]=Id[1]=Rd[0]=Rd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Ud(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Md.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=fl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Md.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=yl(i,a,y,b,h,g,10),i=h,a=g;break;case Md.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Vd(D)*T+C,s=Hd(D)*E+w),m=Bd(T,E)*zd(Gd,Math.abs(O)),i=Vd(k)*T+C,a=Hd(k)*E+w;break;case Md.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Md.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Md.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Md.L:u=n[x++],d=n[x++];var w=Ud(u-c),T=Ud(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Md.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;ul(c,k,j,N,D,Nd),ul(l,A,M,P,D,Pd),e.bezierCurveTo(Nd[1],Pd[1],Nd[2],Pd[2],Nd[3],Pd[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Md.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;_l(c,k,j,D,Nd),_l(l,A,M,D,Pd),e.quadraticCurveTo(Nd[1],Pd[1],Nd[2],Pd[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Md.A:var ee=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=Ud(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(ee,te,ne,re,oe,ie,ue,se):e.arc(ee,te,ce,ie,ue,se),F)break lo;C&&(o=Vd(ie)*ne+ee,s=Hd(ie)*re+te),c=Vd(ue)*ne+ee,l=Hd(ue)*re+te;break;case Md.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var I=n[x++],de=n[x++];if(f){var E=p[g++];if(h+E>_){var fe=_-h;e.moveTo(u,d),e.lineTo(u+zd(fe,I),d),fe-=I,fe>0&&e.lineTo(u+I,d+zd(fe,de)),fe-=de,fe>0&&e.lineTo(u+Bd(I-fe,0),d+de),fe-=I,fe>0&&e.lineTo(u,d+Bd(de-fe,0));break lo}h+=E}e.rect(u,d,I,de);break;case Md.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Md,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function Zd(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=nf);var f=Math.atan2(c,s);return f<0&&(f+=nf),f>=r&&f<=i||f+nf>=r&&f+nf<=i}function af(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var of=Xd.CMD,sf=Math.PI*2,cf=1e-4;function lf(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&ff(),p=ol(t,r,a,s,df[0]),f>1&&(m=ol(t,r,a,s,df[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=pl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);uf[0]=-c,uf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=sf-1e-4){r=0,i=sf;var u=a?1:-1;return o>=uf[0]+e&&o<=uf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=sf,i+=sf);for(var f=0,p=0;p<2;p++){var m=uf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=sf+h),(h>=r&&h<=i||h+sf>=r&&h+sf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=af(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case of.M:u=a[m++],d=a[m++],c=u,l=d;break;case of.L:if(n){if(Zd(c,l,a[m],a[m+1],t,r,i))return!0}else s+=af(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case of.C:if(n){if(Qd(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=pf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case of.Q:if(n){if($d(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=mf(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case of.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=af(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(rf(_,v,b,x,x+S,C,t,w,i))return!0}else s+=hf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case of.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(Zd(u,d,f,d,t,r,i)||Zd(f,d,f,p,t,r,i)||Zd(f,p,u,p,t,r,i)||Zd(u,p,u,d,t,r,i))return!0}else s+=af(f,d,f,p,r,i),s+=af(u,p,u,d,r,i);break;case of.Z:if(n){if(Zd(c,l,u,d,t,r,i))return!0}else s+=af(c,l,u,d,r,i);c=u,l=d}}return!n&&!lf(l,d)&&(s+=af(c,l,u,d,r,i)||0),s!==0}function _f(e,t,n){return gf(e,0,!1,t,n)}function vf(e,t,n,r){return gf(e,t,!0,n,r)}var yf=Ka({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ld),bf={style:Ka({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ud.style)},xf=Kc.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Sf=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Hu:t>.2?Wu:Uu}if(e)return Uu}return Hu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Gl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new Xd(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),vf(a,o/s,e,t)))return!0}if(this.hasFill())return _f(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:V(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return To(yf,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=V({},r.shape),V(c,n.shape)):(c=V({},i?this.shape:r.shape),V(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=V({},this.shape);for(var l={},u=eo(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Af=Math.round;function jf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Af(r*2)===Af(i*2)&&(e.x1=e.x2=Nf(r,s,!0)),Af(a*2)===Af(o*2)&&(e.y1=e.y2=Nf(a,s,!0)),e):e}}function Mf(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=Nf(r,s,!0),e.y=Nf(i,s,!0),e.width=Math.max(Nf(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(Nf(i+o,s,!1)-e.y,o===0?0:1),e):e}}function Nf(e,t,n){if(!t)return e;var r=Af(e*2);return(r+Af(t))%2==0?r/2:(r+(n?1:-1))/2}var Pf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Ff={},If=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Pf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Mf(Ff,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?kf(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Sf);If.prototype.type=`rect`;var Lf={fill:`#000`},Rf=2,zf={},Bf={style:Ka({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ud.style)},Vf=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Lf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&ep(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=Qf(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(wf),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=Zf(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=Xf(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Rf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=fo(s.opacity,t.opacity,1),Kf(p,s),y&&(p.lineWidth=fo(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Pc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(If),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(Of),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=fo(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return qf(e)&&(t=[e.fontStyle,e.fontWeight,Gf(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&go(t)||e.textFont||e.font},t}(pd),Hf={left:!0,right:1,center:1},Uf={top:1,bottom:1,middle:1},Wf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Gf(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Kf(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var gp=_p;function _p(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return vp(e,t,n)}function vp(e,t,n){return q(e)?bp(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function yp(e){return q(e)&&bp(e)}function bp(e){return!!rp(e).match(/%$/)}function xp(e,t,n){return isNaN(t)?n?``+e:+e:(t=ip(ap(0,t),np),e=(+e).toFixed(t),n?e:+e)}function Sp(e){return e.sort(function(e,t){return e-t}),e}function Cp(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(sp(e*t)/t===e)return n}return wp(e)}function wp(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return ap(0,(a<0?0:i-1-a)-r)}function Tp(e,t,n){var r=op(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=dp(2*op(n||1)*op(r))/fp,a=dp(op(t))/fp,o=ap(0,lp(-i+a));return isFinite(o)||(o=NaN),o}function Ep(e,t){var n=ap(Cp(e),Cp(t)),r=e+t;return n>np?r:xp(r,n)}var Dp=up(2,53)-1;function Op(e){var t=pp*2;return(e%t+t)%t}function kp(e){return e>-tp&&e=10&&t++,t}function Pp(e,t){var n=Np(e),r=up(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,xp(e,-n)}function Fp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function km(){return[1/0,-1/0]}function Am(e,t){Pm(t)&&(te[1]&&(e[1]=t))}function jm(e,t){Pm(t)&&te[1]&&(e[1]=t)}function Nm(e,t){Fm(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Pm(e){return e!=null&&isFinite(e)}function Fm(e,t){return Pm(e)&&Pm(t)&&e<=t}function Im(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Lm(e){Fm(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Rm(){var e=`__ec_once_`+zm++;return function(t,n){Eo(t,e)||(t[e]=1,n())}}var zm=Rp();function Bm(e,t,n){var r=X(),i=0;H(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Vm(e){return e.value+``}function Hm(e){return e+``}function Um(e,t){return Y(t,!0)?e.seriesIndex+2:0}function Wm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Gm(e,t){return{seriesType:e,overallReset:t}}function Km(e){return{overallReset:e}}var qm=vm(),Jm=function(e,t,n,r){if(r){var i=qm(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=qm(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Ym=`series`,Xm=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),Zm=`original`,Qm=`arrayRows`,$m=`objectRows`,eh=`keyedColumns`,th=`typedArray`,nh=`unknown`,rh=`column`,ih=`Roam`,ah=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],oh=function(){function e(e){H(ah,function(t){this[t]=W(e[t],e)},this)}return e}();function sh(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var ch=1,lh={},uh=vm(),dh=vm(),fh=[`emphasis`,`blur`,`select`],ph=[`normal`,`emphasis`,`blur`,`select`],mh=`highlight`,hh=`downplay`,gh=`select`,_h=`unselect`,vh=`toggleSelect`,yh=`selectchanged`;function bh(e){return e!=null&&e!==`none`}function xh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Sh(e){xh(e,`emphasis`,2)}function Ch(e){e.hoverState===2&&xh(e,`normal`,0)}function wh(e){xh(e,`blur`,1)}function Th(e){e.hoverState===1&&xh(e,`normal`,0)}function Eh(e){e.selected=!0}function Dh(e){e.selected=!1}function Oh(e,t,n){t(e,n)}function kh(e,t,n){Oh(e,t,n),e.isGroup&&e.traverse(function(e){Oh(e,t,n)})}function Ah(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function jh(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Sf){var o=uh(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(bh(s)||bh(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=V({},r),l=V({},l),l.fill=s):!bh(l.fill)&&bh(s)?(a=!0,r=V({},r),l=V({},l),l.fill=ql(s)):!bh(l.stroke)&&bh(c)&&(a||(r=V({},r),l=V({},l)),l.stroke=ql(c)),r.style=l}}if(r&&r.z2==null){a||(r=V({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Nh(e,t,n){if(n&&n.z2==null){n=V({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Ph(e,t,n){var r=qa(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:jh(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=V({},n),o=V({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Fh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Mh(this,e,t,n);if(e===`blur`)return Ph(this,e,n);if(e===`select`)return Nh(this,e,n)}return n}function Ih(e){e.stateProxy=Fh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Fh),n&&(n.stateProxy=Fh)}function Lh(e,t){!Gh(e,t)&&!e.__highByOuter&&kh(e,Sh)}function Rh(e,t){!Gh(e,t)&&!e.__highByOuter&&kh(e,Ch)}function zh(e,t){e.__highByOuter|=1<<(t||0),kh(e,Sh)}function Bh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&kh(e,Ch)}function Vh(e){kh(e,wh)}function Hh(e){kh(e,Th)}function Uh(e){kh(e,Eh)}function Wh(e){kh(e,Dh)}function Gh(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Kh(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=dh(i),o=sh(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Th(e)}),s&&n.push(i)),a.isBlured=!1}),H(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function qh(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ng(e,t,n){lg(e,!0),kh(e,Ih),ag(e,t,n)}function rg(e){lg(e,!1)}function ig(e,t,n,r){r?rg(e):ng(e,t,n)}function ag(e,t,n){var r=qm(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var og=[`emphasis`,`blur`,`select`],sg={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function cg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=bg(m),s*=bg(m));var h=(i===a?-1:1)*bg((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Sg(d)*g-xg(d)*_,y=(t+r)/2+xg(d)*g+Sg(d)*_,b=Eg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=Eg(x,S);if(Tg(x,S)<=-1&&(C=Cg),Tg(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Cg*1e6)/1e6;C=Cg*2+w%2*Cg}u.addData(l,v,y,o,s,b,C,d,a)}var Og=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,kg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ag(e){var t=new Xd;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=Xd.CMD,c=e.match(Og);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=qa(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=qa(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function t_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function n_(e,t){var n,r=Xg(t.r,0),i=Xg(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Jg(c-s),p=f>Ug&&f%Ug;if(p>Qg&&(f=p),!(r>Qg))e.moveTo(l,u);else if(f>Ug-Qg)e.moveTo(l+r*Gg(s),u+r*Wg(s)),e.arc(l,u,r,s,c,!d),i>Qg&&(e.moveTo(l+i*Gg(c),u+i*Wg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Gg(s),j=r*Wg(s),M=i*Gg(c),N=i*Wg(c),P=f>Qg;if(P){var ee=t.cornerRadius;ee&&(n=t_(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Jg(r-i)/2;if(v=Zg(te,g),y=Zg(te,_),b=Zg(te,m),x=Zg(te,h),w=S=Xg(v,y),T=C=Xg(b,x),(S>Qg||C>Qg)&&(E=r*Gg(c),D=r*Wg(c),O=i*Gg(s),k=i*Wg(s),fQg){var le=Zg(g,w),ue=Zg(_,w),F=e_(O,k,A,j,r,le,d),I=e_(E,D,M,N,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w0&&e.arc(l+F.cx,u+F.cy,le,qg(F.y0,F.x0),qg(F.y1,F.x1),!d),e.arc(l,u,r,qg(F.cy+F.y1,F.cx+F.x1),qg(I.cy+I.y1,I.cx+I.x1),!d),ue>0&&e.arc(l+I.cx,u+I.cy,ue,qg(I.y1,I.x1),qg(I.y0,I.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>Qg)||!P)e.lineTo(l+M,u+N);else if(T>Qg){var le=Zg(m,T),ue=Zg(h,T),F=e_(M,N,E,D,i,-ue,d),I=e_(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T0&&e.arc(l+F.cx,u+F.cy,ue,qg(F.y0,F.x0),qg(F.y1,F.x1),!d),e.arc(l,u,i,qg(F.cy+F.y1,F.cx+F.x1),qg(I.cy+I.y1,I.cx+I.x1),d),le>0&&e.arc(l+I.cx,u+I.cy,le,qg(I.y1,I.x1),qg(I.y0,I.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var r_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),i_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new r_},t.prototype.buildPath=function(e,t){n_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Sf);i_.prototype.type=`sector`;var a_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),o_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new a_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Sf);o_.prototype.type=`ring`;function s_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=s_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sA_[1]){if(i=!1,j_.negativeSize||n)return i;var s=O_(A_[0]-k_[1]),c=O_(k_[0]-A_[1]);E_(s,c)>N_.len()&&(s=c||!j_.bidirectional)&&(ks.scale(M_,o,-c*r),j_.useDir&&j_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function B_(e,t,n,r,i,a){z_(`update`,e,t,n,r,i,a)}function V_(e,t,n,r,i,a){z_(`enter`,e,t,n,r,i,a)}function H_(e){if(!e.__zr)return!0;for(var t=0;tx_,BezierCurve:()=>y_,BoundingRect:()=>Z,Circle:()=>zg,CompoundPath:()=>S_,Ellipse:()=>Vg,Group:()=>Lg,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>Of,IncrementalDisplayable:()=>I_,Line:()=>h_,LinearGradient:()=>w_,OrientedBoundingRect:()=>P_,Path:()=>Sf,Point:()=>ks,Polygon:()=>u_,Polyline:()=>f_,RadialGradient:()=>T_,Rect:()=>If,Ring:()=>o_,Sector:()=>i_,Text:()=>Vf,WH:()=>X_,XY:()=>Y_,applyTransform:()=>dv,calcZ2Range:()=>Pv,clipPointsByRect:()=>gv,clipRectByRect:()=>_v,createIcon:()=>vv,decomposeTransform:()=>Rv,ensureCopyRect:()=>jv,ensureCopyTransform:()=>Mv,expandOrShrinkRect:()=>Cv,extendPath:()=>$_,extendShape:()=>Z_,getCurrentCanvasPainter:()=>Bv,getShapeClass:()=>tv,getTransform:()=>uv,groupTransition:()=>hv,initProps:()=>V_,isBoundingRectAxisAligned:()=>kv,isElementRemoved:()=>H_,lineLineIntersect:()=>bv,linePolygonIntersect:()=>yv,makeImage:()=>rv,makePath:()=>nv,mergePath:()=>av,payloadDisableAnimation:()=>Lv,registerShape:()=>ev,removeElement:()=>U_,removeElementWithFadeOut:()=>G_,resizePath:()=>ov,retrieveZInfo:()=>Nv,setTooltipConfig:()=>Ev,subPixelOptimize:()=>lv,subPixelOptimizeLine:()=>sv,subPixelOptimizeRect:()=>cv,transformDirection:()=>fv,traverseElements:()=>Ov,traverseUpdateZ:()=>Fv,updateProps:()=>B_}),J_={},Y_=[`x`,`y`],X_=[`width`,`height`];function Z_(e){return Sf.extend(e)}var Q_=Fg;function $_(e,t){return Q_(e,t)}function ev(e,t){J_[e]=t}function tv(e){if(J_.hasOwnProperty(e))return J_[e]}function nv(e,t,n,r){var i=Pg(e,t);return n&&(r===`center`&&(n=iv(n,i.getBoundingRect())),ov(i,n)),i}function rv(e,t,n){var r=new Of({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(iv(t,i))}}});return r}function iv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var av=Ig;function ov(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function sv(e,t){return jf(e,e,{lineWidth:t}),e}function cv(e,t){return Mf(e,e,t),e}var lv=Nf;function uv(e,t){for(var n=is([]);e&&e!==t;)os(n,e.getLocalTransform(),n),e=e.parent;return n}function dv(e,t,n){return t&&!Xa(t)&&(t=Uc.getLocalTransform(t)),n&&(t=us([],t)),Es([],e,t)}function fv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:op(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:op(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=dv(a,t,n),op(a[0])>op(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function pv(e){return!e.isGroup}function mv(e){return e.shape!=null}function hv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){pv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return mv(e)&&(t.shape=B(e.shape)),t}var a=r(e);t.traverse(function(e){if(pv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),B_(e,r,n,qm(e).dataIndex)}}})}function gv(e,t){return U(e,function(e){var n=e[0];n=ap(n,t.x),n=ip(n,t.x+t.width);var r=e[1];return r=ap(r,t.y),r=ip(r,t.y+t.height),[n,r]})}function _v(e,t){var n=ap(e.x,t.x),r=ip(e.x+e.width,t.x+t.width),i=ap(e.y,t.y),a=ip(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function vv(e,t,n){var r=V({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),Ka(i,n),new Of(r)):nv(e.replace(`path://`,``),r,n,`center`)}function yv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=xv(p,m,u,d)/f;return!(g<0||g>1)}function xv(e,t,n,r){return e*r-n*t}function Sv(e){return e<=1e-6&&e>=-1e-6}function Cv(e,t,n,r,i){return t==null?e:(io(t)?wv[0]=wv[1]=wv[2]=wv[3]=t:(wv[0]=t[0],wv[1]=t[1],wv[2]=t[2],wv[3]=t[3]),r&&(wv[0]=ap(0,wv[0]),wv[1]=ap(0,wv[1]),wv[2]=ap(0,wv[2]),wv[3]=ap(0,wv[3])),n&&(wv[0]=-wv[0],wv[1]=-wv[1],wv[2]=-wv[2],wv[3]=-wv[3]),Tv(e,wv,`x`,`width`,3,1,i&&i[0]||0),Tv(e,wv,`y`,`height`,0,2,i&&i[1]||0),e)}var wv=[0,0,0,0];function Tv(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=ap(0,ip(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:op(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function Ev(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&H(eo(c),function(e){Eo(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=qm(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Ka({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Dv(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function Ov(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Fv(e,t,n){Iv(e,t,n,-1/0)}function Iv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Vy=(e={},e[Qm+`_`+rh]={pure:!0,appendData:i},e[Qm+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[$m]={pure:!0,appendData:i},e[eh]={pure:!0,appendData:function(e){var t=this._data;H(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[Zm]={appendData:i},e[th]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){io(t)||qp(``),this._opFn=lb[e],this._rvalFloat=Ip(t)}return e.prototype.evaluate=function(e){return io(e)?this._opFn(e,this._rvalFloat):this._opFn(Ip(e),this._rvalFloat)},e})();var ub=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=io(e)?e:Ip(e),r=io(t)?t:Ip(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Ip(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=Ip(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function db(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function fb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,mb=typeof Uint16Array>`u`?Array:Uint16Array,hb=typeof Int32Array>`u`?Array:Int32Array,gb=typeof Float64Array>`u`?Array:Float64Array,_b={float:gb,int:hb,ordinal:Array,number:Array,time:gb},vb;function yb(e){return e>65535?pb:mb}function bb(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function xb(e,t,n,r,i){var a=_b[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=U(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(yb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return cb(e[r],this._dimensions[r])}vb={arrayRows:e,objectRows:function(e,t,n,r){return cb(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return cb(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Cb=vm(),wb={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Tb=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=Ob(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=Iy(this.source),n=!kb(e),r=``,i=[],a=0,o=0;a30}var Ab=J,jb=U,Mb=typeof Int32Array>`u`?Array:Int32Array,Nb=`e\0\0`,Pb=-1,Fb=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],Ib=[`_approximateExtent`],Lb,Rb,zb,Bb,Vb,Hb,Ub,Wb=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;Eb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Ab(i)&&(i=V({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Ab(t)?V(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Ab(e)?V(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?V(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Jm(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){H(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:jb(this.dimensions,this._getDimInfo,this),this.hostModel),Vb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(po(arguments)))})},e.internalField=function(){Lb=function(e){var t=e._invertedIndicesMap;H(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Mb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Gb(e,t){Dy(e)||(e=ky(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=Kb(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&kb(o),c=r===e.dimensionsDefine,l=c?Ob(e):Db(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new hb(o),p=0;p0&&(e.name+=t-1)}),new Tb({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Kb(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return H(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function qb(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Jb={},Yb={},Xb=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Jb,!0),this._normalMasterList=n(Yb,!1);function n(n,r){var i=[];return H(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){H(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Jb[e]=t;return}Yb[e]=t},e.get=function(e){return Yb[e]||Jb[e]},e}();function Zb(e){return!!Jb[e]}var Qb=X();function $b(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=Qb.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function ex(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!Zb(n)&&(i=0))}return{coordSysType:n,kind:i}}function tx(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=ex(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var nx=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function rx(e){var t=e.get(`coordinateSystem`),n=new nx(t),r=ix[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var ix={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Sm).models[0],a=e.getReferringComponents(`yAxis`,Sm).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),ax(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),ax(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Sm).models[0];t.coordSysDims=[`single`],n.set(`single`,i),ax(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Sm).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),ax(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),ax(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();H(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),ax(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Sm).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function ax(e){return e.get(`type`)===`category`}function ox(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;sx(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(H(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),H(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;H(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function sx(e){return!Eb(e.schema)}function cx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function lx(e,t){return cx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function ux(e,t){var n=e.get(`coordinateSystem`),r=Xb.get(n),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=ab(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function dx(e,t,n){var r,i;return n&&H(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function fx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=ky(e)):(i=r.getSource(),a=i.sourceFormat===Zm);var o=rx(t),s=ux(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?no(xy,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Gb(i,u),f=dx(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=ox(t,{schema:d,store:p}),h=new Wb(d,t);h.setCalculationInfo(m);var g=f!=null&&px(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function px(e){if(e.sourceFormat===`original`)return!G(em(mx(e.data||[])))}function mx(e){for(var t=0;t=0&&n.push(e)}),n}}function yx(e,t){return Wa(Wa({},e,!0),t,!0)}var bx=Math.log(2);function xx(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){H(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Ax(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Sx(s,o):Sx(o,s))}function jx(e){return e.nodeName.toUpperCase()===`CANVAS`}var Mx=/([&<>"'])/g,Nx={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Px(e){return e==null?``:(e+``).replace(Mx,function(e,t){return Nx[t]})}var Fx={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},Ix={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Lx=`ZH`,Rx=`EN`,zx=Rx,Bx={},Vx={},Hx=Ao.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||zx).toUpperCase().indexOf(Lx)>-1?Lx:zx}():zx;function Ux(e,t){e=e.toUpperCase(),Vx[e]=new my(t),Bx[e]=t}function Wx(e){if(q(e)){var t=Bx[e.toUpperCase()]||{};return e===Lx||e===Rx?B(t):Wa(B(t),B(Bx[zx]),!1)}return Wa(B(e),B(Bx[zx]),!1)}function Gx(e){return Vx[e]}function Kx(){return Vx[zx]}Ux(Rx,Fx),Ux(Lx,Ix);var qx=null;function Jx(){return qx}function Yx(e,t){var n=Jx(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function Xx(e){var t=e.brk;return t?t.breaks:[]}function Zx(e){var t=e.brk;return t?t.hasBreaks():!1}var Qx=1e3,$x=Qx*60,eS=$x*60,tS=eS*24,nS=tS*365,rS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},iS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},aS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,oS=`{yyyy}-{MM}-{dd}`,sS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:oS,hour:oS+` `+iS.hour,minute:oS+` `+iS.minute,second:oS+` `+iS.second,millisecond:aS},cS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],lS=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function uS(e){return!q(e)&&!K(e)?dS(e):e}function dS(e){e||={};var t={},n=!0;return H(cS,function(t){n&&=e[t]==null}),H(cS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=cS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=iS[r]:rS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function fS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function pS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function mS(e){return e===pS(e)}function hS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function gS(e,t,n,r){var i=jp(e),a=i[bS(n)](),o=i[xS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[SS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[CS(n)](),d=(u-1)%12+1,f=i[wS(n)](),p=i[TS(n)](),m=i[ES(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof my?r:Gx(r||Hx)||Kx()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,fS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,fS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,fS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,fS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,fS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,fS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,fS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,fS(m,3)).replace(/{S}/g,m+``)}function _S(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Jx();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=vS(e.value,i);a=n[u][u][0]}}return gS(new Date(e.value),a,i,r)}function vS(e,t){var n=jp(e),r=n[xS(t)]()+1,i=n[SS(t)](),a=n[CS(t)](),o=n[wS(t)](),s=n[TS(t)](),c=n[ES(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function yS(e,t,n){switch(t){case`year`:e[OS(n)](0);case`month`:e[kS(n)](1);case`day`:e[AS(n)](0);case`hour`:e[jS(n)](0);case`minute`:e[MS(n)](0);case`second`:e[NS(n)](0)}return e}function bS(e){return e?`getUTCFullYear`:`getFullYear`}function xS(e){return e?`getUTCMonth`:`getMonth`}function SS(e){return e?`getUTCDate`:`getDate`}function CS(e){return e?`getUTCHours`:`getHours`}function wS(e){return e?`getUTCMinutes`:`getMinutes`}function TS(e){return e?`getUTCSeconds`:`getSeconds`}function ES(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function DS(e){return e?`setUTCFullYear`:`setFullYear`}function OS(e){return e?`setUTCMonth`:`setMonth`}function kS(e){return e?`setUTCDate`:`setDate`}function AS(e){return e?`setUTCHours`:`setHours`}function jS(e){return e?`setUTCMinutes`:`setMinutes`}function MS(e){return e?`setUTCSeconds`:`setSeconds`}function NS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function PS(e){if(!Lp(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function FS(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var IS=mo;function LS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&go(e)?e:`-`}function a(e){return Vp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?jp(e):e;if(!isNaN(+c))return gS(c,r,n);if(s)return`-`}if(t===`ordinal`)return ro(e)?i(e):io(e)&&a(e)?e+``:`-`;var l=Ip(e);return a(l)?PS(l):ro(e)?i(e):typeof e==`boolean`?e+``:`-`}var RS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],zS=function(e,t){return`{`+e+(t??``)+`}`};function BS(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function HS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var US=H,WS=[`left`,`right`,`top`,`bottom`,`width`,`height`],GS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function KS(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var qS=KS;no(KS,`vertical`),no(KS,`horizontal`);function JS(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function YS(e,t,n){n=IS(n||0);var r=t.width,i=t.height,a=gp(e.left,r),o=gp(e.top,i),s=gp(e.right,r),c=gp(e.bottom,i),l=gp(e.width,r),u=gp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function XS(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=Wa(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Cm(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return JS(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(my);Bo(aC,my),Go(aC),_x(aC),vx(aC,oC);function oC(e){var t=[];return H(aC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return Fo(e).main}),e!==`dataset`&&qa(t,`dataset`)<=0&&t.unshift(`dataset`),t}var sC=vm(),cC=vm(),lC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=Zp(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return fC(this,sC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){pC(this,sC)},e}();function uC(e,t,n,r){return fC(e,cC,Zp(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function dC(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function fC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:dC(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function pC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var mC=/\{@(.+?)\}/g,hC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return BS(i,s).replace(mC,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=tb(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return tb(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function gC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function _C(e){return new vC(e)}var vC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(MC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=oo(o)?th:Zm,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[Oy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[Oy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&NC(``);var i,a=[],o=[];return H(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&NC(``),a.push(t),o.push(e._getVersionSign())}),n?i=OC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ay(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t{I(e)}):I(e)}function I(e){if(e)try{e.body&&fe(e.body,`react-draggable-transparent-selection`);let t=e.selection;if(t)t.empty();else{let t=(e.defaultView||window).getSelection();t&&t.type!==`Caret`&&t.removeAllRanges()}}catch{}}function de(e,t){e.classList?e.classList.add(t):e.className.match(RegExp(`(?:^|\\s)${t}(?!\\S)`))||(e.className+=` ${t}`)}function fe(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(RegExp(`(?:^|\\s)${t}(?!\\S)`,`g`),``)}function pe(e,t,n){if(!e.props.bounds)return[t,n];let{bounds:r}=e.props;r=typeof r==`string`?r:be(r);let i=xe(e);if(typeof r==`string`){let{ownerDocument:e}=i,t=e.defaultView;if(!t)throw Error(`Cannot resolve the owner window of the draggable node.`);let n;if(n=r===`parent`?i.parentNode:i.getRootNode().querySelector(r),!(n instanceof t.HTMLElement))throw Error(`Bounds selector "`+r+`" could not find an element.`);let a=n,o=t.getComputedStyle(i),s=t.getComputedStyle(a);r={left:-i.offsetLeft+b(s.paddingLeft)+b(o.marginLeft),top:-i.offsetTop+b(s.paddingTop)+b(o.marginTop),right:ne(a)-ee(i)-i.offsetLeft+b(s.paddingRight)-b(o.marginRight),bottom:te(a)-P(i)-i.offsetTop+b(s.paddingBottom)-b(o.marginBottom)}}return y(r.right)&&(t=Math.min(t,r.right)),y(r.bottom)&&(n=Math.min(n,r.bottom)),y(r.left)&&(t=Math.max(t,r.left)),y(r.top)&&(n=Math.max(n,r.top)),[t,n]}function me(e,t,n){return[Math.round(t/e[0])*e[0],Math.round(n/e[1])*e[1]]}function he(e){return e.props.axis===`both`||e.props.axis===`x`}function ge(e){return e.props.axis===`both`||e.props.axis===`y`}function _e(e,t,n){let r=typeof t==`number`?se(e,t):null;if(typeof t==`number`&&!r)return null;let i=xe(n),a=n.props.offsetParent||i.offsetParent||i.ownerDocument.body;return re(r||e,a,n.props.scale)}function ve(e,t,n){let r=!y(e.lastX),i=xe(e);return r?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-e.lastX,deltaY:n-e.lastY,lastX:e.lastX,lastY:e.lastY,x:t,y:n}}function ye(e,t){let n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}}function be(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}function xe(e){let t=e.findDOMNode();if(!t)throw Error(`: Unmounted during event!`);return t}var Se=u(C()),Ce=u(Yr()),we=u(T()),Te=typeof process<`u`&&{}.DRAGGABLE_DEBUG?console.log.bind(console):function(){},Ee={touch:{start:`touchstart`,move:`touchmove`,stop:`touchend`},mouse:{start:`mousedown`,move:`mousemove`,stop:`mouseup`}},De=Ee.mouse,Oe=class extends Se.Component{constructor(){super(...arguments),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,this.touchIdentifier=null,this.mounted=!1,this.handleDragStart=e=>{if(this.props.onMouseDown(e),!this.props.allowAnyClick&&(typeof e.button==`number`&&e.button!==0||e.ctrlKey))return!1;let t=this.findDOMNode();if(!t||!t.ownerDocument||!t.ownerDocument.body)throw Error(` not mounted on DragStart!`);let{ownerDocument:n}=t;if(this.props.disabled||!(e.target instanceof n.defaultView.Node)||this.props.handle&&!j(e.target,this.props.handle,t)||this.props.cancel&&j(e.target,this.props.cancel,t))return;e.type===`touchstart`&&!this.props.allowMobileScroll&&e.preventDefault();let r=ce(e);this.touchIdentifier=r;let i=_e(e,r,this);if(i==null)return;let{x:a,y:o}=i,s=ve(this,a,o);Te(`DraggableCore: handleDragStart: %j`,s),Te(`calling`,this.props.onStart),this.props.onStart(e,s)!==!1&&this.mounted!==!1&&(this.props.enableUserSelectHack&&ue(n,this.props.nonce),this.dragging=!0,this.lastX=a,this.lastY=o,M(n,De.move,this.handleDrag),M(n,De.stop,this.handleDragStop))},this.handleDrag=e=>{let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX,t=r-this.lastY;if([e,t]=me(this.props.grid,e,t),!e&&!t)return;n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(Te(`DraggableCore: handleDrag: %j`,i),this.props.onDrag(e,i)===!1||this.mounted===!1){try{this.handleDragStop(new MouseEvent(`mouseup`))}catch{let e=document.createEvent(`MouseEvents`);e.initMouseEvent(`mouseup`,!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.handleDragStop(e)}return}this.lastX=n,this.lastY=r},this.handleDragStop=e=>{if(!this.dragging)return;let t=_e(e,this.touchIdentifier,this);if(t==null)return;let{x:n,y:r}=t;if(Array.isArray(this.props.grid)){let e=n-this.lastX||0,t=r-this.lastY||0;[e,t]=me(this.props.grid,e,t),n=this.lastX+e,r=this.lastY+t}let i=ve(this,n,r);if(this.props.onStop(e,i)===!1||this.mounted===!1)return!1;let a=this.findDOMNode();a&&this.props.enableUserSelectHack&&F(a.ownerDocument),Te(`DraggableCore: handleDragStop: %j`,i),this.dragging=!1,this.lastX=NaN,this.lastY=NaN,a&&(Te(`DraggableCore: Removing handlers`),N(a.ownerDocument,De.move,this.handleDrag),N(a.ownerDocument,De.stop,this.handleDragStop))},this.onMouseDown=e=>(De=Ee.mouse,this.handleDragStart(e)),this.onMouseUp=e=>(De=Ee.mouse,this.handleDragStop(e)),this.onTouchStart=e=>(De=Ee.touch,this.handleDragStart(e)),this.onTouchEnd=e=>(De=Ee.touch,this.handleDragStop(e))}componentDidMount(){this.mounted=!0;let e=this.findDOMNode();e&&M(e,Ee.touch.start,this.onTouchStart,{passive:!1})}componentWillUnmount(){this.mounted=!1;let e=this.findDOMNode();if(e){let{ownerDocument:t}=e;N(t,Ee.mouse.move,this.handleDrag),N(t,Ee.touch.move,this.handleDrag),N(t,Ee.mouse.stop,this.handleDragStop),N(t,Ee.touch.stop,this.handleDragStop),N(e,Ee.touch.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&F(t)}}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=we.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):(Te(`react-draggable: ReactDOM.findDOMNode is not available in React 19+. You must provide a nodeRef prop. See: https://github.com/react-grid-layout/react-draggable#noderef`),null)}render(){return Se.cloneElement(Se.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}};Oe.displayName=`DraggableCore`,Oe.propTypes={allowAnyClick:Ce.default.bool,allowMobileScroll:Ce.default.bool,children:Ce.default.node.isRequired,disabled:Ce.default.bool,enableUserSelectHack:Ce.default.bool,offsetParent:function(e,t){if(e[t]&&e[t].nodeType!==1)throw Error(`Draggable's offsetParent must be a DOM Node.`)},grid:Ce.default.arrayOf(Ce.default.number),handle:Ce.default.string,cancel:Ce.default.string,nodeRef:Ce.default.object,nonce:Ce.default.string,onStart:Ce.default.func,onDrag:Ce.default.func,onStop:Ce.default.func,onMouseDown:Ce.default.func,scale:Ce.default.number,className:x,style:x,transform:x},Oe.defaultProps={allowAnyClick:!1,allowMobileScroll:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1};var ke=class extends p.Component{constructor(e){super(e),this.onDragStart=(e,t)=>{if(Te(`Draggable: onDragStart: %j`,t),this.props.onStart(e,ye(this,t))===!1)return!1;this.setState({dragging:!0,dragged:!0})},this.onDrag=(e,t)=>{if(!this.state.dragging)return!1;Te(`Draggable: onDrag: %j`,t);let n=ye(this,t),r={x:n.x,y:n.y,slackX:0,slackY:0};if(this.props.bounds){let{x:e,y:t}=r;r.x+=this.state.slackX,r.y+=this.state.slackY;let[i,a]=pe(this,r.x,r.y);r.x=i,r.y=a,r.slackX=this.state.slackX+(e-r.x),r.slackY=this.state.slackY+(t-r.y),n.x=r.x,n.y=r.y,n.deltaX=r.x-this.state.x,n.deltaY=r.y-this.state.y}if(this.props.onDrag(e,n)===!1)return!1;this.setState(r)},this.onDragStop=(e,t)=>{if(!this.state.dragging||this.props.onStop(e,ye(this,t))===!1)return!1;Te(`Draggable: onDragStop: %j`,t);let n={dragging:!1,slackX:0,slackY:0};if(this.props.position){let{x:e,y:t}=this.props.position;n.x=e,n.y=t}this.setState(n)},this.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:{...e.position},slackX:0,slackY:0,isElementSVG:!1},e.position&&!(e.onDrag||e.onStop)&&console.warn("A `position` was applied to this , without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element.")}static getDerivedStateFromProps({position:e},{prevPropsPosition:t}){return e&&(!t||e.x!==t.x||e.y!==t.y)?(Te(`Draggable: getDerivedStateFromProps %j`,{position:e,prevPropsPosition:t}),{x:e.x,y:e.y,prevPropsPosition:{...e}}):null}componentDidMount(){window.SVGElement!==void 0&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}componentWillUnmount(){this.state.dragging&&this.setState({dragging:!1})}findDOMNode(){if(this.props?.nodeRef)return this.props.nodeRef.current;let e=h.default;return typeof e.findDOMNode==`function`?e.findDOMNode(this):null}render(){let{axis:e,bounds:t,children:n,defaultPosition:r,defaultClassName:i,defaultClassNameDragging:a,defaultClassNameDragged:o,position:s,positionOffset:c,scale:l,...u}=this.props,d={},f=null,m=!s||this.state.dragging,h=s||r,_={x:he(this)&&m?this.state.x:h.x,y:ge(this)&&m?this.state.y:h.y};this.state.isElementSVG?f=ae(_,c):d=ie(_,c);let v=p.Children.only(n),y=(0,g.clsx)(v.props.className||``,i,{[a]:this.state.dragging,[o]:this.state.dragged});return p.createElement(Oe,{...u,onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop},p.cloneElement(v,{className:y,style:{...v.props.style,...d},transform:f}))}};ke.displayName=`Draggable`,ke.propTypes={...Oe.propTypes,axis:m.default.oneOf([`both`,`x`,`y`,`none`]),bounds:m.default.oneOfType([m.default.shape({left:m.default.number,right:m.default.number,top:m.default.number,bottom:m.default.number}),m.default.string,m.default.oneOf([!1])]),defaultClassName:m.default.string,defaultClassNameDragging:m.default.string,defaultClassNameDragged:m.default.string,defaultPosition:m.default.shape({x:m.default.number,y:m.default.number}),positionOffset:m.default.shape({x:m.default.oneOfType([m.default.number,m.default.string]),y:m.default.oneOfType([m.default.number,m.default.string])}),position:m.default.shape({x:m.default.number,y:m.default.number}),className:x,style:x,transform:x},ke.defaultProps={...Oe.defaultProps,axis:`both`,bounds:!1,defaultClassName:`react-draggable`,defaultClassNameDragging:`react-draggable-dragging`,defaultClassNameDragged:`react-draggable-dragged`,defaultPosition:{x:0,y:0},scale:1},0&&(t.exports={DraggableCore:Oe})})),Gi=h(((e,t)=>{var n=Wi(),r=n.DraggableCore,i=n.default||n;t.exports=i,t.exports.default=i,t.exports.DraggableCore=r})),Ki=h((e=>{e.__esModule=!0,e.cloneElement=c;var t=n(C());function n(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function i(e){for(var t=1;t{e.__esModule=!0,e.resizableProps=void 0;var t=n(Yr());Gi();function n(e){return e&&e.__esModule?e:{default:e}}e.resizableProps={axis:t.default.oneOf([`both`,`x`,`y`,`none`]),className:t.default.string,children:t.default.element.isRequired,draggableOpts:t.default.shape({allowAnyClick:t.default.bool,cancel:t.default.string,children:t.default.node,disabled:t.default.bool,enableUserSelectHack:t.default.bool,offsetParent:typeof Element<`u`?t.default.instanceOf(Element):t.default.any,grid:t.default.arrayOf(t.default.number),handle:t.default.string,nodeRef:t.default.object,onStart:t.default.func,onDrag:t.default.func,onStop:t.default.func,onMouseDown:t.default.func,scale:t.default.number}),height:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`y`?t.default.number.isRequired(...e):t.default.number(...e)},handle:t.default.oneOfType([t.default.node,t.default.func]),handleSize:t.default.arrayOf(t.default.number),lockAspectRatio:t.default.bool,maxConstraints:t.default.arrayOf(t.default.number),minConstraints:t.default.arrayOf(t.default.number),onResizeStop:t.default.func,onResizeStart:t.default.func,onResize:t.default.func,resizeHandles:t.default.arrayOf(t.default.oneOf([`s`,`w`,`e`,`n`,`sw`,`nw`,`se`,`ne`])),transformScale:t.default.number,width:function(){var e=[...arguments];let n=e[0];return n.axis===`both`||n.axis===`x`?t.default.number.isRequired(...e):t.default.number(...e)}}})),Ji=h((e=>{e.__esModule=!0,e.default=void 0;var t=o(C()),n=Gi(),r=Ki(),i=qi(),a=[`children`,`className`,`draggableOpts`,`width`,`height`,`handle`,`handleSize`,`lockAspectRatio`,`axis`,`minConstraints`,`maxConstraints`,`onResize`,`onResizeStop`,`onResizeStart`,`resizeHandles`,`transformScale`];function o(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(o=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;tMath.abs(i*n)?t=e/n:e=t*n}let o=e,s=t,c=this.slack||[0,0],l=c[0],u=c[1];return e+=l,t+=u,r&&(e=Math.max(r[0],e),t=Math.max(r[1],t)),i&&(e=Math.min(i[0],e),t=Math.min(i[1],t)),this.slack=[l+(o-e),u+(s-t)],[e,t]}resizeHandler(e,t){return(n,r)=>{let i=r.node,a=r.deltaX,o=r.deltaY;e===`onResizeStart`&&this.resetData();let s=(this.props.axis===`both`||this.props.axis===`x`)&&t!==`n`&&t!==`s`,c=(this.props.axis===`both`||this.props.axis===`y`)&&t!==`e`&&t!==`w`;if(!s&&!c)return;let l=t[0],u=t[t.length-1],d=i.getBoundingClientRect();if(this.lastHandleRect!=null){if(u===`w`){let e=d.left-this.lastHandleRect.left;a+=e}if(l===`n`){let e=d.top-this.lastHandleRect.top;o+=e}}this.lastHandleRect=d,u===`w`&&(a=-a),l===`n`&&(o=-o);let f=this.lastSize?.width??this.props.width,p=this.lastSize?.height??this.props.height,m=f+(s?a/this.props.transformScale:0),h=p+(c?o/this.props.transformScale:0);var g=this.runConstraints(m,h);if(m=g[0],h=g[1],e===`onResizeStop`&&this.lastSize){var _=this.lastSize;m=_.width,h=_.height}let v=m!==f||h!==p;e!==`onResizeStop`&&(this.lastSize={width:m,height:h});let y=typeof this.props[e]==`function`?this.props[e]:null;y&&(e!==`onResize`||v)&&(n.persist==null||n.persist(),y(n,{node:i,size:{width:m,height:h},handle:t})),e===`onResizeStop`&&this.resetData()}}renderResizeHandle(e,n){let r=this.props.handle;if(!r)return t.createElement(`span`,{className:`react-resizable-handle react-resizable-handle-`+e,ref:n});if(typeof r==`function`)return r(e,n);let i=typeof r.type==`string`,a=u({ref:n},i?{}:{handleAxis:e});return t.cloneElement(r,a)}render(){let e=this.props,i=e.children,o=e.className,l=e.draggableOpts;e.width,e.height,e.handle,e.handleSize,e.lockAspectRatio,e.axis,e.minConstraints,e.maxConstraints,e.onResize,e.onResizeStop,e.onResizeStart;let d=e.resizeHandles;e.transformScale;let f=c(e,a);return(0,r.cloneElement)(i,u(u({},f),{},{className:(o?o+` `:``)+`react-resizable`,children:[...t.Children.toArray(i.props.children),...d.map(e=>{let r=this.handleRefs[e]??(this.handleRefs[e]=t.createRef());return t.createElement(n.DraggableCore,s({},l,{nodeRef:r,key:`resizableHandle-`+e,onStop:this.resizeHandler(`onResizeStop`,e),onStart:this.resizeHandler(`onResizeStart`,e),onDrag:this.resizeHandler(`onResize`,e)}),this.renderResizeHandle(e,r))})]}))}};e.default=m,m.propTypes=i.resizableProps,m.defaultProps={axis:`both`,handleSize:[20,20],lockAspectRatio:!1,minConstraints:[20,20],maxConstraints:[1/0,1/0],resizeHandles:[`se`],transformScale:1}})),Yi=h((e=>{e.__esModule=!0,e.default=void 0;var t=s(C()),n=o(Yr()),r=o(Ji()),i=qi(),a=[`handle`,`handleSize`,`onResize`,`onResizeStart`,`onResizeStop`,`draggableOpts`,`minConstraints`,`maxConstraints`,`lockAspectRatio`,`axis`,`width`,`height`,`resizeHandles`,`style`,`transformScale`];function o(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(typeof WeakMap==`function`)var n=new WeakMap,r=new WeakMap;return(s=function(e,t){if(!t&&e&&e.__esModule)return e;var i,a,o={__proto__:null,default:e};if(e===null||typeof e!=`object`&&typeof e!=`function`)return o;if(i=t?r:n){if(i.has(e))return i.get(e);i.set(e,o)}for(let t in e)t!=="default"&&{}.hasOwnProperty.call(e,t)&&((a=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?i(o,t,a):o[t]=e[t]);return o})(e,t)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let n=t.size;this.props.onResize?(e.persist==null||e.persist(),this.setState(n,()=>this.props.onResize&&this.props.onResize(e,t))):this.setState(n)}}static getDerivedStateFromProps(e,t){return t.propsWidth!==e.width||t.propsHeight!==e.height?{width:e.width,height:e.height,propsWidth:e.width,propsHeight:e.height}:null}render(){let e=this.props,n=e.handle,i=e.handleSize;e.onResize;let o=e.onResizeStart,s=e.onResizeStop,l=e.draggableOpts,d=e.minConstraints,f=e.maxConstraints,p=e.lockAspectRatio,h=e.axis;e.width,e.height;let g=e.resizeHandles,_=e.style,v=e.transformScale,y=m(e,a);return t.createElement(r.default,{axis:h,draggableOpts:l,handle:n,handleSize:i,height:this.state.height,lockAspectRatio:p,maxConstraints:f,minConstraints:d,onResizeStart:o,onResize:this.onResize,onResizeStop:s,resizeHandles:g,transformScale:v,width:this.state.width},t.createElement(`div`,c({},y,{style:u(u({},_),{},{width:this.state.width+`px`,height:this.state.height+`px`})})))}};e.default=h,h.propTypes=u(u({},i.resizableProps),{},{children:n.default.element})})),Xi=h(((e,t)=>{t.exports=function(){throw Error(`Don't instantiate Resizable directly! Use require('react-resizable').Resizable`)},t.exports.Resizable=Ji().default,t.exports.ResizableBox=Yi().default})),Zi=h(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?r(e):typeof define==`function`&&define.amd?define([`exports`],r):(n=typeof globalThis<`u`?globalThis:n||self,r(n[`fast-equals`]={}))})(e,(function(e){function t(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function n(e){return function(t,n,r,i){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r,i);var a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);var s=e(t,n,r,i);return i.delete(t),i.delete(n),s}}function r(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n}function i(e){return e.constructor===Object||e.constructor==null}function a(e){return typeof e.then==`function`}function o(e,t){return e===t||e!==e&&t!==t}var s=Object.prototype.toString;function c(e){var t=e.areArraysEqual,n=e.areDatesEqual,r=e.areMapsEqual,c=e.areObjectsEqual,l=e.areRegExpsEqual,u=e.areSetsEqual,d=e.createIsNestedEqual,f=d(p);function p(e,d,p){if(e===d)return!0;if(!e||!d||typeof e!=`object`||typeof d!=`object`)return e!==e&&d!==d;if(i(e)&&i(d))return c(e,d,f,p);var m=Array.isArray(e),h=Array.isArray(d);if(m||h)return m===h&&t(e,d,f,p);var g=s.call(e);return g===s.call(d)?g===`[object Date]`?n(e,d,f,p):g===`[object RegExp]`?l(e,d,f,p):g===`[object Map]`?r(e,d,f,p):g===`[object Set]`?u(e,d,f,p):g===`[object Object]`||g===`[object Arguments]`?a(e)||a(d)?!1:c(e,d,f,p):g===`[object Boolean]`||g===`[object Number]`||g===`[object String]`?o(e.valueOf(),d.valueOf()):!1:!1}return p}function l(e,t,n,r){var i=e.length;if(t.length!==i)return!1;for(;i-->0;)if(!n(e[i],t[i],i,i,e,t,r))return!1;return!0}var u=n(l);function d(e,t){return o(e.valueOf(),t.valueOf())}function f(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={},o=0;return e.forEach(function(s,c){if(i){var l=!1,u=0;t.forEach(function(i,d){!l&&!a[u]&&(l=n(c,d,o,u,e,t,r)&&n(s,i,c,d,e,t,r))&&(a[u]=!0),u++}),o++,i=l}}),i}var p=n(f),m=`_owner`,h=Object.prototype.hasOwnProperty;function g(e,t,n,r){var i=Object.keys(e),a=i.length;if(Object.keys(t).length!==a)return!1;for(var o;a-->0;){if(o=i[a],o===m){var s=!!e.$$typeof,c=!!t.$$typeof;if((s||c)&&s!==c)return!1}if(!h.call(t,o)||!n(e[o],t[o],o,o,e,t,r))return!1}return!0}var _=n(g);function v(e,t){return e.source===t.source&&e.flags===t.flags}function y(e,t,n,r){var i=e.size===t.size;if(!i)return!1;if(!e.size)return!0;var a={};return e.forEach(function(o,s){if(i){var c=!1,l=0;t.forEach(function(i,u){!c&&!a[l]&&(c=n(o,i,s,u,e,t,r))&&(a[l]=!0),l++}),i=c}}),i}var b=n(y),x=Object.freeze({areArraysEqual:l,areDatesEqual:d,areMapsEqual:f,areObjectsEqual:g,areRegExpsEqual:v,areSetsEqual:y,createIsNestedEqual:t}),S=Object.freeze({areArraysEqual:u,areDatesEqual:d,areMapsEqual:p,areObjectsEqual:_,areRegExpsEqual:v,areSetsEqual:b,createIsNestedEqual:t}),C=c(x);function w(e,t){return C(e,t,void 0)}var T=c(r(x,{createIsNestedEqual:function(){return o}}));function E(e,t){return T(e,t,void 0)}var D=c(S);function O(e,t){return D(e,t,new WeakMap)}var k=c(r(S,{createIsNestedEqual:function(){return o}}));function A(e,t){return k(e,t,new WeakMap)}function j(e){return c(r(x,e(x)))}function M(e){var t=c(r(S,e(S)));return(function(e,n,r){return r===void 0&&(r=new WeakMap),t(e,n,r)})}e.circularDeepEqual=O,e.circularShallowEqual=A,e.createCustomCircularEqual=M,e.createCustomEqual=j,e.deepEqual=w,e.sameValueZeroEqual=o,e.shallowEqual=E,Object.defineProperty(e,"__esModule",{value:!0})}))})),Qi=Xi(),$i=Zi();function ea(e){let{children:t,cols:n,containerWidth:r,margin:i,containerPadding:a,rowHeight:o,maxRows:s,isDraggable:c,isResizable:l,isBounded:u,static:d,useCSSTransforms:f=!0,usePercentages:m=!1,transformScale:h=1,positionStrategy:g,dragThreshold:_=0,droppingPosition:v,className:y=``,style:b,handle:x=``,cancel:S=``,x:C,y:w,w:T,h:E,minW:D=1,maxW:O=1/0,minH:k=1,maxH:A=1/0,i:j,resizeHandles:M,resizeHandle:N,constraints:P=cr,layoutItem:ee,layout:te=[],onDragStart:ne,onDrag:re,onDragStop:ie,onResizeStart:ae,onResize:oe,onResizeStop:se}=e,[ce,le]=(0,L.useState)(!1),[ue,F]=(0,L.useState)(!1),I=(0,L.useRef)(null),de=(0,L.useRef)({left:0,top:0}),fe=(0,L.useRef)({top:0,left:0,width:0,height:0}),pe=(0,L.useRef)(void 0),me=(0,L.useRef)(te);me.current=te;let he=(0,L.useRef)(null),ge=(0,L.useRef)(null),_e=(0,L.useRef)(!1),ve=(0,L.useRef)({x:0,y:0}),ye=(0,L.useRef)(!1),be=(0,L.useMemo)(()=>({cols:n,containerPadding:a,containerWidth:r,margin:i,maxRows:s,rowHeight:o}),[n,a,r,i,s,o]),xe=(0,L.useMemo)(()=>({cols:n,maxRows:s,containerWidth:r,containerHeight:0,rowHeight:o,margin:i,layout:[]}),[n,s,r,o,i]),Se=(0,L.useCallback)(()=>({...xe,layout:me.current}),[xe]),Ce=(0,L.useMemo)(()=>ee??{i:j,x:C,y:w,w:T,h:E,minW:D,maxW:O,minH:k,maxH:A},[ee,j,C,w,T,E,D,O,k,A]),we=(0,L.useCallback)(e=>{if(g?.calcStyle)return g.calcStyle(e);if(f)return dr(e);let t=fr(e);return m?{...t,left:pr(e.left/r),width:pr(e.width/r)}:t},[g,f,m,r]),Te=(0,L.useCallback)((e,{node:t})=>{if(!ne)return;let{offsetParent:n}=t;if(!n)return;let r=n.getBoundingClientRect(),i=t.getBoundingClientRect(),a=i.left/h,o=r.left/h,s=i.top/h,c=r.top/h,l;if(g?.calcDragPosition){let t=e;l=g.calcDragPosition(t.clientX,t.clientY,t.clientX-i.left,t.clientY-i.top)}else l={left:a-o+n.scrollLeft,top:s-c+n.scrollTop};if(de.current=l,_>0){let t=e;ve.current={x:t.clientX,y:t.clientY},_e.current=!0,ye.current=!1,le(!0);return}le(!0);let u=Hn(be,l.top,l.left),{x:d,y:f}=lr(P,Ce,u.x,u.y,Se());ne(j,d,f,{e,node:t,newPosition:l})},[ne,h,be,g,_,P,Ce,Se,j]),Ee=(0,L.useCallback)((e,{node:t,deltaX:n,deltaY:a})=>{if(!re||!ce)return;let s=e;if(_e.current&&!ye.current){let n=s.clientX-ve.current.x,r=s.clientY-ve.current.y;if(Math.hypot(n,r)<_)return;if(ye.current=!0,_e.current=!1,ne){let n=Hn(be,de.current.top,de.current.left),{x:r,y:i}=lr(P,Ce,n.x,n.y,Se());ne(j,r,i,{e,node:t,newPosition:de.current})}}let c=de.current.top+a,l=de.current.left+n;if(u){let{offsetParent:e}=t;if(e){let t=e.clientHeight-zn(E,o,i[1]);c=Wn(c,0,t);let n=Rn(be),a=r-zn(T,n,i[0]);l=Wn(l,0,a)}}let d={top:c,left:l};de.current=d;let f=Hn(be,c,l),{x:p,y:m}=lr(P,Ce,f.x,f.y,Se());re(j,p,m,{e,node:t,newPosition:d})},[re,ne,ce,_,u,E,o,i,be,r,T,j,P,Ce,Se]),De=(0,L.useCallback)((e,{node:t})=>{if(!ie||!ce)return;let n=_e.current;if(_e.current=!1,ye.current=!1,ve.current={x:0,y:0},n){le(!1),de.current={left:0,top:0};return}let{left:r,top:i}=de.current,a={top:i,left:r};le(!1),de.current={left:0,top:0};let o=Hn(be,i,r),{x:s,y:c}=lr(P,Ce,o.x,o.y,Se());ie(j,s,c,{e,node:t,newPosition:a})},[ie,ce,be,P,Ce,Se,j]);he.current=Te,ge.current=Ee;let Oe=(0,L.useCallback)((e,{node:t,size:n,handle:i},a,o)=>{let s=o===`onResizeStart`?ae:o===`onResize`?oe:se;if(!s)return;let c;c=t?Cr(i,a,n,r):{...n,top:a.top,left:a.left},fe.current=c;let l=Un(be,c.width,c.height),{w:u,h:d}=ur(P,Ce,l.w,l.h,i,Se());s(j,u,d,{e:e.nativeEvent??e,node:t,size:c,handle:i})},[ae,oe,se,r,be,j,P,Ce,Se]),ke=(0,L.useCallback)((e,t)=>{F(!0);let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStart`)},[Oe,be,C,w,T,E]),Ae=(0,L.useCallback)((e,t)=>{let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResize`)},[Oe,be,C,w,T,E]),je=(0,L.useCallback)((e,t)=>{F(!1),fe.current={top:0,left:0,width:0,height:0};let n=Bn(be,C,w,T,E),r={...t,handle:t.handle};Oe(e,r,n,`onResizeStop`)},[Oe,be,C,w,T,E]);(0,L.useEffect)(()=>{if(!v)return;let e=I.current;if(!e)return;let t=pe.current||{left:0,top:0},n=ce&&(v.left!==t.left||v.top!==t.top);if(!ce){let t={node:e,deltaX:v.left,deltaY:v.top,lastX:0,lastY:0,x:v.left,y:v.top};he.current?.(v.e,t)}else if(n){let t={node:e,deltaX:v.left-de.current.left,deltaY:v.top-de.current.top,lastX:de.current.left,lastY:de.current.top,x:v.left,y:v.top};ge.current?.(v.e,t)}pe.current=v},[v,ce,j]);let Me=Bn(be,C,w,T,E,ce?de.current:null,ue?fe.current:null),Ne=L.Children.only(t),Pe=Rn(be),Fe=[zn(D,Pe,i[0]),zn(k,o,i[1])],Ie=[zn(O,Pe,i[0]),zn(A,o,i[1])],Le=Ne.props,Re=Le.className,ze=Le.style,Be=L.cloneElement(Ne,{ref:I,className:p(`react-grid-item`,Re,y,{static:d,resizing:ue,"react-draggable":c,"react-draggable-dragging":ce,dropping:!!v,cssTransforms:f}),style:{...b,...ze,...we(Me)}}),Ve=N;return Be=(0,R.jsx)(Qi.Resizable,{draggableOpts:{disabled:!l},className:l?void 0:`react-resizable-hide`,width:Me.width,height:Me.height,minConstraints:Fe,maxConstraints:Ie,onResizeStart:ke,onResize:Ae,onResizeStop:je,transformScale:h,resizeHandles:M,handle:Ve,children:Be}),Be=(0,R.jsx)(Vi,{disabled:!c,onStart:Te,onDrag:Ee,onStop:De,handle:x,cancel:`.react-resizable-handle`+(S?`,`+S:``),scale:h,nodeRef:I,children:Be}),Be}var ta=()=>{},na=`react-grid-layout`,ra=!1;try{ra=/firefox/i.test(navigator.userAgent)}catch{}function ia(e,t){let n=L.Children.toArray(e),r=L.Children.toArray(t);if(n.length!==r.length)return!1;for(let e=0;e{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key);a.add(n);let r=e.find(e=>e.i===n);if(r)i.push(er(r));else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let o=ir(i,{cols:n});return r.compact(o,n)}function oa(e){let{children:t,width:n,gridConfig:r,dragConfig:i,resizeConfig:a,dropConfig:o,positionStrategy:s=Dr,compactor:c,constraints:l=cr,layout:u=[],droppingItem:d,autoSize:f=!0,className:m=``,style:h={},innerRef:g,onLayoutChange:_=ta,onDragStart:v=ta,onDrag:y=ta,onDragStop:b=ta,onResizeStart:x=ta,onResize:S=ta,onResizeStop:C=ta,onDrop:w=ta,onDropDragOver:T=ta}=e,E=(0,L.useMemo)(()=>({...Or,...r}),[r]),D=(0,L.useMemo)(()=>({...kr,...i}),[i]),O=(0,L.useMemo)(()=>({...Ar,...a}),[a]),k=(0,L.useMemo)(()=>({...jr,...o}),[o]),{cols:A,rowHeight:j,maxRows:M,margin:N,containerPadding:P}=E,{enabled:ee,bounded:te,handle:ne,cancel:re,threshold:ie}=D,{enabled:ae,handles:oe,handleComponent:se}=O,{enabled:ce,defaultItem:le,onDragOver:ue}=k,F=c??Vr(`vertical`),I=F.type,de=F.allowOverlap,fe=F.preventCollision??!1,pe=(0,L.useMemo)(()=>d??{i:`__dropping-elem__`,...le},[d,le]),me=s.type===`transform`,he=s.scale,ge=P??N,[_e,ve]=(0,L.useState)(!1),[ye,be]=(0,L.useState)(()=>aa(u,t,A,F)),[xe,Se]=(0,L.useState)(null),[Ce,we]=(0,L.useState)(!1),[Te,Ee]=(0,L.useState)(null),[De,Oe]=(0,L.useState)(),ke=(0,L.useRef)(null),Ae=(0,L.useRef)(null),je=(0,L.useRef)(null),Me=(0,L.useRef)(0),Ne=(0,L.useRef)(ye),Pe=(0,L.useRef)(u),Fe=(0,L.useRef)(t),Ie=(0,L.useRef)(I),Le=(0,L.useRef)(ye);Le.current=ye,(0,L.useEffect)(()=>{ve(!0),(0,$i.deepEqual)(ye,u)||_(ye)},[]),(0,L.useEffect)(()=>{if(xe||Te)return;let e=!(0,$i.deepEqual)(u,Pe.current),n=!ia(t,Fe.current),r=I!==Ie.current;if(e||n||r){let n=aa(e?u:ye,t,A,F);(0,$i.deepEqual)(n,ye)||be(n)}Pe.current=u,Fe.current=t,Ie.current=I},[u,t,A,I,F,xe,Te,ye]),(0,L.useEffect)(()=>{if(!xe&&!(0,$i.deepEqual)(ye,Ne.current)){Ne.current=ye;let e=ye.filter(e=>e.i!==pe.i);_(e)}},[ye,xe,_,pe.i]);let Re=(0,L.useMemo)(()=>{if(!f)return;let e=Zn(ye),t=ge[1];return e*j+(e-1)*N[1]+t*2+`px`},[f,ye,j,N,ge]),ze=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Qn(i,e);if(!a)return;let o={w:a.w,h:a.h,x:a.x,y:a.y,i:e};ke.current=er(a),je.current=i,Se(o),v(i,a,a,null,r.e,r.node)},[v]),Be=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=ke.current,o=Qn(i,e);if(!o)return;let s={w:o.w,h:o.h,x:o.x,y:o.y,i:e},c=ar(i,o,t,n,!0,fe,I,A,de);y(c,a,o,s,r.e,r.node),be(F.compact(c,A)),Se(s)},[fe,I,A,de,F,y]),Ve=(0,L.useCallback)((e,t,n,r)=>{if(!xe)return;let i=Le.current,a=ke.current,o=Qn(i,e);if(!o)return;let s=ar(i,o,t,n,!0,fe,I,A,de),c=F.compact(s,A);b(c,a,o,null,r.e,r.node);let l=je.current;ke.current=null,je.current=null,Se(null),be(c),l&&!(0,$i.deepEqual)(l,c)&&_(c)},[xe,fe,I,A,de,F,b,_]),He=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Qn(i,e);a&&(Ae.current=er(a),je.current=i,we(!0),x(i,a,a,null,r.e,r.node))},[x]),Ue=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,{handle:o}=r,s=!1,c,l,[u,d]=rr(i,e,e=>(c=e.x,l=e.y,[`sw`,`w`,`nw`,`n`,`ne`].includes(o)&&([`sw`,`nw`,`w`].includes(o)&&(c=e.x+(e.w-t),t=e.x!==c&&c<0?e.w:t,c=c<0?0:c),[`ne`,`n`,`nw`].includes(o)&&(l=e.y+(e.h-n),n=e.y!==l&&l<0?e.h:n,l=l<0?0:l),s=!0),fe&&!de&&qn(i,{...e,w:t,h:n,x:c??e.x,y:l??e.y}).filter(t=>t.i!==e.i).length>0&&(l=e.y,n=e.h,c=e.x,t=e.w,s=!1),e.w=t,e.h=n,e));if(!d)return;let f=u;s&&c!==void 0&&l!==void 0&&(f=ar(u,d,c,l,!0,fe,I,A,de));let p={w:d.w,h:d.h,x:d.x,y:d.y,i:e,static:!0};S(f,a,d,p,r.e,r.node),be(F.compact(f,A)),Se(p)},[fe,I,A,de,F,S]),We=(0,L.useCallback)((e,t,n,r)=>{let i=Le.current,a=Ae.current,o=Qn(i,e),s=F.compact(i,A);C(s,a,o??null,null,r.e,r.node);let c=je.current;Ae.current=null,je.current=null,Se(null),we(!1),be(s),c&&!(0,$i.deepEqual)(c,s)&&_(s)},[A,F,C,_]),Ge=(0,L.useCallback)(()=>{let e=Le.current;if(!e.some(e=>e.i===pe.i)){Ee(null),Se(null),Oe(void 0);return}let t=F.compact(e.filter(e=>e.i!==pe.i),A);be(t),Ee(null),Se(null),Oe(void 0)},[pe.i,A,F]),Ke=(0,L.useCallback)(e=>{if(e.preventDefault(),e.stopPropagation(),ra&&!e.nativeEvent.target?.classList.contains(na))return!1;let t=ue?ue(e.nativeEvent):T(e);if(t===!1)return Te&&Ge(),!1;let{dragOffsetX:r=0,dragOffsetY:i=0,...a}=t??{},o={...pe,...a},s=e.currentTarget.getBoundingClientRect(),c={cols:A,margin:N,maxRows:M,rowHeight:j,containerWidth:n,containerPadding:ge},l=Rn(c),u=zn(o.w,l,N[0]),d=zn(o.h,j,N[1]),f=u/2,p=d/2,m=e.clientX-s.left+r-f,h=e.clientY-s.top+i-p,g=Math.max(0,m),_=Math.max(0,h),v={left:g/he,top:_/he,e:e.nativeEvent};if(Te)De&&(De.left!==v.left||De.top!==v.top)&&Oe(v);else{let e=Vn(c,_,g,o.w,o.h);Ee((0,R.jsx)(`div`,{},o.i)),Oe(v);let t=Le.current.filter(e=>e.i!==o.i);be([...t,{...o,x:e.x,y:e.y,static:!1,isDraggable:!0}])}},[Te,De,pe,ue,T,Ge,he,A,N,M,j,n,ge]),qe=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current--,Me.current<0&&(Me.current=0),Me.current===0&&Ge()},[Ge]),Je=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation(),Me.current++},[]),Ye=(0,L.useCallback)(e=>{e.preventDefault(),e.stopPropagation();let t=Le.current,n=t.find(e=>e.i===pe.i);Me.current=0,Ge(),w(t,n,e.nativeEvent)},[pe.i,Ge,w]),Xe=(0,L.useCallback)((e,t)=>{if(!e||!e.key)return null;let r=Qn(ye,String(e.key));if(!r)return null;let i=typeof r.isDraggable==`boolean`?r.isDraggable:!r.static&&ee,a=typeof r.isResizable==`boolean`?r.isResizable:!r.static&&ae,o=r.resizeHandles||[...oe],c=i&&te&&r.isBounded!==!1,u=se;return(0,R.jsx)(ea,{containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,cancel:re,handle:ne,onDragStart:ze,onDrag:Be,onDragStop:Ve,onResizeStart:He,onResize:Ue,onResizeStop:We,isDraggable:i,isResizable:a,isBounded:c,useCSSTransforms:me&&_e,usePercentages:!_e,transformScale:he,positionStrategy:s,dragThreshold:ie,w:r.w,h:r.h,x:r.x,y:r.y,i:r.i,minH:r.minH,minW:r.minW,maxH:r.maxH,maxW:r.maxW,static:r.static,droppingPosition:t?De:void 0,resizeHandles:o,resizeHandle:u,constraints:l,layoutItem:r,layout:ye,children:e},r.i)},[ye,n,A,N,ge,M,j,re,ne,ze,Be,Ve,He,Ue,We,ee,ae,te,me,_e,he,s,ie,De,oe,se,l]),Ze=()=>xe?(0,R.jsx)(ea,{w:xe.w,h:xe.h,x:xe.x,y:xe.y,i:xe.i,className:`react-grid-placeholder ${Ce?`placeholder-resizing`:``}`,containerWidth:n,cols:A,margin:N,containerPadding:ge,maxRows:M,rowHeight:j,isDraggable:!1,isResizable:!1,isBounded:!1,useCSSTransforms:me,transformScale:he,constraints:l,layout:ye,children:(0,R.jsx)(`div`,{})}):null,Qe=p(na,m),$e={height:Re,...h};return(0,R.jsxs)(`div`,{ref:g,className:Qe,style:$e,onDrop:ce?Ye:void 0,onDragLeave:ce?qe:void 0,onDragEnter:ce?Je:void 0,onDragOver:ce?Ke:void 0,children:[L.Children.map(t,e=>L.isValidElement(e)?Xe(e):null),ce&&Te&&Xe(Te,!0),Ze()]})}var sa={lg:1200,md:996,sm:768,xs:480,xxs:0},ca={lg:12,md:10,sm:6,xs:4,xxs:2},la=()=>{};function ua(e,t,n,r){let i=[];L.Children.forEach(t,t=>{if(!L.isValidElement(t)||t.key===null)return;let n=String(t.key),r=e.find(e=>e.i===n);if(r)i.push({...r,i:n});else{let e=t.props[`data-grid`];e?i.push({i:n,x:e.x??0,y:e.y??0,w:e.w??1,h:e.h??1,minW:e.minW,maxW:e.maxW,minH:e.minH,maxH:e.maxH,static:e.static,isDraggable:e.isDraggable,isResizable:e.isResizable,resizeHandles:e.resizeHandles,isBounded:e.isBounded}):i.push({i:n,x:0,y:Zn(i),w:1,h:1})}});let a=ir(i,{cols:n});return r.compact(a,n)}function da(e){let{children:t,width:n,breakpoint:r,breakpoints:i=sa,cols:a=ca,layouts:o={},rowHeight:s=150,maxRows:c=1/0,margin:l=[10,10],containerPadding:u=null,compactor:d,onBreakpointChange:f=la,onLayoutChange:p=la,onWidthChange:m=la,...h}=e,g=d??Vr(`vertical`),_=g.type,v=g.allowOverlap,y=(0,L.useMemo)(()=>r??Ur(i,n),[]),b=(0,L.useMemo)(()=>Wr(y,a),[y,a]),x=(0,L.useMemo)(()=>Gr(o,i,y,y,b,_),[]),[S,C]=(0,L.useState)(y),[w,T]=(0,L.useState)(b),[E,D]=(0,L.useState)(x),[O,k]=(0,L.useState)(o),A=(0,L.useRef)(n),j=(0,L.useRef)(r),M=(0,L.useRef)(i),N=(0,L.useRef)(a),P=(0,L.useRef)(o),ee=(0,L.useRef)(_),te=(0,L.useRef)(O);(0,L.useEffect)(()=>{te.current=O},[O]);let ne=(0,L.useMemo)(()=>(0,$i.deepEqual)(o,P.current)?null:Gr(o,i,S,S,w,g),[o,i,S,w,g]),re=ne??E;(0,L.useEffect)(()=>{ne!==null&&(D(ne),k(o),te.current=o,P.current=o)},[ne,o]),(0,L.useEffect)(()=>{if(_!==ee.current){let e=g.compact(tr(re),w),t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t),ee.current=_}},[_,g,re,w,v,S,p]),(0,L.useEffect)(()=>{let e=n!==A.current,o=r!==j.current,s=!(0,$i.deepEqual)(i,M.current),c=!(0,$i.deepEqual)(a,N.current);if(e||o||s||c){let e=r??Ur(i,n),o=Wr(e,a),d=S;if(d!==e||s||c){let n={...te.current};n[d]||(n[d]=tr(E));let r=Gr(n,i,e,d,o,g);r=ua(r,t,o,g),n[e]=r,C(e),T(o),D(r),k(n),te.current=n,f(e,o),p(r,n)}let h=Kr(l,e),_=u?Kr(u,e):null;m(n,h,o,_),A.current=n,j.current=r,M.current=i,N.current=a}},[n,r,i,a,S,w,E,t,g,_,v,l,u,f,p,m]);let ie=(0,L.useCallback)(e=>{let t={...te.current,[S]:e};D(e),k(t),te.current=t,p(e,t)},[S,p]),ae=(0,L.useMemo)(()=>Kr(l,S),[l,S]),oe=(0,L.useMemo)(()=>u===null?null:Kr(u,S),[u,S]),se=(0,L.useMemo)(()=>({cols:w,rowHeight:s,maxRows:c,margin:ae,containerPadding:oe}),[w,s,c,ae,oe]);return(0,R.jsx)(oa,{...h,width:n,gridConfig:se,compactor:g,onLayoutChange:ie,layout:re,children:t})}function fa(e){let{children:t,width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,rowHeight:u,maxRows:d,margin:f,containerPadding:p,droppingItem:m,compactType:h,preventCollision:g=!1,allowOverlap:_=!1,verticalCompact:v,isDraggable:y=!0,isBounded:b=!1,draggableHandle:x,draggableCancel:S,isResizable:C=!0,resizeHandles:w=[`se`],resizeHandle:T,isDroppable:E=!1,useCSSTransforms:D=!0,transformScale:O=1,autoSize:k,className:A,style:j,innerRef:M,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae}=e,oe=h===void 0?`vertical`:h;v===!1&&(oe=null);let se={enabled:y,bounded:b,handle:x,cancel:S},ce={enabled:C,handles:w,handleComponent:T},le={enabled:E},ue;ue=D?O===1?wr:Er(O):Tr;let F=Vr(oe,_,g);return(0,R.jsx)(da,{width:n,breakpoint:r,breakpoints:i,cols:a,layouts:o,rowHeight:u,maxRows:d,margin:f,containerPadding:p,compactor:F,dragConfig:se,resizeConfig:ce,dropConfig:le,positionStrategy:ue,droppingItem:m,autoSize:k,className:A,style:j,innerRef:M,onBreakpointChange:s,onLayoutChange:c,onWidthChange:l,onDragStart:N,onDrag:P,onDragStop:ee,onResizeStart:te,onResize:ne,onResizeStop:re,onDrop:ie,onDropDragOver:ae,children:t})}fa.displayName=`ResponsiveReactGridLayout`;var pa=fa,ma=`react-grid-layout`;function ha(e){function t(t){let{measureBeforeMount:n=!1,className:r,style:i,...a}=t,[o,s]=(0,L.useState)(1280),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(null);return(0,L.useEffect)(()=>{l(!0)},[]),(0,L.useEffect)(()=>{let e=u.current;if(!(e instanceof HTMLElement))return;let t=null,n=new ResizeObserver(e=>{if(e[0]){let n=Math.round(e[0].contentRect.width);t!==null&&cancelAnimationFrame(t),t=requestAnimationFrame(()=>{s(e=>e===n?e:n),t=null})}});return n.observe(e),d.current=n,()=>{t!==null&&cancelAnimationFrame(t),n.unobserve(e),n.disconnect()}},[c]),n&&!c?(0,R.jsx)(`div`,{className:p(r,ma),style:i,ref:u}):(0,R.jsx)(e,{innerRef:u,className:r,style:i,...a,width:o})}return t.displayName=`WidthProvider(${e.displayName||e.name||`Component`})`,t}function ga(e){return e.reduce((e,t)=>Math.max(e,t.y+t.h),0)}function _a(e,t){return e.map(e=>({...e,x:0,w:t,minW:Math.min(e.minW??1,t)}))}var va=[`overview`,`topology`,`activity`,`assistant`,`performance`,`trace`,`logs`],ya={overview:{w:4,h:3,minW:3,minH:3},activity:{w:4,h:5,minW:3,minH:4},assistant:{w:4,h:3,minW:3,minH:3},topology:{w:8,h:5,minW:4,minH:4},performance:{w:8,h:5,minW:4,minH:4},logs:{w:8,h:5,minW:4,minH:4},trace:{w:8,h:4,minW:4,minH:4}};function ba(e,t){return e.xe.y)),o=(t,r)=>!e.some(e=>ba(e,{x:t,y:a,w:r,h:n}));for(let e=0;e+t<=r;e+=1)if(o(e,t))return{x:e,y:a,w:t};let s=e.reduce((e,t)=>ba(t,{x:0,y:a,w:r,h:n})?Math.max(e,t.x+t.w):e,0),c={x:s,w:0};for(let e=Math.min(s,r);ec.w&&(c={x:e,w:t-e}),e=t}return c.w>=i?{x:c.x,y:a,w:c.w}:{x:0,y:ga(e),w:t}}function Sa(e){if(e>=2e3)return`bad`;if(e>=750)return`warn`}function Ca(e){return e>=.05?`bad`:e>=.01?`warn`:`dimmed`}var wa=function(e,t){return wa=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},wa(e,t)};function z(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);wa(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Ta=`12px sans-serif`,Ea=20,Da=100,Oa=`007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N`;function ka(e){var t={};if(typeof JSON>`u`)return t;for(var n=0;n=0)s=o*n.length;else for(var c=0;c=Wa&&(Ua=0),Ua++}function Ka(){var e=[...arguments];typeof console<`u`&&console.error.apply(console,e)}function B(e){if(typeof e!=`object`||!e)return e;var t=e,n=Pa.call(e);if(n===`[object Array]`){if(!So(e)){t=[];for(var r=0,i=e.length;r`u`&&typeof self<`u`?No.worker=!0:!No.hasGlobalWindow||`Deno`in window||typeof navigator<`u`&&typeof navigator.userAgent==`string`&&navigator.userAgent.indexOf(`Node.js`)>-1?(No.node=!0,No.svgSupported=!0):Po(navigator.userAgent,No);function Po(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),i=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),a=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);if(r&&(n.firefox=!0,n.version=r[1]),i&&(n.ie=!0,n.version=i[1]),a&&(n.edge=!0,n.version=a[1],n.newEdge=+a[1].split(`.`)[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<`u`,t.touchEventsSupported=`ontouchstart`in window&&!n.ie&&!n.edge,t.pointerEventsSupported=`onpointerdown`in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<`u`){var s=document.documentElement.style;t.transform3dSupported=(n.ie&&`transition`in s||n.edge||`WebKitCSSMatrix`in window&&`m11`in new WebKitCSSMatrix||`MozPerspective`in s)&&!(`OTransition`in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}}var Fo=`.`,Io=`___EC__COMPONENT__CONTAINER___`,Lo=`___EC__EXTENDED_CLASS___`;function Ro(e){var t={main:``,sub:``};if(e){var n=e.split(Fo);t.main=n[0]||``,t.sub=n[1]||``}return t}function zo(e){vo(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(e),`componentType "`+e+`" illegal`)}function Bo(e){return!!(e&&e[Lo])}function Vo(e,t){e.$constructor=e,e.extend=function(e){var t=this,n;return Ho(t)?n=function(e){z(t,e);function t(){return e.apply(this,arguments)||this}return t}(t):(n=function(){(e.$constructor||t).apply(this,arguments)},Za(n,this)),V(n.prototype,e),n[Lo]=!0,n.extend=this.extend,n.superCall=Ko,n.superApply=qo,n.superClass=t,n}}function Ho(e){return K(e)&&/^class\s/.test(Function.prototype.toString.call(e))}function Uo(e,t){e.extend=t.extend}var Wo=Math.round(Math.random()*10);function Go(e){var t=[`__\0is_clz`,Wo++].join(`_`);e.prototype[t]=!0,e.isInstance=function(e){return!!(e&&e[t])}}function Ko(e,t){var n=[...arguments].slice(2);return this.superClass.prototype[t].apply(e,n)}function qo(e,t,n){return this.superClass.prototype[t].apply(e,n)}function Jo(e){var t={};e.registerClass=function(e){var r=e.type||e.prototype.type;if(r){zo(r),e.prototype.type=r;var i=Ro(r);if(!i.sub)t[i.main]=e;else if(i.sub!==Io){var a=n(i);a[i.sub]=e}}return e},e.getClass=function(e,n,r){var i=t[e];if(i&&i[Io]&&(i=n?i[n]:null),r&&!i)throw Error(n?`Component `+e+`.`+(n||``)+` is used but not imported.`:e+`.type should be specified.`);return i},e.getClassesByMainType=function(e){var n=Ro(e),r=[],i=t[n.main];return i&&i[Io]?H(i,function(e,t){t!==Io&&r.push(e)}):r.push(i),r},e.hasClass=function(e){return!!t[Ro(e).main]},e.getAllClassMainTypes=function(){var e=[];return H(t,function(t,n){e.push(n)}),e},e.hasSubTypes=function(e){var n=t[Ro(e).main];return n&&n[Io]};function n(e){var n=t[e.main];return(!n||!n[Io])&&(n=t[e.main]={},n[Io]=!0),n}}function Yo(e,t){for(var n=0;n=0||i&&Xa(i,s)<0)){var c=n.getShallow(s,t);c!=null&&(a[e[o][0]]=c)}}return a}}var Xo=Yo([[`fill`,`color`],[`shadowBlur`],[`shadowOffsetX`],[`shadowOffsetY`],[`opacity`],[`shadowColor`]]),Zo=function(){function e(){}return e.prototype.getAreaStyle=function(e,t){return Xo(this,e,t)},e}(),Qo=function(){function e(e){this.value=e}return e}(),$o=function(){function e(){this._len=0}return e.prototype.insert=function(e){var t=new Qo(e);return this.insertEntry(t),t},e.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},e.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),es=function(){function e(e){this._list=new $o,this._maxSize=10,this._map={},this._maxSize=e}return e.prototype.put=function(e,t){var n=this._list,r=this._map,i=null;if(r[e]==null){var a=n.len(),o=this._lastRemovedEntry;if(a>=this._maxSize&&a>0){var s=n.head;n.remove(s),delete r[s.key],i=s.value,this._lastRemovedEntry=s}o?o.value=t:o=new Qo(t),o.key=e,n.insertEntry(o),r[e]=o}return i},e.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),ts=new es(50);function ns(e){if(typeof e==`string`){var t=ts.get(e);return t&&t.image}return e}function rs(e,t,n,r,i){if(!e)return t;if(typeof e==`string`){if(t&&t.__zrImageSrc===e||!n)return t;var a=ts.get(e),o={hostEl:n,cb:r,cbPayload:i};return a?(t=a.image,!as(t)&&a.pending.push(o)):(t=ja.loadImage(e,is,is),t.__zrImageSrc=e,ts.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}return e}function is(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;tu||d>f||p>m||h>g)return!1;var _=!(u=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},e.prototype.contain=function(t,n){return e.contain(this,t,n)},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(e){Js(this,e)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t?t.x:0,t?t.y:0,t?t.width:0,t?t.height:0)},e.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},e.applyTransform=function(e,t,n){if(!n){e!==t&&Js(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var r=n[0],i=n[3],a=n[4],o=n[5];e.x=t.x*r+a,e.y=t.y*i+o,e.width=t.width*r,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}Rs.x=Bs.x=t.x,Rs.y=Vs.y=t.y,zs.x=Vs.x=t.x+t.width,zs.y=Bs.y=t.y+t.height,Rs.transform(n),Vs.transform(n),zs.transform(n),Bs.transform(n),e.x=Ns(Rs.x,zs.x,Bs.x,Vs.x),e.y=Ns(Rs.y,zs.y,Bs.y,Vs.y);var s=Ps(Rs.x,zs.x,Bs.x,Vs.x),c=Ps(Rs.y,zs.y,Bs.y,Vs.y);e.width=s-e.x,e.height=c-e.y},e.calculateTransform=function(e,t,n){var r=n.width/t.width,i=n.height/t.height;return e=ss(e||[]),us(e,e,_s(ec,-t.x,-t.y)),fs(e,e,_s(ec,r,i)),us(e,e,_s(ec,n.x,n.y)),e},e}(),Ks=Z.create,qs=Z.set,Js=Z.copy,Ys=Z.calculateTransform,Xs=Z.applyTransform,Zs=Z.contain,Qs=new Z(0,0,0,0),$s=new Z(0,0,0,0),ec=[];function tc(e,t,n,r,i,a,o,s){var c=Fs(t-n),l=Fs(r-e),u=Ns(c,l),d=Is[i],f=Is[1-i],p=Ls[i];t=l||!Hs.bidirectional)&&(Us[d]=-l,Us[f]=0,Hs.useDir&&Hs.calcDirMTV())))}function nc(){var e=0,t=new Ms,n=new Ms,r={minTv:new Ms,maxTv:new Ms,useDir:!1,dirMinTv:new Ms,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,a){r.touchThreshold=0,i&&i.touchThreshold!=null&&(r.touchThreshold=Ps(0,i.touchThreshold)),r.negativeSize=!1,a&&(r.minTv.set(1/0,1/0),r.maxTv.set(0,0),r.useDir=!1,i&&i.direction!=null&&(r.useDir=!0,r.dirMinTv.copy(r.minTv),n.copy(r.minTv),e=i.direction,r.bidirectional=i.bidirectional==null||!!i.bidirectional,r.bidirectional||t.set(Math.cos(e),Math.sin(e))))},calcDirMTV:function(){var a=r.minTv,o=r.dirMinTv,s=a.y*a.y+a.x*a.x,c=Math.sin(e),l=Math.cos(e),u=c*a.y+l*a.x;if(i(u)){i(a.x)&&i(a.y)&&o.set(0,0);return}if(n.x=s*l/u,n.y=s*c/u,i(n.x)&&i(n.y)){o.set(0,0);return}(r.bidirectional||t.dot(n)>0)&&n.len()=sc)){e||=`12px sans-serif`;for(var t=[],n=+new Date,r=0;r<=127;r++)t[r]=ja.measureText(String.fromCharCode(r),e).width;var i=+new Date-n;return i>16?oc=sc:i>2&&oc++,t}}var oc=0,sc=5;function cc(e,t){return e.asciiWidthMapTried||=(e.asciiWidthMap=ac(e.font),!0),0<=t&&t<=127?e.asciiWidthMap==null?e.asciiCharWidth:e.asciiWidthMap[t]:e.stWideCharWidth}function lc(e,t){var n=e.strWidthCache,r=n.get(t);return r??(r=ja.measureText(t,e.font).width,n.put(t,r)),r}function uc(e,t,n,r){var i=lc(rc(t),e),a=mc(t);return new Z(fc(0,i,n),pc(0,a,r),i,a)}function dc(e,t,n,r){var i=((e||``)+``).split(` +`);if(i.length===1)return uc(i[0],t,n,r);for(var a=new Z(0,0,0,0),o=0;o=0?parseFloat(e)/100*t:parseFloat(e):e}function gc(e,t,n){var r=t.position||`inside`,i=t.distance==null?5:t.distance,a=n.height,o=n.width,s=a/2,c=n.x,l=n.y,u=`left`,d=`top`;if(r instanceof Array)c+=hc(r[0],n.width),l+=hc(r[1],n.height),u=null,d=null;else switch(r){case`left`:c-=i,l+=s,u=`right`,d=`middle`;break;case`right`:c+=i+o,l+=s,d=`middle`;break;case`top`:c+=o/2,l-=i,u=`center`,d=`bottom`;break;case`bottom`:c+=o/2,l+=a+i,u=`center`;break;case`inside`:c+=o/2,l+=s,u=`center`,d=`middle`;break;case`insideLeft`:c+=i,l+=s,d=`middle`;break;case`insideRight`:c+=o-i,l+=s,u=`right`,d=`middle`;break;case`insideTop`:c+=o/2,l+=i,u=`center`;break;case`insideBottom`:c+=o/2,l+=a-i,u=`center`,d=`bottom`;break;case`insideTopLeft`:c+=i,l+=i;break;case`insideTopRight`:c+=o-i,l+=i,u=`right`;break;case`insideBottomLeft`:c+=i,l+=a-i,d=`bottom`;break;case`insideBottomRight`:c+=o-i,l+=a-i,u=`right`,d=`bottom`}return e||={},e.x=c,e.y=l,e.align=u,e.verticalAlign=d,e}var _c=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function vc(e,t,n,r,i,a){if(!n){e.text=``,e.isTruncated=!1;return}var o=(t+``).split(` +`);a=yc(n,r,i,a);for(var s=!1,c={},l=0,u=o.length;l=s;l++)c-=s;var u=lc(o,n);return u>c&&(n=``,u=0),c=e-u,i.ellipsis=n,i.ellipsisWidth=u,i.contentWidth=c,i.containerWidth=e,i}function bc(e,t,n){var r=n.containerWidth,i=n.contentWidth,a=n.fontMeasureInfo;if(!r){e.textLine=``,e.isTruncated=!1;return}var o=lc(a,t);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var c=s===0?xc(t,i,a):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,c),o=lc(a,t)}t===``&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function xc(e,t,n){for(var r=0,i=0,a=e.length;ig&&p){var y=Math.floor(g/f);m||=_.length>y,_=_.slice(0,y),v=_.length*f}if(i&&u&&h!=null)for(var b=yc(h,l,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),x={},S=0;S<_.length;S++)bc(x,_[S],b),_[S]=x.textLine,m||=x.isTruncated;for(var C=g,w=0,T=rc(l),S=0;S<_.length;S++)w=Math.max(lc(T,_[S]),w);h??=w;var E=h;return C+=c,E+=s,{lines:_,height:g,outerWidth:E,outerHeight:C,lineHeight:f,calculatedLineHeight:d,contentWidth:w,contentHeight:v,width:h,isTruncated:m}}var Cc=function(){function e(){}return e}(),wc=function(){function e(e){this.tokens=[],e&&(this.tokens=e)}return e}(),Tc=function(){function e(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return e}();function Ec(e,t,n,r,i){var a=new Tc,o=Fc(e);if(!o)return a;var s=t.padding,c=s?s[1]+s[3]:0,l=s?s[0]+s[2]:0,u=t.width;u==null&&n!=null&&(u=n-c);var d=t.height;d==null&&r!=null&&(d=r-l);for(var f=t.overflow,p=(f===`break`||f===`breakAll`)&&u!=null?{width:u,accumWidth:0,breakAll:f===`breakAll`}:null,m=_c.lastIndex=0,h;(h=_c.exec(o))!=null;){var g=h.index;g>m&&Dc(a,o.substring(m,g),t,p),Dc(a,h[2],t,p,h[1]),m=_c.lastIndex}md){var ee=a.lines.length;O>0?(T.tokens=T.tokens.slice(0,O),C(T,D,E),a.lines=a.lines.slice(0,w+1)):a.lines=a.lines.slice(0,w),a.isTruncated=a.isTruncated||a.lines.length0&&m+r.accumWidth>r.width&&(u=t.split(` +`),l=!0),r.accumWidth=m}else{var h=jc(t,c,r.width,r.breakAll,r.accumWidth);r.accumWidth=h.accumWidth+p,d=h.linesWidths,u=h.lines}}u||=t.split(` +`);for(var g=rc(c),_=0;_=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var kc=eo(`,&?/;] `.split(``),function(e,t){return e[t]=!0,e},{});function Ac(e){return!Oc(e)||!!kc[e]}function jc(e,t,n,r,i){for(var a=[],o=[],s=``,c=``,l=0,u=0,d=rc(t),f=0;fn:i+u+m>n){u?(s||c)&&(h?(s||(s=c,c=``,l=0,u=l),a.push(s),o.push(u-l),c+=p,l+=m,s=``,u=l):(c&&(s+=c,c=``,l=0),a.push(s),o.push(u),s=p,u=m)):h?(a.push(c),o.push(l),c=p,l=m):(a.push(p),o.push(m));continue}u+=m,h?(c+=p,l+=m):(c&&(s+=c,c=``,l=0),s+=p)}return c&&(s+=c),s&&(a.push(s),o.push(u)),a.length===1&&(u+=i),{accumWidth:u,lines:a,linesWidths:o}}function Mc(e,t,n,r,i,a){if(e.baseX=n,e.baseY=r,e.outerWidth=e.outerHeight=null,t){var o=t.width*2,s=t.height*2;Z.set(Nc,fc(n,o,i),pc(r,s,a),o,s),Z.intersect(t,Nc,null,Pc);var c=Pc.outIntersectRect;e.outerWidth=c.width,e.outerHeight=c.height,e.baseX=fc(c.x,c.width,i,!0),e.baseY=pc(c.y,c.height,a,!0)}}var Nc=new Z(0,0,0,0),Pc={outIntersectRect:{},clamp:!0};function Fc(e){return e==null?e=``:e+=``}function Ic(e){var t=Fc(e.text),n=e.font;return Lc(e,lc(rc(n),t),mc(n),null)}function Lc(e,t,n,r){var i=new Z(fc(e.x||0,t,e.textAlign),pc(e.y||0,n,e.textBaseline),t,n),a=r??(Rc(e)?e.lineWidth:0);return a>0&&(i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a),i}function Rc(e){var t=e.stroke;return t!=null&&t!==`none`&&e.lineWidth>0}var zc=ss,Bc=5e-5;function Vc(e){return e>Bc||e<-Bc}var Hc=[],Uc=[],Wc=os(),Gc=Math.abs,Kc=function(){function e(){}return e.prototype.getLocalTransform=function(e){return qc(this,e)},e.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},e.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},e.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},e.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},e.prototype.needLocalTransform=function(){return Vc(this.rotation)||Vc(this.x)||Vc(this.y)||Vc(this.scaleX-1)||Vc(this.scaleY-1)||Vc(this.skewX)||Vc(this.skewY)},e.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(zc(n),this.invTransform=null);return}n||=os(),t?this.getLocalTransform(n):zc(n),e&&(t?ls(n,e,n):cs(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n),this.invTransform=this.invTransform||os(),ps(this.invTransform,n)},e.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Hc);var n=Hc[0]<0?-1:1,r=Hc[1]<0?-1:1,i=((Hc[0]-n)*t+n)/Hc[0]||0,a=((Hc[1]-r)*t+r)/Hc[1]||0;e[0]*=i,e[1]*=i,e[2]*=a,e[3]*=a}},e.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},e.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],r=Math.atan2(e[1],e[0]),i=Math.PI/2+r-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-r,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||os(),ls(Uc,e.invTransform,t),t=Uc);var n=this.originX,r=this.originY;(n||r)&&(Wc[4]=n,Wc[5]=r,ls(Uc,t,Wc),Uc[4]-=n,Uc[5]-=r,t=Uc),this.setLocalTransform(t)}},e.prototype.getGlobalScale=function(e){var t=this.transform;return e||=[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},e.prototype.transformCoordToLocal=function(e,t){var n=[e,t],r=this.invTransform;return r&&ks(n,n,r),n},e.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],r=this.transform;return r&&ks(n,n,r),n},e.prototype.getLineScale=function(){var e=this.transform;return e&&Gc(e[0]-1)>1e-10&&Gc(e[3]-1)>1e-10?Math.sqrt(Gc(e[0]*e[3]-e[2]*e[1])):1},e.prototype.copyTransform=function(e){Xc(this,e)},e.getLocalTransform=function(e,t){t||=[];var n=e.originX||0,r=e.originY||0,i=e.scaleX,a=e.scaleY,o=e.anchorX,s=e.anchorY,c=e.rotation||0,l=e.x,u=e.y,d=e.skewX?Math.tan(e.skewX):0,f=e.skewY?Math.tan(-e.skewY):0;if(n||r||o||s){var p=n+o,m=r+s;t[4]=-p*i-d*m*a,t[5]=-m*a-f*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=a,t[1]=f*i,t[2]=d*a,c&&ds(t,t,c),t[4]+=n+l,t[5]+=r+u,t},e.initDefaultProps=(function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0})(),e}(),qc=Kc.getLocalTransform;function Jc(){return new Kc}var Yc=[`x`,`y`,`originX`,`originY`,`anchorX`,`anchorY`,`rotation`,`scaleX`,`scaleY`,`skewX`,`skewY`];function Xc(e,t){return Ja(e,t,Yc)}var Zc={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:1024**(e-1)},exponentialOut:function(e){return e===1?1:1-2**(-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*1024**(e-1):.5*(-(2**(-10*(e-1)))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*2**(-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*2**(10*--e)*Math.sin((e-t)*(2*Math.PI)/r)):n*2**(-10*--e)*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Zc.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Zc.bounceIn(e*2)*.5:Zc.bounceOut(e*2-1)*.5+.5}},Qc=Math.pow,$c=Math.sqrt,el=1e-8,tl=1e-4,nl=$c(3),rl=1/3,il=ms(),al=ms(),ol=ms();function sl(e){return e>-el&&eel||e<-el}function ll(e,t,n,r,i){var a=1-i;return a*a*(a*e+3*i*t)+i*i*(i*r+3*a*n)}function ul(e,t,n,r,i){var a=1-i;return 3*(((t-e)*a+2*(n-t)*i)*a+(r-n)*i*i)}function dl(e,t,n,r,i,a){var o=r+3*(t-n)-e,s=3*(n-t*2+e),c=3*(t-e),l=e-i,u=s*s-3*o*c,d=s*c-9*o*l,f=c*c-3*s*l,p=0;if(sl(u)&&sl(d)){if(sl(s))a[0]=0;else{var m=-c/s;m>=0&&m<=1&&(a[p++]=m)}}else{var h=d*d-4*u*f;if(sl(h)){var g=d/u,m=-s/o+g,_=-g/2;m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_)}else if(h>0){var v=$c(h),y=u*s+1.5*o*(-d+v),b=u*s+1.5*o*(-d-v);y=y<0?-Qc(-y,rl):Qc(y,rl),b=b<0?-Qc(-b,rl):Qc(b,rl);var m=(-s-(y+b))/(3*o);m>=0&&m<=1&&(a[p++]=m)}else{var x=(2*u*s-3*o*d)/(2*$c(u*u*u)),S=Math.acos(x)/3,C=$c(u),w=Math.cos(S),m=(-s-2*C*w)/(3*o),_=(-s+C*(w+nl*Math.sin(S)))/(3*o),T=(-s+C*(w-nl*Math.sin(S)))/(3*o);m>=0&&m<=1&&(a[p++]=m),_>=0&&_<=1&&(a[p++]=_),T>=0&&T<=1&&(a[p++]=T)}}return p}function fl(e,t,n,r,i){var a=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,c=0;if(sl(o)){if(cl(a)){var l=-s/a;l>=0&&l<=1&&(i[c++]=l)}}else{var u=a*a-4*o*s;if(sl(u))i[0]=-a/(2*o);else if(u>0){var d=$c(u),l=(-a+d)/(2*o),f=(-a-d)/(2*o);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function pl(e,t,n,r,i,a){var o=(t-e)*i+e,s=(n-t)*i+t,c=(r-n)*i+n,l=(s-o)*i+o,u=(c-s)*i+s,d=(u-l)*i+l;a[0]=e,a[1]=o,a[2]=l,a[3]=d,a[4]=d,a[5]=u,a[6]=c,a[7]=r}function ml(e,t,n,r,i,a,o,s,c,l,u){var d,f=.005,p=1/0,m,h,g,_;il[0]=c,il[1]=l;for(var v=0;v<1;v+=.05)al[0]=ll(e,n,i,o,v),al[1]=ll(t,r,a,s,v),g=Os(il,al),g=0&&g=0&&l<=1&&(i[c++]=l)}}else{var u=o*o-4*a*s;if(sl(u)){var l=-o/(2*a);l>=0&&l<=1&&(i[c++]=l)}else if(u>0){var d=$c(u),l=(-o+d)/(2*a),f=(-o-d)/(2*a);l>=0&&l<=1&&(i[c++]=l),f>=0&&f<=1&&(i[c++]=f)}}return c}function yl(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function bl(e,t,n,r,i){var a=(t-e)*r+e,o=(n-t)*r+t,s=(o-a)*r+a;i[0]=e,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=n}function xl(e,t,n,r,i,a,o,s,c){var l,u=.005,d=1/0;il[0]=o,il[1]=s;for(var f=0;f<1;f+=.05){al[0]=gl(e,n,i,f),al[1]=gl(t,r,a,f);var p=Os(il,al);p=0&&p=1?1:dl(0,r,a,1,e,s)&&ll(0,i,o,1,s[0])}}}var Tl=function(){function e(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Ao,this.ondestroy=e.ondestroy||Ao,this.onrestart=e.onrestart||Ao,e.easing&&this.setEasing(e.easing)}return e.prototype.step=function(e,t){if(this._inited||=(this._startTime=e+this._delay,!0),this._paused){this._pausedTime+=t;return}var n=this._life,r=e-this._startTime-this._pausedTime,i=r/n;i<0&&(i=0),i=Math.min(i,1);var a=this.easingFunc,o=a?a(i):i;if(this.onframe(o),i===1){if(this.loop){var s=r%n;this._startTime=e-s,this._pausedTime=0,this.onrestart()}else return!0}return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(e){this.easing=e,this.easingFunc=K(e)?e:Zc[e]||wl(e)},e}(),El={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function Dl(e){return e=Math.round(e),e<0?0:e>255?255:e}function Ol(e){return e=Math.round(e),e<0?0:e>360?360:e}function kl(e){return e<0?0:e>1?1:e}function Al(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?Dl(parseFloat(t)/100*255):Dl(parseInt(t,10))}function jl(e){var t=e;return t.length&&t.charAt(t.length-1)===`%`?kl(parseFloat(t)/100):kl(parseFloat(t))}function Ml(e,t,n){return n<0?n+=1:n>1&&--n,n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Nl(e,t,n){return e+(t-e)*n}function Pl(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}function Fl(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var Il=new es(20),Ll=null;function Rl(e,t){Ll&&Fl(Ll,t),Ll=Il.put(e,Ll||t.slice())}function zl(e,t){if(e){t||=[];var n=Il.get(e);if(n)return Fl(t,n);e+=``;var r=e.replace(/ /g,``).toLowerCase();if(r in El)return Fl(t,El[r]),Rl(e,t),t;var i=r.length;if(r.charAt(0)===`#`){if(i===4||i===5){var a=parseInt(r.slice(1,4),16);if(!(a>=0&&a<=4095)){Pl(t,0,0,0,1);return}return Pl(t,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(r.slice(4),16)/15:1),Rl(e,t),t}if(i===7||i===9){var a=parseInt(r.slice(1,7),16);if(!(a>=0&&a<=16777215)){Pl(t,0,0,0,1);return}return Pl(t,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(r.slice(7),16)/255:1),Rl(e,t),t}return}var o=r.indexOf(`(`),s=r.indexOf(`)`);if(o!==-1&&s+1===i){var c=r.substr(0,o),l=r.substr(o+1,s-(o+1)).split(`,`),u=1;switch(c){case`rgba`:if(l.length!==4)return l.length===3?Pl(t,+l[0],+l[1],+l[2],1):Pl(t,0,0,0,1);u=jl(l.pop());case`rgb`:if(l.length>=3)return Pl(t,Al(l[0]),Al(l[1]),Al(l[2]),l.length===3?u:jl(l[3])),Rl(e,t),t;Pl(t,0,0,0,1);return;case`hsla`:if(l.length!==4){Pl(t,0,0,0,1);return}return l[3]=jl(l[3]),Bl(l,t),Rl(e,t),t;case`hsl`:if(l.length!==3){Pl(t,0,0,0,1);return}return Bl(l,t),Rl(e,t),t;default:return}}Pl(t,0,0,0,1)}}function Bl(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=jl(e[1]),i=jl(e[2]),a=i<=.5?i*(r+1):i+r-i*r,o=i*2-a;return t||=[],Pl(t,Dl(Ml(o,a,n+1/3)*255),Dl(Ml(o,a,n)*255),Dl(Ml(o,a,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Vl(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=a-i,s=(a+i)/2,c,l;if(o===0)c=0,l=0;else{l=s<.5?o/(a+i):o/(2-a-i);var u=((a-t)/6+o/2)/o,d=((a-n)/6+o/2)/o,f=((a-r)/6+o/2)/o;t===a?c=f-d:n===a?c=1/3+u-f:r===a&&(c=2/3+d-u),c<0&&(c+=1),c>1&&--c}var p=[c*360,l,s];return e[3]!=null&&p.push(e[3]),p}}function Hl(e,t){var n=zl(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return ql(n,n.length===4?`rgba`:`rgb`)}}function Ul(e,t,n){if(t&&t.length&&e>=0&&e<=1){n||=[];var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=t[i],s=t[a],c=r-i;return n[0]=Dl(Nl(o[0],s[0],c)),n[1]=Dl(Nl(o[1],s[1],c)),n[2]=Dl(Nl(o[2],s[2],c)),n[3]=kl(Nl(o[3],s[3],c)),n}}function Wl(e,t,n){if(t&&t.length&&e>=0&&e<=1){var r=e*(t.length-1),i=Math.floor(r),a=Math.ceil(r),o=zl(t[i]),s=zl(t[a]),c=r-i,l=ql([Dl(Nl(o[0],s[0],c)),Dl(Nl(o[1],s[1],c)),Dl(Nl(o[2],s[2],c)),kl(Nl(o[3],s[3],c))],`rgba`);return n?{color:l,leftIndex:i,rightIndex:a,value:r}:l}}function Gl(e,t,n,r){var i=zl(e);if(e)return i=Vl(i),t!=null&&(i[0]=Ol(K(t)?t(i[0]):t)),n!=null&&(i[1]=jl(K(n)?n(i[1]):n)),r!=null&&(i[2]=jl(K(r)?r(i[2]):r)),ql(Bl(i),`rgba`)}function Kl(e,t){var n=zl(e);if(n&&t!=null)return n[3]=kl(t),ql(n,`rgba`)}function ql(e,t){if(e&&e.length){var n=e[0]+`,`+e[1]+`,`+e[2];return(t===`rgba`||t===`hsva`||t===`hsla`)&&(n+=`,`+e[3]),t+`(`+n+`)`}}function Jl(e,t){var n=zl(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}var Yl=new es(100);function Xl(e){if(q(e)){var t=Yl.get(e);return t||(t=Hl(e,-.1),Yl.put(e,t)),t}if(fo(e)){var n=V({},e);return n.colorStops=U(e.colorStops,function(e){return{offset:e.offset,color:Hl(e.color,-.1)}}),n}return e}var Zl=Math.round;function Ql(e){var t;if(!e||e===`transparent`)e=`none`;else if(typeof e==`string`&&e.indexOf(`rgba`)>-1){var n=zl(e);n&&(e=`rgb(`+n[0]+`,`+n[1]+`,`+n[2]+`)`,t=n[3])}return{color:e,opacity:t??1}}var $l=1e-4;function eu(e){return e<$l&&e>-$l}function tu(e){return Zl(e*1e3)/1e3}function nu(e){return Zl(e*1e4)/1e4}function ru(e){return`matrix(`+tu(e[0])+`,`+tu(e[1])+`,`+tu(e[2])+`,`+tu(e[3])+`,`+nu(e[4])+`,`+nu(e[5])+`)`}var iu={left:`start`,right:`end`,center:`middle`,middle:`middle`};function au(e,t,n){return n===`top`?e+=t/2:n===`bottom`&&(e-=t/2),e}function ou(e){return e&&(e.shadowBlur||e.shadowOffsetX||e.shadowOffsetY)}function su(e){var t=e.style,n=e.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),n[0],n[1]].join(`,`)}function cu(e){return e&&!!e.image}function lu(e){return e&&!!e.svgElement}function uu(e){return cu(e)||lu(e)}function du(e){return e.type===`linear`}function fu(e){return e.type===`radial`}function pu(e){return e&&(e.type===`linear`||e.type===`radial`)}function mu(e){return`url(#`+e+`)`}function hu(e){var t=e.getGlobalScale(),n=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(n)/Math.log(10)),1)}function gu(e){var t=e.x||0,n=e.y||0,r=(e.rotation||0)*jo,i=Y(e.scaleX,1),a=Y(e.scaleY,1),o=e.skewX||0,s=e.skewY||0,c=[];return(t||n)&&c.push(`translate(`+t+`px,`+n+`px)`),r&&c.push(`rotate(`+r+`)`),(i!==1||a!==1)&&c.push(`scale(`+i+`,`+a+`)`),(o||s)&&c.push(`skew(`+Zl(o*jo)+`deg, `+Zl(s*jo)+`deg)`),c.join(` `)}var _u=(function(){return typeof Buffer<`u`&&typeof Buffer.from==`function`?function(e){return Buffer.from(e).toString(`base64`)}:typeof btoa==`function`&&typeof unescape==`function`&&typeof encodeURIComponent==`function`?function(e){return btoa(unescape(encodeURIComponent(e)))}:function(e){return null}})(),vu=Array.prototype.slice;function yu(e,t,n){return(t-e)*n+e}function bu(e,t,n,r){for(var i=t.length,a=0;ar?t:e,a=Math.min(n,r),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;so)r.length=o;else for(var s=a;s=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var r=this.keyframes,i=r.length,a=!1,o=Fu,s=t;if($a(t)){var c=Ou(t);o=c,(c===1&&!so(t[0])||c===2&&!so(t[0][0]))&&(a=!0)}else if(so(t)&&!po(t))o=ku;else if(q(t)){if(!isNaN(+t))o=ku;else{var l=zl(t);l&&(s=l,o=Mu)}}else if(fo(t)){var u=V({},s);u.colorStops=U(t.colorStops,function(e){return{offset:e.offset,color:zl(e.color)}}),du(t)?o=Nu:fu(t)&&(o=Pu),s=u}i===0?this.valType=o:(o!==this.valType||o===Fu)&&(a=!0),this.discrete=this.discrete||a;var d={time:e,value:s,rawValue:t,percent:0};return n&&(d.easing=n,d.easingFunc=K(n)?n:Zc[n]||wl(n)),r.push(d),d},e.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(e,t){return e.time-t.time});for(var r=this.valType,i=n.length,a=n[i-1],o=this.discrete,s=Lu(r),c=Iu(r),l=0;l=0&&!(a[l].percent<=t);l--);l=d(l,o-2)}else{for(l=u;lt);l++);l=d(l-1,o-2)}p=a[l+1],f=a[l]}if(f&&p){this._lastFr=l,this._lastFrP=t;var m=p.percent-f.percent,h=m===0?1:d((t-f.percent)/m,1);p.easingFunc&&(h=p.easingFunc(h));var g=n?this._additiveValue:c?Ru:e[s];if((Lu(i)||c)&&!g&&(g=this._additiveValue=[]),this.discrete)e[s]=h<1?f.rawValue:p.rawValue;else if(Lu(i))i===Au?bu(g,f[r],p[r],h):xu(g,f[r],p[r],h);else if(Iu(i)){var _=f[r],v=p[r],y=i===Nu;e[s]={type:y?`linear`:`radial`,x:yu(_.x,v.x,h),y:yu(_.y,v.y,h),colorStops:U(_.colorStops,function(e,t){var n=v.colorStops[t];return{offset:yu(e.offset,n.offset,h),color:Du(bu([],e.color,n.color,h))}}),global:v.global},y?(e[s].x2=yu(_.x2,v.x2,h),e[s].y2=yu(_.y2,v.y2,h)):e[s].r=yu(_.r,v.r,h)}else if(c)bu(g,f[r],p[r],h),n||(e[s]=Du(g));else{var b=yu(f[r],p[r],h);n?this._additiveValue=b:e[s]=b}n&&this._addToTarget(e)}}},e.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,r=this._additiveValue;t===ku?e[n]=e[n]+r:t===Mu?(zl(e[n],Ru),Su(Ru,Ru,r,1),e[n]=Du(Ru)):t===Au?Su(e[n],e[n],r,1):t===ju&&Cu(e[n],e[n],r,1)},e}(),Bu=function(){function e(e,t,n,r){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&r){Ka(`Can' use additive animation on looped animation.`);return}this._additiveAnimators=r,this._allowDiscrete=n}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(e){this._target=e},e.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,ro(t),n)},e.prototype.whenWithKeys=function(e,t,n,r){for(var i=this._tracks,a=0;a0&&s.addKeyframe(0,Eu(c),r),this._trackKeys.push(o)}s.addKeyframe(e,Eu(t[o]),r)}return this._maxTime=Math.max(this._maxTime,e),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],r=this._maxTime||0,i=0;i1){var o=a.pop();i.addKeyframe(o.time,e[r]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}(),Vu=function(){function e(e){e&&(this._$eventProcessor=e)}return e.prototype.on=function(e,t,n,r){this._$handlers||={};var i=this._$handlers;if(typeof t==`function`&&(r=n,n=t,t=null),!n||!e)return this;var a=this._$eventProcessor;t!=null&&a&&a.normalizeQuery&&(t=a.normalizeQuery(t)),i[e]||(i[e]=[]);for(var o=0;o=0:n.inside,y=void 0,b=void 0,x=void 0;v&&this.canBeInsideText()?(y=n.insideFill,b=n.insideStroke,(y==null||y===`auto`)&&(y=this.getInsideTextFill()),(b==null||b===`auto`)&&(b=this.getInsideTextStroke(y),x=!0)):(y=n.outsideFill,b=n.outsideStroke,(y==null||y===`auto`)&&(y=this.getOutsideFill()),(b==null||b===`auto`)&&(b=this.getOutsideStroke(y),x=!0)),y||=`#000`,(y!==g.fill||b!==g.stroke||x!==g.autoStroke||a!==g.align||o!==g.verticalAlign)&&(s=!0,g.fill=y,g.stroke=b,g.autoStroke=x,g.align=a,g.verticalAlign=o,t.setDefaultTextStyle(g)),t.__dirty|=1,s&&t.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return`#fff`},e.prototype.getInsideTextStroke=function(e){return`#000`},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Ku:Gu},e.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t==`string`&&zl(t);n||=[255,255,255,1];for(var r=n[3],i=this.__zr.isDarkMode(),a=0;a<3;a++)n[a]=n[a]*r+(i?0:255)*(1-r);return n[3]=1,ql(n,`rgba`)},e.prototype.traverse=function(e,t){},e.prototype.attrKV=function(e,t){e===`textConfig`?this.setTextConfig(t):e===`textContent`?this.setTextContent(t):e===`clipPath`?this.setClipPath(t):e===`extra`?(this.extra=this.extra||{},V(this.extra,t)):this[e]=t},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(e,t){if(typeof e==`string`)this.attrKV(e,t);else if(J(e))for(var n=ro(e),r=0;r0},e.prototype.getState=function(e){return this.states[e]},e.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},e.prototype.clearStates=function(e){this.useState(Ju,!1,e)},e.prototype.useState=function(e,t,n,r){var i=e===Ju;if(this.hasState()||!i){var a=this.currentStates,o=this.stateTransition;if(!(Xa(a,e)>=0&&(t||a.length===1))){var s;if(this.stateProxy&&!i&&(s=this.stateProxy(e)),s||=this.states&&this.states[e],!s&&!i){Ka(`State `+e+` not exists.`);return}i||this.saveCurrentToNormalState(s);var c=this._textContent,l=cd(this,c,s,r);l&&!this.__inHover&&(this.__inHover=l),this._applyStateObj(e,s,this._normalState,t,ud(this,n,o),o);var u=this._textGuide;return c&&c.useState(e,t,n,!!l),u&&u.useState(e,t,n,!!l),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!l&&this.__inHover&&(this.__inHover=0,this.__dirty&=-2),s}}},e.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var r=[],i=this.currentStates,a=e.length,o=a===i.length;if(o){for(var s=0;s=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},e.prototype.replaceState=function(e,t,n){var r=this.currentStates.slice(),i=Xa(r,e),a=Xa(r,t)>=0;i>=0?a?r.splice(i,1):r[i]=t:n&&!a&&r.push(t),this.useStates(r)},e.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},e.prototype._mergeStates=function(e){for(var t={},n,r=0;r=0&&t.splice(n,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},e.prototype.updateDuringAnimation=function(e){this.markRedraw()},e.prototype.stopAnimation=function(e,t){for(var n=this.animators,r=n.length,i=[],a=0;a0&&n.during&&a[0].during(function(e,t){n.during(t)});for(var f=0;f0||i.force&&!o.length){var C=void 0,w=void 0,T=void 0;if(s){w={},f&&(C={});for(var b=0;b0}var dd=`__zr_style_`+Math.round(Math.random()*10),fd={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:`#000`,opacity:1,blend:`source-over`},pd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};fd[dd]=!0;var md=[`z`,`z2`,`invisible`],hd=[`invisible`],gd=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype._init=function(t){for(var n=ro(t),r=0;r1e-4){s[0]=e-n,s[1]=t-r,c[0]=e+n,c[1]=t+r;return}if(Td[0]=Cd(i)*n+e,Td[1]=Sd(i)*r+t,Ed[0]=Cd(a)*n+e,Ed[1]=Sd(a)*r+t,l(s,Td,Ed),u(c,Td,Ed),i%=wd,i<0&&(i+=wd),a%=wd,a<0&&(a+=wd),i>a&&!o?a+=wd:ii&&(Dd[0]=Cd(p)*n+e,Dd[1]=Sd(p)*r+t,l(s,Dd,s),u(c,Dd,c))}var Fd={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Id=[],Ld=[],Rd=[],zd=[],Bd=[],Vd=[],Hd=Math.min,Ud=Math.max,Wd=Math.cos,Gd=Math.sin,Kd=Math.abs,qd=Math.PI,Jd=qd*2,Yd=typeof Float32Array<`u`,Xd=[];function Zd(e){return Math.round(e/qd*1e8)/1e8%2*qd}function Qd(e,t){var n=Zd(e[0]);n<0&&(n+=Jd);var r=n-e[0],i=e[1];i+=r,!t&&i-n>=Jd?i=n+Jd:t&&n-i>=Jd?i=n-Jd:!t&&n>i?i=n+(Jd-Zd(n-i)):t&&n0&&(this._ux=Kd(n/Uu/e)||0,this._uy=Kd(n/Uu/t)||0)},e.prototype.setDPR=function(e){this.dpr=e},e.prototype.setContext=function(e){this._ctx=e},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Fd.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},e.prototype.lineTo=function(e,t){var n=Kd(e-this._xi),r=Kd(t-this._yi),i=n>this._ux||r>this._uy;if(this.addData(Fd.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var a=n*n+r*r;a>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=a)}return this},e.prototype.bezierCurveTo=function(e,t,n,r,i,a){return this._drawPendingPt(),this.addData(Fd.C,e,t,n,r,i,a),this._ctx&&this._ctx.bezierCurveTo(e,t,n,r,i,a),this._xi=i,this._yi=a,this},e.prototype.quadraticCurveTo=function(e,t,n,r){return this._drawPendingPt(),this.addData(Fd.Q,e,t,n,r),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,r),this._xi=n,this._yi=r,this},e.prototype.arc=function(e,t,n,r,i,a){this._drawPendingPt(),Xd[0]=r,Xd[1]=i,Qd(Xd,a),r=Xd[0],i=Xd[1];var o=i-r;return this.addData(Fd.A,e,t,n,n,r,o,0,+!a),this._ctx&&this._ctx.arc(e,t,n,r,i,a),this._xi=Wd(i)*n+e,this._yi=Gd(i)*n+t,this},e.prototype.arcTo=function(e,t,n,r,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,r,i),this},e.prototype.rect=function(e,t,n,r){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,r),this.addData(Fd.R,e,t,n,r),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Fd.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},e.prototype.fill=function(e){e&&e.fill(),this.toStatic()},e.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Yd&&(this.data=new Float32Array(t));for(var n=0;n0&&a))for(var o=0;ol.length&&(this._expandData(),l=this.data);for(var u=0;u0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},e.prototype.getBoundingRect=function(){Rd[0]=Rd[1]=Bd[0]=Bd[1]=Number.MAX_VALUE,zd[0]=zd[1]=Vd[0]=Vd[1]=-Number.MAX_VALUE;for(var e=this.data,t=0,n=0,r=0,i=0,a=0;an||Kd(v)>r||d===t-1)&&(m=Math.sqrt(_*_+v*v),i=h,a=g);break;case Fd.C:var y=e[d++],b=e[d++],h=e[d++],g=e[d++],x=e[d++],S=e[d++];m=hl(i,a,y,b,h,g,x,S,10),i=x,a=S;break;case Fd.Q:var y=e[d++],b=e[d++],h=e[d++],g=e[d++];m=Sl(i,a,y,b,h,g,10),i=h,a=g;break;case Fd.A:var C=e[d++],w=e[d++],T=e[d++],E=e[d++],D=e[d++],O=e[d++],k=O+D;d+=1,p&&(o=Wd(D)*T+C,s=Gd(D)*E+w),m=Ud(T,E)*Hd(Jd,Math.abs(O)),i=Wd(k)*T+C,a=Gd(k)*E+w;break;case Fd.R:o=i=e[d++],s=a=e[d++];var A=e[d++],j=e[d++];m=A*2+j*2;break;case Fd.Z:var _=o-i,v=s-a;m=Math.sqrt(_*_+v*v),i=o,a=s}m>=0&&(c[u++]=m,l+=m)}return this._pathLen=l,l},e.prototype.rebuildPath=function(e,t){var n=this.data,r=this._ux,i=this._uy,a=this._len,o,s,c,l,u,d,f=t<1,p,m,h=0,g=0,_,v=0,y,b;if(!(f&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,m=this._pathLen,_=t*m,!_)))lo:for(var x=0;x0&&(e.lineTo(y,b),v=0),S){case Fd.M:o=c=n[x++],s=l=n[x++],e.moveTo(c,l);break;case Fd.L:u=n[x++],d=n[x++];var w=Kd(u-c),T=Kd(d-l);if(w>r||T>i){if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+u*D,l*(1-D)+d*D);break lo}h+=E}e.lineTo(u,d),c=u,l=d,v=0}else{var O=w*w+T*T;O>v&&(y=u,b=d,v=O)}break;case Fd.C:var k=n[x++],A=n[x++],j=n[x++],M=n[x++],N=n[x++],P=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;pl(c,k,j,N,D,Id),pl(l,A,M,P,D,Ld),e.bezierCurveTo(Id[1],Ld[1],Id[2],Ld[2],Id[3],Ld[3]);break lo}h+=E}e.bezierCurveTo(k,A,j,M,N,P),c=N,l=P;break;case Fd.Q:var k=n[x++],A=n[x++],j=n[x++],M=n[x++];if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;bl(c,k,j,D,Id),bl(l,A,M,D,Ld),e.quadraticCurveTo(Id[1],Ld[1],Id[2],Ld[2]);break lo}h+=E}e.quadraticCurveTo(k,A,j,M),c=j,l=M;break;case Fd.A:var ee=n[x++],te=n[x++],ne=n[x++],re=n[x++],ie=n[x++],ae=n[x++],oe=n[x++],se=!n[x++],ce=ne>re?ne:re,le=Kd(ne-re)>.001,ue=ie+ae,F=!1;if(f){var E=p[g++];h+E>_&&(ue=ie+ae*(_-h)/E,F=!0),h+=E}if(le&&e.ellipse?e.ellipse(ee,te,ne,re,oe,ie,ue,se):e.arc(ee,te,ce,ie,ue,se),F)break lo;C&&(o=Wd(ie)*ne+ee,s=Gd(ie)*re+te),c=Wd(ue)*ne+ee,l=Gd(ue)*re+te;break;case Fd.R:o=c=n[x],s=l=n[x+1],u=n[x++],d=n[x++];var I=n[x++],de=n[x++];if(f){var E=p[g++];if(h+E>_){var fe=_-h;e.moveTo(u,d),e.lineTo(u+Hd(fe,I),d),fe-=I,fe>0&&e.lineTo(u+I,d+Hd(fe,de)),fe-=de,fe>0&&e.lineTo(u+Ud(I-fe,0),d+de),fe-=I,fe>0&&e.lineTo(u,d+Ud(de-fe,0));break lo}h+=E}e.rect(u,d,I,de);break;case Fd.Z:if(f){var E=p[g++];if(h+E>_){var D=(_-h)/E;e.lineTo(c*(1-D)+o*D,l*(1-D)+s*D);break lo}h+=E}e.closePath(),c=o,l=s}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.prototype.canSave=function(){return!!this._saveData},e.CMD=Fd,e.initDefaultProps=(function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0})(),e}();function ef(e,t,n,r,i,a,o){if(i===0)return!1;var s=i,c=0,l=e;if(o>t+s&&o>r+s||oe+s&&a>n+s||at+d&&u>r+d&&u>a+d&&u>s+d||ue+d&&l>n+d&&l>i+d&&l>o+d||lt+l&&c>r+l&&c>a+l||ce+l&&s>n+l&&s>i+l||sn||u+li&&(i+=of);var f=Math.atan2(c,s);return f<0&&(f+=of),f>=r&&f<=i||f+of>=r&&f+of<=i}function cf(e,t,n,r,i,a){if(a>t&&a>r||ai?s:0}var lf=$d.CMD,uf=Math.PI*2,df=1e-4;function ff(e,t){return Math.abs(e-t)t&&l>r&&l>a&&l>s||l1&&hf(),p=ll(t,r,a,s,mf[0]),f>1&&(m=ll(t,r,a,s,mf[1]))),f===2?gt&&s>r&&s>a||s=0&&l<=1){for(var u=0,d=gl(t,r,a,l),f=0;fn||s<-n)return 0;var c=Math.sqrt(n*n-s*s);pf[0]=-c,pf[1]=c;var l=Math.abs(r-i);if(l<1e-4)return 0;if(l>=uf-1e-4){r=0,i=uf;var u=a?1:-1;return o>=pf[0]+e&&o<=pf[1]+e?u:0}if(r>i){var d=r;r=i,i=d}r<0&&(r+=uf,i+=uf);for(var f=0,p=0;p<2;p++){var m=pf[p];if(m+e>o){var h=Math.atan2(s,m),u=a?1:-1;h<0&&(h=uf+h),(h>=r&&h<=i||h+uf>=r&&h+uf<=i)&&(h>Math.PI/2&&h1&&(n||(s+=cf(c,l,u,d,r,i))),g&&(c=a[m],l=a[m+1],u=c,d=l),h){case lf.M:u=a[m++],d=a[m++],c=u,l=d;break;case lf.L:if(n){if(ef(c,l,a[m],a[m+1],t,r,i))return!0}else s+=cf(c,l,a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.C:if(n){if(tf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=gf(c,l,a[m++],a[m++],a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.Q:if(n){if(nf(c,l,a[m++],a[m++],a[m],a[m+1],t,r,i))return!0}else s+=_f(c,l,a[m++],a[m++],a[m],a[m+1],r,i)||0;c=a[m++],l=a[m++];break;case lf.A:var _=a[m++],v=a[m++],y=a[m++],b=a[m++],x=a[m++],S=a[m++];m+=1;var C=!!(1-a[m++]);f=Math.cos(x)*y+_,p=Math.sin(x)*b+v,g?(u=f,d=p):s+=cf(c,l,f,p,r,i);var w=(r-_)*b/y+_;if(n){if(sf(_,v,b,x,x+S,C,t,w,i))return!0}else s+=vf(_,v,b,x,x+S,C,w,i);c=Math.cos(x+S)*y+_,l=Math.sin(x+S)*b+v;break;case lf.R:u=c=a[m++],d=l=a[m++];var T=a[m++],E=a[m++];if(f=u+T,p=d+E,n){if(ef(u,d,f,d,t,r,i)||ef(f,d,f,p,t,r,i)||ef(f,p,u,p,t,r,i)||ef(u,p,u,d,t,r,i))return!0}else s+=cf(f,d,f,p,r,i),s+=cf(u,p,u,d,r,i);break;case lf.Z:if(n){if(ef(c,l,u,d,t,r,i))return!0}else s+=cf(c,l,u,d,r,i);c=u,l=d}}return!n&&!ff(l,d)&&(s+=cf(c,l,u,d,r,i)||0),s!==0}function bf(e,t,n){return yf(e,0,!1,t,n)}function xf(e,t,n,r){return yf(e,t,!0,n,r)}var Sf=Ya({fill:`#000`,stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:`butt`,miterLimit:10,strokeNoScale:!1,strokeFirst:!1},fd),Cf={style:Ya({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},pd.style)},wf=Yc.concat([`invisible`,`culling`,`z`,`z2`,`zlevel`,`parent`]),Tf=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var i=this._decalEl=this._decalEl||new t;i.buildPath===t.prototype.buildPath&&(i.buildPath=function(e){n.buildPath(e,n.shape)}),i.silent=!0;var a=i.style;for(var o in r)a[o]!==r[o]&&(a[o]=r[o]);a.fill=r.fill?r.decal:null,a.decal=null,a.shadowColor=null,r.strokeFirst&&(a.stroke=null);for(var s=0;s.5?Gu:t>.2?qu:Ku}if(e)return Ku}return Gu},t.prototype.getInsideTextStroke=function(e){var t=this.style.fill;if(q(t)){var n=this.__zr;if(!!(n&&n.isDarkMode())==Jl(e,0)<.4)return t}},t.prototype.buildPath=function(e,t,n){},t.prototype.pathUpdated=function(){this.__dirty&=-5},t.prototype.getUpdatedPathProxy=function(e){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,e),this.path},t.prototype.createPathProxy=function(){this.path=new $d(!1)},t.prototype.hasStroke=function(){var e=this.style,t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))},t.prototype.hasFill=function(){var e=this.style.fill;return e!=null&&e!==`none`},t.prototype.getBoundingRect=function(){var e=this._rect,t=this.style,n=!e;if(n){var r=!1;this.path||(r=!0,this.createPathProxy());var i=this.path;(r||this.__dirty&4)&&(i.beginPath(),this.buildPath(i,this.shape,!1),this.pathUpdated()),e=i.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var a=this._rectStroke||=e.clone();if(this.__dirty||n){a.copy(e);var o=t.strokeNoScale?this.getLineScale():1,s=t.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;s=Math.max(s,c??4)}o>1e-10&&(a.width+=s/o,a.height+=s/o,a.x-=s/o/2,a.y-=s/o/2)}return a}return e},t.prototype.contain=function(e,t){var n=this.transformCoordToLocal(e,t),r=this.getBoundingRect(),i=this.style;if(e=n[0],t=n[1],r.contain(e,t)){var a=this.path;if(this.hasStroke()){var o=i.lineWidth,s=i.strokeNoScale?this.getLineScale():1;if(s>1e-10&&(this.hasFill()||(o=Math.max(o,this.strokeContainThreshold)),xf(a,o/s,e,t)))return!0}if(this.hasFill())return bf(a,e,t)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=4,this._rect&&=null,this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate(`shape`,e)},t.prototype.updateDuringAnimation=function(e){e===`style`?this.dirtyStyle():e===`shape`?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(t,n){t===`shape`?this.setShape(n):e.prototype.attrKV.call(this,t,n)},t.prototype.setShape=function(e,t){var n=this.shape;return n||=this.shape={},typeof e==`string`?n[e]=t:V(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&4)},t.prototype.createStyle=function(e){return Oo(Sf,e)},t.prototype._innerSaveToNormal=function(t){e.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=V({},this.shape))},t.prototype._applyStateObj=function(t,n,r,i,a,o){if(e.prototype._applyStateObj.call(this,t,n,r,i,a,o),this.__inHover!==1){var s=!(n&&i),c;if(n&&n.shape?a?i?c=n.shape:(c=V({},r.shape),V(c,n.shape)):(c=V({},i?this.shape:r.shape),V(c,n.shape)):s&&(c=r.shape),c){if(a){this.shape=V({},this.shape);for(var l={},u=ro(c),d=0;di&&(d=s+c,s*=i/d,c*=i/d),l+u>i&&(d=l+u,l*=i/d,u*=i/d),c+l>a&&(d=c+l,c*=a/d,l*=a/d),s+u>a&&(d=s+u,s*=a/d,u*=a/d),e.moveTo(n+s,r),e.lineTo(n+i-c,r),c!==0&&e.arc(n+i-c,r+c,c,-Math.PI/2,0),e.lineTo(n+i,r+a-l),l!==0&&e.arc(n+i-l,r+a-l,l,0,Math.PI/2),e.lineTo(n+u,r+a),u!==0&&e.arc(n+u,r+a-u,u,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5),e.closePath()}var Nf=Math.round;function Pf(e,t,n){if(t){var r=t.x1,i=t.x2,a=t.y1,o=t.y2;e.x1=r,e.x2=i,e.y1=a,e.y2=o;var s=n&&n.lineWidth;return s?(Nf(r*2)===Nf(i*2)&&(e.x1=e.x2=If(r,s,!0)),Nf(a*2)===Nf(o*2)&&(e.y1=e.y2=If(a,s,!0)),e):e}}function Ff(e,t,n){if(t){var r=t.x,i=t.y,a=t.width,o=t.height;e.x=r,e.y=i,e.width=a,e.height=o;var s=n&&n.lineWidth;return s?(e.x=If(r,s,!0),e.y=If(i,s,!0),e.width=Math.max(If(r+a,s,!1)-e.x,a===0?0:1),e.height=Math.max(If(i+o,s,!1)-e.y,o===0?0:1),e):e}}function If(e,t,n){if(!t)return e;var r=Nf(e*2);return(r+Nf(t))%2==0?r/2:(r+(n?1:-1))/2}var Lf=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Rf={},zf=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new Lf},t.prototype.buildPath=function(e,t){var n,r,i,a;if(this.subPixelOptimize){var o=Ff(Rf,t,this.style);n=o.x,r=o.y,i=o.width,a=o.height,o.r=t.r,t=o}else n=t.x,r=t.y,i=t.width,a=t.height;t.r?Mf(e,t):e.rect(n,r,i,a)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Tf);zf.prototype.type=`rect`;var Bf={fill:`#000`},Vf=2,Hf={},Uf={style:Ya({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},pd.style)},Wf=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n.type=`text`,n._children=[],n._defaultStyle=Bf,n.attr(t),n}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,T=0;T=0&&(D=y[E],D.align===`right`);)this._placeToken(D,e,x,m,T,`right`,g),S-=D.width,T-=D.width,E--;for(w+=(s-(w-p)-(h-T)-S)/2;C<=E;)D=y[C],this._placeToken(D,e,x,m,w+D.width/2,`center`,g),w+=D.width,C++;m+=x}},t.prototype._placeToken=function(e,t,n,r,i,a,o){var s=t.rich[e.styleName]||{};s.text=e.text;var c=e.verticalAlign,l=r+n/2;c===`top`?l=r+e.height/2:c===`bottom`&&(l=r+n-e.height/2),!e.isLineHolder&&rp(s)&&this._renderBackground(s,t,a===`right`?i-e.width:a===`center`?i-e.width/2:i,l-e.height/2,e.width,e.height);var u=!!s.backgroundColor,d=e.textPadding;d&&(i=tp(i,a,d),l-=e.height/2-d[0]-e.innerHeight/2);var f=this._getOrCreateChild(Df),p=f.createStyle();f.useStyle(p);var m=this._defaultStyle,h=!1,g=0,_=!1,v=ep(`fill`in s?s.fill:`fill`in t?t.fill:(h=!0,m.fill)),y=$f(`stroke`in s?s.stroke:`stroke`in t?t.stroke:!u&&!o&&(!m.autoStroke||h)?(g=Vf,_=!0,m.stroke):null),b=s.textShadowBlur>0||t.textShadowBlur>0;p.text=e.text,p.x=i,p.y=l,b&&(p.shadowBlur=s.textShadowBlur||t.textShadowBlur||0,p.shadowColor=s.textShadowColor||t.textShadowColor||`transparent`,p.shadowOffsetX=s.textShadowOffsetX||t.textShadowOffsetX||0,p.shadowOffsetY=s.textShadowOffsetY||t.textShadowOffsetY||0),p.textAlign=a,p.textBaseline=`middle`,p.font=e.font||`12px sans-serif`,p.opacity=ho(s.opacity,t.opacity,1),Yf(p,s),y&&(p.lineWidth=ho(s.lineWidth,t.lineWidth,g),p.lineDash=Y(s.lineDash,t.lineDash),p.lineDashOffset=t.lineDashOffset||0,p.stroke=y),v&&(p.fill=v),f.setBoundingRect(Lc(p,e.contentWidth,e.contentHeight,_?0:null))},t.prototype._renderBackground=function(e,t,n,r,i,a){var o=e.backgroundColor,s=e.borderWidth,c=e.borderColor,l=o&&o.image,u=o&&!l,d=e.borderRadius,f=this,p,m;if(u||e.lineHeight||s&&c){p=this._getOrCreateChild(zf),p.useStyle(p.createStyle()),p.style.fill=null;var h=p.shape;h.x=n,h.y=r,h.width=i,h.height=a,h.r=d,p.dirtyShape()}if(u){var g=p.style;g.fill=o||null,g.fillOpacity=Y(e.fillOpacity,1)}else if(l){m=this._getOrCreateChild(jf),m.onload=function(){f.dirtyStyle()};var _=m.style;_.image=o.image,_.x=n,_.y=r,_.width=i,_.height=a}if(s&&c){var g=p.style;g.lineWidth=s,g.stroke=c,g.strokeOpacity=Y(e.strokeOpacity,1),g.lineDash=e.borderDash,g.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(g.strokeFirst=!0,g.lineWidth*=2)}var v=(p||m).style;v.shadowBlur=e.shadowBlur||0,v.shadowColor=e.shadowColor||`transparent`,v.shadowOffsetX=e.shadowOffsetX||0,v.shadowOffsetY=e.shadowOffsetY||0,v.opacity=ho(e.opacity,t.opacity,1)},t.makeFont=function(e){var t=``;return Xf(e)&&(t=[e.fontStyle,e.fontWeight,Jf(e.fontSize),e.fontFamily||`sans-serif`].join(` `)),t&&yo(t)||e.textFont||e.font},t}(gd),Gf={left:!0,right:1,center:1},Kf={top:1,bottom:1,middle:1},qf=[`fontStyle`,`fontWeight`,`fontSize`,`fontFamily`];function Jf(e){return typeof e==`string`&&(e.indexOf(`px`)!==-1||e.indexOf(`rem`)!==-1||e.indexOf(`em`)!==-1)?e:isNaN(+e)?`12px`:e+`px`}function Yf(e,t){for(var n=0;n0){if(e<=i)return o;if(e>=a)return s}else if(e>=i)return o;else if(e<=a)return s}else{if(e===i)return o;if(e===a)return s}return(e-i)/c*l+o}var yp=bp;function bp(e,t,n){switch(e){case`center`:case`middle`:e=`50%`;break;case`left`:case`top`:e=`0%`;break;case`right`:case`bottom`:e=`100%`}return xp(e,t,n)}function xp(e,t,n){return q(e)?Cp(e)?parseFloat(e)/100*t+(n||0):parseFloat(e):e==null?NaN:+e}function Sp(e){return q(e)&&Cp(e)}function Cp(e){return!!op(e).match(/%$/)}function wp(e,t,n){return isNaN(t)?n?``+e:+e:(t=sp(cp(0,t),ap),e=(+e).toFixed(t),n?e:+e)}function Tp(e){return e.sort(function(e,t){return e-t}),e}function Ep(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(up(e*t)/t===e)return n}return Dp(e)}function Dp(e){var t=e.toString().toLowerCase(),n=t.indexOf(`e`),r=n>0?+t.slice(n+1):0,i=n>0?n:t.length,a=t.indexOf(`.`);return cp(0,(a<0?0:i-1-a)-r)}function Op(e,t,n){var r=lp(e[1]-e[0]);if(!isFinite(r)||r===0)return NaN;var i=mp(2*lp(n||1)*lp(r))/hp,a=mp(lp(t))/hp,o=cp(0,fp(-i+a));return isFinite(o)||(o=NaN),o}function kp(e,t){var n=cp(Ep(e),Ep(t)),r=e+t;return n>ap?r:wp(r,n)}var Ap=pp(2,53)-1;function jp(e){var t=gp*2;return(e%t+t)%t}function Mp(e){return e>-ip&&e=10&&t++,t}function Lp(e,t){var n=Ip(e),r=pp(10,n),i=e/r;return e=(t===2?1:t?i<1.5?1:i<2.5?2:i<4?3:i<7?5:10:i<1?1:i<2?2:i<3?3:i<5?5:10)*r,wp(e,-n)}function Rp(e){e.sort(function(e,t){return s(e,t,0)?-1:1});for(var t=-1/0,n=1,r=0;r0?e.length:0),this.item=null,this.key=NaN,this},e.prototype.next=function(){return(this._step>0?this._idx=this._end)&&(this.item=this._list[this._idx],this.key=this._idx+=this._step,!0)},e})();function Mm(){return[1/0,-1/0]}function Nm(e,t){Lm(t)&&(te[1]&&(e[1]=t))}function Pm(e,t){Lm(t)&&te[1]&&(e[1]=t)}function Im(e,t){Rm(t[0],t[1])&&(t[0]e[1]&&(e[1]=t[1]))}function Lm(e){return e!=null&&isFinite(e)}function Rm(e,t){return Lm(e)&&Lm(t)&&e<=t}function zm(e){var t=e[1]-e[0];return isFinite(t)&&t>=0}function Bm(e){Rm(e[0],e[1])&&e[0]>e[1]&&(e[0]=e[1])}function Vm(){var e=`__ec_once_`+Hm++;return function(t,n){ko(t,e)||(t[e]=1,n())}}var Hm=Vp();function Um(e,t,n){var r=X(),i=0;H(e,function(a){var o=t(a),s=r.get(o)||0;n&&n(a,s),!s&&!n&&(e[i++]=a),r.set(o,s+1)}),n||(e.length=i)}function Wm(e){return e.value+``}function Gm(e){return e+``}function Km(e,t){return Y(t,!0)?e.seriesIndex+2:0}function qm(e,t,n){var r=e.getData().count();return{progressiveRender:n.progressiveEnabled&&t.incrementalPrepareRender&&r>=n.threshold,large:e.get(`large`)&&r>=e.get(`largeThreshold`),modDataCount:e.get(`progressiveChunkMode`)===`mod`?e.getData().count():null}}function Jm(e,t){return{seriesType:e,overallReset:t}}function Ym(e){return{overallReset:e}}var Xm=xm(),Zm=function(e,t,n,r){if(r){var i=Xm(r);i.dataIndex=n,i.dataType=t,i.seriesIndex=e,i.ssrType=`chart`,r.type===`group`&&r.traverse(function(r){var i=Xm(r);i.seriesIndex=e,i.dataIndex=n,i.dataType=t,i.ssrType=`chart`})}},Qm=`series`,$m=X([`tooltip`,`label`,`itemName`,`itemId`,`itemGroupId`,`itemChildGroupId`,`seriesName`]),eh=`original`,th=`arrayRows`,nh=`objectRows`,rh=`keyedColumns`,ih=`typedArray`,ah=`unknown`,oh=`column`,sh=`Roam`,ch=[`getDom`,`getZr`,`getWidth`,`getHeight`,`getDevicePixelRatio`,`dispatchAction`,`isSSR`,`isDisposed`,`on`,`off`,`getDataURL`,`getConnectedDataURL`,`getOption`,`getId`,`updateLabelLayout`],lh=function(){function e(e){H(ch,function(t){this[t]=W(e[t],e)},this)}return e}();function uh(e,t){return t.mainType===`series`?e.getViewOfSeriesModel(t):e.getViewOfComponentModel(t)}var dh=1,fh={},ph=xm(),mh=xm(),hh=[`emphasis`,`blur`,`select`],gh=[`normal`,`emphasis`,`blur`,`select`],_h=`highlight`,vh=`downplay`,yh=`select`,bh=`unselect`,xh=`toggleSelect`,Sh=`selectchanged`;function Ch(e){return e!=null&&e!==`none`}function wh(e,t,n){e.onHoverStateChange&&(e.hoverState||0)!==n&&e.onHoverStateChange(t),e.hoverState=n}function Th(e){wh(e,`emphasis`,2)}function Eh(e){e.hoverState===2&&wh(e,`normal`,0)}function Dh(e){wh(e,`blur`,1)}function Oh(e){e.hoverState===1&&wh(e,`normal`,0)}function kh(e){e.selected=!0}function Ah(e){e.selected=!1}function jh(e,t,n){t(e,n)}function Mh(e,t,n){jh(e,t,n),e.isGroup&&e.traverse(function(e){jh(e,t,n)})}function Nh(e,t){switch(t){case`emphasis`:e.hoverState=2;break;case`normal`:e.hoverState=0;break;case`blur`:e.hoverState=1;break;case`select`:e.selected=!0}}function Ph(e,t,n,r){for(var i=e.style,a={},o=0;o=0,a=!1;if(e instanceof Tf){var o=ph(e),s=i&&o.selectFill||o.normalFill,c=i&&o.selectStroke||o.normalStroke;if(Ch(s)||Ch(c)){r||={};var l=r.style||{};l.fill===`inherit`?(a=!0,r=V({},r),l=V({},l),l.fill=s):!Ch(l.fill)&&Ch(s)?(a=!0,r=V({},r),l=V({},l),l.fill=Xl(s)):!Ch(l.stroke)&&Ch(c)&&(a||(r=V({},r),l=V({},l)),l.stroke=Xl(c)),r.style=l}}if(r&&r.z2==null){a||(r=V({},r));var u=e.z2EmphasisLift;r.z2=e.z2+(u??10)}return r}function Ih(e,t,n){if(n&&n.z2==null){n=V({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??9)}return n}function Lh(e,t,n){var r=Xa(e.currentStates,t)>=0,i=e.style.opacity,a=r?null:Ph(e,[`opacity`],t,{opacity:1});n||={};var o=n.style||{};return o.opacity??(n=V({},n),o=V({opacity:r?i:a.opacity*.1},o),n.style=o),n}function Rh(e,t){var n=this.states[e];if(this.style){if(e===`emphasis`)return Fh(this,e,t,n);if(e===`blur`)return Lh(this,e,n);if(e===`select`)return Ih(this,e,n)}return n}function zh(e){e.stateProxy=Rh;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=Rh),n&&(n.stateProxy=Rh)}function Bh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Th)}function Vh(e,t){!Jh(e,t)&&!e.__highByOuter&&Mh(e,Eh)}function Hh(e,t){e.__highByOuter|=1<<(t||0),Mh(e,Th)}function Uh(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Mh(e,Eh)}function Wh(e){Mh(e,Dh)}function Gh(e){Mh(e,Oh)}function Kh(e){Mh(e,kh)}function qh(e){Mh(e,Ah)}function Jh(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function Yh(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(t,i){var a=mh(i),o=uh(e,i),s=t===`series`;!s&&r.push(o),a.isBlured&&(o.group.traverse(function(e){Oh(e)}),s&&n.push(i)),a.isBlured=!1}),H(r,function(e){e&&e.toggleBlurSeries&&e.toggleBlurSeries(n,!1,t)})}function Xh(e,t,n,r){var i=r.getModel();n||=`coordinateSystem`;function a(e,t){for(var n=0;n0){var a={dataIndex:i,seriesIndex:e.seriesIndex};r!=null&&(a.dataType=r),t.push(a)}})}),t}function ag(e,t,n){fg(e,!0),Mh(e,zh),cg(e,t,n)}function og(e){fg(e,!1)}function sg(e,t,n,r){r?og(e):ag(e,t,n)}function cg(e,t,n){var r=Xm(e);t==null?r.focus&&=null:(r.focus=t,r.blurScope=n)}var lg=[`emphasis`,`blur`,`select`],ug={itemStyle:`getItemStyle`,lineStyle:`getLineStyle`,areaStyle:`getAreaStyle`};function dg(e,t,n,r){n||=`itemStyle`;for(var i=0;i1&&(o*=Cg(m),s*=Cg(m));var h=(i===a?-1:1)*Cg((o*o*(s*s)-o*o*(p*p)-s*s*(f*f))/(o*o*(p*p)+s*s*(f*f)))||0,g=h*o*p/s,_=h*-s*f/o,v=(e+n)/2+Tg(d)*g-wg(d)*_,y=(t+r)/2+wg(d)*g+Tg(d)*_,b=kg([1,0],[(f-g)/o,(p-_)/s]),x=[(f-g)/o,(p-_)/s],S=[(-1*f-g)/o,(-1*p-_)/s],C=kg(x,S);if(Og(x,S)<=-1&&(C=Eg),Og(x,S)>=1&&(C=0),C<0){var w=Math.round(C/Eg*1e6)/1e6;C=Eg*2+w%2*Eg}u.addData(l,v,y,o,s,b,C,d,a)}var jg=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/gi,Mg=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function Ng(e){var t=new $d;if(!e)return t;var n=0,r=0,i=n,a=r,o,s=$d.CMD,c=e.match(jg);if(!c)return t;for(var l=0;l=0&&(n.splice(r,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,t){var n=Xa(this._children,e);return n>=0&&this.replaceAt(t,n),this},t.prototype.replaceAt=function(e,t){var n=this._children,r=n[t];if(e&&e!==this&&e.parent!==this&&e!==r){n[t]=e,r.parent=null;var i=this.__zr;i&&r.removeSelfFromZr(i),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var t=this.__zr;t&&t!==e.__zr&&e.addSelfToZr(t),t&&t.refresh()},t.prototype.remove=function(e){var t=this.__zr,n=this._children,r=Xa(n,e);return r<0?this:(n.splice(r,1),e.parent=null,t&&e.removeSelfFromZr(t),t&&t.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,t=this.__zr,n=0;nA*A+j*j&&(w=E,T=D),{cx:w,cy:T,x0:-u,y0:-d,x1:w*(i/x-1),y1:T*(i/x-1)}}function i_(e){var t;if(G(e)){var n=e.length;if(!n)return e;t=n===1?[e[0],e[0],0,0]:n===2?[e[0],e[0],e[1],e[1]]:n===3?e.concat(e[2]):e}else t=[e,e,e,e];return t}function a_(e,t){var n,r=$g(t.r,0),i=$g(t.r0||0,0),a=r>0;if(a||i>0){if(a||(r=i,i=0),i>r){var o=r;r=i,i=o}var s=t.startAngle,c=t.endAngle;if(!(isNaN(s)||isNaN(c))){var l=t.cx,u=t.cy,d=!!t.clockwise,f=Zg(c-s),p=f>Kg&&f%Kg;if(p>t_&&(f=p),!(r>t_))e.moveTo(l,u);else if(f>Kg-t_)e.moveTo(l+r*Jg(s),u+r*qg(s)),e.arc(l,u,r,s,c,!d),i>t_&&(e.moveTo(l+i*Jg(c),u+i*qg(c)),e.arc(l,u,i,c,s,d));else{var m=void 0,h=void 0,g=void 0,_=void 0,v=void 0,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0,w=void 0,T=void 0,E=void 0,D=void 0,O=void 0,k=void 0,A=r*Jg(s),j=r*qg(s),M=i*Jg(c),N=i*qg(c),P=f>t_;if(P){var ee=t.cornerRadius;ee&&(n=i_(ee),m=n[0],h=n[1],g=n[2],_=n[3]);var te=Zg(r-i)/2;if(v=e_(te,g),y=e_(te,_),b=e_(te,m),x=e_(te,h),w=S=$g(v,y),T=C=$g(b,x),(S>t_||C>t_)&&(E=r*Jg(c),D=r*qg(c),O=i*Jg(s),k=i*qg(s),ft_){var le=e_(g,w),ue=e_(_,w),F=r_(O,k,A,j,r,le,d),I=r_(E,D,M,N,r,ue,d);e.moveTo(l+F.cx+F.x0,u+F.cy+F.y0),w0&&e.arc(l+F.cx,u+F.cy,le,Xg(F.y0,F.x0),Xg(F.y1,F.x1),!d),e.arc(l,u,r,Xg(F.cy+F.y1,F.cx+F.x1),Xg(I.cy+I.y1,I.cx+I.x1),!d),ue>0&&e.arc(l+I.cx,u+I.cy,ue,Xg(I.y1,I.x1),Xg(I.y0,I.x0),!d))}else e.moveTo(l+A,u+j),e.arc(l,u,r,s,c,!d);if(!(i>t_)||!P)e.lineTo(l+M,u+N);else if(T>t_){var le=e_(m,T),ue=e_(h,T),F=r_(M,N,E,D,i,-ue,d),I=r_(A,j,O,k,i,-le,d);e.lineTo(l+F.cx+F.x0,u+F.cy+F.y0),T0&&e.arc(l+F.cx,u+F.cy,ue,Xg(F.y0,F.x0),Xg(F.y1,F.x1),!d),e.arc(l,u,i,Xg(F.cy+F.y1,F.cx+F.x1),Xg(I.cy+I.y1,I.cx+I.x1),d),le>0&&e.arc(l+I.cx,u+I.cy,le,Xg(I.y1,I.x1),Xg(I.y0,I.x0),!d))}else e.lineTo(l+M,u+N),e.arc(l,u,i,c,s,d)}e.closePath()}}}var o_=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),s_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new o_},t.prototype.buildPath=function(e,t){a_(e,t)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Tf);s_.prototype.type=`sector`;var c_=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),l_=function(e){z(t,e);function t(t){return e.call(this,t)||this}return t.prototype.getDefaultShape=function(){return new c_},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.PI*2;e.moveTo(n+t.r,r),e.arc(n,r,t.r,0,i,!1),e.moveTo(n+t.r0,r),e.arc(n,r,t.r0,0,i,!0)},t}(Tf);l_.prototype.type=`ring`;function u_(e,t,n,r){var i=[],a=[],o=[],s=[],c,l,u,d;if(r){u=[1/0,1/0],d=[-1/0,-1/0];for(var f=0,p=e.length;f=2){if(r){var a=u_(i,r,n,t.smoothConstraint);e.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(n?o:o-1);s++){var c=a[s*2],l=a[s*2+1],u=i[(s+1)%o];e.bezierCurveTo(c[0],c[1],l[0],l[1],u[0],u[1])}}else{e.moveTo(i[0][0],i[0][1]);for(var s=1,d=i.length;sN_[1]){if(i=!1,P_.negativeSize||n)return i;var s=j_(N_[0]-M_[1]),c=j_(M_[0]-N_[1]);k_(s,c)>I_.len()&&(s=c||!P_.bidirectional)&&(Ms.scale(F_,o,-c*r),P_.useDir&&P_.calcDirMTV()))}}return i},e.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var r=this._axes[e],i=this._origin,a=t[0].dot(r)+i[e],o=a,s=a,c=1;c0){var d=u.duration,f=u.delay,p=u.easing,m={duration:d,delay:f||0,easing:p,done:a,force:!!a||!!o,setToFinal:!l,scope:e,during:o};s?t.animateFrom(n,m):t.animateTo(n,m)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),a&&a()}function U_(e,t,n,r,i,a){H_(`update`,e,t,n,r,i,a)}function W_(e,t,n,r,i,a){H_(`enter`,e,t,n,r,i,a)}function G_(e){if(!e.__zr)return!0;for(var t=0;tw_,BezierCurve:()=>S_,BoundingRect:()=>Z,Circle:()=>Hg,CompoundPath:()=>T_,Ellipse:()=>Wg,Group:()=>Bg,HOVER_LAYER_FOR_INCREMENTAL:()=>2,HOVER_LAYER_FROM_THRESHOLD:()=>1,HOVER_LAYER_NO:()=>0,Image:()=>jf,IncrementalDisplayable:()=>z_,Line:()=>v_,LinearGradient:()=>D_,OrientedBoundingRect:()=>L_,Path:()=>Tf,Point:()=>Ms,Polygon:()=>p_,Polyline:()=>h_,RadialGradient:()=>O_,Rect:()=>zf,Ring:()=>l_,Sector:()=>s_,Text:()=>Wf,WH:()=>$_,XY:()=>Q_,applyTransform:()=>mv,calcZ2Range:()=>Lv,clipPointsByRect:()=>yv,clipRectByRect:()=>bv,createIcon:()=>xv,decomposeTransform:()=>Vv,ensureCopyRect:()=>Pv,ensureCopyTransform:()=>Fv,expandOrShrinkRect:()=>Ev,extendPath:()=>nv,extendShape:()=>ev,getCurrentCanvasPainter:()=>Uv,getShapeClass:()=>iv,getTransform:()=>pv,groupTransition:()=>vv,initProps:()=>W_,isBoundingRectAxisAligned:()=>Mv,isElementRemoved:()=>G_,lineLineIntersect:()=>Cv,linePolygonIntersect:()=>Sv,makeImage:()=>ov,makePath:()=>av,mergePath:()=>cv,payloadDisableAnimation:()=>Bv,registerShape:()=>rv,removeElement:()=>K_,removeElementWithFadeOut:()=>J_,resizePath:()=>lv,retrieveZInfo:()=>Iv,setTooltipConfig:()=>kv,subPixelOptimize:()=>fv,subPixelOptimizeLine:()=>uv,subPixelOptimizeRect:()=>dv,transformDirection:()=>hv,traverseElements:()=>jv,traverseUpdateZ:()=>Rv,updateProps:()=>U_}),Z_={},Q_=[`x`,`y`],$_=[`width`,`height`];function ev(e){return Tf.extend(e)}var tv=Rg;function nv(e,t){return tv(e,t)}function rv(e,t){Z_[e]=t}function iv(e){if(Z_.hasOwnProperty(e))return Z_[e]}function av(e,t,n,r){var i=Lg(e,t);return n&&(r===`center`&&(n=sv(n,i.getBoundingRect())),lv(i,n)),i}function ov(e,t,n){var r=new jf({style:{image:e,x:t.x,y:t.y,width:t.width,height:t.height},onload:function(e){if(n===`center`){var i={width:e.width,height:e.height};r.setStyle(sv(t,i))}}});return r}function sv(e,t){var n=t.width/t.height,r=e.height*n,i;r<=e.width?i=e.height:(r=e.width,i=r/n);var a=e.x+e.width/2,o=e.y+e.height/2;return{x:a-r/2,y:o-i/2,width:r,height:i}}var cv=zg;function lv(e,t){if(e.applyTransform){var n=e.getBoundingRect().calculateTransform(t);e.applyTransform(n)}}function uv(e,t){return Pf(e,e,{lineWidth:t}),e}function dv(e,t){return Ff(e,e,t),e}var fv=If;function pv(e,t){for(var n=ss([]);e&&e!==t;)ls(n,e.getLocalTransform(),n),e=e.parent;return n}function mv(e,t,n){return t&&!$a(t)&&(t=Kc.getLocalTransform(t)),n&&(t=ps([],t)),ks([],e,t)}function hv(e,t,n){var r=t[4]===0||t[5]===0||t[0]===0?1:lp(2*t[4]/t[0]),i=t[4]===0||t[5]===0||t[2]===0?1:lp(2*t[4]/t[2]),a=[e===`left`?-r:e===`right`?r:0,e===`top`?-i:e===`bottom`?i:0];return a=mv(a,t,n),lp(a[0])>lp(a[1])?a[0]>0?`right`:`left`:a[1]>0?`bottom`:`top`}function gv(e){return!e.isGroup}function _v(e){return e.shape!=null}function vv(e,t,n){if(!e||!t)return;function r(e){var t={};return e.traverse(function(e){gv(e)&&e.anid&&(t[e.anid]=e)}),t}function i(e){var t={x:e.x,y:e.y,rotation:e.rotation};return _v(e)&&(t.shape=B(e.shape)),t}var a=r(e);t.traverse(function(e){if(gv(e)&&e.anid){var t=a[e.anid];if(t){var r=i(e);e.attr(i(t)),U_(e,r,n,Xm(e).dataIndex)}}})}function yv(e,t){return U(e,function(e){var n=e[0];n=cp(n,t.x),n=sp(n,t.x+t.width);var r=e[1];return r=cp(r,t.y),r=sp(r,t.y+t.height),[n,r]})}function bv(e,t){var n=cp(e.x,t.x),r=sp(e.x+e.width,t.x+t.width),i=cp(e.y,t.y),a=sp(e.y+e.height,t.y+t.height);if(r>=n&&a>=i)return{x:n,y:i,width:r-n,height:a-i}}function xv(e,t,n){var r=V({rectHover:!0},t),i=r.style={strokeNoScale:!0};if(n||={x:-1,y:-1,width:2,height:2},e)return e.indexOf(`image://`)===0?(i.image=e.slice(8),Ya(i,n),new jf(r)):av(e.replace(`path://`,``),r,n,`center`)}function Sv(e,t,n,r,i){for(var a=0,o=i[i.length-1];a1)return!1;var g=wv(p,m,u,d)/f;return!(g<0||g>1)}function wv(e,t,n,r){return e*r-n*t}function Tv(e){return e<=1e-6&&e>=-1e-6}function Ev(e,t,n,r,i){return t==null?e:(so(t)?Dv[0]=Dv[1]=Dv[2]=Dv[3]=t:(Dv[0]=t[0],Dv[1]=t[1],Dv[2]=t[2],Dv[3]=t[3]),r&&(Dv[0]=cp(0,Dv[0]),Dv[1]=cp(0,Dv[1]),Dv[2]=cp(0,Dv[2]),Dv[3]=cp(0,Dv[3])),n&&(Dv[0]=-Dv[0],Dv[1]=-Dv[1],Dv[2]=-Dv[2],Dv[3]=-Dv[3]),Ov(e,Dv,`x`,`width`,3,1,i&&i[0]||0),Ov(e,Dv,`y`,`height`,0,2,i&&i[1]||0),e)}var Dv=[0,0,0,0];function Ov(e,t,n,r,i,a,o){var s=t[a]+t[i],c=e[r];e[r]+=s,o=cp(0,sp(o,c)),e[r]=0?-t[i]:t[a]>=0?c+t[a]:lp(s)>1e-8?(c-o)*t[i]/s:0):e[n]-=t[i]}function kv(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,i=q(t)?{formatter:t}:t,a=n.mainType,o=n.componentIndex,s={componentType:a,name:r,$vars:[`name`]};s[a+`Index`]=o;var c=e.formatterParamsExtra;c&&H(ro(c),function(e){ko(s,e)||(s[e]=c[e],s.$vars.push(e))});var l=Xm(e.el);l.componentMainType=a,l.componentIndex=o,l.tooltipConfig={name:r,option:Ya({content:r,encodeHTMLContent:!0,formatterParams:s},i)}}function Av(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function jv(e,t){if(e){if(G(e))for(var n=0;nt&&(t=r),rt&&(n=t=0),{min:n,max:t}}function Rv(e,t,n){zv(e,t,n,-1/0)}function zv(e,t,n,r){if(e.ignoreModelZ)return r;var i=e.getTextContent(),a=e.getTextGuideLine();if(e.isGroup)for(var o=e.childrenRef(),s=0;s1){var l=s.shift();s.length===1&&(n[o]=s[0]),this._update&&this._update(l,a)}else c===1?(n[o]=null,this._update&&this._update(s,a)):this._remove&&this._remove(a)}this._performRestAdd(i,n)},e.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},r={},i=[],a=[];this._initIndexMap(e,n,i,`_oldKeyGetter`),this._initIndexMap(t,r,a,`_newKeyGetter`);for(var o=0;o1&&d===1)this._updateManyToOne&&this._updateManyToOne(l,c),r[s]=null;else if(u===1&&d>1)this._updateOneToMany&&this._updateOneToMany(l,c),r[s]=null;else if(u===1&&d===1)this._update&&this._update(l,c),r[s]=null;else if(u>1&&d>1)this._updateManyToMany&&this._updateManyToMany(l,c),r[s]=null;else if(u>1)for(var f=0;f1)for(var o=0;ol&&(l=p)}s[0]=c,s[1]=l}},r=function(){return this._data?this._data.length/this._dimSize:0};Wy=(e={},e[th+`_`+oh]={pure:!0,appendData:i},e[th+`_row`]={pure:!0,appendData:function(){throw Error(`Do not support appendData when set seriesLayoutBy: "row".`)}},e[nh]={pure:!0,appendData:i},e[rh]={pure:!0,appendData:function(e){var t=this._data;H(e,function(e,n){for(var r=t[n]||(t[n]=[]),i=0;i<(e||[]).length;i++)r.push(e[i])})}},e[eh]={appendData:i},e[ih]={persistent:!1,pure:!0,appendData:function(e){this._data=e},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(e){for(var t=0;tt},gte:function(e,t){return e>=t}};(function(){function e(e,t){so(t)||Xp(``),this._opFn=fb[e],this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){return so(e)?this._opFn(e,this._rvalFloat):this._opFn(zp(e),this._rvalFloat)},e})();var pb=function(){function e(e,t){var n=e===`desc`;this._resultLT=n?1:-1,t??=n?`min`:`max`,this._incomparable=t===`min`?-1/0:1/0}return e.prototype.evaluate=function(e,t){var n=so(e)?e:zp(e),r=so(t)?t:zp(t),i=isNaN(n),a=isNaN(r);if(i&&(n=this._incomparable),a&&(r=this._incomparable),i&&a){var o=q(e),s=q(t);o&&(n=s?e:0),s&&(r=o?t:0)}return nr?-this._resultLT:0},e}();(function(){function e(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=zp(t)}return e.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n===`number`||this._rvalTypeof===`number`)&&(t=zp(e)===this._rvalFloat)}return this._isEQ?t:!t},e})();function mb(e){var t=``,n=-1/0,r=-1/0,i=1/0,a=1/0;return e&&(e.g!=null&&(t+=`G`+e.g,n=e.g),e.ge!=null&&(t+=`GE`+e.ge,r=e.ge),e.l!=null&&(t+=`L`+e.l,i=e.l),e.le!=null&&(t+=`LE`+e.le,a=e.le)),{key:t,g:n,ge:r,l:i,le:a}}function hb(e,t){return t>e.g&&t>=e.ge&&t`u`?Array:Uint32Array,_b=typeof Uint16Array>`u`?Array:Uint16Array,vb=typeof Int32Array>`u`?Array:Int32Array,yb=typeof Float64Array>`u`?Array:Float64Array,bb={float:yb,int:vb,ordinal:Array,number:Array,time:yb},xb;function Sb(e){return e>65535?gb:_b}function Cb(e){var t=e.constructor;return t===Array?e.slice():new t(e)}function wb(e,t,n,r,i){var a=bb[n||`float`];if(i){var o=e[t],s=o&&o.length;if(s!==r){for(var c=new a(r),l=0;lh[1]&&(h[1]=m)}return this._rawCount=this._count=s,{start:o,end:s}},e.prototype._initDataFromProvider=function(e,t,n){for(var r=this._provider,i=this._chunks,a=this._dimensions,o=a.length,s=this._rawExtent,c=U(a,function(e){return e.property}),l=0;lg[1]&&(g[1]=h)}}!r.persistent&&r.clean&&r.clean(),this._rawCount=this._count=t,this._extent=[]},e.prototype.count=function(){return this._count},e.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=a-1;else return a}return-1},e.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,r=this._count;if(n===Array){e=new n(r);for(var i=0;i=l&&g<=u||isNaN(g))&&(o[s++]=p),p++}f=!0}else if(i===2){for(var m=d[r[0]],_=d[r[1]],v=e[r[1]][0],y=e[r[1]][1],h=0;h=l&&g<=u||isNaN(g))&&(b>=v&&b<=y||isNaN(b))&&(o[s++]=p),p++}f=!0}}if(!f){if(i===1)for(var h=0;h=l&&g<=u||isNaN(g))&&(o[s++]=x)}else for(var h=0;he[w][1])&&(S=!1)}S&&(o[s++]=t.getRawIndex(h))}}return sg[1]&&(g[1]=h)}}}},e.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),r=n._chunks[e],i=this.count(),a=0,o=Math.floor(1/t),s=this.getRawIndex(0),c,l,u,d=new(Sb(this._rawCount))(Math.min((Math.ceil(i/o)+2)*2,i));d[a++]=s;for(var f=1;fc&&(c=l,u=v)}T>0&&To&&(m=o-l);for(var h=0;hp&&(p=g,f=l+h)}var _=this.getRawIndex(u),v=this.getRawIndex(f);ul-p&&(s=l-p,o.length=s);for(var m=0;mu[1]&&(u[1]=g),d[f++]=_}return i._count=f,i._indices=d,i._updateGetRawIdx(),i},e.prototype.each=function(e,t){if(this._count)for(var n=e.length,r=this._chunks,i=0,a=this.count();id&&(d=p))}return o[c]=[u,d]},e.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],r=this._chunks,i=0;i=0?this._indices[e]:-1},e.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},e.internalField=function(){function e(e,t,n,r){return db(e[r],this._dimensions[r])}xb={arrayRows:e,objectRows:function(e,t,n,r){return db(e[t],this._dimensions[r])},keyedColumns:e,original:function(e,t,n,r){var i=e&&(e.value==null?e:e.value);return db(i instanceof Array?i[r]:i,this._dimensions[r])},typedArray:function(e,t,n,r){return e[r]}}}(),e}(),Eb=xm(),Db={float:`f`,int:`i`,ordinal:`o`,number:`n`,time:`t`},Ob=function(){function e(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return e.prototype.isDimensionOmitted=function(){return this._dimOmitted},e.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||=jb(this.source))},e.prototype.getSourceDimensionIndex=function(e){return Y(this._dimNameMap.get(e),-1)},e.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},e.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=zy(this.source),n=!Mb(e),r=``,i=[],a=0,o=0;a30}var Nb=J,Pb=U,Fb=typeof Int32Array>`u`?Array:Int32Array,Ib=`e\0\0`,Lb=-1,Rb=[`hasItemOption`,`_nameList`,`_idList`,`_invertedIndicesMap`,`_dimSummary`,`userOutput`,`_rawData`,`_dimValueGetter`,`_nameDimIdx`,`_idDimIdx`,`_nameRepeatCount`],zb=[`_approximateExtent`],Bb,Vb,Hb,Ub,Wb,Gb,Kb,qb=function(){function e(e,t){this.type=`list`,this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=[`cloneShallow`,`downSample`,`minmaxDownSample`,`lttbDownSample`,`map`],this.CHANGABLE_METHODS=[`filterSelf`,`selectRange`],this.DOWNSAMPLE_METHODS=[`downSample`,`minmaxDownSample`,`lttbDownSample`];var n,r=!1;kb(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(r=!0,n=e),n||=[`x`,`y`];for(var i={},a=[],o={},s=!1,c={},l=0;l=t)){var n=this._store.getProvider();this._updateOrdinalMeta();var r=this._nameList,i=this._idList;if(n.getSource().sourceFormat===`original`&&!n.pure)for(var a=[],o=e;o0},e.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,r=n[e];r||=n[e]={};var i=r[t];return i??(i=this.getVisual(t),G(i)?i=i.slice():Nb(i)&&(i=V({},i)),r[t]=i),i},e.prototype.setItemVisual=function(e,t,n){var r=this._itemVisuals[e]||{};this._itemVisuals[e]=r,Nb(t)?V(r,t):r[t]=n},e.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},e.prototype.setLayout=function(e,t){Nb(e)?V(this._layout,e):this._layout[e]=t},e.prototype.getLayout=function(e){return this._layout[e]},e.prototype.getItemLayout=function(e){return this._itemLayouts[e]},e.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?V(this._itemLayouts[e]||{},t):t},e.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},e.prototype.setItemGraphicEl=function(e,t){Zm(this.hostModel&&this.hostModel.seriesIndex,this.dataType,e,t),this._graphicEls[e]=t},e.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},e.prototype.eachItemGraphicEl=function(e,t){H(this._graphicEls,function(n,r){n&&e&&e.call(t,n,r)})},e.prototype.cloneShallow=function(t){return t||=new e(this._schema?this._schema:Pb(this.dimensions,this._getDimInfo,this),this.hostModel),Wb(t,this),t._store=this._store,t},e.prototype.wrapMethod=function(e,t){var n=this[e];K(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var e=n.apply(this,arguments);return t.apply(this,[e].concat(go(arguments)))})},e.internalField=function(){Bb=function(e){var t=e._invertedIndicesMap;H(t,function(n,r){var i=e._dimInfos[r],a=i.ordinalMeta,o=e._store;if(a){n=t[r]=new Fb(a.categories.length);for(var s=0;s1&&(s+=`__ec__`+l),r[t]=s}}}(),e}();function Jb(e,t){Ay(e)||(e=My(e)),t||={};var n=t.coordDimensions||[],r=t.dimensionsDefine||e.dimensionsDefine||[],i=X(),a=[],o=Yb(e,n,r,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Mb(o),c=r===e.dimensionsDefine,l=c?jb(e):Ab(r),u=t.encodeDefine;!u&&t.encodeDefaulter&&(u=t.encodeDefaulter(e,o));for(var d=X(u),f=new vb(o),p=0;p0&&(e.name+=t-1)}),new Ob({source:e,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function Yb(e,t,n,r){var i=Math.max(e.dimensionsDetectedCount||1,t.length,n.length,r||0);return H(t,function(e){var t;J(e)&&(t=e.dimsDef)&&(i=Math.max(i,t.length))}),i}function Xb(e,t,n){if(n||t.hasKey(e)){for(var r=0;t.hasKey(e+r);)r++;e+=r}return t.set(e,!0),e}var Zb={},Qb={},$b=function(){function e(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return e.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Zb,!0),this._normalMasterList=n(Qb,!1);function n(n,r){var i=[];return H(n,function(n,r){var a=n.create(e,t);i=i.concat(a||[])}),i}},e.prototype.update=function(e,t){H(this._normalMasterList,function(n){n.update&&n.update(e,t)})},e.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},e.register=function(e,t){if(e===`matrix`||e===`calendar`){Zb[e]=t;return}Qb[e]=t},e.get=function(e){return Qb[e]||Zb[e]},e}();function ex(e){return!!Zb[e]}var tx=X();function nx(e){var t=e.getShallow(`coord`,!0),n=1;if(t==null){var r=tx.get(e.type);r&&r.getCoord2&&(n=2,t=r.getCoord2(e))}return{coord:t,from:n}}function rx(e,t){var n=e.getShallow(`coordinateSystem`),r=e.getShallow(`coordinateSystemUsage`,!0),i=0;if(n){var a=e.mainType===`series`;r??=a?`data`:`box`,r===`data`?(i=1,a||(i=0)):r===`box`&&(i=2,!a&&!ex(n)&&(i=0))}return{coordSysType:n,kind:i}}function ix(e){var t=e.targetModel,n=e.coordSysType,r=e.coordSysProvider,i=e.isDefaultDataCoordSys;e.allowNotFound;var a=rx(t,!0),o=a.kind,s=a.coordSysType;if(i&&o!==1&&(o=1,s=n),o===0||s!==n)return 0;var c=r(n,t);return c?(o===1?t.coordinateSystem=c:t.boxCoordinateSystem=c,o):0}var ax=function(){function e(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return e}();function ox(e){var t=e.get(`coordinateSystem`),n=new ax(t),r=sx[t];if(r)return r(e,n,n.axisMap,n.categoryAxisMap),n}var sx={cartesian2d:function(e,t,n,r){var i=e.getReferringComponents(`xAxis`,Tm).models[0],a=e.getReferringComponents(`yAxis`,Tm).models[0];t.coordSysDims=[`x`,`y`],n.set(`x`,i),n.set(`y`,a),cx(i)&&(r.set(`x`,i),t.firstCategoryDimIndex=0),cx(a)&&(r.set(`y`,a),t.firstCategoryDimIndex??=1)},singleAxis:function(e,t,n,r){var i=e.getReferringComponents(`singleAxis`,Tm).models[0];t.coordSysDims=[`single`],n.set(`single`,i),cx(i)&&(r.set(`single`,i),t.firstCategoryDimIndex=0)},polar:function(e,t,n,r){var i=e.getReferringComponents(`polar`,Tm).models[0],a=i.findAxisModel(`radiusAxis`),o=i.findAxisModel(`angleAxis`);t.coordSysDims=[`radius`,`angle`],n.set(`radius`,a),n.set(`angle`,o),cx(a)&&(r.set(`radius`,a),t.firstCategoryDimIndex=0),cx(o)&&(r.set(`angle`,o),t.firstCategoryDimIndex??=1)},geo:function(e,t,n,r){t.coordSysDims=[`lng`,`lat`]},parallel:function(e,t,n,r){var i=e.ecModel,a=i.getComponent(`parallel`,e.get(`parallelIndex`)),o=t.coordSysDims=a.dimensions.slice();H(a.parallelAxisIndex,function(e,a){var s=i.getComponent(`parallelAxis`,e),c=o[a];n.set(c,s),cx(s)&&(r.set(c,s),t.firstCategoryDimIndex??=a)})},matrix:function(e,t,n,r){var i=e.getReferringComponents(`matrix`,Tm).models[0];t.coordSysDims=[`x`,`y`];var a=i.getDimensionModel(`x`),o=i.getDimensionModel(`y`);n.set(`x`,a),n.set(`y`,o),r.set(`x`,a),r.set(`y`,o)}};function cx(e){return e.get(`type`)===`category`}function lx(e,t,n){n||={};var r=n.byIndex,i=n.stackedCoordDimension,a,o,s;ux(t)?a=t:(o=t.schema,a=o.dimensions,s=t.store);var c=!!(e&&e.get(`stack`)),l,u,d,f,p=!0;function m(e){return e.type!==`ordinal`&&e.type!==`time`}if(H(a,function(e,t){q(e)&&(a[t]=e={name:e}),m(e)||(p=!1)}),H(a,function(e,t){c&&!e.isExtraCoord&&(!r&&!l&&e.ordinalMeta&&(l=e),!u&&m(e)&&(!p||e.coordDim!==`x`&&e.coordDim!==`angle`)&&(!i||i===e.coordDim)&&(u=e))}),u&&!r&&!l&&(r=!0),u){d=`__\0ecstackresult_`+e.id,f=`__\0ecstackedover_`+e.id,l&&(l.createInvertedIndices=!0);var h=u.coordDim,g=u.type,_=0;H(a,function(e){e.coordDim===h&&_++});var v={name:d,coordDim:h,coordDimIndex:_,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},y={name:f,coordDim:f,coordDimIndex:_+1,type:g,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,g),y.storeDimIndex=s.ensureCalculationDimension(d,g)),o.appendCalculationDimension(v),o.appendCalculationDimension(y)):(a.push(v),a.push(y))}return{stackedDimension:u&&u.name,stackedByDimension:l&&l.name,isStackedByIndex:r,stackedOverDimension:f,stackResultDimension:d}}function ux(e){return!kb(e.schema)}function dx(e,t){return!!t&&t===e.getCalculationInfo(`stackedDimension`)}function fx(e,t){return dx(e,t)?e.getCalculationInfo(`stackResultDimension`):t}function px(e,t){var n=e.get(`coordinateSystem`),r=$b.get(n),i;return t&&t.coordSysDims&&(i=U(t.coordSysDims,function(e){var n={name:e},r=t.axisMap.get(e);return r&&(n.type=cb(r.get(`type`))),n})),i||=r&&(r.getDimensionsInfo?r.getDimensionsInfo():r.dimensions.slice())||[`x`,`y`],i}function mx(e,t,n){var r,i;return n&&H(e,function(e,a){var o=e.coordDim,s=n.categoryAxisMap.get(o);s&&(r??=a,e.ordinalMeta=s.getOrdinalMeta(),t&&(e.createInvertedIndices=!0)),e.otherDims.itemName!=null&&(i=!0)}),!i&&r!=null&&(e[r].otherDims.itemName=0),r}function hx(e,t,n){n||={};var r=t.getSourceManager(),i,a=!1;e?(a=!0,i=My(e)):(i=r.getSource(),a=i.sourceFormat===eh);var o=ox(t),s=px(t,o),c=n.useEncodeDefaulter,l=K(c)?c:c?ao(wy,s,t):null,u={coordDimensions:s,generateCoord:n.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:l,canOmitUnusedDimensions:!a},d=Jb(i,u),f=mx(d.dimensions,n.createInvertedIndices,o),p=a?null:r.getSharedDataStore(d),m=lx(t,{schema:d,store:p}),h=new qb(d,t);h.setCalculationInfo(m);var g=f!=null&&gx(i)?function(e,t,n,r){return r===f?n:this.defaultDimValueGetter(e,t,n,r)}:null;return h.hasItemOption=!1,h.initData(a?i:p,null,g),h}function gx(e){if(e.sourceFormat===`original`)return!G(rm(_x(e.data||[])))}function _x(e){for(var t=0;t=0&&n.push(e)}),n}}function Sx(e,t){return qa(qa({},e,!0),t,!0)}var Cx=Math.log(2);function Tx(e,t,n,r,i,a){var o=r+`-`+i,s=e.length;if(a.hasOwnProperty(o))return a[o];if(t===1){var c=Math.round(Math.log((1<>1)%2;s.cssText=[`position: absolute`,`visibility: hidden`,`padding: 0`,`margin: 0`,`border-width: 0`,`user-select: none`,`width:0`,`height:0`,r[c]+`:0`,i[l]+`:0`,r[1-c]+`:auto`,i[1-l]+`:auto`,``].join(`!important;`),e.appendChild(o),n.push(o)}return t.clearMarkers=function(){H(n,function(e){e.parentNode&&e.parentNode.removeChild(e)})},n}function Nx(e,t,n){for(var r=n?`invTrans`:`trans`,i=t[r],a=t.srcCoords,o=[],s=[],c=!0,l=0;l<4;l++){var u=e[l].getBoundingClientRect(),d=2*l,f=u.left,p=u.top;o.push(f,p),c=c&&a&&f===a[d]&&p===a[d+1],s.push(e[l].offsetLeft,e[l].offsetTop)}return c&&i?i:(t.srcCoords=o,t[r]=n?Ex(s,o):Ex(o,s))}function Px(e){return e.nodeName.toUpperCase()===`CANVAS`}var Fx=/([&<>"'])/g,Ix={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`};function Lx(e){return e==null?``:(e+``).replace(Fx,function(e,t){return Ix[t]})}var Rx={time:{month:[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`],monthAbbr:[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],dayOfWeek:[`Sunday`,`Monday`,`Tuesday`,`Wednesday`,`Thursday`,`Friday`,`Saturday`],dayOfWeekAbbr:[`Sun`,`Mon`,`Tue`,`Wed`,`Thu`,`Fri`,`Sat`]},legend:{selector:{all:`All`,inverse:`Inv`}},toolbox:{brush:{title:{rect:`Box Select`,polygon:`Lasso Select`,lineX:`Horizontally Select`,lineY:`Vertically Select`,keep:`Keep Selections`,clear:`Clear Selections`}},dataView:{title:`Data View`,lang:[`Data View`,`Close`,`Refresh`]},dataZoom:{title:{zoom:`Zoom`,back:`Zoom Reset`}},magicType:{title:{line:`Switch to Line Chart`,bar:`Switch to Bar Chart`,stack:`Stack`,tiled:`Tile`}},restore:{title:`Restore`},saveAsImage:{title:`Save as Image`,lang:[`Right Click to Save Image`]}},series:{typeNames:{pie:`Pie chart`,bar:`Bar chart`,line:`Line chart`,scatter:`Scatter plot`,effectScatter:`Ripple scatter plot`,radar:`Radar chart`,tree:`Tree`,treemap:`Treemap`,boxplot:`Boxplot`,candlestick:`Candlestick`,k:`K line chart`,heatmap:`Heat map`,map:`Map`,parallel:`Parallel coordinate map`,lines:`Line graph`,graph:`Relationship graph`,sankey:`Sankey diagram`,funnel:`Funnel chart`,gauge:`Gauge`,pictorialBar:`Pictorial bar`,themeRiver:`Theme River Map`,sunburst:`Sunburst`,custom:`Custom chart`,chart:`Chart`}},aria:{general:{withTitle:`This is a chart about "{title}"`,withoutTitle:`This is a chart`},series:{single:{prefix:``,withName:` with type {seriesType} named {seriesName}.`,withoutName:` with type {seriesType}.`},multiple:{prefix:`. It consists of {seriesCount} series count.`,withName:` The {seriesId} series is a {seriesType} representing {seriesName}.`,withoutName:` The {seriesId} series is a {seriesType}.`,separator:{middle:``,end:``}}},data:{allData:`The data is as follows: `,partialData:`The first {displayCnt} items are: `,withName:`the data for {name} is {value}`,withoutName:`{value}`,separator:{middle:`, `,end:`. `}}}},zx={time:{month:[`一月`,`二月`,`三月`,`四月`,`五月`,`六月`,`七月`,`八月`,`九月`,`十月`,`十一月`,`十二月`],monthAbbr:[`1月`,`2月`,`3月`,`4月`,`5月`,`6月`,`7月`,`8月`,`9月`,`10月`,`11月`,`12月`],dayOfWeek:[`星期日`,`星期一`,`星期二`,`星期三`,`星期四`,`星期五`,`星期六`],dayOfWeekAbbr:[`日`,`一`,`二`,`三`,`四`,`五`,`六`]},legend:{selector:{all:`全选`,inverse:`反选`}},toolbox:{brush:{title:{rect:`矩形选择`,polygon:`圈选`,lineX:`横向选择`,lineY:`纵向选择`,keep:`保持选择`,clear:`清除选择`}},dataView:{title:`数据视图`,lang:[`数据视图`,`关闭`,`刷新`]},dataZoom:{title:{zoom:`区域缩放`,back:`区域缩放还原`}},magicType:{title:{line:`切换为折线图`,bar:`切换为柱状图`,stack:`切换为堆叠`,tiled:`切换为平铺`}},restore:{title:`还原`},saveAsImage:{title:`保存为图片`,lang:[`右键另存为图片`]}},series:{typeNames:{pie:`饼图`,bar:`柱状图`,line:`折线图`,scatter:`散点图`,effectScatter:`涟漪散点图`,radar:`雷达图`,tree:`树图`,treemap:`矩形树图`,boxplot:`箱型图`,candlestick:`K线图`,k:`K线图`,heatmap:`热力图`,map:`地图`,parallel:`平行坐标图`,lines:`线图`,graph:`关系图`,sankey:`桑基图`,funnel:`漏斗图`,gauge:`仪表盘图`,pictorialBar:`象形柱图`,themeRiver:`主题河流图`,sunburst:`旭日图`,custom:`自定义图表`,chart:`图表`}},aria:{general:{withTitle:`这是一个关于“{title}”的图表。`,withoutTitle:`这是一个图表,`},series:{single:{prefix:``,withName:`图表类型是{seriesType},表示{seriesName}。`,withoutName:`图表类型是{seriesType}。`},multiple:{prefix:`它由{seriesCount}个图表系列组成。`,withName:`第{seriesId}个系列是一个表示{seriesName}的{seriesType},`,withoutName:`第{seriesId}个系列是一个{seriesType},`,separator:{middle:`;`,end:`。`}}},data:{allData:`其数据是——`,partialData:`其中,前{displayCnt}项是——`,withName:`{name}的数据是{value}`,withoutName:`{value}`,separator:{middle:`,`,end:``}}}},Bx=`ZH`,Vx=`EN`,Hx=Vx,Ux={},Wx={},Gx=No.domSupported?function(){return(document.documentElement.lang||navigator.language||navigator.browserLanguage||Hx).toUpperCase().indexOf(Bx)>-1?Bx:Hx}():Hx;function Kx(e,t){e=e.toUpperCase(),Wx[e]=new _y(t),Ux[e]=t}function qx(e){if(q(e)){var t=Ux[e.toUpperCase()]||{};return e===Bx||e===Vx?B(t):qa(B(t),B(Ux[Hx]),!1)}return qa(B(e),B(Ux[Hx]),!1)}function Jx(e){return Wx[e]}function Yx(){return Wx[Hx]}Kx(Vx,Rx),Kx(Bx,zx);var Xx=null;function Zx(){return Xx}function Qx(e,t){var n=Zx(),r=t.breakOption,i=t.breakParsed;return!i&&n&&(i=n.parseAxisBreakOption(r,e)),i}function $x(e){var t=e.brk;return t?t.breaks:[]}function eS(e){var t=e.brk;return t?t.hasBreaks():!1}var tS=1e3,nS=tS*60,rS=nS*60,iS=rS*24,aS=iS*365,oS={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},sS={year:`{yyyy}`,month:`{MMM}`,day:`{d}`,hour:`{HH}:{mm}`,minute:`{HH}:{mm}`,second:`{HH}:{mm}:{ss}`,millisecond:`{HH}:{mm}:{ss} {SSS}`},cS=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}`,lS=`{yyyy}-{MM}-{dd}`,uS={year:`{yyyy}`,month:`{yyyy}-{MM}`,day:lS,hour:lS+` `+sS.hour,minute:lS+` `+sS.minute,second:lS+` `+sS.second,millisecond:cS},dS=[`year`,`month`,`day`,`hour`,`minute`,`second`,`millisecond`],fS=[`year`,`half-year`,`quarter`,`month`,`week`,`half-week`,`day`,`half-day`,`quarter-day`,`hour`,`minute`,`second`,`millisecond`];function pS(e){return!q(e)&&!K(e)?mS(e):e}function mS(e){e||={};var t={},n=!0;return H(dS,function(t){n&&=e[t]==null}),H(dS,function(r,i){var a=e[r];t[r]={};for(var o=null,s=i;s>=0;s--){var c=dS[s],l=J(a)&&!G(a)?a[c]:a,u=void 0;G(l)?(u=l.slice(),o=u[0]||``):q(l)?(o=l,u=[o]):(o==null?o=sS[r]:oS[c].test(o)||(o=t[c][c][0]+` `+o),u=[o],n&&(u[1]=`{primary|`+o+`}`)),t[r][c]=u}}),t}function hS(e,t){return e+=``,`0000`.substr(0,t-e.length)+e}function gS(e){switch(e){case`half-year`:case`quarter`:return`month`;case`week`:case`half-week`:return`day`;case`half-day`:case`quarter-day`:return`hour`;default:return e}}function _S(e){return e===gS(e)}function vS(e){switch(e){case`year`:case`month`:return`day`;case`millisecond`:return`millisecond`;default:return`second`}}function yS(e,t,n,r){var i=Pp(e),a=i[CS(n)](),o=i[wS(n)]()+1,s=Math.floor((o-1)/3)+1,c=i[TS(n)](),l=i[`get`+(n?`UTC`:``)+`Day`](),u=i[ES(n)](),d=(u-1)%12+1,f=i[DS(n)](),p=i[OS(n)](),m=i[kS(n)](),h=u>=12?`pm`:`am`,g=h.toUpperCase(),_=(r instanceof _y?r:Jx(r||Gx)||Yx()).getModel(`time`),v=_.get(`month`),y=_.get(`monthAbbr`),b=_.get(`dayOfWeek`),x=_.get(`dayOfWeekAbbr`);return(t||``).replace(/{a}/g,h+``).replace(/{A}/g,g+``).replace(/{yyyy}/g,a+``).replace(/{yy}/g,hS(a%100+``,2)).replace(/{Q}/g,s+``).replace(/{MMMM}/g,v[o-1]).replace(/{MMM}/g,y[o-1]).replace(/{MM}/g,hS(o,2)).replace(/{M}/g,o+``).replace(/{dd}/g,hS(c,2)).replace(/{d}/g,c+``).replace(/{eeee}/g,b[l]).replace(/{ee}/g,x[l]).replace(/{e}/g,l+``).replace(/{HH}/g,hS(u,2)).replace(/{H}/g,u+``).replace(/{hh}/g,hS(d+``,2)).replace(/{h}/g,d+``).replace(/{mm}/g,hS(f,2)).replace(/{m}/g,f+``).replace(/{ss}/g,hS(p,2)).replace(/{s}/g,p+``).replace(/{SSS}/g,hS(m,3)).replace(/{S}/g,m+``)}function bS(e,t,n,r,i){var a=null;if(q(n))a=n;else if(K(n)){var o={time:e.time,level:e.time?e.time.level:0},s=Zx();s&&s.makeAxisLabelFormatterParamBreak(o,e.break),a=n(e.value,t,o)}else{var c=e.time;if(c){var l=n[c.lowerTimeUnit][c.upperTimeUnit];a=l[Math.min(c.level,l.length-1)]||``}else{var u=xS(e.value,i);a=n[u][u][0]}}return yS(new Date(e.value),a,i,r)}function xS(e,t){var n=Pp(e),r=n[wS(t)]()+1,i=n[TS(t)](),a=n[ES(t)](),o=n[DS(t)](),s=n[OS(t)](),c=n[kS(t)]()===0,l=c&&s===0,u=l&&o===0,d=u&&a===0,f=d&&i===1;return f&&r===1?`year`:f?`month`:d?`day`:u?`hour`:l?`minute`:c?`second`:`millisecond`}function SS(e,t,n){switch(t){case`year`:e[jS(n)](0);case`month`:e[MS(n)](1);case`day`:e[NS(n)](0);case`hour`:e[PS(n)](0);case`minute`:e[FS(n)](0);case`second`:e[IS(n)](0)}return e}function CS(e){return e?`getUTCFullYear`:`getFullYear`}function wS(e){return e?`getUTCMonth`:`getMonth`}function TS(e){return e?`getUTCDate`:`getDate`}function ES(e){return e?`getUTCHours`:`getHours`}function DS(e){return e?`getUTCMinutes`:`getMinutes`}function OS(e){return e?`getUTCSeconds`:`getSeconds`}function kS(e){return e?`getUTCMilliseconds`:`getMilliseconds`}function AS(e){return e?`setUTCFullYear`:`setFullYear`}function jS(e){return e?`setUTCMonth`:`setMonth`}function MS(e){return e?`setUTCDate`:`setDate`}function NS(e){return e?`setUTCHours`:`setHours`}function PS(e){return e?`setUTCMinutes`:`setMinutes`}function FS(e){return e?`setUTCSeconds`:`setSeconds`}function IS(e){return e?`setUTCMilliseconds`:`setMilliseconds`}function LS(e){if(!Bp(e))return q(e)?e:`-`;var t=(e+``).split(`.`);return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,`$1,`)+(t.length>1?`.`+t[1]:``)}function RS(e,t){return e=(e||``).toLowerCase().replace(/-(.)/g,function(e,t){return t.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var zS=_o;function BS(e,t,n){var r=`{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}`;function i(e){return e&&yo(e)?e:`-`}function a(e){return Wp(e)}var o=t===`time`,s=e instanceof Date;if(o||s){var c=o?Pp(e):e;if(!isNaN(+c))return yS(c,r,n);if(s)return`-`}if(t===`ordinal`)return oo(e)?i(e):so(e)&&a(e)?e+``:`-`;var l=zp(e);return a(l)?LS(l):oo(e)?i(e):typeof e==`boolean`?e+``:`-`}var VS=[`a`,`b`,`c`,`d`,`e`,`f`,`g`],HS=function(e,t){return`{`+e+(t??``)+`}`};function US(e,t,n){G(t)||(t=[t]);var r=t.length;if(!r)return``;for(var i=t[0].$vars||[],a=0;a`:``:{renderMode:a,content:`{`+(n.markerId||`markerX`)+`|} `,style:i===`subItem`?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}:``}function GS(e,t){return t||=`transparent`,q(e)?e:J(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var KS=H,qS=[`left`,`right`,`top`,`bottom`,`width`,`height`],JS=[[`width`,`left`,`right`],[`height`,`top`,`bottom`]];function YS(e,t,n,r,i){var a=0,o=0;r??=1/0,i??=1/0;var s=0;t.eachChild(function(c,l){var u=c.getBoundingRect(),d=t.childAt(l+1),f=d&&d.getBoundingRect(),p,m;if(e===`horizontal`){var h=u.width+(f?-f.x+u.x:0);p=a+h,p>r||c.newline?(a=0,p=h,o+=s+n,s=u.height):s=Math.max(s,u.height)}else{var g=u.height+(f?-f.y+u.y:0);m=o+g,m>i||c.newline?(a+=s+n,o=0,m=g,s=u.width):s=Math.max(s,u.width)}c.newline||(c.x=a,c.y=o,c.markRedraw(),e===`horizontal`?a=p+n:o=m+n)})}var XS=YS;ao(YS,`vertical`),ao(YS,`horizontal`);function ZS(e,t){return{left:e.getShallow(`left`,t),top:e.getShallow(`top`,t),right:e.getShallow(`right`,t),bottom:e.getShallow(`bottom`,t),width:e.getShallow(`width`,t),height:e.getShallow(`height`,t)}}function QS(e,t,n){n=zS(n||0);var r=t.width,i=t.height,a=yp(e.left,r),o=yp(e.top,i),s=yp(e.right,r),c=yp(e.bottom,i),l=yp(e.width,r),u=yp(e.height,i),d=n[2]+n[0],f=n[1]+n[3],p=e.aspect;switch(isNaN(l)&&(l=r-s-f-a),isNaN(u)&&(u=i-c-d-o),p!=null&&(isNaN(l)&&isNaN(u)&&(p>r/i?l=r*.8:u=i*.8),isNaN(l)&&(l=p*u),isNaN(u)&&(u=l/p)),isNaN(a)&&(a=r-s-l-f),isNaN(o)&&(o=i-c-u-d),e.left||e.right){case`center`:a=r/2-l/2-n[3];break;case`right`:a=r-l-f}switch(e.top||e.bottom){case`middle`:case`center`:o=i/2-u/2-n[0];break;case`bottom`:o=i-u-d}a||=0,o||=0,isNaN(l)&&(l=r-f-a-(s||0)),isNaN(u)&&(u=i-d-o-(c||0));var m=new Z((t.x||0)+a+n[3],(t.y||0)+o+n[0],l,u);return m.margin=n,m}function $S(e,t,n){var r=e.getShallow(`preserveAspect`,!0);if(!r)return t;var i=t.width/t.height;if(Math.abs(Math.atan(n)-Math.atan(i))<1e-9)return t;var a=e.getShallow(`preserveAspectAlign`,!0),o=e.getShallow(`preserveAspectVerticalAlign`,!0),s={width:t.width,height:t.height},c=r===`cover`;return i>n&&!c||i=u)return a;for(var d=0;d=0;o--)a=qa(a,n[o],!0);t.defaultOption=a}return t.defaultOption},t.prototype.getReferringComponents=function(e,t){var n=e+`Index`,r=e+`Id`;return Em(this.ecModel,e,{index:this.get(n,!0),id:this.get(r,!0)},t)},t.prototype.getBoxLayoutParams=function(){return ZS(this,!1)},t.prototype.getZLevelKey=function(){return``},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type=`component`,e.id=``,e.name=``,e.mainType=``,e.subType=``,e.componentIndex=0}(),t}(_y);Uo(cC,_y),Jo(cC),bx(cC),xx(cC,lC);function lC(e){var t=[];return H(cC.getClassesByMainType(e),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=U(t,function(e){return Ro(e).main}),e!==`dataset`&&Xa(t,`dataset`)<=0&&t.unshift(`dataset`),t}var uC=xm(),dC=xm(),fC=function(){function e(){}return e.prototype.getColorFromPalette=function(e,t,n){var r=em(this.get(`color`,!0)),i=this.get(`colorLayer`,!0);return hC(this,uC,r,i,e,t,n)},e.prototype.clearColorPalette=function(){gC(this,uC)},e}();function pC(e,t,n,r){return hC(e,dC,em(e.get([`aria`,`decal`,`decals`])),null,t,n,r)}function mC(e,t){for(var n=e.length,r=0;rt)return e[r];return e[n-1]}function hC(e,t,n,r,i,a,o){a||=e;var s=t(a),c=s.paletteIdx||0,l=s.paletteNameMap=s.paletteNameMap||{};if(l.hasOwnProperty(i))return l[i];var u=o==null||!r?n:mC(r,o);if(u||=n,u&&u.length){var d=u[c];return i&&(l[i]=d),s.paletteIdx=(c+1)%u.length,d}}function gC(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var _C=/\{@(.+?)\}/g,vC=function(){function e(){}return e.prototype.getDataParams=function(e,t){var n=this.getData(t),r=this.getRawValue(e,t),i=n.getRawIndex(e),a=n.getName(e),o=n.getRawDataItem(e),s=n.getItemVisual(e,`style`),c=s&&s[n.getItemVisual(e,`drawType`)||`fill`],l=s&&s.stroke,u=this.mainType,d=u===`series`,f=n.userOutput&&n.userOutput.get();return{componentType:u,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:d?this.subType:null,seriesIndex:this.seriesIndex,seriesId:d?this.id:null,seriesName:d?this.name:null,name:a,dataIndex:i,data:o,dataType:t,value:r,color:c,borderColor:l,dimensionNames:f?f.fullDimensions:null,encode:f?f.encode:null,$vars:[`seriesName`,`name`,`value`]}},e.prototype.getFormattedLabel=function(e,t,n,r,i,a){t||=`normal`;var o=this.getData(n),s=this.getDataParams(e,n);if(a&&(s.value=a.interpolatedValue),r!=null&&G(s.value)&&(s.value=s.value[r]),i||=o.getItemModel(e).get(t===`normal`?[`label`,`formatter`]:[t,`label`,`formatter`]),K(i))return s.status=t,s.dimensionIndex=r,i(s);if(q(i))return US(i,s).replace(_C,function(t,n){var r=n.length,i=n;i.charAt(0)===`[`&&i.charAt(r-1)===`]`&&(i=+i.slice(1,r-1));var s=ib(o,e,i);if(a&&G(a.interpolatedValue)){var c=o.getDimensionIndex(i);c>=0&&(s=a.interpolatedValue[c])}return s==null?``:s+``})},e.prototype.getRawValue=function(e,t){return ib(this.getData(t),e)},e.prototype.formatTooltip=function(e,t,n){},e}();function yC(e){var t,n;return J(e)?e.type&&(n=e):t=e,{text:t,frag:n}}function bC(e){return new xC(e)}var xC=function(){function e(e){e||={},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return e.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var r=this.context;r.data=r.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var a=l(this._modBy),o=this._modDataCount||0,s=l(e&&e.modBy),c=e&&e.modDataCount||0;(a!==s||o!==c)&&(i=`reset`);function l(e){return!(e>=1)&&(e=1),e}var u;(this._dirty||i===`reset`)&&(this._dirty=!1,u=this._doReset(n)),this._modBy=s,this._modDataCount=c;var d=e&&e.step;if(this._dueEnd=t?t._outputDueEnd:this._count?this._count(this.context):1/0,this._progress){var f=this._dueIndex,p=Math.min(d==null?1/0:this._dueIndex+d,this._dueEnd);if(!n&&(u||f1&&r>0?s:o}};return a;function o(){return t=e?null:a9e10&&(this._versionSignBase=0)},e.prototype._getVersionSign=function(){return this._sourceHost.uid+`_`+this._versionSignBase},e.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},e.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,r,i;if(FC(e)){var a=e,o=void 0,s=void 0,c=void 0;if(n){var l=t[0];l.prepareSource(),c=l.getSource(),o=c.data,s=c.sourceFormat,i=[l._getVersionSign()]}else o=a.get(`data`,!0),s=lo(o)?ih:eh,i=[];var u=this._getSourceMetaRawOption()||{},d=c&&c.metaRawOption||{},f=Y(u.seriesLayoutBy,d.seriesLayoutBy)||null,p=Y(u.sourceHeader,d.sourceHeader),m=Y(u.dimensions,d.dimensions);r=f!==d.seriesLayoutBy||!!p!=!!d.sourceHeader||m?[jy(o,{seriesLayoutBy:f,sourceHeader:p,dimensions:m},s)]:[]}else{var h=e;if(n){var g=this._applyTransform(t);r=g.sourceList,i=g.upstreamSignList}else r=[jy(h.get(`source`,!0),this._getSourceMetaRawOption(),null)],i=[]}this._setLocalSource(r,i)},e.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get(`transform`,!0),r=t.get(`fromTransformResult`,!0);r!=null&&e.length!==1&&IC(``);var i,a=[],o=[];return H(e,function(e){e.prepareSource();var t=e.getSource(r||0);r!=null&&!t&&IC(``),a.push(t),o.push(e._getVersionSign())}),n?i=jC(n,a,{datasetIndex:t.componentIndex}):r!=null&&(i=[Ny(a[0])]),{sourceList:i,upstreamSignList:o}},e.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||n>0&&!e.noHeader;return H(e.blocks,function(e){var n=GC(e);n>=t&&(t=n+ +(r&&(!n||UC(e)&&!e.noHeader)))}),t}return 0}function KC(e,t,n,r){var i=t.noHeader,a=YC(GC(t)),o=[],s=t.blocks||[];ho(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(Eo(l,c)){var u=new ub(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}H(s,function(n,i){var s=t.valueFormatter,c=WC(n)(s?V(V({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):XC(r,o.join(``),i?n:a.html);if(i)return d;var f=LS(t.header,`ordinal`,e.useUTC),p=zC(r,e.renderMode).nameStyle,m=RC(r);return e.renderMode===`richText`?$C(e,f,p)+a.richText+d:XC(r,`
`+Px(f)+`
`+d,n)}function qC(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],U(e,function(e,t){return LS(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:LS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=zC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:$C(e,f,v))+(o?``:ew(e,m,h,g,y)):XC(r,(s?``:d)+(a?``:ZC(f,!s,v))+(o?``:QC(m,h,g,y)),n)}}function JC(e,t,n,r,i,a){if(e)return WC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function YC(e){return{html:BC[e],richText:VC[e]}}function XC(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=RC(e);return`
`+t+r+`
`}function ZC(e,t,n){var r=t?`margin-left:2px`:``;return``+Px(e)+``}function QC(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+U(e,function(e){return Px(e)}).join(`  `)+``}function $C(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function ew(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function tw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return HS(n)}function nw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var rw=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Rp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=VS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?H(t,function(e){return V(n,e)}):V(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function iw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=tw(t,n),u,d,f,p;if(o>1||c&&!o){var m=aw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=tb(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=fm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return HC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[HC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!go(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function aw(e,t,n,r,i){var a=t.getData(),o=Za(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?H(r,function(e){u(tb(a,n,e),e)}):H(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(HC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var ow=vm();function sw(e,t){return e.getName(t)||e.getId(t)}var cw=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=_C({count:dw,reset:fw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(ow(this).sourceManager=new jC(this)).prepareSource();var r=this.getInitialData(e,n);mw(r,this),this.dataTask.context.data=r,ow(this).dataBeforeProcessed=r,lw(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=eC(this),r=n?nC(e):{},i=this.subType;aC.hasClass(i)&&(i+=`Series`),Wa(e,t.getTheme().get(this.subType)),Wa(e,this.getDefaultOption()),Qp(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&tC(e,r,n)},t.prototype.mergeOption=function(e,t){e=Wa(this.option,e,!0),this.fillDataTextStyle(e.data);var n=eC(this);n&&tC(this.option,e,n);var r=ow(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);mw(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,ow(this).dataBeforeProcessed=i,lw(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!oo(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return iw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(Ao.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=lC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[sw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return aC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(aC);Ya(cw,hC),Ya(cw,lC),Bo(cw,aC);function lw(e){var t=e.name;fm(e)||(e.name=uw(e)||t)}function uw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return H(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function dw(e){return e.model.getRawData().count()}function fw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),pw}function pw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function mw(e,t){H(wo(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,no(hw,t))})}function hw(e,t){var n=gw(e);return n&&n.setOutputEnd((t||this).count()),t}function gw(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var _w=Sf.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),vw={line:h_,rect:If,roundRect:If,square:If,circle:zg,diamond:Sf.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Sf.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Sf.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:_w},yw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},bw={};H(vw,function(e,t){bw[t]=new e});var xw=Sf.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=pc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=bw[r];i||=(r=`rect`,bw[r]),yw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Sw(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Cw(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?rv(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?nv(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new xw({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Sw,a&&c.setColor(a),c}function ww(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Tw(e,t){if(e!=null)return G(e)||(e=[e,e]),[gp(e[0],t[0])||0,gp(Y(e[1],e[0]),t[1])||0]}var Ew=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return fx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Lg,n=Cw(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Cw(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(cw);function Dw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=tb(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var kw=function(e){z(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Cw(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Aw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){zh(this.childAt(0))},t.prototype.downplay=function(){Bh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):B_(f,p,o,n),K_(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,V_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Gv(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Tw(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof Of){var S=a.style;a.useStyle(V({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(V({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;Wv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Dw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),ig(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=qm(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&U_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();U_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return ww(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Lg);function Aw(e,t){this.parent.drift(e,t)}function jw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Mw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Nw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Gv(t),cursorStyle:t.get(`cursor`)}}function Pw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Fw=function(){function e(e){this.group=new Lg,this._SymbolCtor=e||kw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Mw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Nw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);jw(e,i,r,t)&&Pw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!jw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):B_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Rw(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function zw(e,t){return!isFinite(e)||!isFinite(t)}var Bw=typeof Float32Array<`u`?Float32Array:void 0,Vw=typeof Float64Array<`u`?Float64Array:void 0;function Hw(e){return Uw({ctor:Bw},e).arr}function Uw(e,t){var n=e.arr,r=e.ctor;if(t>Dp&&(t=Dp),!n||e.typed&&n.length=i||h<0)break;if(zw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||zw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var ne=D>0?1:-1;p=_,m=v-ne*P*o,O=_,k=v+ne*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Kw(O,qw(S,_)),k=Kw(k,qw(C,v)),O=qw(O,Kw(S,_)),k=qw(k,Kw(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=Kw(p,qw(l,_)),m=Kw(m,qw(u,v)),p=qw(p,Kw(l,_)),m=qw(m,Kw(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var Yw=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),Xw=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Yw},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&zw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?cl(i,u,f,m,e,s):cl(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?ol(a,d,p,h,b):ol(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Sf),Zw=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Yw),Qw=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new Zw},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&zw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){ET(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),ET(r,e,t,n)},freeze:function(){}};function ET(e,t,n,r){Fm(n,r)&&(e[t][0]=n,e[t][1]=r)}function DT(e){return OT(e)||AT(e)}function OT(e){return e.type===`interval`}function kT(e){return e.type===`time`}function AT(e){return e.type===`log`}function jT(e){return e.type===`ordinal`}function MT(e){var t=Np(e),n=up(10,t),r=sp(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,xp(r*n,-t)}function NT(e){return Cp(e)+2}function PT(e,t){return dp(e)/dp(t)}function FT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var BT=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,vT(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new mT({}),G(i)&&(i=new mT({categories:U(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=_T(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,yT(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=sp(e),e},t.prototype.getTicks=function(){var e=[];return zT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=ip(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=ip(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=xp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=xp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?xp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return VT(this,e,Xx(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Cp(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),PS(xp(e.value,n,!0))},t.type=`interval`,t}(fT);fT.registerClass(HT);var UT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function JT(e){var t=30*tS;return e/=t,e>6?6:e>3?3:e>2?2:1}function YT(e){return e/=eS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function XT(e,t){return e/=t?$x:Qx,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function ZT(e){return ap(Pp(e,!0),1)}function QT(e,t,n){var r=Math.max(0,qa(cS,t)-1);return yS(new Date(e),cS[r],n).getTime()}function $T(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function eE(e,t,n,r,i,a){var o=lS,s=0;function c(e,t,n,i,o,c,l){for(var u=$T(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!KT(pS(e),r[0],r[1],n)){s&&(i=[{value:QT(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=Qa(U(u,function(e){return Qa(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=GT.length,l=Math.min(UT(GT,a,0,c),c-1),u=GT[l][1],d=GT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};fT.registerClass(WT);var nE=0,rE=1,iE=2,aE=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=HT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[nE]=i[rE]=a[nE]=a[rE]=NaN,vT(r,t.mapperMethods);var s=Jx(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},iE,l),r.powStub=new HT({breakParsed:l.original}),r.intervalStub=new HT({breakParsed:l.transformed}),yT(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Jx(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return U(i.getTicks(e||{}),function(e){var i=e.value,o=FT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,Xx(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return VT(this,e,Xx(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(PT(e,this.base))},scale:function(e){return FT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=PT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return oE.depth=n,sE.lookup=this._lookup,FT(n===2?e:this.intervalStub.transformOut(e,oE),this.base,sE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Fm(t,n)||t<=0||n<=0)){var r=cE,i=cE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[nE]=t,r[rE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[nE]=PT(t,o),i[rE]=PT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Fm(t[0],t[1])&&Vp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(fT);fT.registerClass(aE);var oE={},sE={},cE=[],lE={value:1,category:1,time:1,log:1},uE=vm();function dE(e){var t=e.get(`type`);return(t==null||!Eo(lE,t)&&!fT.getClass(t))&&(t=`value`),t}function fE(e,t,n){var r=Jx(),i;switch(r&&(i=CE(e,t,n)),t){case`category`:return new BT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:km()});case`time`:return new WT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new aE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new HT({breakOption:i});default:return new((fT.getClass(t))||HT)({})}}function pE(e,t,n){var r=n?xT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Fm(i,a)?i===t||a===t?2:it?1:3:3}function mE(e){uE(e).noOnMyZero=!0}function hE(e){return uE(e).noOnMyZero}function gE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=uS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(_E(e,n),n.value-e.scale.getExtent()[0],null)};var r=Jx();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(_E(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function _E(e,t){var n=e.scale;return jT(n)?n.getLabel(t):t.value}function vE(e){return e.get(`interval`)??`auto`}function yE(e){return e.type===`category`&&vE(e.getLabelModel())===0}function bE(e,t){var n={};return H(e.mapDimensionsAll(t),function(t){n[lx(e,t)]=!0}),eo(n)}function xE(e){return e===`middle`||e===`center`}function SE(e){return e.getShallow(`show`)}function CE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Jx()||!n||!wE(t)?void 0:r}function wE(e){return e!==`category`}function TE(e,t,n,r,i,a){var o=AT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=LT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function EE(e,t){return jT(e)?e.getRawOrdinalNumber(t.value):t.value}function DE(e,t){return jT(e)&&!!t.get(`boundaryGap`)}function OE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function FE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=U(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=PE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;H(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new w_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function IE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&LE(a,t))){var o=t.mapDimension(a.dim),s={};return H(a.getViewLabels(),function(e){e.tick.offInterval||(s[EE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function LE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function RE(e){for(var t=e.length/2;t>0&&zw(e[t*2-2],e[t*2-1]);t--);return t-1}function zE(e,t){return[e[t*2],e[t*2+1]]}function BE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function VE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}qm(f).seriesIndex=e.seriesIndex,ig(f,k,A,j);var N=jE(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(Ka(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=jE(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),cg(p,e,`areaStyle`),qm(p).seriesIndex=e.seriesIndex,ig(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||re===!0||re===`line`,oe=ie===!0||re===!0||re===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){qm(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=_m(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(zw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new kw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else nT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=_m(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else nT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Ah(this._polyline,e),t&&Ah(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new Xw({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new Qw({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(VE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Vf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=RE(o);c>=0&&(Wv(a,Gv(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Dw(i,e):Ow(i,n)},enableTextSetter:!0},UE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=BE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=zE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=Om(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=zE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=ty(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Gw(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=NE(u.stackedOnCurrent,u.current,n,i,o),d=NE(u.current,null,n,i,o),m=NE(u.stackedOnNext,u.next,n,i,o),p=NE(u.next,null,n,i,o)),AE(d,p)>3e3||c&&AE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),B_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),B_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=KE[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,qE))}}}}}function YE(e){e.registerChartView(WE),e.registerSeriesModel(Ew),e.registerLayout(GE(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JE(`line`))}var XE=vm(),ZE=vm(),QE={estimate:1,determine:2};function $E(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function eD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:U(nD(n,r),function(t,n){return{formattedLabel:gE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?rD(e,t):oD(e)}function tD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:nD(i,r)}:e.type===`category`?aD(e,t):{ticks:r.getTicks(n)}}function nD(e,t){var n=t.getExtent(),r=[];return H(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Bm(r,Hm,null),Sp(r),U(r,function(e){return{value:e}})}function rD(e,t){var n=e.getLabelModel(),r=iD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function iD(e,t,n){var r=cD(e),i=vE(t),a=n.kind===QE.estimate;if(!a){var o=uD(r,i);if(o)return o}var s,c;K(i)?s=_D(e,i,!1):(c=i===`auto`?fD(e,n):i,s=_D(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return dD(r,i,l),!0}):dD(r,i,l),l}function aD(e,t){var n=sD(e),r=vE(t),i=uD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=_D(e,r,!0);else if(r===`auto`){var s=iD(e,e.getLabelModel(),$E(QE.determine));o=s.labelCategoryInterval,a=U(s.labels,function(e){return e.tick})}else o=r,a=_D(e,o,!0);return dD(n,r,{ticks:a,tickCategoryInterval:o})}function oD(e){var t=e.scale.getTicks(),n=gE(e);return{labels:U(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var sD=lD(`axisTick`),cD=lD(`axisLabel`);function lD(e){return function(t){return ZE(t)[e]||(ZE(t)[e]={list:[]})}}function uD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=cc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===QE.estimate?(t.out.noPxChangeTryDetermine.push(W(mD,null,e,S,c)),S):hD(e,S,c)??S}function mD(e,t,n){return hD(e,t,n)==null}function hD(e,t,n){var r=XE(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function gD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function _D(e,t,n){var r=gE(e),i=e.scale,a=[],o=K(t);return zT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var vD=vm();function yD(e){vD(e).prepare={}}function bD(e){vD(e).fullUpdate={}}function xD(e){return vD(e).prepare}function SD(e){return vD(e).fullUpdate}var CD=Rm(),wD=vm(),TD=vm();function ED(e,t){var n=e.model,r=wD(SD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function DD(e,t){return AD(ED(e,t))}function OD(e,t){var n=[];return kD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Vp(n)&&n>0&&Vp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*UD,e.w2=e.w*n/r)}var qD=[0,1],JD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),hp(e,qD,YD(this),t)},e.prototype.coordToData=function(e,t){var n=hp(e,YD(this),qD,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=U(tD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(EE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=XD(this,n,r);return U(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(jT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),U(this.scale.getMinorTicks(e),function(e){return U(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=$E(QE.determine),eD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return WD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=$E(QE.determine),pD(this,e)},e}();function YD(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function XD(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=WD(e).w;if(!i)return!1;H(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var ZD=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(JD),QD=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],$D=1,eO=2,tO=$D|eO;function nO(e,t,n){n||=tO,t?e.dirty|=n:e.dirty&=~n}function rO(e,t){return t||=tO,e.dirty==null||!!(e.dirty&t)}function iO(e){if(e)return rO(e)&&aO(e,e.label,e),e}function aO(e,t,n){var r=t.getComputedTransform();e.transform=Mv(e.transform,r);var i=e.localRect=jv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=ry.textMargin);for(var d=0;d<4;d++)oO[d]=u===ry.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===ry.textMargin&&Cv(i,oO,!1,!1);var f=e.rect=jv(e.rect,i);return r&&f.applyTransform(r),u===ry.minMargin&&Cv(f,oO,!1,!1),e.axisAligned=kv(r),(e.label=e.label||{}).ignore=t.ignore,nO(e,!1),nO(e,!0,eO),e}var oO=[0,0,0,0];function sO(e,t,n){return e.transform=Mv(e.transform,n),e.localRect=jv(e.localRect,t),e.rect=jv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=kv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function cO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function lO(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var CO=rs(),wO=new Z(0,0,0,0),TO=function(e,t,n,r,i,a){if(xE(e.nameLocation)){var o=a.stOccupiedRect;o&&EO(sO({},o,a.transGroup.transform),r,i)}else DO(a.labelInfoList,a.dirVec,r,i)};function EO(e,t,n){var r=new ks;fO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&cO(t,r)}function DO(e,t,n,r){for(var i=ks.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):kp(r-gO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),kO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],AO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(Es(u,u,l),Es(d,d,l));var p=V({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&Zx(r.axis.scale))mO().buildAxisBreakLine(r,i,a,m);else{var h=new h_(V({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));sv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||io(_))&&(_=[_,_]);var v=Tw(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];H([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Cw(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){zO(t,i,s)&&jO(e,t,n,r,i,a,o,QE.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){zO(t,i,s)&&jO(e,t,n,r,i,a,o,QE.determine);var c=LO(e,i,a,r);PO(e,t.labelLayoutList,c),RO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(KO(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new ks(0,0),_=new ks(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=rs();_.transform(cs(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*gO/180);var b,x;xE(u)?b=OO.innerTextLayout(e.rotation,y??e.rotation,d):(b=MO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=uo(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Vf({x:g.x,y:g.y,rotation:b.rotation,silent:OO.isLabelSilent(r),style:Kv(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(Ev({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=OO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,qm(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=iO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:xE(u)?_O[E]:vO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function jO(e,t,n,r,i,a,o,s){VO(t)||BO(e,t,i,s,r,o);var c=t.labelLayoutList;UO(e,r,c,a),JO(r,e.rotation,c);var l=e.optionHideOverlap;NO(r,c,l),l&&dO(Qa(c,function(e){return e&&!e.label.ignore})),SO(e,n,r,c)}function MO(e,t,n,r){var i=Op(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return kp(i-gO/2)?(o=c?`bottom`:`top`,a=`center`):kp(i-gO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=igO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function NO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(yE(r))return;function a(e,a,o){var s=iO(t[a]),c=iO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=yO(s.label).labelInfo.tick;if(kT(l)&&u.notNice||jT(l)&&u.offInterval){FO(s.label);return}}if(e===!1||s.suggestIgnore){FO(s.label);return}if(c.suggestIgnore){FO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=lO({marginForce:f},s),c=lO({marginForce:f},c)}fO(s,c,null,{touchThreshold:d})&&FO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function PO(e,t,n){e.showMinorTicks||H(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=ik(e,t.get(`startValue`,!0)),x=b!=null;!Vp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Vp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),rk(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),rk(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function rk(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Lm(t))}function ik(e,t){return t==null?null:lo(t)?NaN:e.parse(t)}function ak(e,t){var n;if(jT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[ok(n[0]),ok(n[1])]}function ok(e){return fc(typeof e==`boolean`?0:e,1)||0}function sk(e){var t=ek(e.scale);return t.extent||=km(),t}function ck(e,t){sk(e).dimIdxInCoord=t.get(e.dim)}function lk(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||uk(n,e,i,r,t)}function uk(e,t,n,r,i){var a=sk(t),o=a.extent,s=!1;jD(t,function(r){if(r.boxCoordinateSystem){var i=$b(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Am(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;H(bE(u,n),function(e){Nm(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=gk(e,t,r);fk(e,new nk(e,r,o,s,c),i),a.extent=null}function dk(e,t){var n=e.scale;fk(n,new nk(n,e.model,t,!1,!1),tk)}function fk(e,t,n){e.rawExtentInfo=t,t.from=n}function pk(e,t){mk.set(e,t)}var mk=X();function hk(e,t,n,r,i){e.rawExtentInfo||dk({scale:e,model:t},i||km());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function gk(e,t,n){var r=DE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return FD(t,function(e){a=!!mk.get(e)||a}),a}function _k(e,t,n,r){if(n.ctnShp){var i;if(FD(e,function(t){var n=mk.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],jm(i,a[0]),Mm(i,a[1]),mE(e))}}),i){var a=t.getExtent();if(jT(t))e.onBand||t.setExtent2(1,ip(a[0],a[0]+i[0]),ap(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=ip(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=ap(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function vk(){LD(`liPosMinGap`,yk)}function yk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=db(u);function f(n){ND(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Uw(bk,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var bk=Uw({ctor:Vw},50);function xk(e){return function(t,n){var r=WD(t,{fromStat:{key:e}});if(Vp(r.w2))return[-r.w2/2,r.w2/2]}}function Sk(e,t){return e+`|&`+t}function Ck(e){return vk(),{liPosMinGap:!jT(e.scale)}}function wk(e,t,n,r){VD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Ck})}function Tk(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var Ek={left:0,right:0,top:0,bottom:0},Dk=[`25%`,`25%`],Ok=`cartesian2d`,kk=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=nC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&tC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&tC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:Ek,outerBoundsContain:`all`,outerBoundsClampWidth:Dk[0],outerBoundsClampHeight:Dk[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(aC),Ak=Rm(),jk=`__ec_stack_`;function Mk(e){return e.get(`stack`)||jk+e.seriesIndex}function Nk(e,t){var n=Pk(e,t);return n.columnMap=Fk(n),n}function Pk(e,t){var n=Sk(t,Ok),r=[],i=WD(e,{fromStat:{key:n},min:1});return MD(e,n,function(e){r.push({barWidth:gp(e.get(`barWidth`),i.w),barMaxWidth:gp(e.get(`barMaxWidth`),i.w),barMinWidth:gp(e.get(`barMinWidth`)||(Rk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Mk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Fk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};H(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;Eo(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=ip(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=ap(35-o.length*4,15)+`%`;var c=gp(i,t),l=gp(a,1),u=(n-c)/(r+(r-1)*l);u=ap(u,0),H(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=ip(o,i)),a&&(o=ap(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=ap(u,0);var d=0,f;H(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return H(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function Ik(e){return{seriesType:e,overallReset:function(t){var n=Sk(e,Ok);PD(t,n,function(t){var r=Nk(t,e);MD(t,n,function(e){var t=r.columnMap[Mk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Lk(e){return{seriesType:e,plan:$w(),reset:function(e){if(XO(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=cx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Tk(i))),p=Rk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Hw(r*3),c=p&&s&&Hw(r*3),l=p&&Hw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,op(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(cw);cw.registerClass(Vk);var Hk=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return fx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=Wm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=yx(Vk.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Vk),Uk=`\0__throttleOriginMethod`,Wk=`\0__throttleRate`,Gk=`\0__throttleType`;function Kk(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function qk(e,t,n,r){var i=e[t];if(i){var a=i[Uk]||i,o=i[Gk];if(i[Wk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Kk(a,n,r===`debounce`),i[Uk]=a,i[Gk]=r,i[Wk]=n}return i}}function Jk(e,t){var n=e[t];n&&n[Uk]&&(n.clear&&n.clear(),e[t]=n[Uk])}var Yk=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),Xk=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Yk},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){G_(t,e,qm(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(nT),aA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=nA(t.x,e.x),s=rA(t.x+t.width,i),c=nA(t.y,e.y),l=rA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=rA(t.r,e.r),a=nA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},oA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new If({shape:V({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?Xk:i_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=Zk(hA(i),{isRoundCap:l===Xk}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?B_:V_)(u,{shape:p},a)}return u}};function sA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function cA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?B_:V_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?B_:V_)(n,{shape:l},u,i)}function lA(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function mA(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function hA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function gA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;V(u,tA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?TA(i,a.coordinateSystem):EA(i,a.coordinateSystem),p=Gv(r);Wv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Dw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,Qk(e,h===`outside`?f:h,hA(o),r.get([`label`,`rotate`]))}ny(m,p,a.getRawValue(n),function(e){return Ow(t,e)});var g=r.getModel([`emphasis`]);ig(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),cg(e,r),mA(i)&&(e.style.fill=`none`,e.style.stroke=`none`,H(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function _A(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var vA=function(){function e(){}return e}(),yA=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new vA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function SA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function CA(e,t,n){if(dT(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function wA(e,t,n){return new(e.type===`polar`?i_:If)({shape:CA(t,n,e),silent:!0,z2:0})}function TA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function EA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function DA(e){e.registerChartView(iA),e.registerSeriesModel(Hk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,Ik(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Lk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,JE(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Bk(e)}function OA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),jA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),MA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new jA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new jA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new jA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new jA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new jA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new jA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),NA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,PA=[],FA=Ao.browser.firefox&&+Ao.browser.version.split(`.`)[0]<39;function IA(e,t,n,r){return n||={},r?LA(e,t,n):FA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?LA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function LA(e,t,n){if(Ao.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(jx(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(Ox(PA,e,r,i)){n.zrX=PA[0],n.zrY=PA[1];return}}n.zrX=n.zrY=0}function RA(e){return e||window.event}function zA(e,t,n){if(t=RA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&IA(e,i,t,n)}else{IA(e,t,t,n);var a=BA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&NA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function BA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function VA(e,t,n,r){e.addEventListener(t,n,r)}function HA(e,t,n,r){e.removeEventListener(t,n,r)}var UA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function WA(e){return e.which===2||e.which===3}var GA=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=KA(r)/KA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=qA(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},YA=`silent`;function XA(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ZA}}function ZA(){UA(this.event)}var QA=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Ru),$A=function(){function e(e,t){this.x=e,this.y=t}return e}(),ej=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],tj=new Z(0,0,0,0),nj=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new $A(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new QA,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new MA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(H(ej,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=aj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new $A(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new $A(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=XA(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new $A(e,t);if(ij(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(tj.copy(u.getBoundingRect()),u.transform&&tj.applyTransform(u.transform),tj.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function rj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||YA}return!1}function ij(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=rj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==YA)){t.target=o;break}}}function aj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var oj=32,sj=7;function cj(e){for(var t=0;e>=oj;)t|=e&1,e>>=1;return e+t}function lj(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function uj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function fj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function pj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function mj(e,t){var n=sj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=sj||m>=sj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-fj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=sj||g>=sj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),dj(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var gj=!1;function _j(){gj||(gj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function vj(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var yj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=vj}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),bj=Ao.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function xj(){return new Date().getTime()}var Sj=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=xj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(bj(t),!e._paused&&e.update())}bj(t)},t.prototype.start=function(){this._running||(this._time=xj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=xj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=xj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Lu(e,t.loop);return this.addAnimator(n),n},t}(Ru),Cj=300,wj=Ao.domSupported,Tj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:U(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),Ej={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Dj=!1;function Oj(e){var t=e.pointerType;return t===`pen`||t===`touch`}function kj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Aj(e){e&&(e.zrByTouch=!0)}function jj(e,t){return zA(e.dom,new Nj(e,t),!0)}function Mj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Nj=function(){function e(e,t){this.stopPropagation=Do,this.stopImmediatePropagation=Do,this.preventDefault=Do,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Pj={mousedown:function(e){e=zA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=zA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=zA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=zA(this.dom,e);var t=e.toElement||e.relatedTarget;Mj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Dj=!0,e=zA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Dj||(e=zA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=zA(this.dom,e),Aj(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Pj.mousemove.call(this,e),Pj.mousedown.call(this,e)},touchmove:function(e){e=zA(this.dom,e),Aj(e),this.handler.processGesture(e,`change`),Pj.mousemove.call(this,e)},touchend:function(e){e=zA(this.dom,e),Aj(e),this.handler.processGesture(e,`end`),Pj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!pm(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[cM],e},t.prototype.setTheme=function(e){this._theme=new my(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function xM(e,t){return e.join(`,`)===t.join(`,`)}var SM=H,CM=J,wM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function TM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=wM.length;n0?e[n-1].seriesModel:null)}),JM(e))})}function JM(e){H(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=Ep(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var YM=function(){function e(){this.group=new Lg,this.uid=gx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Ro(YM),Go(YM);var XM=vm(),ZM={itemStyle:Ko(dy,!0),lineStyle:Ko(cy,!0)},QM={lineStyle:`stroke`,itemStyle:`fill`};function $M(e,t){return e.visualStyleMapper||ZM[t]||(console.warn(`Unknown style type '`+t+`'.`),ZM.itemStyle)}function eN(e,t){return e.visualDrawType||QM[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var tN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=$M(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=eN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=V({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},nN=new my,rN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=$M(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){nN.option=n[r];var o=i(nN);V(e.ensureUniqueItemVisual(t,`style`),o),nN.option.decal&&(e.setItemVisual(t,`decal`,nN.option.decal),nN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},iN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();XM(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=XM(e).scope,a=eN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},aN=Math.PI;function oN(e,t){t||={},Ka(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Lg,r=new If({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Vf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new If({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new x_({shape:{startAngle:-aN/2,endAngle:-aN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:aN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:aN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var sN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):Wm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;H(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});ho(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;H(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||_C({plan:fN,reset:pN,count:gN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||_C({reset:cN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;ho(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):H(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,_C({reset:lN,onDirty:dN})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:_N(e)}),e.uid=gx(`stageHandler`),t&&(e.visualType=t),e},e}();function cN(e){e.overallReset(e.ecModel,e.api,e.payload)}function lN(e){return e.dirtyOnOverallProgress&&uN}function uN(){this.agent.dirty(),this.getDownstream().dirty()}function dN(){this.agent&&this.agent.dirty()}function fN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function pN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=Zp(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?U(t,function(e,t){return hN(t)}):mN}var mN=hN(0);function hN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),DN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],ON=DN.concat([`symbolKeepAspect`]),kN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&WN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function qN(e,t,n){for(var r=t.type===`radial`?KN(e,t,n):GN(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:io(e)?[e]:G(e)?e:null}function QN(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&ZN(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=U(n,function(e){return e/i}),r/=i)}return[n,r]}var $N=new Xd(!0);function eP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function tP(e){return typeof e==`string`&&e!==`none`}function nP(e){var t=e.fill;return t!=null&&t!==`none`}function rP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function iP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function aP(e,t,n){var r=es(t.image,t.__image,n);if(ns(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*Oo),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function oP(e,t,n,r,i){var a,o=eP(n),s=nP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||$N,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?qN(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?qN(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?aP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?aP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=QN(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&iP(e,n),s&&rP(e,n)):(s&&rP(e,n),o&&iP(e,n)),T&&e.setLineDash([])}function sP(e,t,n){var r=t.__image=es(n.image,t.__image,t,t.onload);if(r&&ns(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function cP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=QN(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(eP(n)&&e.strokeText(i,n.x,n.y),nP(n)&&e.fillText(i,n.x,n.y)):(nP(n)&&e.fillText(i,n.x,n.y),eP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var lP=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],uP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function dP(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){SP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?ld.opacity:o}(r||t.blend!==n.blend)&&(a||=(SP(e,i),!0),e.globalCompositeOperation=t.blend||ld.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[nF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[nF]=!0,PF(this),!this._model||t){var o=new _M(this._api),s=this._theme,c=this._model=new uM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},HF);var l={seriesTransition:a,optionChanged:!0};if(n)this[iF]={silent:r,updateParams:l},this[nF]=!1,this.getZr().wakeUp();else{try{gF(this),yF.update.call(this,null,l)}catch(e){throw this[iF]=null,this[nF]=!1,e}this._ssr||this._zr.flush(),this[iF]=null,this[nF]=!1,CF.call(this,r),wF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[nF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[iF]&&(r??=this[iF].silent,i=this[iF].updateParams,this[iF]=null),this[nF]=!0,PF(this);try{this._updateTheme(e),n.setTheme(this._theme),gF(this),yF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[nF]=!1,e}this[nF]=!1,CF.call(this,r),wF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=WF[e]),e&&(e=B(e),e&&GM(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Ao.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return H(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;H(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return H(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(qF[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();H(KF,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(B(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=Oa.createCanvas(),h=qj(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return H(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new If({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),H(u,function(e){var t=new Of({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return bF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return bF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return bF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return H(bm(n,e),function(e,n){n.indexOf(`Models`)>=0&&H(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=bm(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?MN(i,t):jN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;H(LF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&PN(i,function(e){var t=qm(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=V({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;H(BF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),kA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Tm(this.getDom(),YF,``);var e=this,t=e._api,n=e._model;H(e._componentsViews,function(e){e.dispose(n,t)}),H(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete KF[e.id]},t.prototype.resize=function(e){if(!this[nF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[iF]&&(r??=this[iF].silent,n=!0,this[iF]=null),this[nF]=!0,PF(this);try{n&&gF(this),yF.update.call(this,{type:`resize`,animation:V({duration:0},e&&e.animation)})}catch(e){throw this[nF]=!1,e}this[nF]=!1,CF.call(this,r),wF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),GF[e]){var n=GF[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=V({},e);return t.type=zF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),RF[e.type]&&this._model){if(this[nF]){this._pendingActions.push(e);return}var n=t.silent;SF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&Ao.browser.weChat&&this._throttledZrFlush(),CF.call(this,n),wF.call(this,n)}},t.prototype.updateLabelLayout=function(){FN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){gF=function(e){yD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),_F(e,!0),_F(e,!1),t.plan()},_F=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),nM.hoverLayerThreshold)&&!Ao.node&&!Ao.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Nv(e);t.eachRendered(function(e){return Fv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!H_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(H_(e))return;if(e instanceof Sf&&mg(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}AF=function(e){return new(function(t){z(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){zh(t,n),MF(e)},n.prototype.leaveEmphasis=function(t,n){Bh(t,n),MF(e)},n.prototype.enterBlur=function(t){Vh(t),MF(e)},n.prototype.leaveBlur=function(t){Hh(t),MF(e)},n.prototype.enterSelect=function(t){Uh(t),MF(e)},n.prototype.leaveSelect=function(t){Wh(t),MF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[rF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(oh))(e)},jF=function(e){function t(e,t){for(var n=0;n=0)){cI.push(n);var o=sN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function uI(e,t){GF[e]=t}function dI(e,t,n){var r=RN(`registerMap`);r&&r(e,t,n)}var fI=DC;sI(qP,tN),sI(XP,rN),sI(XP,iN),sI(qP,kN),sI(XP,AN),sI(eF,IP),$F(GM),eI(BP,KM),uI(`default`,oN),iI({type:mh,event:mh,update:mh},Do),iI({type:hh,event:hh,update:hh},Do),iI({type:gh,event:yh,update:gh,action:Do,refineEvent:pI,publishNonRefinedEvent:!0}),iI({type:_h,event:yh,update:_h,action:Do,refineEvent:pI,publishNonRefinedEvent:!0}),iI({type:vh,event:yh,update:vh,action:Do,refineEvent:pI,publishNonRefinedEvent:!0});function pI(e,t,n,r){return{eventContent:{selected:tg(n),isFromClick:t.isFromClick||!1}}}QF(`default`,{}),QF(`dark`,TN);var mI=[],hI={registerPreprocessor:$F,registerProcessor:eI,registerPostInit:tI,registerPostUpdate:nI,registerUpdateLifecycle:rI,registerAction:iI,registerCoordinateSystem:aI,registerLayout:oI,registerVisual:sI,registerTransform:fI,registerLoading:uI,registerMap:dI,registerImpl:LN,PRIORITY:tF,ComponentModel:aC,ComponentView:YM,SeriesModel:cw,ChartView:nT,registerComponentModel:function(e){aC.registerClass(e)},registerComponentView:function(e){YM.registerClass(e)},registerSeriesModel:function(e){cw.registerClass(e)},registerChartView:function(e){nT.registerClass(e)},registerCustomSeries:function(e,t){BN(e,t)},registerSubTypeDefaulter:function(e,t){aC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Jj(e,t)}};function gI(e){if(G(e)){H(e,function(e){gI(e)});return}qa(mI,e)>=0||(mI.push(e),K(e)&&(e={install:e}),e.install(hI))}var _I=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),vI=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Sm).models[0]},t.type=`cartesian2dAxis`,t}(aC);Ya(vI,_I);var yI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},bI=Wa({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},yI),xI=Wa({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},yI),SI={category:bI,value:xI,time:Wa({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},xI),log:Ka({logBase:10},xI)};function CI(e,t,n,r){H(lE,function(i,a){var o=Wa(Wa({},SI[a],!0),r,!0),s=function(e){z(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=eC(this),r=n?nC(e):{};Wa(e,t.getTheme().get(a+`Axis`)),Wa(e,this.getDefaultOption()),e.type=wI(e),n&&tC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=mT.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=mO();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,wI)}function wI(e){return e.type||(e.data?`category`:`value`)}var TI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return U(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Qa(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),EI=[`x`,`y`];function DI(e){return(e.type===`interval`||e.type===`time`)&&!Zx(e)}var OI=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ok,t.dimensions=EI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(DI(e)&&DI(t)){var n=xT(e,null),r=xT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=us([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return Es(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return Es(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(TI);function kI(e,t){var n=e.scale,r=e.model,i=hk(n,r,r.ecModel,e,null),a=AT(n),o=AT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=op(l[0].value-l[1].value),g=op(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=xp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=xp(lp(C[0]/E)*E,D),O=xp(cp(C[1]/E)*E,D);var e=sp((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=cp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}TE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function AI(e,t){var n=AT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=IT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?MI(r,t):jI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=NT(d)),i[0]||(s[0]=xp(cp(s[0]/u)*u,l)),i[1]||(s[1]=xp(lp(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),TE(e,i,o,s,a,c)}function jI(e,t){var n=RT(t.splitNumber,5),r=CT(e),i=t.minInterval,a=t.maxInterval,o=Pp(r/n,!0);i!=null&&oa&&(o=a);var s=NT(o),c=e.getExtent(),l=[xp(lp(c[0]/o)*o,s),xp(cp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function MI(e,t){var n=RT(t.splitNumber,10),r=e.getExtent(),i=CT(e),a=ap(Mp(i),1);n/i*a<=.5&&(a*=10);var o=NT(a),s=[xp(lp(r[0]/a)*a,o),xp(cp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function NI(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;PI(t,n,r,i,null)}function PI(e,t,n,r,i){var a=hk(e,t,r,n,i),o=OT(e)||kT(e);FI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&_k(n,e,a,r)}function FI(e,t){II[e.type](e,t)}var II={interval:AI,log:AI,time:tE,ordinal:Do},LI=[[3,1],[0,2]],RI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=EI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;H(this._axesList,function(e){lk(e,1);var t=e.scale;jT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=eo(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):NI(i)}H(n,function(e){UI(e,e.__alignTo)?NI(e):kI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};H(n.x,function(e){BI(n,`y`,e,i)}),H(n.y,function(e){BI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=QS(e,t),i=this._rect=YS(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(GI(a,i),!n){var c=YI(i,o,a,s,t),l=void 0;if(s)qI?(qI(this._axesList,i),GI(a,i)):l=JI(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=ZI(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=JI(d,f,p,i,a,c,r))}XI(i,a,QE.determine,null,l,r),H(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];DT(a.scale)&&CE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&H(r,function(e){e.__alignTo=n})}function UI(e,t){return Zx(e.scale)||Zx(t.scale)||t.scale.getTicks().length<2}function WI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function GI(e,t){H(e.x,function(e){return KI(e,t.x,t.width)}),H(e.y,function(e){return KI(e,t.y,t.height)})}function KI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),WI(e,t)}var qI;function JI(e,t,n,r,i,a,o){XI(r,i,QE.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=$a(s,function(e){return e>0})==null;return Cv(r,s,!0,!0,n),GI(i,r),c;function l(e){H(i[Y_[e]],function(t){if(SE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!lo(t)&&t>1e-4&&(e/=t),e}}function YI(e,t,n,r,i){var a=new xO(QI);return H(n,function(n){return H(n,function(n){if(SE(n.model)){var o=!r;n.axisBuilder=QO(e,t,n.model,i,a,o)}})}),a}function XI(e,t,n,r,i,a){var o=n===QE.determine;H(t,function(t){return H(t,function(t){SE(t.model)&&($O(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Y_[1-t]]=e[X_[t]]<=a.refContainer[X_[t]]*.5?0:1-t==1?2:1}H(t,function(e,t){return H(e,function(e){SE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function ZI(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=YS(e.get(`outerBounds`,!0)||Ek,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||qa([`all`,`axisLabel`],a)<0?`all`:a,s=[vp(Y(e.get(`outerBoundsClampWidth`,!0),Dk[0]),t.width),vp(Y(e.get(`outerBoundsClampHeight`,!0),Dk[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var QI=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;TO(e,t,n,r,i,a),xE(e.nameLocation)||H(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&DO(e.labelInfoList,e.dirVec,r,i)})};function $I(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return eL(n,e,t),n.seriesInvolved&&nL(n,e),n}function eL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];H(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=lL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(H(n.getAxes(),no(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&H(f.baseAxes,no(p,!d||`cross`,u)),d&&H(f.otherAxes,no(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||cL(d))){s??=d.get(`triggerTooltip`),d=r?tL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=lL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:cL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=rL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function tL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};H(s,function(e){c[e]=B(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&Ka(l,u.textStyle)}return e.model.getModel(`axisPointer`,new my(c,n,r))}function nL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&H(e.coordSysAxesInfo[lL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function rL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function aL(e){var t=oL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=cL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(wL(this._zr,`globalPan`)||OL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(UA(r.event),r.__ecRoamConsumed=!0,FL(e,t,n,r,i))},t}(Ru);function OL(e){return e.__ecRoamConsumed}var kL=vm();function AL(e){var t=kL(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function jL(e,t,n,r){for(var i=AL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;DR[0]=o?(i[0]-r.x)/a:i[0],DR[1]=o?(i[1]-r.y)/a:i[1],Es(DR,DR,e.mtRawInv);var s=CR(e,DR);OR(t,s,a),H(n,function(e){e!==t&&OR(e,s.slice(),a)})}var DR=[];function OR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function kR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function AR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=LL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function jR(e,t,n,r,i,a,o,s){if(!vR(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Lv(Ka({type:NR(r,e.subType,ih)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function MR(e,t,n){var r=NR(t,n,ih);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(wm(e,t,n),function(t){_R(e,t),yR(e,t,r,i)})})}function NR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function PR(e){return e.zoom!=null}function FR(e,t,n,r,i,a,o){var s=new zL(null,TR(e.ecModel,t));return XL(s,n,r,i,a),o?ZL(s,o.x,o.y,o.width,o.height):ZL(s,n,r,i,a),YL(s,e),s}var IR=vm();function LR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,WR(t,n,e),H(n,function(n){H(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,no(RR,e))})}),t.wrapMethod(`cloneShallow`,no(BR,e)),H(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,no(zR,e))}),ho(n[t.dataType]===t)}function RR(e,t){if(UR(this)){var n=V({},IR(this).datas);n[this.dataType]=t,WR(t,n,e)}else GR(t,this.dataType,IR(this).mainData,e);return t}function zR(e,t){return e.struct&&e.struct.update(),t}function BR(e,t){return H(IR(t).datas,function(n,r){n!==t&&GR(n.cloneShallow(),r,t,e)}),t}function VR(e){var t=IR(this).mainData;return e==null||t==null?t:IR(t).datas[e]}function HR(){var e=IR(this).mainData;return e==null?[{data:e}]:U(eo(IR(e).datas),function(t){return{type:t,data:IR(e).datas[t]}})}function UR(e){return IR(e).mainData===e}function WR(e,t,n){IR(e).datas={},H(t,function(t,r){GR(t,r,e,n)})}function GR(e,t,n,r){IR(n).datas[t]=e,IR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=VR,e.getLinkedDataAll=HR}var KR=H,qR=J,JR=-1,YR=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=B(t);this.type=r,this.mappingMethod=n,this._normalizeData=sz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(QR(i),XR(i)):n===`category`?i.categories?ZR(i):QR(i,!0):(ho(n!==`linear`||i.dataExtent),QR(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return W(this._normalizeData,this)},e.listVisualTypes=function(){return eo(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?H(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&KR(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(qR(e)){var t=[];KR(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function QR(e,t){var n=e.visual,r=[];J(n)?KR(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),oz(e,r)}function $R(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:iz([0,1])}}function ez(e){var t=this.option.visual;return t[Math.round(hp(e,[0,1],[0,t.length-1],!0))]||{}}function tz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function nz(e){var t=this.option.visual;return t[this.option.loop&&e!==JR?e%t.length:e]}function rz(){return this.option.visual[0]}function iz(e){return{linear:function(t){return hp(t,e,this.option.visual,!0)},category:nz,piecewise:function(t,n){var r=az.call(this,n);return r??=hp(t,e,this.option.visual,!0),r},fixed:rz}}function az(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[YR.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function oz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=U(t,function(e){return Il(e)||[0,0,0,1]})),t}var sz={linear:function(e){return hp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=YR.findPieceIndex(e,t,!0);if(n!=null)return hp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??JR},fixed:Do};function cz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof dz||(t=this._nodesMap[lz(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),fz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function pz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Ya(dz,pz(`hostGraph`,`data`)),Ya(fz,pz(`hostGraph`,`edgeData`));function mz(e,t,n,r,i){for(var a=new uz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=fx(e,n);else{var h=Xb.get(p),g=h&&h.dimensions||[];qa(g,`value`)<0&&g.concat([`value`]);var _=Gb(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new Wb(_,n),m.initData(e)}var v=new Wb([`value`],n);return v.initData(c,s),i&&i(m,v),LR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var hz=`-->`,gz=function(e){return e.get(`autoCurveness`)||null},_z=function(e,t){var n=gz(e),r=20,i=[];if(io(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return iw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=U(this.option.categories||[],function(e){return e.value==null?V({value:0},e):e}),t=new Wb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return fR(e)&&e},t.type=`series.`+Ez,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(cw);function Oz(e){return e instanceof Array||(e=[e,e]),e}var kz=Gm(Ez,Az);function Az(e){e.eachSeriesByType(Ez,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=Oz(e.get(`edgeSymbol`)),i=Oz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=Oz(r.getShallow(`symbol`,!0)),o=Oz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(V(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function jz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Mz(n,e)}}function Mz(e,t){e.eachEdge(function(e,n){var r=fo(e.getModel().get([`lineStyle`,`curveness`]),-Tz(e,t,n,!0),0),i=ps(e.node1.getLayout()),a=ps(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Nz=Gm(Ez,Pz);function Pz(e,t){e.eachSeriesByType(Ez,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];H(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Lg),cB=function(){function e(e){this.group=new Lg,this._LineCtor=e||sB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=uB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=uB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!lB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function uB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Gv(t)}}function dB(e){return isNaN(e[0])||isNaN(e[1])}function fB(e){return e&&!dB(e[0])&&!dB(e[1])}var pB=[],mB=[],hB=[],gB=pl,_B=Ts,vB=Math.abs;function yB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){pB[0]=gB(r[0],i[0],a[0],u),pB[1]=gB(r[1],i[1],a[1],u);var d=vB(_B(pB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function bB(e,t){var n=[],r=_l,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[ps(c[0]),ps(c[1])],c[2]&&c.__original.push(ps(c[2])));var d=c.__original;if(c[2]!=null){if(fs(i[0],d[0]),fs(i[1],d[2]),fs(i[2],d[1]),l&&l!==`none`){var f=Iz(e.node1),p=yB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=Iz(e.node2),p=yB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}fs(c[0],i[0]),fs(c[1],i[2]),fs(c[2],i[1])}else{if(fs(a[0],d[0]),fs(a[1],d[1]),_s(o,a[1],a[0]),xs(o,o),l&&l!==`none`){var f=Iz(e.node1);gs(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=Iz(e.node2);gs(a[1],a[1],o,-f*t)}fs(c[0],a[0]),fs(c[1],a[1])}})}var xB=vm();function SB(e){if(e)return xB(e).bridge}var CB=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=Ez,t}return t.prototype.init=function(e,t){var n=new Fw,r=new cB,i=this.group,a=new Lg;this._controller=new DL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=vR(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&pR(o,2,i,this._firstRender?null:e),bB(e.getGraph(),Fz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&jR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),zz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Mz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(qm(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(qm(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){Vz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=vR(t);this._active&&r&&(pR(this._mainGroup,2,r,null),PR(e)&&(this._updateNodeAndLinkScale(),bB(t.getGraph(),Fz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Fz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(bB(e.getGraph(),Fz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=SB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(VL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Lg,o=n.group.children(),s=r.group.children(),c=new Lg,l=new Lg;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=Ep(t[r],d.sign*a)),t}function AB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function jB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var MB=vm(),NB=B,PB=W,FB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Lg,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=no(IB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}BB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&WD(r).w>o)return!0;if(a){var s=oL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=MB(e).pointerEl=new q_[i.type](NB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=MB(e).labelEl=new Vf(NB(t.label));e.add(i),RB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=MB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=MB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),RB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=vv(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){UA(e.event)},onmousedown:PB(this._onHandleDragMove,this,0,0),drift:PB(this._onHandleDragMove,this),ondragend:PB(this._onHandleDragEnd,this)}),n.add(r)),BB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,qk(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){IB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,zB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(zB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(zB(r)),MB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Jk(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function IB(e,t,n,r){LB(MB(n).lastProp,r)||(MB(n).lastProp=r,t?B_(n,r,e):(n.stopAnimation(),n.attr(r)))}function LB(e,t){if(J(e)&&J(t)){var n=!0;return H(t,function(t,r){n&&=LB(e[r],t)}),!!n}return e===t}function RB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function zB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function BB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function VB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function HB(e,t,n,r,i){var a=WB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=IS(o.get(`padding`)||0),c=o.getFont(),l=cc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),UB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Kv(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function UB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function WB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:_E(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};H(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function GB(e,t,n){var r=rs();return cs(r,r,n.rotation),ss(r,r,n.position),dv([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function KB(e,t,n,r,i,a){var o=OO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),HB(t,r,i,a,{position:GB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function qB(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function JB(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function YB(e,t,n){return WD(e,{fromStat:{sers:U(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function XB(e,t,n){return[ap(ip(t[0],t[1]),e-n/2),ip(e+n/2,ap(t[0],t[1]))]}var ZB=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=QB(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=VB(r),f=$B[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}KB(t,e,YO(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=YO(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=GB(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=QB(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=ip(o[1],l[c]),l[c]=ap(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(FB);function QB(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var $B={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:qB([t,r[0]],[t,r[1]],eV(e))}},shadow:function(e,t,n,r,i,a){var o=YB(e,i,a),s=r[1]-r[0],c=XB(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:JB([l,r[0]],[u-l,s],eV(e))}}};function eV(e){return e.dim===`x`?0:1}var tV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(aC),nV=vm(),rV=H;function iV(e,t,n){if(!Ao.node){var r=t.getZr();nV(r).records||(nV(r).records={}),aV(r,t);var i=nV(r).records[e]||(nV(r).records[e]={});i.handler=n}}function aV(e,t){if(nV(e).initialized)return;nV(e).initialized=!0,n(`click`,no(cV,`click`)),n(`mousemove`,no(cV,`mousemove`)),n(`mousewheel`,no(cV,`mousewheel`)),n(`globalout`,sV);function n(n,r){e.on(n,function(n){var i=lV(t);rV(nV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),oV(i.pendings,t)})}}function oV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function sV(e,t,n){e.handler(`leave`,null,n)}function cV(e,t,n,r){t.handler(e,n,r)}function lV(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function uV(e,t){if(!Ao.node){var n=t.getZr();(nV(n).records||{})[e]&&(nV(n).records[e]=null)}}var dV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;iV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){uV(`axisPointer`,t)},t.prototype.dispose=function(e,t){uV(`axisPointer`,t)},t.type=`axisPointer`,t}(YM);function fV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=_m(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(U(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var pV=vm();function mV(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||W(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){wV(i)&&(i=fV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=wV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||wV(i),f={},p={},m={list:[],map:{}},h={showPointer:no(_V,p),showTooltip:no(vV,m)};H(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);H(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=SV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&hV(e,o,h,!1,f)}})});var g={};return H(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&H(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,CV(t),CV(e)))),g[e.key]=a}})}),H(g,function(e,t){hV(u[t],e,h,!0,f)}),yV(p,u,f),bV(m,i,e,o),xV(u,o,n),f}}function hV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=gV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function gV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return H(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Vp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),H(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function _V(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function vV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=lL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function yV(e,t,n){var r=n.axesInfo=[];H(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function bV(e,t,n,r){if(wV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function xV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=pV(r)[i]||{},o=pV(r)[i]={};H(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&H(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}H(a,function(e,t){!o[t]&&c.push(l(e))}),H(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function SV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function CV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function wV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function TV(e){dL.registerAxisPointerClass(`CartesianAxisPointer`,ZB),e.registerComponentModel(tV),e.registerComponentView(dV),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=$I(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},mV)}function EV(e){gI(SL),gI(TV)}function DV(e,t){var n=IS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new If({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var OV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(aC);function kV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function AV(e){if(Ao.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function BV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(Ao.transformSupported?``+IV+i:`,left`+i+`,top`+i)),FV+`:`+a}function VV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!Ao.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=Ao.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+IV+`:`+o+`;`:[[`top`,0],[`left`,0],[jV,o]]}function HV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),H([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function UV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=nw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(BV(a,n,r)),o&&i.push(`background-color:`+o),H([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=FS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(HV(d)),f!=null&&i.push(`padding:`+IS(f).join(`px `)+`px`),i.join(`;`)+`;`}function WV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&Ex(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var GV=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Ao.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):so(i)?i:K(i)&&i(e.getDom()));WV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;zA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=PV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=LV+UV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+VV(i[0],i[1],!0)+(`border-color:`+HS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!kV(n)&&(o=zV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!Ao.node&&n.getDom()){var i=$V(r,n);this._ticket=``;var a=r.dataByCoordSys,o=iH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=XV;c.x=r.x,c.y=r.y,c.update(),qm(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=fV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide($V(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&QV([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(qm(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;PN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(qm(e).dataIndex==null?qm(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=W(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=QV([t.tooltipOption],r),o=this._renderMode,s=[],c=HC(`section`,{blocks:[],noHeader:!0}),l=[],u=new rw;H(e,function(e){H(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=WB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=HC(`section`,{header:f,noHeader:!go(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),H(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=_E(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,HS(m.color),o);var h=gC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=QV([a],r).get(`valueFormatter`);p.blocks.push(_?V({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=JC(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` +`];function GC(e,t){return t.type=e,t}function KC(e){return e.type===`section`}function qC(e){return KC(e)?YC:XC}function JC(e){if(KC(e)){var t=0,n=e.blocks.length,r=n>1||n>0&&!e.noHeader;return H(e.blocks,function(e){var n=JC(e);n>=t&&(t=n+ +(r&&(!n||KC(e)&&!e.noHeader)))}),t}return 0}function YC(e,t,n,r){var i=t.noHeader,a=QC(JC(t)),o=[],s=t.blocks||[];vo(!s||G(s)),s||=[];var c=e.orderMode;if(t.sortBlocks&&c){s=s.slice();var l={valueAsc:`asc`,valueDesc:`desc`};if(ko(l,c)){var u=new pb(l[c],null);s.sort(function(e,t){return u.evaluate(e.sortParam,t.sortParam)})}else c===`seriesDesc`&&s.reverse()}H(s,function(n,i){var s=t.valueFormatter,c=qC(n)(s?V(V({},e),{valueFormatter:s}):e,n,i>0?a.html:0,r);c!=null&&o.push(c)});var d=e.renderMode===`richText`?o.join(a.richText):$C(r,o.join(``),i?n:a.html);if(i)return d;var f=BS(t.header,`ordinal`,e.useUTC),p=HC(r,e.renderMode).nameStyle,m=VC(r);return e.renderMode===`richText`?nw(e,f,p)+a.richText+d:$C(r,`
`+Lx(f)+`
`+d,n)}function XC(e,t,n,r){var i=e.renderMode,a=t.noName,o=t.noValue,s=!t.markerType,c=t.name,l=e.useUTC,u=t.valueFormatter||e.valueFormatter||function(e){return e=G(e)?e:[e],U(e,function(e,t){return BS(e,G(p)?p[t]:p,l)})};if(!(a&&o)){var d=s?``:e.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||Q.color.secondary,i),f=a?``:BS(c,`ordinal`,l),p=t.valueType,m=o?[]:u(t.value,t.rawDataIndex),h=!s||!a,g=!s&&a,_=HC(r,i),v=_.nameStyle,y=_.valueStyle;return i===`richText`?(s?``:d)+(a?``:nw(e,f,v))+(o?``:rw(e,m,h,g,y)):$C(r,(s?``:d)+(a?``:ew(f,!s,v))+(o?``:tw(m,h,g,y)),n)}}function ZC(e,t,n,r,i,a){if(e)return qC(e)({useUTC:i,renderMode:n,orderMode:r,markupStyleCreator:t,valueFormatter:e.valueFormatter},e,0,a)}function QC(e){return{html:UC[e],richText:WC[e]}}function $C(e,t,n){var r=`
`,i=`margin: `+n+`px 0 0`,a=VC(e);return`
`+t+r+`
`}function ew(e,t,n){var r=t?`margin-left:2px`:``;return``+Lx(e)+``}function tw(e,t,n,r){var i=t?`float:right;margin-left:`+(n?`10px`:`20px`):``;return e=G(e)?e:[e],``+U(e,function(e){return Lx(e)}).join(`  `)+``}function nw(e,t,n){return e.markupStyleCreator.wrapRichTextStyle(t,n)}function rw(e,t,n,r,i){var a=[i],o=r?10:20;return n&&a.push({padding:[0,0,0,o],align:`right`}),e.markupStyleCreator.wrapRichTextStyle(G(t)?t.join(` `):t,a)}function iw(e,t){var n=e.getData().getItemVisual(t,`style`)[e.visualDrawType];return GS(n)}function aw(e,t){return e.get(`padding`)??(t===`richText`?[8,10]:10)}var ow=function(){function e(){this.richTextStyles={},this._nextStyleNameId=Vp()}return e.prototype._generateStyleName=function(){return`__EC_aUTo_`+this._nextStyleNameId++},e.prototype.makeTooltipMarker=function(e,t,n){var r=n===`richText`?this._generateStyleName():null,i=WS({color:t,type:e,renderMode:n,markerId:r});return q(i)?i:(this.richTextStyles[r]=i.style,i.content)},e.prototype.wrapRichTextStyle=function(e,t){var n={};G(t)?H(t,function(e){return V(n,e)}):V(n,t);var r=this._generateStyleName();return this.richTextStyles[r]=n,`{`+r+`|`+e+`}`},e}();function sw(e){var t=e.series,n=e.dataIndex,r=e.multipleSeries,i=t.getData(),a=i.mapDimensionsAll(`defaultedTooltip`),o=a.length,s=t.getRawValue(n),c=G(s),l=iw(t,n),u,d,f,p;if(o>1||c&&!o){var m=cw(s,t,n,a,l);u=m.inlineValues,d=m.inlineValueTypes,f=m.blocks,p=m.inlineValues[0]}else if(o){var h=i.getDimensionInfo(a[0]);p=u=ib(i,n,a[0]),d=h.type}else p=u=c?s[0]:s;var g=hm(t),_=g&&t.name||``,v=i.getName(n),y=r?_:v;return GC(`section`,{header:_,noHeader:r||!g,sortParam:p,blocks:[GC(`nameValue`,{markerType:`item`,markerColor:l,name:y,noName:!yo(y),value:u,valueType:d,rawDataIndex:i.getRawIndex(n)})].concat(f||[])})}function cw(e,t,n,r,i){var a=t.getData(),o=eo(e,function(e,t,n){var r=a.getDimensionInfo(n);return e||=r&&r.tooltip!==!1&&r.displayName!=null},!1),s=[],c=[],l=[];r.length?H(r,function(e){u(ib(a,n,e),e)}):H(e,u);function u(e,t){var n=a.getDimensionInfo(t);n&&n.otherDims.tooltip!==!1&&(o?l.push(GC(`nameValue`,{markerType:`subItem`,markerColor:i,name:n.displayName,value:e,valueType:n.type})):(s.push(e),c.push(n.type)))}return{inlineValues:s,inlineValueTypes:c,blocks:l}}var lw=xm();function uw(e,t){return e.getName(t)||e.getId(t)}var dw=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return t.prototype.init=function(e,t,n){this.seriesIndex=this.componentIndex,this.dataTask=bC({count:mw,reset:hw}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n),(lw(this).sourceManager=new PC(this)).prepareSource();var r=this.getInitialData(e,n);_w(r,this),this.dataTask.context.data=r,lw(this).dataBeforeProcessed=r,fw(this),this._initSelectedMapFromData(r)},t.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{},i=this.subType;cC.hasClass(i)&&(i+=`Series`),qa(e,t.getTheme().get(this.subType)),qa(e,this.getDefaultOption()),tm(e,`label`,[`show`]),this.fillDataTextStyle(e.data),n&&iC(e,r,n)},t.prototype.mergeOption=function(e,t){e=qa(this.option,e,!0),this.fillDataTextStyle(e.data);var n=rC(this);n&&iC(this.option,e,n);var r=lw(this).sourceManager;r.dirty(),r.prepareSource();var i=this.getInitialData(e,t);_w(i,this),this.dataTask.dirty(),this.dataTask.context.data=i,lw(this).dataBeforeProcessed=i,fw(this),this._initSelectedMapFromData(i)},t.prototype.fillDataTextStyle=function(e){if(e&&!lo(e))for(var t=[`show`],n=0;n=0&&u<0)&&(l=v,u=_,d=0),_===u&&(c[d++]=m))}return c.length=d,c},t.prototype.formatTooltip=function(e,t,n){return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(No.node&&!(e&&e.ssr))return!1;var t=this.getShallow(`animation`);return t&&this.getData().count()>this.getShallow(`animationThreshold`)&&(t=!1),!!t},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,t,n){var r=this.ecModel,i=fC.prototype.getColorFromPalette.call(this,e,t,n);return i||=r.getColorFromPalette(e,t,n),i},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get(`progressive`)},t.prototype.getProgressiveThreshold=function(){return this.get(`progressiveThreshold`)},t.prototype.select=function(e,t){this._innerSelect(this.getData(t),e)},t.prototype.unselect=function(e,t){var n=this.option.selectedMap;if(n){var r=this.option.selectedMode,i=this.getData(t);if(r===`series`||n===`all`){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var a=0;a=0&&n.push(i)}return n},t.prototype.isSelected=function(e,t){var n=this.option.selectedMap;if(!n)return!1;var r=this.getData(t);return(n===`all`||n[uw(r,e)])&&!r.getItemModel(e).get([`select`,`disabled`])},t.prototype.isUniversalTransitionEnabled=function(){if(this.__universalTransitionEnabled)return!0;var e=this.option.universalTransition;return e?e===!0||e&&e.enabled:!1},t.prototype._innerSelect=function(e,t){var n,r,i=this.option,a=i.selectedMode,o=t.length;if(a&&o){if(a===`series`)i.selectedMap=`all`;else if(a===`multiple`){J(i.selectedMap)||(i.selectedMap={});for(var s=i.selectedMap,c=0;c0&&this._innerSelect(e,t)}},t.registerClass=function(e){return cC.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type=`series.__base__`,e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol=`circle`,e.visualStyleAccessPath=`itemStyle`,e.visualDrawType=`fill`}(),t}(cC);Qa(dw,vC),Qa(dw,fC),Uo(dw,cC);function fw(e){var t=e.name;hm(e)||(e.name=pw(e)||t)}function pw(e){var t=e.getRawData(),n=t.mapDimensionsAll(`seriesName`),r=[];return H(n,function(e){var n=t.getDimensionInfo(e);n.displayName&&r.push(n.displayName)}),r.join(` `)}function mw(e){return e.model.getRawData().count()}function hw(e){var t=e.model;return t.setData(t.getRawData().cloneShallow()),gw}function gw(e,t){t.outputData&&e.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function _w(e,t){H(Do(e.CHANGABLE_METHODS,e.DOWNSAMPLE_METHODS),function(n){e.wrapMethod(n,ao(vw,t))})}function vw(e,t){var n=yw(e);return n&&n.setOutputEnd((t||this).count()),t}function yw(e){var t=(e.ecModel||{}).scheduler,n=t&&t.getPipeline(e.uid);if(n){var r=n.currentTask;if(r){var i=r.agentStubMap;i&&(r=i.get(e.uid))}return r}}var bw=Tf.extend({type:`triangle`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r+a),e.lineTo(n-i,r+a),e.closePath()}}),xw={line:v_,rect:zf,roundRect:zf,square:zf,circle:Hg,diamond:Tf.extend({type:`diamond`,shape:{cx:0,cy:0,width:0,height:0},buildPath:function(e,t){var n=t.cx,r=t.cy,i=t.width/2,a=t.height/2;e.moveTo(n,r-a),e.lineTo(n+i,r),e.lineTo(n,r+a),e.lineTo(n-i,r),e.closePath()}}),pin:Tf.extend({type:`pin`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.x,r=t.y,i=t.width/5*3,a=Math.max(i,t.height),o=i/2,s=o*o/(a-o),c=r-a+o+s,l=Math.asin(s/o),u=Math.cos(l)*o,d=Math.sin(l),f=Math.cos(l),p=o*.6,m=o*.7;e.moveTo(n-u,c+s),e.arc(n,c,o,Math.PI-l,Math.PI*2+l),e.bezierCurveTo(n+u-d*p,c+s+f*p,n,r-m,n,r),e.bezierCurveTo(n,r-m,n-u+d*p,c+s+f*p,n-u,c+s),e.closePath()}}),arrow:Tf.extend({type:`arrow`,shape:{x:0,y:0,width:0,height:0},buildPath:function(e,t){var n=t.height,r=t.width,i=t.x,a=t.y,o=r/3*2;e.moveTo(i,a),e.lineTo(i+o,a+n),e.lineTo(i,a+n/4*3),e.lineTo(i-o,a+n),e.lineTo(i,a),e.closePath()}}),triangle:bw},Sw={line:function(e,t,n,r,i){i.x1=e,i.y1=t+r/2,i.x2=e+n,i.y2=t+r/2},rect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r},roundRect:function(e,t,n,r,i){i.x=e,i.y=t,i.width=n,i.height=r,i.r=Math.min(n,r)/4},square:function(e,t,n,r,i){var a=Math.min(n,r);i.x=e,i.y=t,i.width=a,i.height=a},circle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.r=Math.min(n,r)/2},diamond:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r},pin:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},arrow:function(e,t,n,r,i){i.x=e+n/2,i.y=t+r/2,i.width=n,i.height=r},triangle:function(e,t,n,r,i){i.cx=e+n/2,i.cy=t+r/2,i.width=n,i.height=r}},Cw={};H(xw,function(e,t){Cw[t]=new e});var ww=Tf.extend({type:`symbol`,shape:{symbolType:``,x:0,y:0,width:0,height:0},calculateTextPosition:function(e,t,n){var r=gc(e,t,n),i=this.shape;return i&&i.symbolType===`pin`&&t.position===`inside`&&(r.y=n.y+n.height*.4),r},buildPath:function(e,t,n){var r=t.symbolType;if(r!==`none`){var i=Cw[r];i||=(r=`rect`,Cw[r]),Sw[r](t.x,t.y,t.width,t.height,i.shape),i.buildPath(e,i.shape,n)}}});function Tw(e,t){if(this.type!==`image`){var n=this.style;this.__isEmptyBrush?(n.stroke=e,n.fill=t||Q.color.neutral00,n.lineWidth=2):this.shape.symbolType===`line`?n.stroke=e:n.fill=e,this.markRedraw()}}function Ew(e,t,n,r,i,a,o){var s=e.indexOf(`empty`)===0;s&&(e=e.substr(5,1).toLowerCase()+e.substr(6));var c=e.indexOf(`image://`)===0?ov(e.slice(8),new Z(t,n,r,i),o?`center`:`cover`):e.indexOf(`path://`)===0?av(e.slice(7),{},new Z(t,n,r,i),o?`center`:`cover`):new ww({shape:{symbolType:e,x:t,y:n,width:r,height:i}});return c.__isEmptyBrush=s,c.setColor=Tw,a&&c.setColor(a),c}function Dw(e){return G(e)||(e=[+e,+e]),[e[0]||0,e[1]||0]}function Ow(e,t){if(e!=null)return G(e)||(e=[e,e]),[yp(e[0],t[0])||0,yp(Y(e[1],e[0]),t[1])||0]}var kw=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.hasSymbolVisual=!0,n}return t.prototype.getInitialData=function(e){return hx(null,this,{useEncodeDefaulter:!0})},t.prototype.getLegendIcon=function(e){var t=new Bg,n=Ew(`line`,0,e.itemHeight/2,e.itemWidth,0,e.lineStyle.stroke,!1);t.add(n),n.setStyle(e.lineStyle);var r=this.getData().getVisual(`symbol`),i=this.getData().getVisual(`symbolRotate`),a=r===`none`?`circle`:r,o=e.itemHeight*.8,s=Ew(a,(e.itemWidth-o)/2,(e.itemHeight-o)/2,o,o,e.itemStyle.fill);return t.add(s),s.setStyle(e.itemStyle),s.rotation=(e.iconRotate===`inherit`?i:e.iconRotate||0)*Math.PI/180,s.setOrigin([e.itemWidth/2,e.itemHeight/2]),a.indexOf(`empty`)>-1&&(s.style.stroke=s.style.fill,s.style.fill=Q.color.neutral00,s.style.lineWidth=2),t},t.type=`series.line`,t.dependencies=[`grid`,`polar`],t.defaultOption={z:3,coordinateSystem:`cartesian2d`,legendHoverLink:!0,clip:!0,label:{position:`top`},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:`solid`},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:`emptyCircle`,symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:`auto`,connectNulls:!1,sampling:`none`,animationEasing:`linear`,progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:`clone`},triggerLineEvent:!1,triggerEvent:!1},t}(dw);function Aw(e,t){var n=e.mapDimensionsAll(`defaultedLabel`),r=n.length;if(r===1){var i=ib(e,t,n[0]);return i==null?null:i+``}if(r){for(var a=[],o=0;o=0&&r.push(t[a])}return r.join(` `)}var Mw=function(e){z(t,e);function t(t,n,r,i){var a=e.call(this)||this;return a.updateData(t,n,r,i),a}return t.prototype._createSymbol=function(e,t,n,r,i,a){this.removeAll();var o=Ew(e,-1,-1,2,2,null,a);o.attr({z2:Y(i,100),culling:!0,scaleX:r[0]/2,scaleY:r[1]/2}),o.drift=Nw,this._symbolType=e,this.add(o)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){Hh(this.childAt(0))},t.prototype.downplay=function(){Uh(this.childAt(0))},t.prototype.setZ=function(e,t){var n=this.childAt(0);n.zlevel=e,n.z=t},t.prototype.setDraggable=function(e,t){var n=this.childAt(0);n.draggable=e,n.cursor=!t&&e?`move`:n.cursor},t.prototype.updateData=function(e,n,r,i){this.silent=!1;var a=e.getItemVisual(n,`symbol`)||`circle`,o=e.hostModel,s=t.getSymbolSize(e,n),c=t.getSymbolZ2(e,n),l=a!==this._symbolType,u=i&&i.disableAnimation;if(l){var d=e.getItemVisual(n,`symbolKeepAspect`);this._createSymbol(a,e,n,s,c,d)}else{var f=this.childAt(0);f.silent=!1;var p={scaleX:s[0]/2,scaleY:s[1]/2};u?f.attr(p):U_(f,p,o,n),Y_(f)}if(this._updateCommon(e,n,s,r,i),l){var f=this.childAt(0);if(!u){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,W_(f,p,o,n)}}u&&this.childAt(0).stopAnimation(`leave`)},t.prototype._updateCommon=function(e,t,n,r,i){var a=this.childAt(0),o=e.hostModel,s,c,l,u,d,f,p,m,h;if(r&&(s=r.emphasisItemStyle,c=r.blurItemStyle,l=r.selectItemStyle,u=r.focus,d=r.blurScope,p=r.labelStatesModels,m=r.hoverScale,h=r.cursorStyle,f=r.emphasisDisabled),!r||e.hasItemOption){var g=r&&r.itemModel?r.itemModel:e.getItemModel(t),_=g.getModel(`emphasis`);s=_.getModel(`itemStyle`).getItemStyle(),l=g.getModel([`select`,`itemStyle`]).getItemStyle(),c=g.getModel([`blur`,`itemStyle`]).getItemStyle(),u=_.get(`focus`),d=_.get(`blurScope`),f=_.get(`disabled`),p=Jv(g),m=_.getShallow(`scale`),h=g.getShallow(`cursor`)}var v=e.getItemVisual(t,`symbolRotate`);a.attr(`rotation`,(v||0)*Math.PI/180||0);var y=Ow(e.getItemVisual(t,`symbolOffset`),n);y&&(a.x=y[0],a.y=y[1]),h&&a.attr(`cursor`,h);var b=e.getItemVisual(t,`style`),x=b.fill;if(a instanceof jf){var S=a.style;a.useStyle(V({image:S.image,x:S.x,y:S.y,width:S.width,height:S.height},b))}else a.__isEmptyBrush?a.useStyle(V({},b)):a.useStyle(b),a.style.decal=null,a.setColor(x,i&&i.symbolInnerColor),a.style.strokeNoScale=!0;var C=e.getItemVisual(t,`liftZ`),w=this._z2;C==null?w!=null&&(a.z2=w,this._z2=null):w??(this._z2=a.z2,a.z2+=C);var T=i&&i.useNameLabel;qv(a,p,{labelFetcher:o,labelDataIndex:t,defaultText:E,inheritColor:x,defaultOpacity:b.opacity});function E(t){return T?e.getName(t):Aw(e,t)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var D=a.ensureState(`emphasis`);D.style=s,a.ensureState(`select`).style=l,a.ensureState(`blur`).style=c;var O=m==null||m===!0?Math.max(1.1,3/this._sizeY):isFinite(m)&&m>0?+m:1;D.scaleX=this._sizeX*O,D.scaleY=this._sizeY*O,this.setSymbolScale(1),sg(this,u,d,f)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,t,n){var r=this.childAt(0),i=Xm(this).dataIndex,a=n&&n.animation;if(this.silent=r.silent=!0,n&&n.fadeLabel){var o=r.getTextContent();o&&K_(o,{style:{opacity:0}},t,{dataIndex:i,removeOpt:a,cb:function(){r.removeTextContent()}})}else r.removeTextContent();K_(r,{style:{opacity:0},scaleX:0,scaleY:0},t,{dataIndex:i,cb:e,removeOpt:a})},t.getSymbolSize=function(e,t){return Dw(e.getItemVisual(t,`symbolSize`))},t.getSymbolZ2=function(e,t){return e.getItemVisual(t,`z2`)},t}(Bg);function Nw(e,t){this.parent.drift(e,t)}function Pw(e,t,n,r){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(r&&r.isIgnore&&r.isIgnore(n))&&!(r&&r.clipShape&&!r.clipShape.contain(t[0],t[1]))&&e.getItemVisual(n,`symbol`)!==`none`}function Fw(e){return e!=null&&!J(e)&&(e={isIgnore:e}),e||{}}function Iw(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{emphasisItemStyle:n.getModel(`itemStyle`).getItemStyle(),blurItemStyle:t.getModel([`blur`,`itemStyle`]).getItemStyle(),selectItemStyle:t.getModel([`select`,`itemStyle`]).getItemStyle(),focus:n.get(`focus`),blurScope:n.get(`blurScope`),emphasisDisabled:n.get(`disabled`),hoverScale:n.get(`scale`),labelStatesModels:Jv(t),cursorStyle:t.get(`cursor`)}}function Lw(e,t,n,r,i,a,o){var s=new e(t,n,r,i);return s.setPosition(a),t.setItemGraphicEl(n,s),o.add(s),s}var Rw=function(){function e(e){this.group=new Bg,this._SymbolCtor=e||Mw}return e.prototype.updateData=function(e,t){this._progressiveEls=null,t=Fw(t);var n=this.group,r=e.hostModel,i=this._data,a=this._SymbolCtor,o=t.disableAnimation,s=this._seriesScope=Iw(e),c={disableAnimation:o},l=t.getSymbolPoint||function(t){return e.getItemLayout(t)};i||n.removeAll(),e.diff(i).add(function(r){var i=l(r);Pw(e,i,r,t)&&Lw(a,e,r,s,c,i,n)}).update(function(u,d){var f=i.getItemGraphicEl(d),p=l(u);if(!Pw(e,p,u,t)){n.remove(f);return}var m=e.getItemVisual(u,`symbol`)||`circle`,h=f&&f.getSymbolType&&f.getSymbolType();if(!f||h&&h!==m)n.remove(f),f=new a(e,u,s,c),f.setPosition(p);else{f.updateData(e,u,s,c);var g={x:p[0],y:p[1]};o?f.attr(g):U_(f,g,r)}n.add(f),e.setItemGraphicEl(u,f)}).remove(function(e){var t=i.getItemGraphicEl(e);t&&t.fadeOut(function(){n.remove(t)},r)}).execute(),this._getSymbolPoint=l,this._data=e},e.prototype.updateLayout=function(e){var t=this._data;if(t)for(var n=this,r=t.getStore(),i=0,a=r.count();i0?n=r[0]:r[1]<0&&(n=r[1]),n}function Vw(e,t,n,r){var i=NaN;e.stacked&&(i=n.get(n.getCalculationInfo(`stackedOverDimension`),r)),isNaN(i)&&(i=e.valueStart);var a=e.baseDataOffset,o=[];return o[a]=n.get(e.baseDim,r),o[1-a]=i,t.dataToPoint(o)}function Hw(e,t){return!isFinite(e)||!isFinite(t)}var Uw=typeof Float32Array<`u`?Float32Array:void 0,Ww=typeof Float64Array<`u`?Float64Array:void 0;function Gw(e){return Kw({ctor:Uw},e).arr}function Kw(e,t){var n=e.arr,r=e.ctor;if(t>Ap&&(t=Ap),!n||e.typed&&n.length=i||h<0)break;if(Hw(_,v)){if(c){h+=a;continue}break}if(h===n)e[a>0?`moveTo`:`lineTo`](_,v),d=_,f=v;else{var y=_-l,b=v-u;if(y*y+b*b<.5){h+=a;continue}if(o>0){for(var x=h+a,S=t[x*2],C=t[x*2+1];S===_&&C===v&&g=r||Hw(S,C))p=_,m=v;else{E=S-l,D=C-u;var A=_-l,j=S-_,M=v-u,N=C-v,P=void 0,ee=void 0;if(s===`x`){P=Math.abs(A),ee=Math.abs(j);var te=E>0?1:-1;p=_-te*P*o,m=v,O=_+te*ee*o,k=v}else if(s===`y`){P=Math.abs(M),ee=Math.abs(N);var ne=D>0?1:-1;p=_,m=v-ne*P*o,O=_,k=v+ne*ee*o}else P=Math.sqrt(A*A+M*M),ee=Math.sqrt(j*j+N*N),T=ee/(ee+P),p=_-E*o*(1-T),m=v-D*o*(1-T),O=_+E*o*T,k=v+D*o*T,O=Yw(O,Xw(S,_)),k=Yw(k,Xw(C,v)),O=Xw(O,Yw(S,_)),k=Xw(k,Yw(C,v)),E=O-_,D=k-v,p=_-E*P/ee,m=v-D*P/ee,p=Yw(p,Xw(l,_)),m=Yw(m,Xw(u,v)),p=Xw(p,Yw(l,_)),m=Xw(m,Yw(u,v)),E=_-p,D=v-m,O=_+E*ee/P,k=v+D*ee/P}e.bezierCurveTo(d,f,p,m,_,v),d=O,f=k}else e.lineTo(_,v)}l=_,u=v,h+=a}return g}var Qw=function(){function e(){this.smooth=0,this.smoothConstraint=!0}return e}(),$w=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polyline`,n}return t.prototype.getDefaultStyle=function(){return{stroke:Q.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Qw},t.prototype.buildPath=function(e,t){var n=t.points,r=0,i=n.length/2;if(t.connectNulls){for(;i>0&&Hw(n[i*2-2],n[i*2-1]);i--);for(;r=0){var _=o?(d-a)*g+a:(u-i)*g+i;return o?[e,_]:[_,e]}i=u,a=d;break;case r.C:u=n[c++],d=n[c++],f=n[c++],p=n[c++],m=n[c++],h=n[c++];var v=o?dl(i,u,f,m,e,s):dl(a,d,p,h,e,s);if(v>0)for(var y=0;y=0){var _=o?ll(a,d,p,h,b):ll(i,u,f,m,b);return o?[e,_]:[_,e]}}i=m,a=h}}},t}(Tf),eT=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(Qw),tT=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`ec-polygon`,n}return t.prototype.getDefaultShape=function(){return new eT},t.prototype.buildPath=function(e,t){var n=t.points,r=t.stackedOnPoints,i=0,a=n.length/2,o=t.smoothMonotone;if(t.connectNulls){for(;a>0&&Hw(n[a*2-2],n[a*2-1]);a--);for(;i=t[0]&&e<=t[1]},getExtent:function(){return this._extents[0].slice()},getExtentUnsafe:function(e){return this._extents[e]},setExtent:function(e,t){kT(this._extents,0,e,t)},setExtent2:function(e,t,n){var r=this._extents;r[e]||(r[e]=r[0].slice()),kT(r,e,t,n)},freeze:function(){}};function kT(e,t,n,r){Rm(n,r)&&(e[t][0]=n,e[t][1]=r)}function AT(e){return jT(e)||NT(e)}function jT(e){return e.type===`interval`}function MT(e){return e.type===`time`}function NT(e){return e.type===`log`}function PT(e){return e.type===`ordinal`}function FT(e){var t=Ip(e),n=pp(10,t),r=up(e/n);return r?r===2?r=3:r===3?r=5:r*=2:r=1,wp(r*n,-t)}function IT(e){return Ep(e)+2}function LT(e,t){return mp(e)/mp(t)}function RT(e,t,n){var r=n&&n.lookup;if(r){for(var i=0;i1&&a/o>2&&(i=Math.round(Math.ceil(i/o)*o)),i!==r[0]&&c(r[0],!0,!0);for(var s=i;s<=r[1];s+=o)c(s,!1,s===r[0]||s===r[1]);s-o!==r[1]&&c(r[1],!0,!0);function c(e,t,r){n({value:e,offInterval:t},r)}}var UT=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`ordinal`,r.parse=t.parse,xT(r,t.decoratedMethods);var i=n.ordinalMeta;i||=new _T({}),G(i)&&(i=new _T({categories:U(i,function(e){return J(e)?e.value:e})})),r._ordinalMeta=i;var a=bT(null,null,n.extent||[0,i.categories.length-1]);return r._mapper=a.mapper,ST(r,a.mapper),r}return t.parse=function(e){return e==null?e=NaN:q(e)?(e=this._ordinalMeta.getOrdinal(e),e??=NaN):e=up(e),e},t.prototype.getTicks=function(){var e=[];return HT(this,0,function(t){e.push(t)}),e},t.prototype.getMinorTicks=function(e){},t.prototype.setSortInfo=function(e){if(e==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var t=e.ordinalNumbers,n=this._ordinalNumbersByTick=[],r=this._ticksByOrdinalNumber=[],i=0,a=this._ordinalMeta.categories.length,o=sp(a,t.length);i=0&&e=0&&e=0&&eo[0]&&mi[1]||!isFinite(p)||!isFinite(i[1]))break}else{if(m>f)break;p=sp(p,i[1]),m===f&&(p=i[1])}if(l.push({value:p}),p=wp(p+n,a),s){var h=s.calcNiceTickMultiple(p,d);h>=0&&(p=wp(p+h*n,a))}if(l.length>0&&p===l[l.length-1].value)break;if(l.length>u)return[]}var g=l.length?l[l.length-1].value:i[1];return r[1]>g&&l.push({value:e.expandToNicedExtent?wp(g+n,a):r[1]}),c&&o.pruneTicksByBreak(e.pruneByBreak,l,s.breaks,function(e){return e.value},t.interval,r),c&&e.breakTicks!==`none`&&o.addBreaksToTicks(l,s.breaks,r),l},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this),this._cfg.interval)},t.prototype.getLabel=function(e,t){if(e==null)return``;var n=t&&t.precision;return n==null?n=Ep(e.value)||0:n===`auto`&&(n=this._cfg.intervalPrecision),LS(wp(e.value,n,!0))},t.type=`interval`,t}(hT);hT.registerClass(GT);var KT=function(e,t,n,r){for(;n>>1;e[i][1]16?16:e>7.5?7:e>3.5?4:e>1.5?2:1}function ZT(e){var t=30*iS;return e/=t,e>6?6:e>3?3:e>2?2:1}function QT(e){return e/=rS,e>12?12:e>6?6:e>3.5?4:e>2?2:1}function $T(e,t){return e/=t?nS:tS,e>30?30:e>20?20:e>15?15:e>10?10:e>5?5:e>2?2:1}function eE(e){return cp(Lp(e,!0),1)}function tE(e,t,n){var r=Math.max(0,Xa(dS,t)-1);return SS(new Date(e),dS[r],n).getTime()}function nE(e,t){var n=new Date(0);n[e](1);var r=n.getTime();n[e](1+t);var i=n.getTime()-r;return function(e,t){return Math.max(0,Math.round((t-e)/i))}}function rE(e,t,n,r,i,a){var o=fS,s=0;function c(e,t,n,i,o,c,l){for(var u=nE(o,e),d=t,f=new Date(d);d3e3));)if(f[o](f[i]()+e),d=f.getTime(),a){var p=a.calcNiceTickMultiple(d,u);p>0&&(f[o](f[i]()+p*e),d=f.getTime())}l.push({value:d,notAdd:d>r[1]})}function l(e,i,a){var o=[],s=!i.length;if(!YT(gS(e),r[0],r[1],n)){s&&(i=[{value:tE(r[0],e,n)},{value:r[1]}]);for(var l=0;l=r[0]&&u<=r[1]&&c(f,u,d,p,m,h,o),e===`year`&&a.length>1&&l===0&&a.unshift({value:a[0].value-f})}}for(var l=0;l=r[0]&&v<=r[1]&&f++)}var y=i/t;if(f>y*1.5&&p>y/1.5||(u.push(g),f>y||e===o[m]))break}d=[]}}for(var b=to(U(u,function(e){return to(e,function(e){return e.value>=r[0]&&e.value<=r[1]&&!e.notAdd})}),function(e){return e.length>0}),x=b.length-1,S=[],m=0;mr[0])&&S.unshift({value:r[0],time:{level:0,upperTimeUnit:O,lowerTimeUnit:O},notNice:!0}),(!D||D.values&&(a=s);var c=JT.length,l=Math.min(KT(JT,a,0,c),c-1),u=JT[l][1],d=JT[Math.max(l-1,0)][0];e.setTimeInterval({approxInterval:a,interval:u,minLevelUnit:d})};hT.registerClass(qT);var aE=0,oE=1,sE=2,cE=function(e){z(t,e);function t(n){var r=e.call(this)||this;r.type=`log`,r.parse=GT.parse,r.base=n.logBase||10;var i=[],a=[],o=r._lookup={from:i,to:a};i[aE]=i[oE]=a[aE]=a[oE]=NaN,xT(r,t.mapperMethods);var s=Zx(),c=n.breakOption,l={lookup:o};return s&&s.parseAxisBreakOptionInwardTransform(c,r,{noNegative:!0},sE,l),r.powStub=new GT({breakParsed:l.original}),r.intervalStub=new GT({breakParsed:l.transformed}),ST(r,r.intervalStub),r}return t.prototype.getTicks=function(e){var t=this.base,n=this.powStub,r=Zx(),i=this.intervalStub,a={lookup:{from:i.getExtent(),to:n.getExtent()}};return U(i.getTicks(e||{}),function(e){var i=e.value,o=RT(i,t,a),s;if(r){var c=r.getTicksBreakOutwardTransform(this,e,$x(n),this._lookup);c&&(s=c.vBreak,o=c.tickVal)}return{value:o,break:s}},this)},t.prototype.getMinorTicks=function(e){return WT(this,e,$x(this.powStub),this.intervalStub.getConfig().interval)},t.prototype.getLabel=function(e,t){return this.intervalStub.getLabel(e,t)},t.type=`log`,t.mapperMethods={needTransform:function(){return!0},normalize:function(e){return this.intervalStub.normalize(LT(e,this.base))},scale:function(e){return RT(this.intervalStub.scale(e),this.base,null)},transformIn:function(e,t){return e=LT(e,this.base),t&&t.depth===2?e:this.intervalStub.transformIn(e,t)},transformOut:function(e,t){var n=t?t.depth:null;return lE.depth=n,uE.lookup=this._lookup,RT(n===2?e:this.intervalStub.transformOut(e,lE),this.base,uE)},contain:function(e){return this.powStub.contain(e)},setExtent:function(e,t){this.setExtent2(0,e,t)},setExtent2:function(e,t,n){if(!(!Rm(t,n)||t<=0||n<=0)){var r=dE,i=dE;if(e===0){var a=this._lookup;r=a.to,i=a.from}this.powStub.setExtent2(e,r[aE]=t,r[oE]=n);var o=this.base;this.intervalStub.setExtent2(e,i[aE]=LT(t,o),i[oE]=LT(n,o))}},getFilter:function(){return{g:0}},sanitize:function(e,t){return Rm(t[0],t[1])&&Wp(e)&&e<=0&&(e=t[0]),e},getDefaultStartValue:function(){return 1},getExtent:function(){return this.powStub.getExtent()},getExtentUnsafe:function(e,t){return t===null?this.powStub.getExtentUnsafe(e,null):this.intervalStub.getExtentUnsafe(e,t)}},t}(hT);hT.registerClass(cE);var lE={},uE={},dE=[],fE={value:1,category:1,time:1,log:1},pE=xm();function mE(e){var t=e.get(`type`);return(t==null||!ko(fE,t)&&!hT.getClass(t))&&(t=`value`),t}function hE(e,t,n){var r=Zx(),i;switch(r&&(i=EE(e,t,n)),t){case`category`:return new UT({ordinalMeta:e.getOrdinalMeta?e.getOrdinalMeta():e.getCategories(),extent:Mm()});case`time`:return new qT({locale:e.ecModel.getLocaleModel(),useUTC:e.ecModel.get(`useUTC`),breakOption:i});case`log`:return new cE({logBase:e.get(`logBase`),breakOption:i});case`value`:return new GT({breakOption:i});default:return new((hT.getClass(t))||GT)({})}}function gE(e,t,n){var r=n?wT(e,null):e.getExtentUnsafe(0,null),i=r[0],a=r[1];return Rm(i,a)?i===t||a===t?2:it?1:3:3}function _E(e){pE(e).noOnMyZero=!0}function vE(e){return pE(e).noOnMyZero}function yE(e){var t=e.getLabelModel().get(`formatter`);if(e.type===`time`){var n=pS(t);return function(t,r){return e.scale.getFormattedLabel(t,r,n)}}if(q(t))return function(n){var r=e.scale.getLabel(n);return t.replace(`{value}`,r??``)};if(K(t)){if(e.type===`category`)return function(n,r){return t(bE(e,n),n.value-e.scale.getExtent()[0],null)};var r=Zx();return function(n,i){var a=null;return r&&(a=r.makeAxisLabelFormatterParamBreak(a,n.break)),t(bE(e,n),i,a)}}return function(t){return e.scale.getLabel(t)}}function bE(e,t){var n=e.scale;return PT(n)?n.getLabel(t):t.value}function xE(e){return e.get(`interval`)??`auto`}function SE(e){return e.type===`category`&&xE(e.getLabelModel())===0}function CE(e,t){var n={};return H(e.mapDimensionsAll(t),function(t){n[fx(e,t)]=!0}),ro(n)}function wE(e){return e===`middle`||e===`center`}function TE(e){return e.getShallow(`show`)}function EE(e,t,n){var r=e.get(`breaks`,!0);if(r!=null)return!Zx()||!n||!DE(t)?void 0:r}function DE(e){return e!==`category`}function OE(e,t,n,r,i,a){var o=NT(e),s=o?e.intervalStub:e;if(s.setExtent(r[0],r[1]),o){var c=e.powStub,l={depth:2},u=e.transformOut(r[0],l),d=e.transformOut(r[1],l),f=BT(n,r);t[0]&&!f[0]&&(u=i[0]),t[1]&&!f[1]&&(d=i[1]),c.setExtent(u,d)}s.setConfig(a)}function kE(e,t){return PT(e)?e.getRawOrdinalNumber(t.value):t.value}function AE(e,t){return PT(e)&&!!t.get(`boundaryGap`)}function jE(e,t){if(e.length===t.length){for(var n=0;nt){a?n.push(o(a,c,t)):i&&n.push(o(i,c,0),o(i,c,t));break}else i&&=(n.push(o(i,c,0)),null),n.push(c),a=c}return n}function RE(e,t,n){var r=e.getVisual(`visualMeta`);if(r&&r.length&&e.count()&&t.type===`cartesian2d`){for(var i,a,o=r.length-1;o>=0;o--){var s=e.getDimensionInfo(r[o].dimension);if(i=s&&s.coordDim,i===`x`||i===`y`){a=r[o];break}}if(a){var c=t.getAxis(i),l=U(a.stops,function(e){return{coord:c.toGlobalCoord(c.dataToCoord(e.value)),color:e.color}}),u=l.length,d=a.outerColors.slice();u&&l[0].coord>l[u-1].coord&&(l.reverse(),d.reverse());var f=LE(l,i===`x`?n.getWidth():n.getHeight()),p=f.length;if(!p&&u)return l[0].coord<0?d[1]?d[1]:l[u-1].color:d[0]?d[0]:l[0].color;var m=10,h=f[0].coord-m,g=f[p-1].coord+m,_=g-h;if(_<.001)return`transparent`;H(f,function(e){e.offset=(e.coord-h)/_}),f.push({offset:p?f[p-1].offset:.5,color:d[1]||`transparent`}),f.unshift({offset:p?f[0].offset:.5,color:d[0]||`transparent`});var v=new D_(0,0,0,0,f,!0);return v[i]=h,v[i+`2`]=g,v}}}function zE(e,t,n){var r=e.get(`showAllSymbol`),i=r===`auto`;if(!r||i){var a=n.getAxesByScale(`ordinal`)[0];if(a&&!(i&&BE(a,t))){var o=t.mapDimension(a.dim),s={};return H(a.getViewLabels(),function(e){e.tick.offInterval||(s[kE(a.scale,e.tick)]=1)}),function(e){return!s.hasOwnProperty(t.get(o,e))}}}}function BE(e,t){var n=e.getExtent(),r=Math.abs(n[1]-n[0])/e.scale.count();isNaN(r)&&(r=0);for(var i=t.count(),a=Math.max(1,Math.round(i/5)),o=0;or)return!1;return!0}function VE(e){for(var t=e.length/2;t>0&&Hw(e[t*2-2],e[t*2-1]);t--);return t-1}function HE(e,t){return[e[t*2],e[t*2+1]]}function UE(e,t,n){for(var r=e.length/2,i=n===`x`?0:1,a,o,s=0,c=-1,l=0;l=t||a>=t&&o<=t){c=l;break}s=l,a=o}return{range:[s,c],t:(t-a)/(o-a)}}function WE(e){if(e.get([`endLabel`,`show`]))return!0;for(var t=0;t0&&e.get([`emphasis`,`lineStyle`,`width`])===`bolder`){var M=f.getState(`emphasis`).style;M.lineWidth=+f.style.lineWidth+1}Xm(f).seriesIndex=e.seriesIndex,sg(f,k,A,j);var N=PE(e.get(`smooth`)),P=e.get(`smoothMonotone`);if(f.setShape({smooth:N,smoothMonotone:P,connectNulls:x}),p){var ee=a.getCalculationInfo(`stackedOnSeries`),te=0;p.useStyle(Ya(s.getAreaStyle(),{fill:E,opacity:.7,lineJoin:`bevel`,decal:a.getVisual(`style`).decal})),ee&&(te=PE(ee.get(`smooth`))),p.setShape({smooth:N,stackedOnSmooth:te,smoothMonotone:P,connectNulls:x}),dg(p,e,`areaStyle`),Xm(p).seriesIndex=e.seriesIndex,sg(p,k,A,j)}var ne=this._changePolyState;a.eachItemGraphicEl(function(e){e&&(e.onHoverStateChange=ne)}),this._polyline.onHoverStateChange=ne,this._data=a,this._coordSys=r,this._stackedOnPoints=y,this._points=c,this._step=w,this._valueOrigin=_;var re=e.get(`triggerEvent`),ie=e.get(`triggerLineEvent`),ae=ie===!0||re===!0||re===`line`,oe=ie===!0||re===!0||re===`area`;this.packEventData(e,f,ae),p&&this.packEventData(e,p,oe)},t.prototype.packEventData=function(e,t,n){Xm(t).eventData=n?{componentType:`series`,componentSubType:`line`,componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:`line`,selfType:t===this._polygon?`area`:`line`}:null},t.prototype.highlight=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`emphasis`),!(a instanceof Array)&&a!=null&&a>=0){var o=i.getLayout(`points`),s=i.getItemGraphicEl(a);if(!s){var c=o[a*2],l=o[a*2+1];if(Hw(c,l)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,l))return;var u=e.get(`zlevel`)||0,d=e.get(`z`)||0;s=new Mw(i,a),s.x=c,s.y=l,s.setZ(u,d);var f=s.getSymbolPath().getTextContent();f&&(f.zlevel=u,f.z=d,f.z2=this._polyline.z2+1),s.__temp=!0,i.setItemGraphicEl(a,s),s.stopSymbolAnimation(!0),this.group.add(s)}s.highlight()}else aT.prototype.highlight.call(this,e,t,n,r)},t.prototype.downplay=function(e,t,n,r){var i=e.getData(),a=bm(i,r);if(this._changePolyState(`normal`),a!=null&&a>=0){var o=i.getItemGraphicEl(a);o&&(o.__temp?(i.setItemGraphicEl(a,null),this.group.remove(o)):o.downplay())}else aT.prototype.downplay.call(this,e,t,n,r)},t.prototype._changePolyState=function(e){var t=this._polygon;Nh(this._polyline,e),t&&Nh(t,e)},t.prototype._newPolyline=function(e){var t=this._polyline;return t&&this._lineGroup.remove(t),t=new $w({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(t),this._polyline=t,t},t.prototype._newPolygon=function(e,t){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new tT({shape:{points:e,stackedOnPoints:t},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,t,n){var r,i,a=t.getBaseAxis(),o=a.inverse;t.type===`cartesian2d`?(r=a.isHorizontal(),i=!1):t.type===`polar`&&(r=a.dim===`angle`,i=!0);var s=e.hostModel,c=s.get(`animationDuration`);K(c)&&(c=c(null));var l=s.get(`animationDelay`)||0,u=K(l)?l(null):l;e.eachItemGraphicEl(function(e,a){var s=e;if(s){var d=[e.x,e.y],f=void 0,p=void 0,m=void 0;if(n){if(i){var h=n,g=t.pointToCoord(d);r?(f=h.startAngle,p=h.endAngle,m=-g[1]/180*Math.PI):(f=h.r0,p=h.r,m=g[0])}else{var _=n;r?(f=_.x,p=_.x+_.width,m=e.x):(f=_.y+_.height,p=_.y,m=e.y)}}var v=p===f?0:(m-f)/(p-f);o&&(v=1-v);var y=K(l)?l(a):c*v+u,b=s.getSymbolPath(),x=b.getTextContent();s.attr({scaleX:0,scaleY:0}),s.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:y}),x&&x.animateFrom({style:{opacity:0}},{duration:300,delay:y}),b.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,t,n){var r=e.getModel(`endLabel`);if(WE(e)){var i=e.getData(),a=this._polyline,o=i.getLayout(`points`);if(!o){a.removeTextContent(),this._endLabel=null;return}var s=this._endLabel;s||(s=this._endLabel=new Wf({z2:200}),s.ignoreClip=!0,a.setTextContent(this._endLabel),a.disableLabelAnimation=!0);var c=VE(o);c>=0&&(qv(a,Jv(e,`endLabel`),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(e,t,n){return n==null?Aw(i,e):jw(i,n)},enableTextSetter:!0},KE(r,t)),a.textConfig.position=null)}else this._endLabel&&=(this._polyline.removeTextContent(),null)},t.prototype._endLabelOnDuring=function(e,t,n,r,i,a,o){var s=this._endLabel,c=this._polyline;if(s){e<1&&r.originalX==null&&(r.originalX=s.x,r.originalY=s.y);var l=n.getLayout(`points`),u=n.hostModel,d=u.get(`connectNulls`),f=a.get(`precision`),p=a.get(`distance`)||0,m=o.getBaseAxis(),h=m.isHorizontal(),g=m.inverse,_=t.shape,v=g?h?_.x:_.y+_.height:h?_.x+_.width:_.y,y=(h?p:0)*(g?-1:1),b=(h?0:-p)*(g?-1:1),x=h?`x`:`y`,S=UE(l,v,x),C=S.range,w=C[1]-C[0],T=void 0;if(w>=1){if(w>1&&!d){var E=HE(l,C[0]);s.attr({x:E[0]+y,y:E[1]+b}),i&&(T=u.getRawValue(C[0]))}else{var E=c.getPointOn(v,x);E&&s.attr({x:E[0]+y,y:E[1]+b});var D=u.getRawValue(C[0]),O=u.getRawValue(C[1]);i&&(T=jm(n,f,D,O,S.t))}r.lastFrameIndex=C[0]}else{var k=e===1||r.lastFrameIndex>0?C[0]:0,E=HE(l,k);i&&(T=u.getRawValue(k)),s.attr({x:E[0]+y,y:E[1]+b})}if(i){var A=iy(s);typeof A.setLabelText==`function`&&A.setLabelText(T)}}},t.prototype._doUpdateAnimation=function(e,t,n,r,i,a,o){var s=this._polyline,c=this._polygon,l=e.hostModel,u=Jw(this._data,e,this._stackedOnPoints,t,this._coordSys,n,this._valueOrigin,a),d=u.current,f=u.stackedOnCurrent,p=u.next,m=u.stackedOnNext;if(i&&(f=IE(u.stackedOnCurrent,u.current,n,i,o),d=IE(u.current,null,n,i,o),m=IE(u.stackedOnNext,u.next,n,i,o),p=IE(u.next,null,n,i,o)),NE(d,p)>3e3||c&&NE(f,m)>3e3){s.stopAnimation(),s.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:m}));return}s.shape.__points=u.current,s.shape.points=d;var h={shape:{points:p}};u.current!==d&&(h.shape.__points=u.next),s.stopAnimation(),U_(s,h,l),c&&(c.setShape({points:d,stackedOnPoints:f}),c.stopAnimation(),U_(c,{shape:{stackedOnPoints:m}},l),s.shape.points!==c.shape.points&&(c.shape.points=s.shape.points));for(var g=[],_=u.status,v=0;v<_.length;v++)if(_[v].cmd===`=`){var y=e.getItemGraphicEl(_[v].idx1);y&&g.push({el:y,ptIdx:v})}s.animators&&s.animators.length&&s.animators[0].during(function(){c&&c.dirtyShape();for(var e=s.shape.__points,t=0;tt&&(t=e[n]);return isFinite(t)?t:NaN},min:function(e){for(var t=1/0,n=0;n10&&a.type===`cartesian2d`&&i){var s=a.getBaseAxis(),c=a.getOtherAxis(s),l=s.getExtent(),u=n.getDevicePixelRatio(),d=Math.abs(l[1]-l[0])*(u||1),f=Math.round(o/d);if(isFinite(f)&&f>1){i===`lttb`?e.setData(r.lttbDownSample(r.mapDimension(c.dim),1/f)):i===`minmax`&&e.setData(r.minmaxDownSample(r.mapDimension(c.dim),1/f));var p=void 0;q(i)?p=YE[i]:K(i)&&(p=i),p&&e.setData(r.downSample(r.mapDimension(c.dim),1/f,p,XE))}}}}}function QE(e){e.registerChartView(qE),e.registerSeriesModel(kw),e.registerLayout(JE(`line`,!0)),e.registerVisual({seriesType:`line`,reset:function(e){var t=e.getData(),n=e.getModel(`lineStyle`).getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual(`style`).fill),t.setVisual(`legendLineStyle`,n)}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`line`))}var $E=xm(),eD=xm(),tD={estimate:1,determine:2};function nD(e){return{out:{noPxChangeTryDetermine:[]},kind:e}}function rD(e,t){var n=e.getLabelModel().get(`customValues`);if(n){var r=e.scale;return{labels:U(aD(n,r),function(t,n){return{formattedLabel:yE(e)(t,n),rawLabel:r.getLabel(t),tick:t}})}}return e.type===`category`?oD(e,t):lD(e)}function iD(e,t,n){var r=e.scale,i=e.getTickModel().get(`customValues`);return i?{ticks:aD(i,r)}:e.type===`category`?cD(e,t):{ticks:r.getTicks(n)}}function aD(e,t){var n=t.getExtent(),r=[];return H(e,function(e){e=t.parse(e),e>=n[0]&&e<=n[1]&&r.push(e)}),Um(r,Gm,null),Tp(r),U(r,function(e){return{value:e}})}function oD(e,t){var n=e.getLabelModel(),r=sD(e,n,t);return!n.get(`show`)||e.scale.isBlank()?{labels:[]}:r}function sD(e,t,n){var r=dD(e),i=xE(t),a=n.kind===tD.estimate;if(!a){var o=pD(r,i);if(o)return o}var s,c;K(i)?s=bD(e,i,!1):(c=i===`auto`?hD(e,n):i,s=bD(e,c,!1));var l={labels:s,labelCategoryInterval:c};return a?n.out.noPxChangeTryDetermine.push(function(){return mD(r,i,l),!0}):mD(r,i,l),l}function cD(e,t){var n=uD(e),r=xE(t),i=pD(n,r);if(i)return i;var a,o;if((!t.get(`show`)||e.scale.isBlank())&&(a=[]),K(r))a=bD(e,r,!0);else if(r===`auto`){var s=sD(e,e.getLabelModel(),nD(tD.determine));o=s.labelCategoryInterval,a=U(s.labels,function(e){return e.tick})}else o=r,a=bD(e,o,!0);return mD(n,r,{ticks:a,tickCategoryInterval:o})}function lD(e){var t=e.scale.getTicks(),n=yE(e);return{labels:U(t,function(t,r){return{formattedLabel:n(t,r),rawLabel:e.scale.getLabel(t),tick:t}})}}var uD=fD(`axisTick`),dD=fD(`axisLabel`);function fD(e){return function(t){return eD(t)[e]||(eD(t)[e]={list:[]})}}function pD(e,t){for(var n=0;nu&&(l=Math.max(1,Math.floor(c/u)));for(var d=s[0],f=e.dataToCoord(d+1)-e.dataToCoord(d),p=Math.abs(f*Math.cos(a)),m=Math.abs(f*Math.sin(a)),h=0,g=0;d<=s[1];d+=l){var _=0,v=0,y=dc(i({value:d}),r.font,`center`,`top`);_=y.width*1.3,v=y.height*1.3,h=Math.max(h,_,7),g=Math.max(g,v,7)}var b=h/p,x=g/m;isNaN(b)&&(b=1/0),isNaN(x)&&(x=1/0);var S=Math.max(0,Math.floor(Math.min(b,x)));return n===tD.estimate?(t.out.noPxChangeTryDetermine.push(W(_D,null,e,S,c)),S):vD(e,S,c)??S}function _D(e,t,n){return vD(e,t,n)==null}function vD(e,t,n){var r=$E(e.model),i=e.getExtent(),a=r.lastAutoInterval,o=r.lastTickCount;if(a!=null&&o!=null&&Math.abs(a-t)<=1&&Math.abs(o-n)<=1&&a>t&&r.axisExtent0===i[0]&&r.axisExtent1===i[1])return a;r.lastTickCount=n,r.lastAutoInterval=t,r.axisExtent0=i[0],r.axisExtent1=i[1]}function yD(e){var t=e.getLabelModel();return{axisRotate:e.getRotate?e.getRotate():e.isHorizontal&&!e.isHorizontal()?90:0,labelRotate:t.get(`rotate`)||0,font:t.getFont()}}function bD(e,t,n){var r=yE(e),i=e.scale,a=[],o=K(t);return HT(i,o?0:t,function(e,s){var c=i.getLabel(e);if(o){var l=!!t(e.value,c);if(e.offInterval=!l,!l&&!s)return}a.push(n?e:{formattedLabel:r(e),rawLabel:c,tick:e})}),a}var xD=xm();function SD(e){xD(e).prepare={}}function CD(e){xD(e).fullUpdate={}}function wD(e){return xD(e).prepare}function TD(e){return xD(e).fullUpdate}var ED=Vm(),DD=xm(),OD=xm();function kD(e,t){var n=e.model,r=DD(TD(n.ecModel)).keyed,i=r&&r.get(t);return i&&i.get(n.uid)}function AD(e,t){return ND(kD(e,t))}function jD(e,t){var n=[];return MD(e.model.ecModel,function(e){for(var r=0;r0?(t>o&&(o=t),a=!1):t===-2&&(a=!0))}),Wp(n)&&n>0&&Wp(o)?(e.w=r/n*o,e.w2=o):a&&(e.w=r*KD,e.w2=e.w*n/r)}var XD=[0,1],ZD=function(){function e(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return e.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return e>=n&&e<=r},e.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},e.prototype.getExtent=function(){return this._extent.slice()},e.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},e.prototype.dataToCoord=function(e,t){var n=this.scale;return e=n.normalize(n.parse(e)),vp(e,XD,QD(this),t)},e.prototype.coordToData=function(e,t){var n=vp(e,QD(this),XD,t);return this.scale.scale(n)},e.prototype.pointToData=function(e,t){},e.prototype.getTicksCoords=function(e){e||={};var t=e.tickModel||this.getTickModel(),n=U(iD(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}).ticks,function(e){return{coord:this.dataToCoord(kE(this.scale,e)),tick:e}},this),r=t.get(`alignWithLabel`),i=$D(this,n,r);return U(n,function(e){return{coord:e.coord,tickValue:e.tick.value,onBand:i}})},e.prototype.getMinorTicksCoords=function(){if(PT(this.scale))return[];var e=this.model.getModel(`minorTick`).get(`splitNumber`);return e>0&&e<100||(e=5),U(this.scale.getMinorTicks(e),function(e){return U(e,function(e){return{coord:this.dataToCoord(e),tickValue:e}},this)},this)},e.prototype.getViewLabels=function(e){return e||=nD(tD.determine),rD(this,e).labels},e.prototype.getLabelModel=function(){return this.model.getModel(`axisLabel`)},e.prototype.getTickModel=function(){return this.model.getModel(`axisTick`)},e.prototype.getBandWidth=function(){return qD(this,{min:1}).w},e.prototype.calculateCategoryInterval=function(e){return e||=nD(tD.determine),gD(this,e)},e}();function QD(e){var t=e.getExtent();if(e.onBand){var n=(t[1]-t[0])/e.scale.count()/2;t[0]+=n,t[1]-=n}return t}function $D(e,t,n){var r=t.length;if(!e.onBand||n||!r)return!1;var i=qD(e).w;if(!i)return!1;H(t,function(e){e.coord-=i/2});var a=e.scale.getExtent(),o=t[r-1];return o.tick.offInterval&&t.pop(),t.push({coord:o.coord+i,tick:{value:a[1]+1}}),!0}var eO=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r)||this;return o.index=0,o.type=i||`value`,o.position=a||`bottom`,o}return t.prototype.isHorizontal=function(){var e=this.position;return e===`top`||e===`bottom`},t.prototype.getGlobalExtent=function(e){var t=this.getExtent();return t[0]=this.toGlobalCoord(t[0]),t[1]=this.toGlobalCoord(t[1]),e&&t[0]>t[1]&&t.reverse(),t},t.prototype.pointToData=function(e,t){return this.coordToData(this.toLocalCoord(e[this.dim===`x`?0:1]),t)},t.prototype.setCategorySortInfo=function(e){if(this.type!==`category`)return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(ZD),tO=[`label`,`labelLine`,`layoutOption`,`priority`,`defaultAttr`,`marginForce`,`minMarginForce`,`marginDefault`,`suggestIgnore`],nO=1,rO=2,iO=nO|rO;function aO(e,t,n){n||=iO,t?e.dirty|=n:e.dirty&=~n}function oO(e,t){return t||=iO,e.dirty==null||!!(e.dirty&t)}function sO(e){if(e)return oO(e)&&cO(e,e.label,e),e}function cO(e,t,n){var r=t.getComputedTransform();e.transform=Fv(e.transform,r);var i=e.localRect=Pv(e.localRect,t.getBoundingRect()),a=t.style,o=a.margin,s=n&&n.marginForce,c=n&&n.minMarginForce,l=n&&n.marginDefault,u=a.__marginType;u==null&&l&&(o=l,u=oy.textMargin);for(var d=0;d<4;d++)lO[d]=u===oy.minMargin&&c&&c[d]!=null?c[d]:s&&s[d]!=null?s[d]:o?o[d]:0;u===oy.textMargin&&Ev(i,lO,!1,!1);var f=e.rect=Pv(e.rect,i);return r&&f.applyTransform(r),u===oy.minMargin&&Ev(f,lO,!1,!1),e.axisAligned=Mv(r),(e.label=e.label||{}).ignore=t.ignore,aO(e,!1),aO(e,!0,rO),e}var lO=[0,0,0,0];function uO(e,t,n){return e.transform=Fv(e.transform,n),e.localRect=Pv(e.localRect,t),e.rect=Pv(e.rect,t),n&&e.rect.applyTransform(n),e.axisAligned=Mv(n),e.obb=void 0,(e.label=e.label||{}).ignore=!1,e}function dO(e,t){if(e){e.label.x+=t.x,e.label.y+=t.y,e.label.markRedraw();var n=e.transform;n&&(n[4]+=t.x,n[5]+=t.y);var r=e.rect;r&&(r.x+=t.x,r.y+=t.y);var i=e.obb;i&&i.fromBoundingRect(e.localRect,n)}}function fO(e,t){for(var n=0;n.1?`x`:`y`,u=a.transGroup[l];if(o.sort(function(e,t){return Math.abs(e.label[l]-u)-Math.abs(t.label[l]-u)}),c&&s){var d=i.getExtent(),f=Math.min(d[0],d[1]),p=Math.max(d[0],d[1])-f;s.union(new Z(f,0,p,1))}a.stOccupiedRect=s,a.labelInfoList=o}var EO=os(),DO=new Z(0,0,0,0),OO=function(e,t,n,r,i,a){if(wE(e.nameLocation)){var o=a.stOccupiedRect;o&&kO(uO({},o,a.transGroup.transform),r,i)}else AO(a.labelInfoList,a.dirVec,r,i)};function kO(e,t,n){var r=new Ms;hO(e,t,r,{direction:Math.atan2(n.y,n.x),bidirectional:!1,touchThreshold:.05})&&dO(t,r)}function AO(e,t,n,r){for(var i=Ms.dot(r,t)>=0,a=0,o=e.length;a0?`top`:`bottom`,i=`center`):Mp(r-yO)?(a=n>0?`bottom`:`top`,i=`center`):(a=`middle`,i=r>0&&r0?`right`:`left`:n>0?`left`:`right`),{rotation:r,textAlign:i,textVerticalAlign:a}},e.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+`Index`]=e.componentIndex,t},e.isLabelSilent=function(e){var t=e.get(`tooltip`);return e.get(`silent`)||!(e.get(`triggerEvent`)||t&&t.show)},e}(),MO=[`axisLine`,`axisTickLabelEstimate`,`axisTickLabelDetermine`,`axisName`],NO={axisLine:function(e,t,n,r,i,a,o){var s=r.get([`axisLine`,`show`]);if(s===`auto`&&(s=!0,e.raw.axisLineAutoShow!=null&&(s=!!e.raw.axisLineAutoShow)),s){var c=r.axis.getExtent(),l=a.transform,u=[c[0],0],d=[c[1],0],f=u[0]>d[0];l&&(ks(u,u,l),ks(d,d,l));var p=V({lineCap:`round`},r.getModel([`axisLine`,`lineStyle`]).getLineStyle()),m={strokeContainThreshold:e.raw.strokeContainThreshold||5,silent:!0,z2:1,style:p};if(r.get([`axisLine`,`breakLine`])&&eS(r.axis.scale))_O().buildAxisBreakLine(r,i,a,m);else{var h=new v_(V({shape:{x1:u[0],y1:u[1],x2:d[0],y2:d[1]}},m));uv(h.shape,h.style.lineWidth),h.anid=`line`,i.add(h)}var g=r.get([`axisLine`,`symbol`]);if(g!=null){var _=r.get([`axisLine`,`symbolSize`]);q(g)&&(g=[g,g]),(q(_)||so(_))&&(_=[_,_]);var v=Ow(r.get([`axisLine`,`symbolOffset`])||0,_),y=_[0],b=_[1];H([{rotate:e.rotation+Math.PI/2,offset:v[0],r:0},{rotate:e.rotation-Math.PI/2,offset:v[1],r:Math.sqrt((u[0]-d[0])*(u[0]-d[0])+(u[1]-d[1])*(u[1]-d[1]))}],function(t,n){if(g[n]!==`none`&&g[n]!=null){var r=Ew(g[n],-y/2,-b/2,y,b,p.stroke,!0),a=t.r+t.offset,o=f?d:u;r.attr({rotation:t.rotate,x:o[0]+a*Math.cos(e.rotation),y:o[1]-a*Math.sin(e.rotation),silent:!0,z2:11}),i.add(r)}})}}},axisTickLabelEstimate:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.estimate)},axisTickLabelDetermine:function(e,t,n,r,i,a,o,s){HO(t,i,s)&&PO(e,t,n,r,i,a,o,tD.determine);var c=BO(e,i,a,r);LO(e,t.labelLayoutList,c),VO(e,i,a,r,e.tickDirection)},axisName:function(e,t,n,r,i,a,o,s){var c=n.ensureRecord(r);t.nameEl&&=(i.remove(t.nameEl),c.nameLayout=c.nameLocation=null);var l=e.axisName;if(YO(l)){var u=e.nameLocation,d=e.nameDirection,f=r.getModel(`nameTextStyle`),p=r.get(`nameGap`)||0,m=r.axis.getExtent(),h=r.axis.inverse?-1:1,g=new Ms(0,0),_=new Ms(0,0);u===`start`?(g.x=m[0]-h*p,_.x=-h):u===`end`?(g.x=m[1]+h*p,_.x=h):(g.x=(m[0]+m[1])/2,g.y=e.labelOffset+d*p,_.y=d);var v=os();_.transform(ds(v,v,e.rotation));var y=r.get(`nameRotate`);y!=null&&(y=y*yO/180);var b,x;wE(u)?b=jO.innerTextLayout(e.rotation,y??e.rotation,d):(b=FO(e.rotation,u,y||0,m),x=e.raw.axisNameAvailableWidth,x!=null&&(x=Math.abs(x/Math.sin(b.rotation)),!isFinite(x)&&(x=null)));var S=f.getFont(),C=r.get(`nameTruncate`,!0)||{},w=C.ellipsis,T=mo(e.raw.nameTruncateMaxWidth,C.maxWidth,x),E=s.nameMarginLevel||0,D=new Wf({x:g.x,y:g.y,rotation:b.rotation,silent:jO.isLabelSilent(r),style:Yv(f,{text:l,font:S,overflow:`truncate`,width:T,ellipsis:w,fill:f.getTextColor()||r.get([`axisLine`,`lineStyle`,`color`]),align:f.get(`align`)||b.textAlign,verticalAlign:f.get(`verticalAlign`)||b.textVerticalAlign}),z2:1});if(kv({el:D,componentModel:r,itemName:l}),D.__fullText=l,D.anid=`name`,r.get(`triggerEvent`)){var O=jO.makeAxisEventDataBase(r);O.targetType=`axisName`,O.name=l,Xm(D).eventData=O}a.add(D),D.updateTransform(),t.nameEl=D;var k=c.nameLayout=sO({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:wE(u)?bO[E]:xO[E]});if(c.nameLocation=u,i.add(D),D.decomposeTransform(),e.shouldNameMoveOverlap&&k){var A=n.ensureRecord(r);n.resolveAxisNameOverlap(e,n,r,k,_,A)}}}};function PO(e,t,n,r,i,a,o,s){WO(t)||UO(e,t,i,s,r,o);var c=t.labelLayoutList;KO(e,r,c,a),ZO(r,e.rotation,c);var l=e.optionHideOverlap;IO(r,c,l),l&&mO(to(c,function(e){return e&&!e.label.ignore})),TO(e,n,r,c)}function FO(e,t,n,r){var i=jp(n-e),a,o,s=r[0]>r[1],c=t===`start`&&!s||t!==`start`&&s;return Mp(i-yO/2)?(o=c?`bottom`:`top`,a=`center`):Mp(i-yO*1.5)?(o=c?`top`:`bottom`,a=`center`):(o=`middle`,a=iyO/2?c?`left`:`right`:c?`right`:`left`),{rotation:i,textAlign:a,textVerticalAlign:o}}function IO(e,t,n){var r=e.axis,i=e.get([`axisLabel`,`customValues`]);if(SE(r))return;function a(e,a,o){var s=sO(t[a]),c=sO(t[o]),l=r.scale;if(s&&c){if(e==null){if(!n&&i)return;var u=SO(s.label).labelInfo.tick;if(MT(l)&&u.notNice||PT(l)&&u.offInterval){RO(s.label);return}}if(e===!1||s.suggestIgnore){RO(s.label);return}if(c.suggestIgnore){RO(c.label);return}var d=.1;if(!n){var f=[0,0,0,0];s=fO({marginForce:f},s),c=fO({marginForce:f},c)}hO(s,c,null,{touchThreshold:d})&&RO(e?c.label:s.label)}}var o=e.get([`axisLabel`,`showMinLabel`]),s=e.get([`axisLabel`,`showMaxLabel`]),c=t.length;a(o,0,1),a(s,c-1,c-2)}function LO(e,t,n){e.showMinorTicks||H(t,function(e){if(e&&e.label.ignore)for(var t=0;t0&&u[1]>0&&!d[0]&&(u[0]=0),u[0]<0&&u[1]<0&&!d[1]&&(u[1]=0));var y=!1;u[0]>u[1]&&(u.reverse(),y=!0);var b=sk(e,t.get(`startValue`,!0)),x=b!=null;!Wp(b)&&r&&(b=e.getDefaultStartValue?e.getDefaultStartValue():0),Wp(b)&&(x||!_||v)&&(bu[1]&&!d[1]&&(u[1]=b,d[1]=!0)),ok(this._i={scale:e,dataMM:l,noZoomEffMM:u,zoomMM:[],fixMM:d,zoomFixMM:[!1,!1],startValue:b,isBlank:g,incl0:v,tggAxInv:y,ctnShp:i},u)}return e.prototype.makeNoZoom=function(){return this._i.noZoomEffMM.slice()},e.prototype.makeFinal=function(){var e=this._i,t=e.zoomMM,n=e.noZoomEffMM,r=e.zoomFixMM,i=e.fixMM,a={fixMM:i,zoomFixMM:r,isBlank:e.isBlank,incl0:e.incl0,tggAxInv:e.tggAxInv,ctnShp:e.ctnShp,effMM:n.slice()},o=a.effMM;return t[0]!=null&&(o[0]=t[0],i[0]=r[0]=!0),t[1]!=null&&(o[1]=t[1],i[1]=r[1]=!0),ok(e,o),a},e.prototype.makeRenderInfo=function(){return{startValue:this._i.startValue}},e.prototype.setZoomMM=function(e,t){this._i.zoomMM[e]=t},e}();function ok(e,t){var n=e.scale,r=e.dataMM;n.sanitize&&(t[0]=n.sanitize(t[0],r),t[1]=n.sanitize(t[1],r),Bm(t))}function sk(e,t){return t==null?null:po(t)?NaN:e.parse(t)}function ck(e,t){var n;if(PT(e))n=[0,0];else{var r=t.get(`boundaryGap`);typeof r==`boolean`&&(r=null),n=G(r)?r:[r,r]}return[lk(n[0]),lk(n[1])]}function lk(e){return hc(typeof e==`boolean`?0:e,1)||0}function uk(e){var t=rk(e.scale);return t.extent||=Mm(),t}function dk(e,t){uk(e).dimIdxInCoord=t.get(e.dim)}function fk(e,t){var n=e.scale,r=e.model,i=e.dim;n.rawExtentInfo||pk(n,e,i,r,t)}function pk(e,t,n,r,i){var a=uk(t),o=a.extent,s=!1;PD(t,function(r){if(r.boxCoordinateSystem){var i=nx(r).coord,c=a.dimIdxInCoord;if(c>=0&&G(i)){var l=i[c];l!=null&&!G(l)&&Nm(o,e.parse(l))}}else if(r.coordinateSystem){var u=r.getData();if(u){var d=e.getFilter?e.getFilter():null;H(CE(u,n),function(e){Im(o,u.getApproximateExtent(e,d))})}r.__requireStartValue&&r.__requireStartValue(t)&&(s=!0)}});var c=yk(e,t,r);hk(e,new ak(e,r,o,s,c),i),a.extent=null}function mk(e,t){var n=e.scale;hk(n,new ak(n,e.model,t,!1,!1),ik)}function hk(e,t,n){e.rawExtentInfo=t,t.from=n}function gk(e,t){_k.set(e,t)}var _k=X();function vk(e,t,n,r,i){e.rawExtentInfo||mk({scale:e,model:t},i||Mm());var a=e.rawExtentInfo.makeFinal(),o=a.effMM;return e.setExtent(o[0],o[1]),e.setBlank(a.isBlank),r&&a.tggAxInv&&n&&!n.get(`legacyMinMaxDontInverseAxis`)&&(r.inverse=!r.inverse),a}function yk(e,t,n){var r=AE(e,n),i=n.get(`containShape`,!0);if(i==null&&!r&&(i=!0),!i)return!1;var a=!1;return RD(t,function(e){a=!!_k.get(e)||a}),a}function bk(e,t,n,r){if(n.ctnShp){var i;if(RD(e,function(t){var n=_k.get(t);if(n){var a=n(e,r);a&&(i||=[0,0],Pm(i,a[0]),Fm(i,a[1]),_E(e))}}),i){var a=t.getExtent();if(PT(t))e.onBand||t.setExtent2(1,sp(a[0],a[0]+i[0]),cp(a[1],a[1]+i[1]));else{var o=a.slice();n.zoomFixMM[0]||(o[0]=sp(o[0],t.transformOut(t.transformIn(o[0],null)+i[0],null))),n.zoomFixMM[1]||(o[1]=cp(o[1],t.transformOut(t.transformIn(o[1],null)+i[1],null))),(o[0]a[1])&&t.setExtent2(1,o[0],o[1])}}}}function xk(){BD(`liPosMinGap`,Sk)}function Sk(e,t,n){var r=X(),i=n.serUids,a=n.liPosMinGap,o,s=t.axis,c=s.scale,l=c.needTransform(),u=c.getFilter?c.getFilter():null,d=mb(u);function f(n){ID(e,t.sers,function(e){var t=e.getRawData(),r=t.getDimensionIndex(t.mapDimension(s.dim));r>=0&&n(r,e,t.getStore())})}var p=0;if(f(function(e,t,n){r.set(t.uid,1),(!i||!i.hasKey(t.uid))&&(o=!0),p+=n.count()}),(!i||i.keys().length!==r.keys().length)&&(o=!0),!o&&a!=null){t.liPosMinGap=a;return}Kw(Ck,p);var m=0;f(function(e,t,n){for(var r=0,i=n.count();r0&&v0?-2:-1,n.serUids=r}var Ck=Kw({ctor:Ww},50);function wk(e){return function(t,n){var r=qD(t,{fromStat:{key:e}});if(Wp(r.w2))return[-r.w2/2,r.w2/2]}}function Tk(e,t){return e+`|&`+t}function Ek(e){return xk(),{liPosMinGap:!PT(e.scale)}}function Dk(e,t,n,r){WD(e,{key:t,seriesType:n,coordSysType:r,getMetrics:Ek})}function Ok(e){return e.scale.rawExtentInfo.makeRenderInfo().startValue}var kk={left:0,right:0,top:0,bottom:0},Ak=[`25%`,`25%`],jk=`cartesian2d`,Mk=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(t,n){var r=aC(t.outerBounds);e.prototype.mergeDefaultAndTheme.apply(this,arguments),r&&t.outerBounds&&iC(t.outerBounds,r)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&iC(this.option.outerBounds,t.outerBounds)},t.type=`grid`,t.dependencies=[`xAxis`,`yAxis`],t.layoutMode=`box`,t.defaultOption={show:!1,z:0,left:`15%`,top:65,right:`10%`,bottom:80,containLabel:!1,outerBoundsMode:`auto`,outerBounds:kk,outerBoundsContain:`all`,outerBoundsClampWidth:Ak[0],outerBoundsClampHeight:Ak[1],backgroundColor:Q.color.transparent,borderWidth:1,borderColor:Q.color.neutral30},t}(cC),Nk=Vm(),Pk=`__ec_stack_`;function Fk(e){return e.get(`stack`)||Pk+e.seriesIndex}function Ik(e,t){var n=Lk(e,t);return n.columnMap=Rk(n),n}function Lk(e,t){var n=Tk(t,jk),r=[],i=qD(e,{fromStat:{key:n},min:1});return FD(e,n,function(e){r.push({barWidth:yp(e.get(`barWidth`),i.w),barMaxWidth:yp(e.get(`barMaxWidth`),i.w),barMinWidth:yp(e.get(`barMinWidth`)||(Vk(e)?.5:1),i.w),barGap:e.get(`barGap`),barCategoryGap:e.get(`barCategoryGap`),defaultBarGap:e.get(`defaultBarGap`),stackId:Fk(e)})}),{bandWidthResult:i,seriesInfo:r}}function Rk(e){var t=e.bandWidthResult.w,n=t,r=0,i,a,o=[],s={};H(e.seriesInfo,function(e,t){t||(a=e.defaultBarGap||0);var c=e.stackId;ko(s,c)||r++;var l=s[c];l||(l=s[c]={width:0,maxWidth:0},o.push(c));var u=e.barWidth;u&&!l.width&&(l.width=u,u=sp(n,u),n-=u);var d=e.barMaxWidth;d&&(l.maxWidth=d);var f=e.barMinWidth;f&&(l.minWidth=f);var p=e.barGap;p!=null&&(a=p);var m=e.barCategoryGap;m!=null&&(i=m)}),i??=cp(35-o.length*4,15)+`%`;var c=yp(i,t),l=yp(a,1),u=(n-c)/(r+(r-1)*l);u=cp(u,0),H(o,function(e){var t=s[e],i=t.maxWidth,a=t.minWidth;if(t.width){var o=t.width;i&&(o=sp(o,i)),a&&(o=cp(o,a)),t.width=o,n-=o+l*o,r--}else{var o=u;i&&io&&(o=a),o!==u&&(t.width=o,n-=o+l*o,r--)}}),u=(n-c)/(r+(r-1)*l),u=cp(u,0);var d=0,f;H(o,function(e){var t=s[e];t.width||=u,f=t,d+=t.width*(1+l)}),f&&(d-=f.width*l);var p={},m=-d/2;return H(o,function(e){var n=s[e];p[e]=p[e]||{bandWidth:t,offset:m,width:n.width},m+=n.width*(1+l)}),p}function zk(e){return{seriesType:e,overallReset:function(t){var n=Tk(e,jk);LD(t,n,function(t){var r=Ik(t,e);FD(t,n,function(e){var t=r.columnMap[Fk(e)];e.getData().setLayout({bandWidth:t.bandWidth,offset:t.offset,size:t.width})})})}}}function Bk(e){return{seriesType:e,plan:nT(),reset:function(e){if($O(e)){var t=e.getData(),n=e.coordinateSystem,r=n.getBaseAxis(),i=n.getOtherAxis(r),a=t.getDimensionIndex(t.mapDimension(i.dim)),o=t.getDimensionIndex(t.mapDimension(r.dim)),s=e.get(`showBackground`,!0),c=t.mapDimension(i.dim),l=t.getCalculationInfo(`stackResultDimension`),u=dx(t,c)&&!!t.getCalculationInfo(`stackedOnSeries`),d=i.isHorizontal(),f=i.toGlobalCoord(i.dataToCoord(Ok(i))),p=Vk(e),m=e.get(`barMinHeight`)||0,h=l&&t.getDimensionIndex(l),g=t.getLayout(`size`),_=t.getLayout(`offset`);return{progress:function(e,t){for(var r=e.count,i=p&&Gw(r*3),c=p&&s&&Gw(r*3),l=p&&Gw(r),v=n.master.getRect(),y=d?v.width:v.height,b,x=t.getStore(),S=0;(b=e.next())!=null;){var C=x.get(u?h:a,b),w=x.get(o,b),T=f,E=void 0;u&&(E=+C-x.get(a,b));var D=void 0,O=void 0,k=void 0,A=void 0;if(d){var j=n.dataToPoint([C,w]);u&&(T=n.dataToPoint([E,w])[0]),D=T,O=j[1]+_,k=j[0]-T,A=g,lp(k)s){u=(p+l)/2;break}f===1&&(d=m-r[0].tickValue)}u??(l?l&&(u=r[r.length-1].coord):u=r[0].coord),a[n]=e.toGlobalCoord(u)}});else{var o=this.getData(),s=o.getLayout(`offset`),c=o.getLayout(`size`),l=+!r.getBaseAxis().isHorizontal();a[l]+=s+c/2}return a}return[NaN,NaN]},t.prototype.__requireStartValue=function(e){return this.getBaseAxis()!==e},t.type=`series.__base_bar__`,t.defaultOption={z:2,coordinateSystem:`cartesian2d`,legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:`mod`,defaultBarGap:`10%`},t}(dw);dw.registerClass(Wk);var Gk=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.getInitialData=function(){return hx(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get(`realtimeSort`,!0)||null})},t.prototype.getProgressive=function(){return this.get(`large`)?this.get(`progressive`):!1},t.prototype.__preparePipelineContext=function(e,t){var n=qm(this,e,t);return n.progressiveRender&&(n.large=!0),n},t.prototype.brushSelector=function(e,t,n){return n.rect(t.getItemLayout(e))},t.type=`series.bar`,t.dependencies=[`grid`,`polar`],t.defaultOption=Sx(Wk.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:`rgba(180, 180, 180, 0.2)`,borderColor:null,borderWidth:0,borderType:`solid`,borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:Q.color.primary,borderWidth:2}},realtimeSort:!1}),t}(Wk),Kk=`\0__throttleOriginMethod`,qk=`\0__throttleRate`,Jk=`\0__throttleType`;function Yk(e,t,n){var r,i=0,a=0,o=null,s,c,l,u;t||=0;function d(){a=new Date().getTime(),o=null,e.apply(c,l||[])}var f=function(){var e=[...arguments];r=new Date().getTime(),c=this,l=e;var f=u||t,p=u||n;u=null,s=r-(p?i:a)-f,clearTimeout(o),p?o=setTimeout(d,f):s>=0?d():o=setTimeout(d,-s),i=r};return f.clear=function(){o&&=(clearTimeout(o),null)},f.debounceNextCall=function(e){u=e},f}function Xk(e,t,n,r){var i=e[t];if(i){var a=i[Kk]||i,o=i[Jk];if(i[qk]!==n||o!==r){if(n==null||!r)return e[t]=a;i=e[t]=Yk(a,n,r===`debounce`),i[Kk]=a,i[Jk]=r,i[qk]=n}return i}}function Zk(e,t){var n=e[t];n&&n[Kk]&&(n.clear&&n.clear(),e[t]=n[Kk])}var Qk=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return e}(),$k=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`sausage`,n}return t.prototype.getDefaultShape=function(){return new Qk},t.prototype.buildPath=function(e,t){var n=t.cx,r=t.cy,i=Math.max(t.r0||0,0),a=Math.max(t.r,0),o=(a-i)*.5,s=i+o,c=t.startAngle,l=t.endAngle,u=t.clockwise,d=Math.PI*2,f=u?l-cMath.PI/2&&ua)return!0;a=l}return!1},t.prototype._isOrderDifferentInView=function(e,t){for(var n=t.scale,r=n.getExtent(),i=Math.max(0,r[0]),a=Math.min(r[1],n.getOrdinalMeta().categories.length-1);i<=a;++i)if(e.ordinalNumbers[i]!==n.getRawOrdinalNumber(i))return!0},t.prototype._updateSortWithinSameData=function(e,t,n,r){if(this._isOrderChangedWithinSameData(e,t,n)){var i=this._dataSort(e,n,t);this._isOrderDifferentInView(i,n)&&(this._removeOnRenderedListener(r),r.dispatchAction({type:`changeAxisOrder`,componentType:n.dim+`Axis`,axisId:n.index,sortInfo:i}))}},t.prototype._dispatchInitSort=function(e,t,n){var r=t.baseAxis,i=this._dataSort(e,r,function(n){return e.get(e.mapDimension(t.otherAxis.dim),n)});n.dispatchAction({type:`changeAxisOrder`,componentType:r.dim+`Axis`,isInitSort:!0,axisId:r.index,sortInfo:i})},t.prototype.remove=function(e,t){this._clear(this._model),this._removeOnRenderedListener(t)},t.prototype.dispose=function(e,t){this._removeOnRenderedListener(t)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&=(e.getZr().off(`rendered`,this._onRendered),null)},t.prototype._clear=function(e){var t=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(t){J_(t,e,Xm(t).dataIndex)})):t.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type=`bar`,t}(aT),cA={cartesian2d:function(e,t){var n=t.width<0?-1:1,r=t.height<0?-1:1;n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height);var i=e.x+e.width,a=e.y+e.height,o=aA(t.x,e.x),s=oA(t.x+t.width,i),c=aA(t.y,e.y),l=oA(t.y+t.height,a),u=si?s:o,t.y=d&&c>a?l:c,t.width=u?0:s-o,t.height=d?0:l-c,n<0&&(t.x+=t.width,t.width=-t.width),r<0&&(t.y+=t.height,t.height=-t.height),u||d},polar:function(e,t){var n=t.r0<=t.r?1:-1;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}var i=oA(t.r,e.r),a=aA(t.r0,e.r0);t.r=i,t.r0=a;var o=i-a<0;if(n<0){var r=t.r;t.r=t.r0,t.r0=r}return o}},lA={cartesian2d:function(e,t,n,r,i,a,o,s,c){var l=new zf({shape:V({},r),z2:1});if(l.__dataIndex=n,l.name=`item`,a){var u=l.shape,d=i?`height`:`width`;u[d]=0}return l},polar:function(e,t,n,r,i,a,o,s,c){var l=!i&&c?$k:s_,u=new l({shape:r,z2:1});if(u.name=`item`,u.calculateTextPosition=eA(vA(i),{isRoundCap:l===$k}),a){var d=u.shape,f=i?`r`:`endAngle`,p={};d[f]=i?r.r0:r.startAngle,p[f]=r[f],(s?U_:W_)(u,{shape:p},a)}return u}};function uA(e,t){var n=e.get(`realtimeSort`,!0),r=t.getBaseAxis();if(n&&r.type===`category`&&t.type===`cartesian2d`)return{baseAxis:r,otherAxis:t.getOtherAxis(r)}}function dA(e,t,n,r,i,a,o,s){var c,l;a?(l={x:r.x,width:r.width},c={y:r.y,height:r.height}):(l={y:r.y,height:r.height},c={x:r.x,width:r.width}),s||(o?U_:W_)(n,{shape:c},t,i,null);var u=t?e.baseAxis.model:null;(o?U_:W_)(n,{shape:l},u,i)}function fA(e,t){for(var n=0;n0?1:-1,o=r.height>0?1:-1;return{x:r.x+a*i/2,y:r.y+o*i/2,width:r.width-a*i,height:r.height-o*i}},polar:function(e,t,n){var r=e.getItemLayout(t);return{cx:r.cx,cy:r.cy,r0:r.r0,r:r.r,startAngle:r.startAngle,endAngle:r.endAngle,clockwise:r.clockwise}}};function _A(e){return e.startAngle!=null&&e.endAngle!=null&&e.startAngle===e.endAngle}function vA(e){return function(e){var t=e?`Arc`:`Angle`;return function(e){switch(e){case`start`:case`insideStart`:case`end`:case`insideEnd`:return e+t;default:return e}}}(e)}function yA(e,t,n,r,i,a,o,s){var c=t.getItemVisual(n,`style`);if(!s){var l=r.get([`itemStyle`,`borderRadius`])||0;e.setShape(`r`,l)}else if(!a.get(`roundCap`)){var u=e.shape;V(u,iA(r.getModel(`itemStyle`),u,!0)),e.setShape(u)}e.useStyle(c);var d=r.getShallow(`cursor`);d&&e.attr(`cursor`,d);var f=s?o?i.r>=i.r0?`endArc`:`startArc`:i.endAngle>=i.startAngle?`endAngle`:`startAngle`:o?OA(i,a.coordinateSystem):kA(i,a.coordinateSystem),p=Jv(r);qv(e,p,{labelFetcher:a,labelDataIndex:n,defaultText:Aw(a.getData(),n),inheritColor:c.fill,defaultOpacity:c.opacity,defaultOutsidePosition:f});var m=e.getTextContent();if(s&&m){var h=r.get([`label`,`position`]);e.textConfig.inside=h===`middle`||null,tA(e,h===`outside`?f:h,vA(o),r.get([`label`,`rotate`]))}ay(m,p,a.getRawValue(n),function(e){return jw(t,e)});var g=r.getModel([`emphasis`]);sg(e,g.get(`focus`),g.get(`blurScope`),g.get(`disabled`)),dg(e,r),_A(i)&&(e.style.fill=`none`,e.style.stroke=`none`,H(e.states,function(e){e.style&&(e.style.fill=e.style.stroke=`none`)}))}function bA(e,t){var n=e.get([`itemStyle`,`borderColor`]);if(!n||n===`none`)return 0;var r=e.get([`itemStyle`,`borderWidth`])||0,i=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),a=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(r,i,a)}var xA=function(){function e(){}return e}(),SA=function(e){z(t,e);function t(t){var n=e.call(this,t)||this;return n.type=`largeBar`,n}return t.prototype.getDefaultShape=function(){return new xA},t.prototype.buildPath=function(e,t){for(var n=t.points,r=this.baseDimIdx,i=1-this.baseDimIdx,a=[],o=[],s=this.barWidth,c=0;c=0?n:null},30,!1);function TA(e,t,n){for(var r=e.baseDimIdx,i=1-r,a=e.shape.points,o=e.largeDataIndices,s=[],c=[],l=e.barWidth,u=0,d=a.length/3;u=s[0]&&t<=s[0]+c[0]&&n>=s[1]&&n<=s[1]+c[1])return o[u]}return-1}function EA(e,t,n){if(mT(n,`cartesian2d`)){var r=t,i=n.getArea();return{x:e?r.x:i.x,y:e?i.y:r.y,width:e?r.width:i.width,height:e?i.height:r.height}}var i=n.getArea(),a=t;return{cx:i.cx,cy:i.cy,r0:e?i.r0:a.r0,r:e?i.r:a.r,startAngle:e?a.startAngle:0,endAngle:e?a.endAngle:Math.PI*2}}function DA(e,t,n){return new(e.type===`polar`?s_:zf)({shape:EA(t,n,e),silent:!0,z2:0})}function OA(e,t){return e.height===0?t.getOtherAxis(t.getBaseAxis()).inverse?`bottom`:`top`:e.height>0?`bottom`:`top`}function kA(e,t){return e.width===0?t.getOtherAxis(t.getBaseAxis()).inverse?`left`:`right`:e.width>=0?`right`:`left`}function AA(e){e.registerChartView(sA),e.registerSeriesModel(Gk),e.registerLayout(e.PRIORITY.VISUAL.LAYOUT,zk(`bar`)),e.registerLayout(e.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Bk(`bar`)),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,ZE(`bar`)),e.registerAction({type:`changeAxisOrder`,event:`changeAxisOrder`,update:`update`},function(e,t){var n=e.componentType||`series`;t.eachComponent({mainType:n,query:e},function(t){e.sortInfo&&t.axis.setCategorySortInfo(e.sortInfo)})}),Uk(e)}function jA(e,t,n,r,i){var a=e+t;n.isSilent(a)||r.eachComponent({mainType:`series`,subType:`pie`},function(e){for(var t=e.seriesIndex,r=e.option.selectedMap,o=i.selected,s=0;s=0},e.prototype.indexOfName=function(e){return this._getDataWithEncodedVisual().indexOfName(e)},e.prototype.getItemVisual=function(e,t){return this._getDataWithEncodedVisual().getItemVisual(e,t)},e}(),PA=function(){function e(e,t){this.target=e,this.topTarget=t&&t.topTarget}return e}(),FA=function(){function e(e){this.handler=e,e.on(`mousedown`,this._dragStart,this),e.on(`mousemove`,this._drag,this),e.on(`mouseup`,this._dragEnd,this)}return e.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new PA(t,e),`dragstart`,e.event))},e.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,r=e.offsetY,i=n-this._x,a=r-this._y;this._x=n,this._y=r,t.drift(i,a,e),this.handler.dispatchToElement(new PA(t,e),`drag`,e.event);var o=this.handler.findHover(n,r,t).target,s=this._dropTarget;this._dropTarget=o,t!==o&&(s&&o!==s&&this.handler.dispatchToElement(new PA(s,e),`dragleave`,e.event),o&&o!==s&&this.handler.dispatchToElement(new PA(o,e),`dragenter`,e.event))}},e.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new PA(t,e),`dragend`,e.event),this._dropTarget&&this.handler.dispatchToElement(new PA(this._dropTarget,e),`drop`,e.event),this._draggingTarget=null,this._dropTarget=null},e}(),IA=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,LA=[],RA=No.browser.firefox&&+No.browser.version.split(`.`)[0]<39;function zA(e,t,n,r){return n||={},r?BA(e,t,n):RA&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX==null?BA(e,t,n):(n.zrX=t.offsetX,n.zrY=t.offsetY),n}function BA(e,t,n){if(No.domSupported&&e.getBoundingClientRect){var r=t.clientX,i=t.clientY;if(Px(e)){var a=e.getBoundingClientRect();n.zrX=r-a.left,n.zrY=i-a.top;return}if(jx(LA,e,r,i)){n.zrX=LA[0],n.zrY=LA[1];return}}n.zrX=n.zrY=0}function VA(e){return e||window.event}function HA(e,t,n){if(t=VA(t),t.zrX!=null)return t;var r=t.type;if(r&&r.indexOf(`touch`)>=0){var i=r===`touchend`?t.changedTouches[0]:t.targetTouches[0];i&&zA(e,i,t,n)}else{zA(e,t,t,n);var a=UA(t);t.zrDelta=a?a/120:-(t.detail||0)/3}var o=t.button;return t.which==null&&o!==void 0&&IA.test(t.type)&&(t.which=o&1?1:o&2?3:o&4?2:0),t}function UA(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var i=Math.abs(r===0?n:r),a=r>0?-1:r<0?1:n>0?-1:1;return 3*i*a}function WA(e,t,n,r){e.addEventListener(t,n,r)}function GA(e,t,n,r){e.removeEventListener(t,n,r)}var KA=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0};function qA(e){return e.which===2||e.which===3}var JA=function(){function e(){this._track=[]}return e.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(e,t,n){var r=e.touches;if(r){for(var i={points:[],touches:[],target:t,event:e},a=0,o=r.length;a1&&r&&r.length>1){var a=YA(r)/YA(i);!isFinite(a)&&(a=1),t.pinchScale=a;var o=XA(r);return t.pinchX=o[0],t.pinchY=o[1],{type:`pinch`,target:e[0].target,event:t}}}}},QA=`silent`;function $A(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:ej}}function ej(){KA(this.event)}var tj=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.handler=null,t}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Vu),nj=function(){function e(e,t){this.x=e,this.y=t}return e}(),rj=[`click`,`dblclick`,`mousewheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],ij=new Z(0,0,0,0),aj=function(e){z(t,e);function t(t,n,r,i,a){var o=e.call(this)||this;return o._hovered=new nj(0,0),o.storage=t,o.painter=n,o.painterRoot=i,o._pointerSize=a,r||=new tj,o.proxy=null,o.setHandlerProxy(r),o._draggingMgr=new FA(o),o}return t.prototype.setHandlerProxy=function(e){this.proxy&&this.proxy.dispose(),e&&(H(rj,function(t){e.on&&e.on(t,this[t],this)},this),e.handler=this),this.proxy=e},t.prototype.mousemove=function(e){var t=e.zrX,n=e.zrY,r=cj(this,t,n),i=this._hovered,a=i.target;a&&!a.__zr&&(i=this.findHover(i.x,i.y),a=i.target);var o=this._hovered=r?new nj(t,n):this.findHover(t,n),s=o.target,c=this.proxy;c.setCursor&&c.setCursor(s?s.cursor:`default`),a&&s!==a&&this.dispatchToElement(i,`mouseout`,e),this.dispatchToElement(o,`mousemove`,e),s&&s!==a&&this.dispatchToElement(o,`mouseover`,e)},t.prototype.mouseout=function(e){var t=e.zrEventControl;t!==`only_globalout`&&this.dispatchToElement(this._hovered,`mouseout`,e),t!==`no_globalout`&&this.trigger(`globalout`,{type:`globalout`,event:e})},t.prototype.resize=function(){this._hovered=new nj(0,0)},t.prototype.dispatch=function(e,t){var n=this[e];n&&n.call(this,t)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(e){var t=this.proxy;t.setCursor&&t.setCursor(e)},t.prototype.dispatchToElement=function(e,t,n){e||={};var r=e.target;if(!(r&&r.silent)){for(var i=`on`+t,a=$A(t,e,n);r&&(r[i]&&(a.cancelBubble=!!r[i].call(r,a)),r.trigger(t,a),r=r.__hostTarget?r.__hostTarget:r.parent,!a.cancelBubble););a.cancelBubble||(this.trigger(t,a),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(e){typeof e[i]==`function`&&e[i].call(e,a),e.trigger&&e.trigger(t,a)}))}},t.prototype.findHover=function(e,t,n){var r=this.storage.getDisplayList(),i=new nj(e,t);if(sj(r,i,e,t,n),this._pointerSize&&!i.target){for(var a=[],o=this._pointerSize,s=o/2,c=new Z(e-s,t-s,o,o),l=r.length-1;l>=0;l--){var u=r[l];u!==n&&!u.ignore&&!u.ignoreCoarsePointer&&(!u.parent||!u.parent.ignoreCoarsePointer)&&(ij.copy(u.getBoundingRect()),u.transform&&ij.applyTransform(u.transform),ij.intersect(c)&&a.push(u))}if(a.length){for(var d=4,f=Math.PI/12,p=Math.PI*2,m=0;m4)return;this._downPoint=null}this.dispatchToElement(a,e,t)}});function oj(e,t,n){if(e[e.rectHover?`rectContain`:`contain`](t,n)){for(var r=e,i=void 0,a=!1;r;){if(r.ignoreClip&&(a=!0),!a){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(i=!0);var s=r.__hostTarget;r=s?r.ignoreHostSilent?null:s:r.parent}return!i||QA}return!1}function sj(e,t,n,r,i){for(var a=e.length-1;a>=0;a--){var o=e[a],s=void 0;if(o!==i&&!o.ignore&&(s=oj(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==QA)){t.target=o;break}}}function cj(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var lj=32,uj=7;function dj(e){for(var t=0;e>=lj;)t|=e&1,e>>=1;return e+t}function fj(e,t,n,r){var i=t+1;if(i===n)return 1;if(r(e[i++],e[t])<0){for(;i=0;)i++;return i-t}function pj(e,t,n){for(n--;t>>1,i(a,e[c])<0?s=c:o=c+1;var l=r-o;switch(l){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;l>0;)e[o+l]=e[o+l-1],l--}e[o]=a}}function hj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])>0){for(s=r-i;c0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}else{for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}for(o++;o>>1);a(e,t[n+u])>0?o=u+1:c=u}return c}function gj(e,t,n,r,i,a){var o=0,s=0,c=1;if(a(e,t[n+i])<0){for(s=i+1;cs&&(c=s);var l=o;o=i-c,c=i-l}else{for(s=r-i;c=0;)o=c,c=(c<<1)+1,c<=0&&(c=s);c>s&&(c=s),o+=i,c+=i}for(o++;o>>1);a(e,t[n+u])<0?c=u:o=u+1}return c}function _j(e,t){var n=uj,r,i,a=0,o=[];r=[],i=[];function s(e,t){r[a]=e,i[a]=t,a+=1}function c(){for(;a>1;){var e=a-2;if(e>=1&&i[e-1]<=i[e]+i[e+1]||e>=2&&i[e-2]<=i[e]+i[e-1])i[e-1]i[e+1])break;u(e)}}function l(){for(;a>1;){var e=a-2;e>0&&i[e-1]=uj||m>=uj);if(h)break;f<0&&(f=0),f+=2}if(n=f,n<1&&(n=1),i===1){for(c=0;c=0;c--)e[p+c]=e[f+c];e[d]=o[u];return}for(var m=n;;){var h=0,g=0,_=!1;do if(t(o[u],e[l])<0){if(e[d--]=e[l--],h++,g=0,--i===0){_=!0;break}}else if(e[d--]=o[u--],g++,h=0,--s===1){_=!0;break}while((h|g)=0;c--)e[p+c]=e[f+c];if(i===0){_=!0;break}}if(e[d--]=o[u--],--s===1){_=!0;break}if(g=s-hj(e[l],o,0,s,s-1,t),g!==0){for(d-=g,u-=g,s-=g,p=d+1,f=u+1,c=0;c=uj||g>=uj);if(_)break;m<0&&(m=0),m+=2}if(n=m,n<1&&(n=1),s===1){for(d-=i,l-=i,p=d+1,f=l+1,c=i-1;c>=0;c--)e[p+c]=e[f+c];e[d]=o[u]}else if(s===0)throw Error();else for(f=d-(s-1),c=0;cs&&(c=s),mj(e,n,n+c,n+a,t),a=c}o.pushRun(n,a),o.mergeRuns(),i-=a,n+=a}while(i!==0);o.forceMergeRuns()}}var yj=!1;function bj(){yj||(yj=!0,console.warn(`z / z2 / zlevel of displayable is invalid, which may cause unexpected errors`))}function xj(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Sj=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=xj}return e.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(r,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Cj=No.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};function wj(){return new Date().getTime()}var Tj=function(e){z(t,e);function t(t){var n=e.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t||={},n.stage=t.stage||{},n}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var t=e.getClip();t&&this.addClip(t)},t.prototype.removeClip=function(e){if(e.animation){var t=e.prev,n=e.next;t?t.next=n:this._head=n,n?n.prev=t:this._tail=t,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var t=e.getClip();t&&this.removeClip(t),e.animation=null},t.prototype.update=function(e){for(var t=wj()-this._pausedTime,n=t-this._time,r=this._head;r;){var i=r.next;r.step(t,n)?(r.ondestroy(),this.removeClip(r),r=i):r=i}this._time=t,e||(this.trigger(`frame`,n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function t(){e._running&&(Cj(t),!e._paused&&e.update())}Cj(t)},t.prototype.start=function(){this._running||(this._time=wj(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||=(this._pauseStart=wj(),!0)},t.prototype.resume=function(){this._paused&&=(this._pausedTime+=wj()-this._pauseStart,!1)},t.prototype.clear=function(){for(var e=this._head;e;){var t=e.next;e.prev=e.next=e.animation=null,e=t}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,t){t||={},this.start();var n=new Bu(e,t.loop);return this.addAnimator(n),n},t}(Vu),Ej=300,Dj=No.domSupported,Oj=(function(){var e=[`click`,`dblclick`,`mousewheel`,`wheel`,`mouseout`,`mouseup`,`mousedown`,`mousemove`,`contextmenu`],t=[`touchstart`,`touchend`,`touchmove`],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1};return{mouse:e,touch:t,pointer:U(e,function(e){var t=e.replace(`mouse`,`pointer`);return n.hasOwnProperty(t)?t:e})}})(),kj={mouse:[`mousemove`,`mouseup`],pointer:[`pointermove`,`pointerup`]},Aj=!1;function jj(e){var t=e.pointerType;return t===`pen`||t===`touch`}function Mj(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function Nj(e){e&&(e.zrByTouch=!0)}function Pj(e,t){return HA(e.dom,new Ij(e,t),!0)}function Fj(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var Ij=function(){function e(e,t){this.stopPropagation=Ao,this.stopImmediatePropagation=Ao,this.preventDefault=Ao,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return e}(),Lj={mousedown:function(e){e=HA(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger(`mousedown`,e)},mousemove:function(e){e=HA(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger(`mousemove`,e)},mouseup:function(e){e=HA(this.dom,e),this.__togglePointerCapture(!1),this.trigger(`mouseup`,e)},mouseout:function(e){e=HA(this.dom,e);var t=e.toElement||e.relatedTarget;Fj(this,t)||(this.__pointerCapturing&&(e.zrEventControl=`no_globalout`),this.trigger(`mouseout`,e))},wheel:function(e){Aj=!0,e=HA(this.dom,e),this.trigger(`mousewheel`,e)},mousewheel:function(e){Aj||(e=HA(this.dom,e),this.trigger(`mousewheel`,e))},touchstart:function(e){e=HA(this.dom,e),Nj(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,`start`),Lj.mousemove.call(this,e),Lj.mousedown.call(this,e)},touchmove:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`change`),Lj.mousemove.call(this,e)},touchend:function(e){e=HA(this.dom,e),Nj(e),this.handler.processGesture(e,`end`),Lj.mouseup.call(this,e),+new Date-this.__lastTouchMoment0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||this._refresh({animUpdate:!1,refresh:!1,refreshHover:!0})},e.prototype.resize=function(e){this._disposed||(e||={},this.painter.resize(e.width,e.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},e.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},e.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},e.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},e.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},e.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t=0;o--)r[o]&&!gm(r[o])?a=!0:(r[o]=null,!a&&i--);r.length=i,e[n]=r}}),delete e[dM],e},t.prototype.setTheme=function(e){this._theme=new _y(e),this._resetOption(`recreate`,null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,t){var n=this._componentsMap.get(e);if(n){var r=n[t||0];if(r)return r;if(t==null){for(var i=0;i=t:n===`max`?e<=t:e===t}function wM(e,t){return e.join(`,`)===t.join(`,`)}var TM=H,EM=J,DM=[`areaStyle`,`lineStyle`,`nodeStyle`,`linkStyle`,`chordStyle`,`label`,`labelLine`];function OM(e){var t=e&&e.itemStyle;if(t)for(var n=0,r=DM.length;n0?e[n-1].seriesModel:null)}),ZM(e))})}function ZM(e){H(e,function(t,n){var r=[],i=[NaN,NaN],a=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,c=t.seriesModel.get(`stackStrategy`)||`samesign`;o.modify(a,function(a,l,u){var d=o.get(t.stackedDimension,u);if(isNaN(d))return i;var f,p;s?p=o.getRawIndex(u):f=o.get(t.stackedByDimension,u);for(var m=NaN,h=n-1;h>=0;h--){var g=e[h];if(s||(p=g.data.rawIndexOf(g.stackedByDimension,f)),p>=0){var _=g.data.getByRawIndex(g.stackResultDimension,p);if(c===`all`||c===`positive`&&_>0||c===`negative`&&_<0||c===`samesign`&&d>=0&&_>0||c===`samesign`&&d<=0&&_<0){d=kp(d,_),m=_;break}}}return r[0]=d,r[1]=m,r})})}var QM=function(){function e(){this.group=new Bg,this.uid=yx(`viewComponent`)}return e.prototype.init=function(e,t){},e.prototype.render=function(e,t,n,r){},e.prototype.dispose=function(e,t){},e.prototype.updateView=function(e,t,n,r){},e.prototype.updateLayout=function(e,t,n,r){},e.prototype.updateVisual=function(e,t,n,r){},e.prototype.toggleBlurSeries=function(e,t,n){},e.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},e}();Vo(QM),Jo(QM);var $M=xm(),eN={itemStyle:Yo(my,!0),lineStyle:Yo(dy,!0)},tN={lineStyle:`stroke`,itemStyle:`fill`};function nN(e,t){return e.visualStyleMapper||eN[t]||(console.warn(`Unknown style type '`+t+`'.`),eN.itemStyle)}function rN(e,t){return e.visualDrawType||tN[t]||(console.warn(`Unknown style type '`+t+`'.`),`fill`)}var iN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=e.getModel(r),a=nN(e,r)(i),o=i.getShallow(`decal`);o&&(n.setVisual(`decal`,o),o.dirty=!0);var s=rN(e,r),c=a[s],l=K(c)?c:null,u=a.fill===`auto`||a.stroke===`auto`;if(!a[s]||l||u){var d=e.getColorFromPalette(e.name,null,t.getSeriesCount());a[s]||(a[s]=d,n.setVisual(`colorFromPalette`,!0)),a.fill=a.fill===`auto`||K(a.fill)?d:a.fill,a.stroke=a.stroke===`auto`||K(a.stroke)?d:a.stroke}if(n.setVisual(`style`,a),n.setVisual(`drawType`,s),!t.isSeriesFiltered(e)&&l)return n.setVisual(`colorFromPalette`,!1),{dataEach:function(t,n){var r=e.getDataParams(n),i=V({},a);i[s]=l(r),t.setItemVisual(n,`style`,i)}}}},aN=new _y,oN={createOnAllSeries:!0,reset:function(e,t){if(!e.ignoreStyleOnData){var n=e.getData(),r=e.visualStyleAccessPath||`itemStyle`,i=nN(e,r),a=n.getVisual(`drawType`);return{dataEach:n.hasItemOption?function(e,t){var n=e.getRawDataItem(t);if(n&&n[r]){aN.option=n[r];var o=i(aN);V(e.ensureUniqueItemVisual(t,`style`),o),aN.option.decal&&(e.setItemVisual(t,`decal`,aN.option.decal),aN.option.decal.dirty=!0),a in o&&e.setItemVisual(t,`colorFromPalette`,!1)}}:null}}}},sN={performRawSeries:!0,overallReset:function(e){var t=X();e.eachSeries(function(e){if(!e.isColorBySeries()){var n=e.type+`-`+e.getColorBy();$M(e).scope=t.get(n)||t.set(n,{})}}),e.eachSeries(function(e){if(!e.isColorBySeries()){var t=e.getRawData(),n={},r=e.getData(),i=$M(e).scope,a=rN(e,e.visualStyleAccessPath||`itemStyle`);r.each(function(e){var t=r.getRawIndex(e);n[t]=e}),t.each(function(o){var s=n[o];if(r.getItemVisual(s,`colorFromPalette`)){var c=r.ensureUniqueItemVisual(s,`style`),l=t.getName(o)||o+``,u=t.count();c[a]=e.getColorFromPalette(l,i,u)}})}})}},cN=Math.PI;function lN(e,t){t||={},Ya(t,{text:`loading`,textColor:Q.color.primary,fontSize:12,fontWeight:`normal`,fontStyle:`normal`,fontFamily:`sans-serif`,maskColor:`rgba(255,255,255,0.8)`,showSpinner:!0,color:Q.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var n=new Bg,r=new zf({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});n.add(r);var i=new Wf({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),a=new zf({style:{fill:`none`},textContent:i,textConfig:{position:`right`,distance:10},zlevel:t.zlevel,z:10001});n.add(a);var o;return t.showSpinner&&(o=new w_({shape:{startAngle:-cN/2,endAngle:-cN/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:`round`,lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:cN*3/2}).start(`circularInOut`),o.animateShape(!0).when(1e3,{startAngle:cN*3/2}).delay(300).start(`circularInOut`),n.add(o)),n.resize=function(){var n=i.getBoundingRect().width,s=t.showSpinner?t.spinnerRadius:0,c=(e.getWidth()-s*2-(t.showSpinner&&n?10:0)-n)/2-(t.showSpinner&&n?0:5+n/2)+(t.showSpinner?0:n/2)+(n?0:s),l=e.getHeight()/2;t.showSpinner&&o.setShape({cx:c,cy:l}),a.setShape({x:c-s,y:l-s,width:s*2,height:s*2}),r.setShape({x:0,y:0,width:e.getWidth(),height:e.getHeight()})},n.resize(),n}var uN=function(){function e(e,t,n,r){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),r=this._visualHandlers=r.slice(),this._allHandlers=n.concat(r)}return e.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(e){var t=e.overallTask;t&&t.dirty()})},e.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),r=n.context,i=!t&&n.progressiveEnabled&&(!r||r.progressiveRender)&&e.__idxInPipeline>n.blockIndex?n.step:null,a=r&&r.modDataCount;return{step:i,modBy:a==null?null:Math.ceil(a/i),modDataCount:a}}},e.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},e.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid);e.pipelineContext=n.context=e.__preparePipelineContext?e.__preparePipelineContext(t,n):qm(e,t,n)},e.prototype.restorePipelines=function(e,t){var n=this,r=n._pipelineMap=X();t.eachSeries(function(t){var i=e.painter.type===`canvas`&&t.getProgressive(),a=t.uid;r.set(a,{id:a,head:null,tail:null,threshold:t.getProgressiveThreshold(),progressiveEnabled:i&&!(t.preventIncremental&&t.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),n._pipe(t,t.dataTask)})},e.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;H(this._allHandlers,function(r){var i=e.get(r.uid)||e.set(r.uid,{});vo(!(r.reset&&r.overallReset),``),r.reset&&this._createSeriesStageTask(r,i,t,n),r.overallReset&&this._createOverallStageTask(r,i,t,n)},this)},e.prototype.prepareView=function(e,t,n,r){var i=e.renderTask,a=i.context;a.model=t,a.ecModel=n,a.api=r,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},e.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},e.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},e.prototype._performStageTasks=function(e,t,n,r){r||={};var i=!1,a=this;H(e,function(e,s){if(!(r.visualType&&r.visualType!==e.visualType)){var c=a._stageTaskMap.get(e.uid),l=c.seriesTaskMap,u=c.overallTask;if(u){var d,f=u.agentStubMap;f.each(function(e){o(r,e)&&(e.dirty(),d=!0)}),d&&u.dirty(),a.updatePayload(u,n);var p=a.getPerformArgs(u,r.block);f.each(function(e){e.perform(p)}),u.perform(p)&&(i=!0)}else l&&l.each(function(s,c){o(r,s)&&s.dirty();var l=a.getPerformArgs(s,r.block);l.skip=!e.performRawSeries&&t.isSeriesFiltered(s.context.model),a.updatePayload(s,n),s.perform(l)&&(i=!0)})}});function o(e,t){return e.setDirty&&(!e.dirtyMap||e.dirtyMap.get(t.__pipeline.id))}this.unfinished=i||this.unfinished},e.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(e){t=e.dataTask.perform()||t}),this.unfinished=t||this.unfinished},e.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},e.prototype.updatePayload=function(e,t){t!==`remain`&&(e.context.payload=t)},e.prototype._createSeriesStageTask=function(e,t,n,r){var i=this,a=t.seriesTaskMap,o=t.seriesTaskMap=X(),s=e.seriesType,c=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(l):s?n.eachRawSeriesByType(s,l):c&&c(n,r).each(l);function l(t){var s=t.uid,c=o.set(s,a&&a.get(s)||bC({plan:hN,reset:gN,count:yN}));c.context={model:t,ecModel:n,api:r,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(t,c)}},e.prototype._createOverallStageTask=function(e,t,n,r){var i=this,a=t.overallTask=t.overallTask||bC({reset:dN});a.context={ecModel:n,api:r,overallReset:e.overallReset,scheduler:i};var o=a.agentStubMap,s=a.agentStubMap=X(),c=e.seriesType,l=e.getTargetSeries,u=e.dirtyOnOverallProgress,d=!1;vo(!e.createOnAllSeries,``),c?n.eachRawSeriesByType(c,f):l?l(n,r).each(f):H(n.getSeries(),f);function f(e){var t=e.uid,n=s.set(t,o&&o.get(t)||(d=!0,bC({reset:fN,onDirty:mN})));n.context={model:e,dirtyOnOverallProgress:u},n.agent=a,n.__block=u,i._pipe(e,n)}d&&a.dirty()},e.prototype._pipe=function(e,t){var n=e.uid,r=this._pipelineMap.get(n);!r.head&&(r.head=t),r.tail&&r.tail.pipe(t),r.tail=t,t.__idxInPipeline=r.count++,t.__pipeline=r},e.wrapStageHandler=function(e,t){return K(e)&&(e={overallReset:e,seriesType:bN(e)}),e.uid=yx(`stageHandler`),t&&(e.visualType=t),e},e}();function dN(e){e.overallReset(e.ecModel,e.api,e.payload)}function fN(e){return e.dirtyOnOverallProgress&&pN}function pN(){this.agent.dirty(),this.getDownstream().dirty()}function mN(){this.agent&&this.agent.dirty()}function hN(e){return e.plan?e.plan(e.model,e.ecModel,e.api,e.payload):null}function gN(e){e.useClearVisual&&e.data.clearAllVisual();var t=e.resetDefines=em(e.reset(e.model,e.ecModel,e.api,e.payload));return t.length>1?U(t,function(e,t){return vN(t)}):_N}var _N=vN(0);function vN(e){return function(t,n){var r=n.data,i=n.resetDefines[e];if(i&&i.dataEach)for(var a=t.start;a0&&u===i.length-l.length){var d=i.slice(0,u);d!==`data`&&(t.mainType=d,t[l.toLowerCase()]=e,s=!0)}}o.hasOwnProperty(i)&&(n[i]=e,s=!0),s||(r[i]=e)})}return{cptQuery:t,dataQuery:n,otherQuery:r}},e.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var r=n.targetEl,i=n.packedEvent,a=n.model,o=n.view;if(!a||!o)return!0;var s=t.cptQuery,c=t.dataQuery;return l(s,a,`mainType`)&&l(s,a,`subType`)&&l(s,a,`index`,`componentIndex`)&&l(s,a,`name`)&&l(s,a,`id`)&&l(c,i,`name`)&&l(c,i,`dataIndex`)&&l(c,i,`dataType`)&&(!o.filterForExposedEvent||o.filterForExposedEvent(e,t.otherQuery,r,i));function l(e,t,n,r){return e[n]==null||t[r||n]===e[n]}},e.prototype.afterTrigger=function(){this.eventInfo=null},e}(),AN=[`symbol`,`symbolSize`,`symbolRotate`,`symbolOffset`],jN=AN.concat([`symbolKeepAspect`]),MN={createOnAllSeries:!0,performRawSeries:!0,reset:function(e,t){var n=e.getData();if(e.legendIcon&&n.setVisual(`legendIcon`,e.legendIcon),!e.hasSymbolVisual)return;for(var r={},i={},a=!1,o=0;o=0&&qN(c)?c:.5,e.createRadialGradient(o,s,0,o,s,c)}function XN(e,t,n){for(var r=t.type===`radial`?YN(e,t,n):JN(e,t,n),i=t.colorStops,a=0;a0)?null:e===`dashed`?[4*t,2*t]:e===`dotted`?[t]:so(e)?[e]:G(e)?e:null}function tP(e){var t=e.style,n=t.lineDash&&t.lineWidth>0&&eP(t.lineDash,t.lineWidth),r=t.lineDashOffset;if(n){var i=t.strokeNoScale&&e.getLineScale?e.getLineScale():1;i&&i!==1&&(n=U(n,function(e){return e/i}),r/=i)}return[n,r]}var nP=new $d(!0);function rP(e){var t=e.stroke;return!(t==null||t===`none`||!(e.lineWidth>0))}function iP(e){return typeof e==`string`&&e!==`none`}function aP(e){var t=e.fill;return t!=null&&t!==`none`}function oP(e,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.fillOpacity*t.opacity,e.fill(),e.globalAlpha=n}else e.fill()}function sP(e,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var n=e.globalAlpha;e.globalAlpha=t.strokeOpacity*t.opacity,e.stroke(),e.globalAlpha=n}else e.stroke()}function cP(e,t,n){var r=rs(t.image,t.__image,n);if(as(r)){var i=e.createPattern(r,t.repeat||`repeat`);if(typeof DOMMatrix==`function`&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(t.x||0,t.y||0),a.rotateSelf(0,0,(t.rotation||0)*jo),a.scaleSelf(t.scaleX||1,t.scaleY||1),i.setTransform(a)}return i}}function lP(e,t,n,r,i){var a,o=rP(n),s=aP(n),c=n.strokePercent,l=c<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var d=t.path||nP,f=t.__dirty;if(!r){var p=n.fill,m=n.stroke,h=s&&!!p.colorStops,g=o&&!!m.colorStops,_=s&&!!p.image,v=o&&!!m.image,y=void 0,b=void 0,x=void 0,S=void 0,C=void 0;(h||g)&&(C=t.getBoundingRect()),h&&(y=f?XN(e,p,C):t.__canvasFillGradient,t.__canvasFillGradient=y),g&&(b=f?XN(e,m,C):t.__canvasStrokeGradient,t.__canvasStrokeGradient=b),_&&(x=f||!t.__canvasFillPattern?cP(e,p,t):t.__canvasFillPattern,t.__canvasFillPattern=x),v&&(S=f||!t.__canvasStrokePattern?cP(e,m,t):t.__canvasStrokePattern,t.__canvasStrokePattern=S),h?e.fillStyle=y:_&&(x?e.fillStyle=x:s=!1),g?e.strokeStyle=b:v&&(S?e.strokeStyle=S:o=!1)}var w=t.getGlobalScale();d.setScale(w[0],w[1],t.segmentIgnoreThreshold);var T,E;e.setLineDash&&n.lineDash&&(a=tP(t),T=a[0],E=a[1]);var D=!0;(u||f&4)&&(d.setDPR(e.dpr),l?d.setContext(null):(d.setContext(e),D=!1),d.reset(),t.buildPath(d,t.shape,r),d.toStatic(),t.pathUpdated()),D&&d.rebuildPath(e,l?c:1),T&&(e.setLineDash(T),e.lineDashOffset=E),r?(i.batchFill=s,i.batchStroke=o):n.strokeFirst?(o&&sP(e,n),s&&oP(e,n)):(s&&oP(e,n),o&&sP(e,n)),T&&e.setLineDash([])}function uP(e,t,n){var r=t.__image=rs(n.image,t.__image,t,t.onload);if(r&&as(r)){var i=n.x||0,a=n.y||0,o=t.getWidth(),s=t.getHeight(),c=r.width/r.height;if(o==null&&s!=null?o=s*c:s==null&&o!=null?s=o/c:o==null&&s==null&&(o=r.width,s=r.height),n.sWidth&&n.sHeight){var l=n.sx||0,u=n.sy||0;e.drawImage(r,l,u,n.sWidth,n.sHeight,i,a,o,s)}else if(n.sx&&n.sy){var l=n.sx,u=n.sy,d=o-l,f=s-u;e.drawImage(r,l,u,d,f,i,a,o,s)}else e.drawImage(r,i,a,o,s)}}function dP(e,t,n){var r,i=n.text;if(i!=null&&(i+=``),i){e.font=n.font||`12px sans-serif`,e.textAlign=n.textAlign,e.textBaseline=n.textBaseline;var a=void 0,o=void 0;e.setLineDash&&n.lineDash&&(r=tP(t),a=r[0],o=r[1]),a&&(e.setLineDash(a),e.lineDashOffset=o),n.strokeFirst?(rP(n)&&e.strokeText(i,n.x,n.y),aP(n)&&e.fillText(i,n.x,n.y)):(aP(n)&&e.fillText(i,n.x,n.y),rP(n)&&e.strokeText(i,n.x,n.y)),a&&e.setLineDash([])}}var fP=[`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`],pP=[[`lineCap`,`butt`],[`lineJoin`,`miter`],[`miterLimit`,10]];function mP(e,t,n,r,i){var a=!1;if(!r&&(n||={},t===n))return!1;if(r||t.opacity!==n.opacity){TP(e,i),a=!0;var o=Math.max(Math.min(t.opacity,1),0);e.globalAlpha=isNaN(o)?fd.opacity:o}(r||t.blend!==n.blend)&&(a||=(TP(e,i),!0),e.globalCompositeOperation=t.blend||fd.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,t,n){if(!this[aF]){if(this._disposed){this.id;return}var r,i,a;if(J(t)&&(n=t.lazyUpdate,r=t.silent,i=t.replaceMerge,a=t.transition,t=t.notMerge),this[aF]=!0,LF(this),!this._model||t){var o=new bM(this._api),s=this._theme,c=this._model=new pM;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,s,this._locale,o)}this._model.setOption(e,{replaceMerge:i},GF);var l={seriesTransition:a,optionChanged:!0};if(n)this[sF]={silent:r,updateParams:l},this[aF]=!1,this.getZr().wakeUp();else{try{yF(this),SF.update.call(this,null,l)}catch(e){throw this[sF]=null,this[aF]=!1,e}this._ssr||this._zr.flush(),this[sF]=null,this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.setTheme=function(e,t){if(!this[aF]){if(this._disposed){this.id;return}var n=this._model;if(n){var r=t&&t.silent,i=null;this[sF]&&(r??=this[sF].silent,i=this[sF].updateParams,this[sF]=null),this[aF]=!0,LF(this);try{this._updateTheme(e),n.setTheme(this._theme),yF(this),SF.update.call(this,{type:`setTheme`},i)}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype._updateTheme=function(e){q(e)&&(e=qF[e]),e&&(e=B(e),e&&JM(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||No.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){return e||={},this._zr.painter.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get(`backgroundColor`),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){return e||={},this._zr.painter.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr;return H(e.storage.getDisplayList(),function(e){e.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e||={};var t=e.excludeComponents,n=this._model,r=[],i=this;H(t,function(e){n.eachComponent({mainType:e},function(e){var t=i._componentsMap[e.__viewId];t.group.ignore||(r.push(t),t.group.ignore=!0)})});var a=this._zr.painter.getType()===`svg`?this.getSvgDataURL():this.renderToCanvas(e).toDataURL(`image/`+(e&&e.type||`png`));return H(r,function(e){e.group.ignore=!1}),a},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var t=e.type===`svg`,n=this.group,r=Math.min,i=Math.max,a=1/0;if(XF[n]){var o=a,s=a,c=-a,l=-a,u=[],d=e&&e.pixelRatio||this.getDevicePixelRatio();H(YF,function(a,d){if(a.group===n){var f=t?a.getZr().painter.getSvgDom().innerHTML:a.renderToCanvas(B(e)),p=a.getDom().getBoundingClientRect();o=r(p.left,o),s=r(p.top,s),c=i(p.right,c),l=i(p.bottom,l),u.push({dom:f,left:p.left,top:p.top})}}),o*=d,s*=d,c*=d,l*=d;var f=c-o,p=l-s,m=ja.createCanvas(),h=Xj(m,{renderer:t?`svg`:`canvas`});if(h.resize({width:f,height:p}),t){var g=``;return H(u,function(e){var t=e.left-o,n=e.top-s;g+=``+e.dom+``}),h.painter.getSvgRoot().innerHTML=g,e.connectedBackgroundColor&&h.painter.setBackgroundColor(e.connectedBackgroundColor),h.refreshImmediately(),h.painter.toDataURL()}return e.connectedBackgroundColor&&h.add(new zf({shape:{x:0,y:0,width:f,height:p},style:{fill:e.connectedBackgroundColor}})),H(u,function(e){var t=new jf({style:{x:e.left*d-o,y:e.top*d-s,image:e.dom}});h.add(t)}),h.refreshImmediately(),m.toDataURL(`image/`+(e&&e.type||`png`))}return this.getDataURL(e)},t.prototype.convertToPixel=function(e,t,n){return CF(this,`convertToPixel`,e,t,n)},t.prototype.convertToLayout=function(e,t,n){return CF(this,`convertToLayout`,e,t,n)},t.prototype.convertFromPixel=function(e,t,n){return CF(this,`convertFromPixel`,e,t,n)},t.prototype.containPixel=function(e,t){if(this._disposed){this.id;return}var n=this._model,r;return H(Cm(n,e),function(e,n){n.indexOf(`Models`)>=0&&H(e,function(e){var i=e.coordinateSystem;if(i&&i.containPoint)r||=!!i.containPoint(t);else if(n===`seriesModels`){var a=this._chartsMap[e.__viewId];a&&a.containPoint&&(r||=a.containPoint(t,e))}},this)},this),!!r},t.prototype.getVisual=function(e,t){var n=this._model,r=Cm(n,e,{defaultMainType:`series`}),i=r.seriesModel.getData(),a=r.hasOwnProperty(`dataIndexInside`)?r.dataIndexInside:r.hasOwnProperty(`dataIndex`)?i.indexOfRawIndex(r.dataIndex):null;return a==null?FN(i,t):PN(i,a,t)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;H(BF,function(t){var n=function(n){var r=e.getModel(),i=n.target,a;if(t===`globalout`?a={}:i&&LN(i,function(e){var t=Xm(e);if(t&&t.dataIndex!=null){var n=t.dataModel||r.getSeriesByIndex(t.seriesIndex);return a=n&&n.getDataParams(t.dataIndex,t.dataType,i)||{},!0}if(t.eventData)return a=V({},t.eventData),!0},!0),a){var o=a.componentType,s=a.componentIndex;(o===`markLine`||o===`markPoint`||o===`markArea`)&&(o=`series`,s=a.seriesIndex);var c=o&&s!=null&&r.getComponent(o,s),l=c&&e[c.mainType===`series`?`_chartsMap`:`_componentsMap`][c.__viewId];a.event=n,a.type=t,e._$eventProcessor.eventInfo={targetEl:i,packedEvent:a,model:c,view:l},e.trigger(t,a)}};n.zrEventfulCallAtLast=!0,e._zr.on(t,n,e)});var t=this._messageCenter;H(UF,function(n,r){t.on(r,function(t){e.trigger(r,t)})}),MA(t,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0,this.getDom()&&Om(this.getDom(),QF,``);var e=this,t=e._api,n=e._model;H(e._componentsViews,function(e){e.dispose(n,t)}),H(e._chartsViews,function(e){e.dispose(n,t)}),e._zr.dispose(),e._dom=e._model=e._chartsMap=e._componentsMap=e._chartsViews=e._componentsViews=e._scheduler=e._api=e._zr=e._throttledZrFlush=e._theme=e._coordSysMgr=e._messageCenter=null,delete YF[e.id]},t.prototype.resize=function(e){if(!this[aF]){if(this._disposed){this.id;return}this._zr.resize(e);var t=this._model;if(this._loadingFX&&this._loadingFX.resize(),t){var n=t.resetOption(`media`),r=e&&e.silent;this[sF]&&(r??=this[sF].silent,n=!0,this[sF]=null),this[aF]=!0,LF(this);try{n&&yF(this),SF.update.call(this,{type:`resize`,animation:V({duration:0},e&&e.animation)})}catch(e){throw this[aF]=!1,e}this[aF]=!1,EF.call(this,r),DF.call(this,r)}}},t.prototype.showLoading=function(e,t){if(this._disposed){this.id;return}if(J(e)&&(t=e,e=``),e||=`default`,this.hideLoading(),JF[e]){var n=JF[e](this._api,t),r=this._zr;this._loadingFX=n,r.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var t=V({},e);return t.type=HF[e.type],t},t.prototype.dispatchAction=function(e,t){if(this._disposed){this.id;return}if(J(t)||(t={silent:!!t}),VF[e.type]&&this._model){if(this[aF]){this._pendingActions.push(e);return}var n=t.silent;TF.call(this,e,n);var r=t.flush;r?this._zr.flush():r!==!1&&No.browser.weChat&&this._throttledZrFlush(),EF.call(this,n),DF.call(this,n)}},t.prototype.updateLabelLayout=function(){RN.trigger(`series:layoutlabels`,this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var t=e.seriesIndex;this.getModel().getSeriesByIndex(t).appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){yF=function(e){SD(e._model);var t=e._scheduler;t.restorePipelines(e._zr,e._model),t.prepareStageTasks(),bF(e,!0),bF(e,!1),t.plan()},bF=function(e,t){for(var n=e._model,r=e._scheduler,i=t?e._componentsViews:e._chartsViews,a=t?e._componentsMap:e._chartsMap,o=e._zr,s=e._api,c=0;cY(t.get(`hoverLayerThreshold`),aM.hoverLayerThreshold)&&!No.node&&!No.worker;(e._usingTHL||a)&&(t.eachSeries(function(t){if(!t.preventUsingHoverLayer){var n=e._chartsMap[t.__viewId];n.__alive&&n.eachRendered(function(e){var t=e.states.emphasis;t&&t.hoverLayer!==2&&(t.hoverLayer=+!!a)})}}),e._usingTHL=a)}}function a(e,t){var n=e.get(`blendMode`)||null;t.eachRendered(function(e){e.isGroup||(e.style.blend=n)})}function o(e,t){if(!e.preventAutoZ){var n=Iv(e);t.eachRendered(function(e){return Rv(e,n.z,n.zlevel),!0})}}function s(e,t){t.eachRendered(function(e){if(!G_(e)){var t=e.getTextContent(),n=e.getTextGuideLine();e.stateTransition&&=null,t&&t.stateTransition&&(t.stateTransition=null),n&&n.stateTransition&&(n.stateTransition=null),e.hasState()?(e.prevStates=e.currentStates,e.clearStates()):e.prevStates&&=null}})}function c(e,t){var n=e.getModel(`stateAnimation`),i=e.isAnimationEnabled(),a=n.get(`duration`),o=a>0?{duration:a,delay:n.get(`delay`),easing:n.get(`easing`)}:null;t.eachRendered(function(e){if(e.states&&e.states.emphasis){if(G_(e))return;if(e instanceof Tf&&_g(e),e.__dirty){var t=e.prevStates;t&&e.useStates(t)}if(i){e.stateTransition=o;var n=e.getTextContent(),a=e.getTextGuideLine();n&&(n.stateTransition=o),a&&(a.stateTransition=o)}e.__dirty&&r(e)}})}NF=function(e){return new(function(t){z(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n.prototype.getCoordinateSystems=function(){return e._coordSysMgr.getCoordinateSystems()},n.prototype.getComponentByElement=function(t){for(;t;){var n=t.__ecComponentInfo;if(n!=null)return e._model.getComponent(n.mainType,n.index);t=t.parent}},n.prototype.enterEmphasis=function(t,n){Hh(t,n),FF(e)},n.prototype.leaveEmphasis=function(t,n){Uh(t,n),FF(e)},n.prototype.enterBlur=function(t){Wh(t),FF(e)},n.prototype.leaveBlur=function(t){Gh(t),FF(e)},n.prototype.enterSelect=function(t){Kh(t),FF(e)},n.prototype.leaveSelect=function(t){qh(t),FF(e)},n.prototype.getModel=function(){return e.getModel()},n.prototype.getViewOfComponentModel=function(t){return e.getViewOfComponentModel(t)},n.prototype.getViewOfSeriesModel=function(t){return e.getViewOfSeriesModel(t)},n.prototype.getECUpdateCycleVersion=function(){return e[oF]},n.prototype.usingTHL=function(){return e._usingTHL},n}(lh))(e)},PF=function(e){function t(e,t){for(var n=0;n=0)){dI.push(n);var o=uN.wrapStageHandler(n,i);o.__prio=t,o.__raw=n,e.push(o)}}function pI(e,t){JF[e]=t}function mI(e,t,n){var r=VN(`registerMap`);r&&r(e,t,n)}var hI=AC;uI(XP,iN),uI($P,oN),uI($P,sN),uI(XP,MN),uI($P,NN),uI(rF,zP),nI(JM),rI(UP,YM),pI(`default`,lN),sI({type:_h,event:_h,update:_h},Ao),sI({type:vh,event:vh,update:vh},Ao),sI({type:yh,event:Sh,update:yh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:bh,event:Sh,update:bh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0}),sI({type:xh,event:Sh,update:xh,action:Ao,refineEvent:gI,publishNonRefinedEvent:!0});function gI(e,t,n,r){return{eventContent:{selected:ig(n),isFromClick:t.isFromClick||!1}}}tI(`default`,{}),tI(`dark`,ON);var _I=[],vI={registerPreprocessor:nI,registerProcessor:rI,registerPostInit:iI,registerPostUpdate:aI,registerUpdateLifecycle:oI,registerAction:sI,registerCoordinateSystem:cI,registerLayout:lI,registerVisual:uI,registerTransform:hI,registerLoading:pI,registerMap:mI,registerImpl:BN,PRIORITY:iF,ComponentModel:cC,ComponentView:QM,SeriesModel:dw,ChartView:aT,registerComponentModel:function(e){cC.registerClass(e)},registerComponentView:function(e){QM.registerClass(e)},registerSeriesModel:function(e){dw.registerClass(e)},registerChartView:function(e){aT.registerClass(e)},registerCustomSeries:function(e,t){UN(e,t)},registerSubTypeDefaulter:function(e,t){cC.registerSubTypeDefaulter(e,t)},registerPainter:function(e,t){Zj(e,t)}};function yI(e){if(G(e)){H(e,function(e){yI(e)});return}Xa(_I,e)>=0||(_I.push(e),K(e)&&(e={install:e}),e.install(vI))}var bI=function(){function e(){}return e.prototype.needIncludeZero=function(){return!this.option.scale},e.prototype.getCoordSysModel=function(){},e}(),xI=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents(`grid`,Tm).models[0]},t.type=`cartesian2dAxis`,t}(cC);Qa(xI,bI);var SI={show:!0,z:0,inverse:!1,name:``,nameLocation:`end`,nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:`...`,placeholder:`.`},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:`auto`,onZeroAxisIndex:null,lineStyle:{color:Q.color.axisLine,width:1,type:`solid`},symbol:[`none`,`none`],symbolSize:[10,15],breakLine:!0},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12,color:Q.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:Q.color.axisSplitLine,width:1,type:`solid`}},splitArea:{show:!1,areaStyle:{color:[Q.color.backgroundTint,Q.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:Q.color.neutral00,borderColor:Q.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:`auto`}},CI=qa({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:`auto`,show:`auto`},axisLabel:{interval:`auto`}},SI),wI=qa({boundaryGap:[0,0],axisLine:{show:`auto`},axisTick:{show:`auto`},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:Q.color.axisMinorSplitLine,width:1}}},SI),TI={category:CI,value:wI,time:qa({splitNumber:6,axisLabel:{rich:{primary:{fontWeight:`bold`}}},splitLine:{show:!1}},wI),log:Ya({logBase:10},wI)};function EI(e,t,n,r){H(fE,function(i,a){var o=qa(qa({},TI[a],!0),r,!0),s=function(e){z(n,e);function n(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t+`Axis.`+a,n}return n.prototype.mergeDefaultAndTheme=function(e,t){var n=rC(this),r=n?aC(e):{};qa(e,t.getTheme().get(a+`Axis`)),qa(e,this.getDefaultOption()),e.type=DI(e),n&&iC(e,r,n)},n.prototype.optionUpdated=function(){this.option.type===`category`&&(this.__ordinalMeta=_T.createByAxisModel(this))},n.prototype.getCategories=function(e){var t=this.option;if(t.type===`category`)return e?t.data:this.__ordinalMeta.categories},n.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},n.prototype.updateAxisBreaks=function(e){var t=_O();return t?t.updateModelAxisBreak(this,e):{breaks:[]}},n.type=t+`Axis.`+a,n.defaultOption=o,n}(n);e.registerComponentModel(s)}),e.registerSubTypeDefaulter(t+`Axis`,DI)}function DI(e){return e.type||(e.data?`category`:`value`)}var OI=function(){function e(e){this.type=`cartesian`,this._dimList=[],this._axes={},this.name=e||``}return e.prototype.getAxis=function(e){return this._axes[e]},e.prototype.getAxes=function(){return U(this._dimList,function(e){return this._axes[e]},this)},e.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),to(this.getAxes(),function(t){return t.scale.type===e})},e.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},e}(),kI=[`x`,`y`];function AI(e){return(e.type===`interval`||e.type===`time`)&&!eS(e)}var jI=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=jk,t.dimensions=kI,t}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis(`x`).scale,t=this.getAxis(`y`).scale;if(AI(e)&&AI(t)){var n=wT(e,null),r=wT(t,null),i=this.dataToPoint([n[0],r[0]]),a=this.dataToPoint([n[1],r[1]]),o=n[1]-n[0],s=r[1]-r[0];if(o&&s){var c=(a[0]-i[0])/o,l=(a[1]-i[1])/s,u=i[0]-n[0]*c,d=i[1]-r[0]*l,f=this._transform=[c,0,0,l,u,d];this._invTransform=ps([],f)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale(`ordinal`)[0]||this.getAxesByScale(`time`)[0]||this.getAxis(`x`)},t.prototype.containPoint=function(e){var t=this.getAxis(`x`),n=this.getAxis(`y`);return t.contain(t.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis(`x`).containData(e[0])&&this.getAxis(`y`).containData(e[1])},t.prototype.containZone=function(e,t){var n=this.dataToPoint(e),r=this.dataToPoint(t),i=this.getArea(),a=new Z(n[0],n[1],r[0]-n[0],r[1]-n[1]);return i.intersect(a)},t.prototype.dataToPoint=function(e,t,n){n||=[];var r=e[0],i=e[1];if(this._transform&&r!=null&&isFinite(r)&&i!=null&&isFinite(i))return ks(n,e,this._transform);var a=this.getAxis(`x`),o=this.getAxis(`y`);return n[0]=a.toGlobalCoord(a.dataToCoord(r,t)),n[1]=o.toGlobalCoord(o.dataToCoord(i,t)),n},t.prototype.clampData=function(e,t){var n=this.getAxis(`x`).scale,r=this.getAxis(`y`).scale,i=n.getExtent(),a=r.getExtent(),o=n.parse(e[0]),s=r.parse(e[1]);return t||=[],t[0]=Math.min(Math.max(Math.min(i[0],i[1]),o),Math.max(i[0],i[1])),t[1]=Math.min(Math.max(Math.min(a[0],a[1]),s),Math.max(a[0],a[1])),t},t.prototype.pointToData=function(e,t,n){if(n||=[],this._invTransform)return ks(n,e,this._invTransform);var r=this.getAxis(`x`),i=this.getAxis(`y`);return n[0]=r.coordToData(r.toLocalCoord(e[0]),t),n[1]=i.coordToData(i.toLocalCoord(e[1]),t),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim===`x`?`y`:`x`)},t.prototype.getArea=function(e){e||=0;var t=this.getAxis(`x`).getGlobalExtent(),n=this.getAxis(`y`).getGlobalExtent(),r=Math.min(t[0],t[1])-e,i=Math.min(n[0],n[1])-e;return new Z(r,i,Math.max(t[0],t[1])-r+e,Math.max(n[0],n[1])-i+e)},t}(OI);function MI(e,t){var n=e.scale,r=e.model,i=vk(n,r,r.ecModel,e,null),a=NT(n),o=NT(t)?t.intervalStub:t,s=a?n.intervalStub:n,c=n.base,l=o.getTicks(),u=o.getTicks({expandToNicedExtent:!0}),d=l.length-1,f,p,m;if(d===1)f=p=0,m=1;else if(d===2){var h=lp(l[0].value-l[1].value),g=lp(l[1].value-l[2].value);f=p=0,h===g?m=2:(m=1,h=C[1])return!0})):b[1]?(T=C[1],A(function(){if(P(),k=wp(O-E*m,D),j(),w<=C[0])return!0})):A(function(){k=wp(fp(C[0]/E)*E,D),O=wp(dp(C[1]/E)*E,D);var e=up((O-k)/E);if(e<=m){var t=m-e,n=void 0,r=i.incl0||a;if(r&&C[0]===0)n=[0,t];else if(r&&C[1]===0)n=[t,0];else{var o=dp(t/2);n=t%2==0?[o,o]:w+T=C[1])return!0}})}OE(n,b,S,[w,T],x,{interval:E,intervalCount:m,intervalPrecision:D,niceExtent:[k,O]})}function NI(e,t){var n=NT(e),r=n?e.intervalStub:e,i=t.fixMinMax||[],a=n?e.getExtent():null,o=r.getExtent(),s=zT(o,i,t.rawExtentResult);r.setExtent(s[0],s[1]),s=r.getExtent();var c=n?FI(r,t):PI(r,t),l=c.intervalPrecision,u=c.interval,d=t.userInterval;d!=null&&(c.interval=d,c.intervalPrecision=IT(d)),i[0]||(s[0]=wp(dp(s[0]/u)*u,l)),i[1]||(s[1]=wp(fp(s[1]/u)*u,l)),d!=null&&(c.niceExtent=s.slice()),OE(e,i,o,s,a,c)}function PI(e,t){var n=VT(t.splitNumber,5),r=ET(e),i=t.minInterval,a=t.maxInterval,o=Lp(r/n,!0);i!=null&&oa&&(o=a);var s=IT(o),c=e.getExtent(),l=[wp(fp(c[0]/o)*o,s),wp(dp(c[1]/o)*o,s)];return{interval:o,intervalPrecision:s,niceExtent:l}}function FI(e,t){var n=VT(t.splitNumber,10),r=e.getExtent(),i=ET(e),a=cp(Fp(i),1);n/i*a<=.5&&(a*=10);var o=IT(a),s=[wp(fp(r[0]/a)*a,o),wp(dp(r[1]/a)*a,o)];return{intervalPrecision:o,interval:a,niceExtent:s}}function II(e){var t=e.scale,n=e.model,r=n.axis,i=n.ecModel;LI(t,n,r,i,null)}function LI(e,t,n,r,i){var a=vk(e,t,r,n,i),o=jT(e)||MT(e);RI(e,{splitNumber:t.get(`splitNumber`),fixMinMax:a.fixMM,userInterval:t.get(`interval`),minInterval:o?t.get(`minInterval`):null,maxInterval:o?t.get(`maxInterval`):null,rawExtentResult:a}),n&&r&&bk(n,e,a,r)}function RI(e,t){zI[e.type](e,t)}var zI={interval:NI,log:NI,time:iE,ordinal:Ao},BI=[[3,1],[0,2]],VI=function(){function e(e,t,n){this.type=`grid`,this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=kI,this._initCartesian(e,t,n),this.model=e}return e.prototype.getRect=function(){return this._rect},e.prototype.update=function(e,t){var n=this._axesMap;H(this._axesList,function(e){fk(e,1);var t=e.scale;PT(t)&&t.setSortInfo(e.model.get(`categorySortInfo`))});function r(e){for(var t=ro(e),n=[],r=t.length-1;r>=0;r--){var i=e[+t[r]];i.__alignTo?n.push(i):II(i)}H(n,function(e){KI(e,e.__alignTo)?II(e):MI(e,e.__alignTo.scale)})}r(n.x),r(n.y);var i={};H(n.x,function(e){UI(n,`y`,e,i)}),H(n.y,function(e){UI(n,`x`,e,i)}),this.resize(this.model,t)},e.prototype.resize=function(e,t,n){var r=tC(e,t),i=this._rect=QS(e.getBoxLayoutParams(),r.refContainer),a=this._axesMap,o=this._coordsList,s=e.get(`containLabel`);if(JI(a,i),!n){var c=QI(i,o,a,s,t),l=void 0;if(s)XI?(XI(this._axesList,i),JI(a,i)):l=ZI(i.clone(),`axisLabel`,null,i,a,c,r);else{var u=eL(e,i,r),d=u.outerBoundsRect,f=u.parsedOuterBoundsContain,p=u.outerBoundsClamp;d&&(l=ZI(d,f,p,i,a,c,r))}$I(i,a,tD.determine,null,l,r),H(this._coordsList,function(e){e.calcAffineTransform()})}},e.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},e.prototype.getAxes=function(){return this._axesList.slice()},e.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n=`x`+e+`y`+t;return this._coordsMap[n]}J(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var r=0,i=this._coordsList;r=0;i--){var a=e[+t[i]];AT(a.scale)&&EE(a.model,a.type,!0)==null&&(a.model.get(`alignTicks`)&&a.model.get(`interval`)==null?r.push(a):n=a)}n||=r.pop(),n&&H(r,function(e){e.__alignTo=n})}function KI(e,t){return eS(e.scale)||eS(t.scale)||t.scale.getTicks().length<2}function qI(e,t){var n=e.getExtent(),r=n[0]+n[1];e.toGlobalCoord=e.dim===`x`?function(e){return e+t}:function(e){return r-e+t},e.toLocalCoord=e.dim===`x`?function(e){return e-t}:function(e){return r-e+t}}function JI(e,t){H(e.x,function(e){return YI(e,t.x,t.width)}),H(e.y,function(e){return YI(e,t.y,t.height)})}function YI(e,t,n){var r=[0,n],i=+!!e.inverse;e.setExtent(r[i],r[1-i]),qI(e,t)}var XI;function ZI(e,t,n,r,i,a,o){$I(r,i,tD.estimate,t,!1,o);var s=[0,0,0,0];l(0),l(1),u(r,0,NaN),u(r,1,NaN);var c=no(s,function(e){return e>0})==null;return Ev(r,s,!0,!0,n),JI(i,r),c;function l(e){H(i[Q_[e]],function(t){if(TE(t.model)){var n=a.ensureRecord(t.model),r=n.labelInfoList;if(r)for(var i=0;i0&&!po(t)&&t>1e-4&&(e/=t),e}}function QI(e,t,n,r,i){var a=new wO(tL);return H(n,function(n){return H(n,function(n){if(TE(n.model)){var o=!r;n.axisBuilder=tk(e,t,n.model,i,a,o)}})}),a}function $I(e,t,n,r,i,a){var o=n===tD.determine;H(t,function(t){return H(t,function(t){TE(t.model)&&(nk(t.axisBuilder,e,t.model),t.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:i}))})});var s={x:0,y:0};c(0),c(1);function c(t){s[Q_[1-t]]=e[$_[t]]<=a.refContainer[$_[t]]*.5?0:1-t==1?2:1}H(t,function(e,t){return H(e,function(e){TE(e.model)&&((r===`all`||o)&&e.axisBuilder.build({axisName:!0},{nameMarginLevel:s[t]}),o&&e.axisBuilder.build({axisLine:!0}))})})}function eL(e,t,n){var r,i=e.get(`outerBoundsMode`,!0);i===`same`?r=t.clone():(i==null||i===`auto`)&&(r=QS(e.get(`outerBounds`,!0)||kk,n.refContainer));var a=e.get(`outerBoundsContain`,!0),o=a==null||a===`auto`||Xa([`all`,`axisLabel`],a)<0?`all`:a,s=[xp(Y(e.get(`outerBoundsClampWidth`,!0),Ak[0]),t.width),xp(Y(e.get(`outerBoundsClampHeight`,!0),Ak[1]),t.height)];return{outerBoundsRect:r,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var tL=function(e,t,n,r,i,a){var o=n.axis.dim===`x`?`y`:`x`;OO(e,t,n,r,i,a),wE(e.nameLocation)||H(t.recordMap[o],function(e){e&&e.labelInfoList&&e.dirVec&&AO(e.labelInfoList,e.dirVec,r,i)})};function nL(e,t){var n={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return rL(n,e,t),n.seriesInvolved&&aL(n,e),n}function rL(e,t,n){var r=t.getComponent(`tooltip`),i=t.getComponent(`axisPointer`),a=i.get(`link`,!0)||[],o=[];H(n.getCoordinateSystems(),function(n){if(!n.axisPointerEnabled)return;var s=fL(n.model),c=e.coordSysAxesInfo[s]={};e.coordSysMap[s]=n;var l=n.model.getModel(`tooltip`,r);if(H(n.getAxes(),ao(p,!1,null)),n.getTooltipAxes&&r&&l.get(`show`)){var u=l.get(`trigger`)===`axis`,d=l.get([`axisPointer`,`type`])===`cross`,f=n.getTooltipAxes(l.get([`axisPointer`,`axis`]));(u||d)&&H(f.baseAxes,ao(p,!d||`cross`,u)),d&&H(f.otherAxes,ao(p,`cross`,!1))}function p(r,s,u){var d=u.model.getModel(`axisPointer`,i),f=d.get(`show`);if(f&&(f!==`auto`||r||dL(d))){s??=d.get(`triggerTooltip`),d=r?iL(u,l,i,t,r,s):d;var p=d.get(`snap`),m=d.get(`triggerEmphasis`),h=fL(u.model),g=s||p||u.type===`category`,_=e.axesInfo[h]={key:h,axis:u,coordSys:n,axisPointerModel:d,triggerTooltip:s,triggerEmphasis:m,involveSeries:g,snap:p,useHandle:dL(d),seriesModels:[],linkGroup:null};c[h]=_,e.seriesInvolved=e.seriesInvolved||g;var v=oL(a,u);if(v!=null){var y=o[v]||(o[v]={axesInfo:{}});y.axesInfo[h]=_,y.mapper=a[v].mapper,_.linkGroup=y}}}})}function iL(e,t,n,r,i,a){var o=t.getModel(`axisPointer`),s=[`type`,`snap`,`lineStyle`,`shadowStyle`,`label`,`animation`,`animationDurationUpdate`,`animationEasingUpdate`,`z`],c={};H(s,function(e){c[e]=B(o.get(e))}),c.snap=e.type!==`category`&&!!a,o.get(`type`)===`cross`&&(c.type=`line`);var l=c.label||={};if(l.show??=!1,i===`cross`&&(l.show=o.get([`label`,`show`])??!0,!a)){var u=c.lineStyle=o.get(`crossStyle`);u&&Ya(l,u.textStyle)}return e.model.getModel(`axisPointer`,new _y(c,n,r))}function aL(e,t){t.eachSeries(function(t){var n=t.coordinateSystem,r=t.get([`tooltip`,`trigger`],!0),i=t.get([`tooltip`,`show`],!0);n&&n.model&&r!==`none`&&r!==!1&&r!==`item`&&i!==!1&&t.get([`axisPointer`,`show`],!0)!==!1&&H(e.coordSysAxesInfo[fL(n.model)],function(e){var r=e.axis;n.getAxis(r.dim)===r&&(e.seriesModels.push(t),e.seriesDataCount??=0,e.seriesDataCount+=t.getData().count())})})}function oL(e,t){for(var n=t.model,r=t.dim,i=0;i=0||e===t}function cL(e){var t=lL(e);if(t){var n=t.axisPointerModel,r=t.axis.scale,i=n.option,a=n.get(`status`),o=n.get(`value`);o!=null&&(o=r.parse(o));var s=dL(n);a??(i.status=s?`show`:`hide`);var c=r.getExtent();(o==null||o>c[1])&&(o=c[1]),o3?1.4:i>1?1.2:1.1,c=r>0?s:1/s;this._checkTriggerMoveZoom(this,`zoom`,`zoomOnMouseWheel`,e,{scale:c,originX:a,originY:o,isAvailableBehavior:null})}if(n){var l=Math.abs(r),u=(r>0?1:-1)*(l>3?.4:l>1?.15:.05);this._checkTriggerMoveZoom(this,`scrollMove`,`moveOnMouseWheel`,e,{scrollDelta:u,originX:a,originY:o,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(DL(this._zr,`globalPan`)||jL(e))){var t=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,`zoom`,null,e,{scale:t,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,t,n,r,i){e._checkPointer(r,i.originX,i.originY)&&(KA(r.event),r.__ecRoamConsumed=!0,RL(e,t,n,r,i))},t}(Vu);function jL(e){return e.__ecRoamConsumed}var ML=xm();function NL(e){var t=ML(e);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function PL(e,t,n,r){for(var i=NL(e).roam,a=i[t]=i[t]||[],o=0;o1e-6;AR[0]=o?(i[0]-r.x)/a:i[0],AR[1]=o?(i[1]-r.y)/a:i[1],ks(AR,AR,e.mtRawInv);var s=ER(e,AR);jR(t,s,a),H(n,function(e){e!==t&&jR(e,s.slice(),a)})}var AR=[];function jR(e,t,n){var r=e.option;r.center=t,r.zoom=n}function MR(e,t){if(t){var n=t.min||0,r=t.max||1/0;e=Math.max(Math.min(r,e),n)}return e}function NR(e,t){var n=t.getShallow(`nodeScaleRatio`,!0)||1,r=BL(e);return((r.zoom-1)*n+1)/(r.trans[2].scaleX||1)}function PR(e,t,n,r,i,a,o,s){if(!xR(e)){n.disable();return}n.enable(Y(e.get(`roam`),o),{api:t,zInfo:{component:e},triggerInfo:{roamTrigger:e.get(`roamTrigger`),isInSelf:r,isInClip:function(e,t,n){return!i||i.contain(t,n)}}});function c(n){var r=e.mainType,i=Bv(Ya({type:IR(r,e.subType,sh)},n));s&&(i.componentType=r),i[r+`Id`]=e.id,t.dispatchAction(i)}n.off(`pan`).off(`zoom`).on(`pan`,function(e){a&&a(`pan`),c({dx:e.dx,dy:e.dy})}).on(`zoom`,function(e){a&&a(`zoom`),c({zoom:e.scale,originX:e.originX,originY:e.originY})})}new Z(0,0,0,0);function FR(e,t,n){var r=IR(t,n,sh);e.registerAction({type:r,event:r,update:`none`},function(e,r,i){r.eachComponent(Dm(e,t,n),function(t){bR(e,t),SR(e,t,r,i)})})}function IR(e,t,n){return(e===`series`?t===`map`?`geo`:t:e)+n}function LR(e){return e.zoom!=null}function RR(e,t,n,r,i,a,o){var s=new HL(null,OR(e.ecModel,t));return $L(s,n,r,i,a),o?eR(s,o.x,o.y,o.width,o.height):eR(s,n,r,i,a),QL(s,e),s}var zR=xm();function BR(e){var t=e.mainData,n=e.datas;n||(n={main:t},e.datasAttr={main:`data`}),e.datas=e.mainData=null,qR(t,n,e),H(n,function(n){H(t.TRANSFERABLE_METHODS,function(t){n.wrapMethod(t,ao(VR,e))})}),t.wrapMethod(`cloneShallow`,ao(UR,e)),H(t.CHANGABLE_METHODS,function(n){t.wrapMethod(n,ao(HR,e))}),vo(n[t.dataType]===t)}function VR(e,t){if(KR(this)){var n=V({},zR(this).datas);n[this.dataType]=t,qR(t,n,e)}else JR(t,this.dataType,zR(this).mainData,e);return t}function HR(e,t){return e.struct&&e.struct.update(),t}function UR(e,t){return H(zR(t).datas,function(n,r){n!==t&&JR(n.cloneShallow(),r,t,e)}),t}function WR(e){var t=zR(this).mainData;return e==null||t==null?t:zR(t).datas[e]}function GR(){var e=zR(this).mainData;return e==null?[{data:e}]:U(ro(zR(e).datas),function(t){return{type:t,data:zR(e).datas[t]}})}function KR(e){return zR(e).mainData===e}function qR(e,t,n){zR(e).datas={},H(t,function(t,r){JR(t,r,e,n)})}function JR(e,t,n,r){zR(n).datas[t]=e,zR(e).mainData=n,e.dataType=t,r.struct&&(e[r.structAttr]=r.struct,r.struct[r.datasAttr[t]]=e),e.getLinkedData=WR,e.getLinkedDataAll=GR}var YR=H,XR=J,ZR=-1,QR=function(){function e(t){var n=t.mappingMethod,r=t.type,i=this.option=B(t);this.type=r,this.mappingMethod=n,this._normalizeData=uz[n];var a=e.visualHandlers[r];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[n],n===`piecewise`?(tz(i),$R(i)):n===`category`?i.categories?ez(i):tz(i,!0):(vo(n!==`linear`||i.dataExtent),tz(i))}return e.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},e.prototype.getNormalizer=function(){return W(this._normalizeData,this)},e.listVisualTypes=function(){return ro(e.visualHandlers)},e.isValidType=function(t){return e.visualHandlers.hasOwnProperty(t)},e.eachVisual=function(e,t,n){J(e)?H(e,t,n):t.call(n,e)},e.mapVisual=function(t,n,r){var i,a=G(t)?[]:J(t)?{}:(i=!0,null);return e.eachVisual(t,function(e,t){var o=n.call(r,e,t);i?a=o:a[t]=o}),a},e.retrieveVisuals=function(t){var n={},r;return t&&YR(e.visualHandlers,function(e,i){t.hasOwnProperty(i)&&(n[i]=t[i],r=!0)}),r?n:null},e.prepareVisualTypes=function(e){if(G(e))e=e.slice();else if(XR(e)){var t=[];YR(e,function(e,n){t.push(n)}),e=t}else return[];return e.sort(function(e,t){return t===`color`&&e!==`color`&&e.indexOf(`color`)===0?1:-1}),e},e.dependsOn=function(e,t){return t===`color`?!!(e&&e.indexOf(t)===0):e===t},e.findPieceIndex=function(e,t,n){for(var r,i=1/0,a=0,o=t.length;a=0;a--)r[a]??(delete n[t[a]],t.pop())}function tz(e,t){var n=e.visual,r=[];J(n)?YR(n,function(e){r.push(e)}):n!=null&&r.push(n),!t&&r.length===1&&!{color:1,symbol:1}.hasOwnProperty(e.type)&&(r[1]=r[0]),lz(e,r)}function nz(e){return{applyVisual:function(t,n,r){var i=this.mapValueToVisual(t);r(`color`,e(n(`color`),i))},_normalizedToVisual:sz([0,1])}}function rz(e){var t=this.option.visual;return t[Math.round(vp(e,[0,1],[0,t.length-1],!0))]||{}}function iz(e){return function(t,n,r){r(e,this.mapValueToVisual(t))}}function az(e){var t=this.option.visual;return t[this.option.loop&&e!==ZR?e%t.length:e]}function oz(){return this.option.visual[0]}function sz(e){return{linear:function(t){return vp(t,e,this.option.visual,!0)},category:az,piecewise:function(t,n){var r=cz.call(this,n);return r??=vp(t,e,this.option.visual,!0),r},fixed:oz}}function cz(e){var t=this.option,n=t.pieceList;if(t.hasSpecialVisual){var r=n[QR.findPieceIndex(e,n)];if(r&&r.visual)return r.visual[this.type]}}function lz(e,t){return e.visual=t,e.type===`color`&&(e.parsedVisual=U(t,function(e){return zl(e)||[0,0,0,1]})),t}var uz={linear:function(e){return vp(e,this.option.dataExtent,[0,1],!0)},piecewise:function(e){var t=this.option.pieceList,n=QR.findPieceIndex(e,t,!0);if(n!=null)return vp(n,[0,t.length-1],[0,1],!0)},category:function(e){return(this.option.categories?this.option.categoryMap[e]:e)??ZR},fixed:Ao};function dz(e,t,n){return e?t<=n:t=0&&e.call(t,n[i],i)},e.prototype.eachEdge=function(e,t){for(var n=this.edges,r=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},e.prototype.breadthFirstTraverse=function(e,t,n,r){if(t instanceof mz||(t=this._nodesMap[fz(t)]),t){for(var i=n===`out`?`outEdges`:n===`in`?`inEdges`:`edges`,a=0;a=0&&n.node2.dataIndex>=0});for(var i=0,a=r.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),a.push(f.node1))}for(s=0;s=0&&!e.hasKey(v)&&(e.set(v,!0),o.push(_.node2))}}}return{edge:e.keys(),node:t.keys()}},e}(),hz=function(){function e(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return e.prototype.getModel=function(e){if(!(this.dataIndex<0))return this.hostGraph.edgeData.getItemModel(this.dataIndex).getModel(e)},e.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},e.prototype.getTrajectoryDataIndices=function(){var e=X(),t=X();e.set(this.dataIndex,!0);for(var n=[this.node1],r=[this.node2],i=0;i=0&&!e.hasKey(u)&&(e.set(u,!0),n.push(l.node1))}for(i=0;i=0&&!e.hasKey(m)&&(e.set(m,!0),r.push(p.node2))}return{edge:e.keys(),node:t.keys()}},e}();function gz(e,t){return{getValue:function(n){var r=this[e][t];return r.getStore().get(r.getDimensionIndex(n||`value`),this.dataIndex)},setVisual:function(n,r){this.dataIndex>=0&&this[e][t].setItemVisual(this.dataIndex,n,r)},getVisual:function(n){return this[e][t].getItemVisual(this.dataIndex,n)},setLayout:function(n,r){this.dataIndex>=0&&this[e][t].setItemLayout(this.dataIndex,n,r)},getLayout:function(){return this[e][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[e][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[e][t].getRawIndex(this.dataIndex)}}}Qa(mz,gz(`hostGraph`,`data`)),Qa(hz,gz(`hostGraph`,`edgeData`));function _z(e,t,n,r,i){for(var a=new pz(r),o=0;o `+f)),l++)}var p=n.get(`coordinateSystem`),m;if(p===`cartesian2d`||p===`polar`||p===`matrix`)m=hx(e,n);else{var h=$b.get(p),g=h&&h.dimensions||[];Xa(g,`value`)<0&&g.concat([`value`]);var _=Jb(e,{coordDimensions:g,encodeDefine:n.getEncode()}).dimensions;m=new qb(_,n),m.initData(e)}var v=new qb([`value`],n);return v.initData(c,s),i&&i(m,v),BR({mainData:m,struct:a,structAttr:`graph`,datas:{node:m,edge:v},datasAttr:{node:`data`,edge:`edgeData`}}),a.update(),a}var vz=`-->`,yz=function(e){return e.get(`autoCurveness`)||null},bz=function(e,t){var n=yz(e),r=20,i=[];if(so(n))r=n;else if(G(n)){e.__curvenessList=n;return}t>r&&(r=t);var a=r%2?r+2:r+3;i=[];for(var o=0;o `),value:i.value,noValue:i.value==null})}return sw({series:this,dataIndex:e,multipleSeries:t})},t.prototype._updateCategoriesData=function(){var e=U(this.option.categories||[],function(e){return e.value==null?V({value:0},e):e}),t=new qb([`value`],this);t.initData(e),this._categoriesData=t,this._categoriesModels=t.mapArray(function(e){return t.getItemModel(e)})},t.prototype.isAnimationEnabled=function(){return e.prototype.isAnimationEnabled.call(this)&&!(this.get(`layout`)===`force`&&this.get([`force`,`layoutAnimation`]))},t.prototype.__ownRoamView=function(){var e=this.coordinateSystem;return hR(e)&&e},t.type=`series.`+kz,t.dependencies=[`grid`,`polar`,`geo`,`singleAxis`,`calendar`],t.defaultOption={z:2,coordinateSystem:`view`,legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:`center`,top:`center`,symbol:`circle`,symbolSize:10,edgeSymbol:[`none`,`none`],edgeSymbolSize:10,edgeLabel:{position:`middle`,distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:`{b}`},itemStyle:{},lineStyle:{color:Q.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:Q.color.primary}}},t}(dw);function jz(e){return e instanceof Array||(e=[e,e]),e}var Mz=Jm(kz,Nz);function Nz(e){e.eachSeriesByType(kz,function(e){var t=e.getGraph(),n=e.getEdgeData(),r=jz(e.get(`edgeSymbol`)),i=jz(e.get(`edgeSymbolSize`));n.setVisual(`fromSymbol`,r&&r[0]),n.setVisual(`toSymbol`,r&&r[1]),n.setVisual(`fromSymbolSize`,i&&i[0]),n.setVisual(`toSymbolSize`,i&&i[1]),n.setVisual(`style`,e.getModel(`lineStyle`).getLineStyle()),n.each(function(e){var r=n.getItemModel(e),i=t.getEdgeByIndex(e),a=jz(r.getShallow(`symbol`,!0)),o=jz(r.getShallow(`symbolSize`,!0)),s=r.getModel(`lineStyle`).getLineStyle(),c=n.ensureUniqueItemVisual(e,`style`);switch(V(c,s),c.stroke){case`source`:var l=i.node1.getVisual(`style`);c.stroke=l&&l.fill;break;case`target`:var l=i.node2.getVisual(`style`);c.stroke=l&&l.fill}a[0]&&i.setVisual(`fromSymbol`,a[0]),a[1]&&i.setVisual(`toSymbol`,a[1]),o[0]&&i.setVisual(`fromSymbolSize`,o[0]),o[1]&&i.setVisual(`toSymbolSize`,o[1])})})}function Pz(e){var t=e.coordinateSystem;if(!(t&&t.type!==`view`)){var n=e.getGraph();n.eachNode(function(e){var t=e.getModel();e.setLayout([+t.get(`x`),+t.get(`y`)])}),Fz(n,e)}}function Fz(e,t){e.eachEdge(function(e,n){var r=ho(e.getModel().get([`lineStyle`,`curveness`]),-Oz(e,t,n,!0),0),i=gs(e.node1.getLayout()),a=gs(e.node2.getLayout()),o=[i,a];+r&&o.push([(i[0]+a[0])/2-(i[1]-a[1])*r,(i[1]+a[1])/2-(a[0]-i[0])*r]),e.setLayout(o)})}var Iz=Jm(kz,Lz);function Lz(e,t){e.eachSeriesByType(kz,function(e){var t=e.get(`layout`),n=e.coordinateSystem;if(n&&n.type!==`view`){var r=e.getData(),i=[];H(n.dimensions,function(e){i=i.concat(r.mapDimensionsAll(e))});for(var a=0;a0&&(y[0]=-y[0],y[1]=-y[1]);var x=v[0]<0?-1:1;if(r.__position!==`start`&&r.__position!==`end`){var S=-Math.atan2(v[1],v[0]);l[0].8?`left`:u[0]<-.8?`right`:`center`,p=u[1]>.8?`top`:u[1]<-.8?`bottom`:`middle`;break;case`start`:r.x=-u[0]*h+c[0],r.y=-u[1]*g+c[1],f=u[0]>.8?`right`:u[0]<-.8?`left`:`center`,p=u[1]>.8?`bottom`:u[1]<-.8?`top`:`middle`;break;case`insideStartTop`:case`insideStart`:case`insideStartBottom`:r.x=h*x+c[0],r.y=c[1]+C,f=v[0]<0?`right`:`left`,r.originX=-h*x,r.originY=-C;break;case`insideMiddleTop`:case`insideMiddle`:case`insideMiddleBottom`:case`middle`:r.x=b[0],r.y=b[1]+C,f=`center`,r.originY=-C;break;case`insideEndTop`:case`insideEnd`:case`insideEndBottom`:r.x=-h*x+l[0],r.y=l[1]+C,f=v[0]>=0?`right`:`left`,r.originX=h*x,r.originY=-C}r.scaleX=r.scaleY=i,r.setStyle({verticalAlign:r.__verticalAlign||p,align:r.__align||f})}},t}(Bg),dB=function(){function e(e){this.group=new Bg,this._LineCtor=e||uB}return e.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,r=n.group,i=n._lineData;n._lineData=e,i||r.removeAll();var a=pB(e);e.diff(i).add(function(n){t._doAdd(e,n,a)}).update(function(n,r){t._doUpdate(i,e,r,n,a)}).remove(function(e){r.remove(i.getItemGraphicEl(e))}).execute()},e.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},e.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=pB(e),this._lineData=null,this.group.removeAll()},e.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[];function r(e){!e.isGroup&&!fB(e)&&(e.incremental=n,e.ensureState(`emphasis`).hoverLayer=2)}for(var i=e.start;i0}function pB(e){var t=e.hostModel,n=t.getModel(`emphasis`);return{lineStyle:t.getModel(`lineStyle`).getLineStyle(),emphasisLineStyle:n.getModel([`lineStyle`]).getLineStyle(),blurLineStyle:t.getModel([`blur`,`lineStyle`]).getLineStyle(),selectLineStyle:t.getModel([`select`,`lineStyle`]).getLineStyle(),emphasisDisabled:n.get(`disabled`),blurScope:n.get(`blurScope`),focus:n.get(`focus`),labelStatesModels:Jv(t)}}function mB(e){return isNaN(e[0])||isNaN(e[1])}function hB(e){return e&&!mB(e[0])&&!mB(e[1])}var gB=[],_B=[],vB=[],yB=gl,bB=Os,xB=Math.abs;function SB(e,t,n){for(var r=e[0],i=e[1],a=e[2],o=1/0,s,c=n*n,l=.1,u=.1;u<=.9;u+=.1){gB[0]=yB(r[0],i[0],a[0],u),gB[1]=yB(r[1],i[1],a[1],u);var d=xB(bB(gB,t)-c);d=0?s+=l:s-=l:m>=0?s-=l:s+=l}return s}function CB(e,t){var n=[],r=bl,i=[[],[],[]],a=[[],[]],o=[];t/=2,e.eachEdge(function(e,s){var c=e.getLayout(),l=e.getVisual(`fromSymbol`),u=e.getVisual(`toSymbol`);c.__original||(c.__original=[gs(c[0]),gs(c[1])],c[2]&&c.__original.push(gs(c[2])));var d=c.__original;if(c[2]!=null){if(hs(i[0],d[0]),hs(i[1],d[2]),hs(i[2],d[1]),l&&l!==`none`){var f=zz(e.node1),p=SB(i,d[0],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[0][0]=n[3],i[1][0]=n[4],r(i[0][1],i[1][1],i[2][1],p,n),i[0][1]=n[3],i[1][1]=n[4]}if(u&&u!==`none`){var f=zz(e.node2),p=SB(i,d[1],f*t);r(i[0][0],i[1][0],i[2][0],p,n),i[1][0]=n[1],i[2][0]=n[2],r(i[0][1],i[1][1],i[2][1],p,n),i[1][1]=n[1],i[2][1]=n[2]}hs(c[0],i[0]),hs(c[1],i[2]),hs(c[2],i[1])}else{if(hs(a[0],d[0]),hs(a[1],d[1]),bs(o,a[1],a[0]),ws(o,o),l&&l!==`none`){var f=zz(e.node1);ys(a[0],a[0],o,f*t)}if(u&&u!==`none`){var f=zz(e.node2);ys(a[1],a[1],o,-f*t)}hs(c[0],a[0]),hs(c[1],a[1])}})}var wB=xm();function TB(e){if(e)return wB(e).bridge}var EB=function(e){z(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.type=kz,t}return t.prototype.init=function(e,t){var n=new Rw,r=new dB,i=this.group,a=new Bg;this._controller=new AL(t.getZr()),a.add(n.group),a.add(r.group),i.add(a),this._symbolDraw=n,this._lineDraw=r,this._mainGroup=a,this._firstRender=!0},t.prototype.render=function(e,t,n){var r=this,i=xR(e),a=!1;this._model=e,this._api=n,this._active=!0;var o=this._mainGroup,s=this._getThumbnailInfo();s&&s.bridge.reset(n);var c=this._symbolDraw,l=this._lineDraw;i&&gR(o,2,i,this._firstRender?null:e),CB(e.getGraph(),Rz(e));var u=e.getData();c.updateData(u);var d=e.getEdgeData();l.updateData(d),this._updateNodeAndLinkScale(),i&&PR(e,n,this._controller,function(t,n,r){return e.coordinateSystem.containPoint([n,r])},null),clearTimeout(this._layoutTimeout);var f=e.forceLayout,p=e.get([`force`,`layoutAnimation`]);f&&(a=!0,this._startForceLayoutIteration(f,n,p));var m=e.get(`layout`);u.graph.eachNode(function(t){var i=t.dataIndex,a=t.getGraphicEl(),o=t.getModel();if(a){a.off(`drag`).off(`dragend`);var s=o.get(`draggable`);s&&a.on(`drag`,function(o){switch(m){case`force`:f.warmUp(),!r._layouting&&r._startForceLayoutIteration(f,n,p),f.setFixed(i),u.setItemLayout(i,[a.x,a.y]);break;case`circular`:u.setItemLayout(i,[a.x,a.y]),t.setLayout({fixed:!0},!0),Hz(e,`symbolSize`,t,[o.offsetX,o.offsetY]),r.updateLayout(e);break;default:u.setItemLayout(i,[a.x,a.y]),Fz(e.getGraph(),e),r.updateLayout(e)}}).on(`dragend`,function(){f&&f.setUnfixed(i)}),a.setDraggable(s,!!o.get(`cursor`)),o.get([`emphasis`,`focus`])===`adjacency`&&(Xm(a).focus=t.getAdjacentDataIndices())}}),u.graph.eachEdge(function(e){var t=e.getGraphicEl(),n=e.getModel().get([`emphasis`,`focus`]);t&&n===`adjacency`&&(Xm(t).focus={edge:[e.dataIndex],node:[e.node1.dataIndex,e.node2.dataIndex]})});var h=e.get(`layout`)===`circular`&&e.get([`circular`,`rotateLabel`]),g=u.getLayout(`cx`),_=u.getLayout(`cy`);u.graph.eachNode(function(e){Wz(e,h,g,_)}),this._firstRender=!1,a||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose()},t.prototype._startForceLayoutIteration=function(e,t,n){var r=this,i=!1;(function a(){e.step(function(e){r.updateLayout(r._model),(e||!i)&&(i=!0,r._renderThumbnail(r._model,t,r._symbolDraw,r._lineDraw)),(r._layouting=!e)&&(n?r._layoutTimeout=setTimeout(a,16):a())})})()},t.prototype.__updateOnOwnRoam=function(e,t,n){var r=xR(t);this._active&&r&&(gR(this._mainGroup,2,r,null),LR(e)&&(this._updateNodeAndLinkScale(),CB(t.getGraph(),Rz(t)),this._lineDraw.updateLayout(),n.updateLabelLayout()),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,t=e.getData(),n=Rz(e);t.eachItemGraphicEl(function(e,t){e&&e.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(CB(e.getGraph(),Rz(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,t=e.coordinateSystem;if(t.type===`view`){var n=TB(e);if(n)return{bridge:n,coordSys:t}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(WL(null,e.coordSys),this._api)},t.prototype._renderThumbnail=function(e,t,n,r){var i=this._getThumbnailInfo();if(i){var a=new Bg,o=n.group.children(),s=r.group.children(),c=new Bg,l=new Bg;a.add(l),a.add(c);for(var u=0;ua&&(t[1-r]=kp(t[r],d.sign*a)),t}function NB(e,t){var n=e[t]-e[1-t];return{span:Math.abs(n),sign:n>0?-1:n<0?1:t?-1:1}}function PB(e,t){return Math.min(t[1]==null?1/0:t[1],Math.max(t[0]==null?-1/0:t[0],e))}var FB=xm(),IB=B,LB=W,RB=function(){function e(){this._dragging=!1,this.animationThreshold=15}return e.prototype.render=function(e,t,n,r){var i=t.get(`value`),a=t.get(`status`);if(this._axisModel=e,this._axisPointerModel=t,this._api=n,r||this._lastValue!==i||this._lastStatus!==a){this._lastValue=i,this._lastStatus=a;var o=this._group,s=this._handle;if(!a||a===`hide`){o&&o.hide(),s&&s.hide();return}o&&o.show(),s&&s.show();var c={};this.makeElOption(c,i,e,t,n);var l=c.graphicKey;l!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=l;var u=this._moveAnimation=this.determineAnimation(e,t);if(!o)o=this._group=new Bg,this.createPointerEl(o,c,e,t),this.createLabelEl(o,c,e,t),n.getZr().add(o);else{var d=ao(zB,t,u);this.updatePointerEl(o,c,d),this.updateLabelEl(o,c,d,t)}UB(o,t,!0),this._renderHandle(i)}},e.prototype.remove=function(e){this.clear(e)},e.prototype.dispose=function(e){this.clear(e)},e.prototype.determineAnimation=function(e,t){var n=t.get(`animation`),r=e.axis,i=r.type===`category`,a=t.get(`snap`);if(!a&&!i)return!1;if(n===`auto`||n==null){var o=this.animationThreshold;if(i&&qD(r).w>o)return!0;if(a){var s=lL(e).seriesDataCount,c=r.getExtent();return Math.abs(c[0]-c[1])/s>o}return!1}return n===!0},e.prototype.makeElOption=function(e,t,n,r,i){},e.prototype.createPointerEl=function(e,t,n,r){var i=t.pointer;if(i){var a=FB(e).pointerEl=new X_[i.type](IB(t.pointer));e.add(a)}},e.prototype.createLabelEl=function(e,t,n,r){if(t.label){var i=FB(e).labelEl=new Wf(IB(t.label));e.add(i),VB(i,r)}},e.prototype.updatePointerEl=function(e,t,n){var r=FB(e).pointerEl;r&&t.pointer&&(r.setStyle(t.pointer.style),n(r,{shape:t.pointer.shape}))},e.prototype.updateLabelEl=function(e,t,n,r){var i=FB(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),VB(i,r))},e.prototype._renderHandle=function(e){if(!this._dragging&&this.updateHandleTransform){var t=this._axisPointerModel,n=this._api.getZr(),r=this._handle,i=t.getModel(`handle`),a=t.get(`status`);if(!i.get(`show`)||!a||a===`hide`){r&&n.remove(r),this._handle=null;return}var o;this._handle||(o=!0,r=this._handle=xv(i.get(`icon`),{cursor:`move`,draggable:!0,onmousemove:function(e){KA(e.event)},onmousedown:LB(this._onHandleDragMove,this,0,0),drift:LB(this._onHandleDragMove,this),ondragend:LB(this._onHandleDragEnd,this)}),n.add(r)),UB(r,t,!1),r.setStyle(i.getItemStyle(null,[`color`,`borderColor`,`borderWidth`,`opacity`,`shadowColor`,`shadowBlur`,`shadowOffsetX`,`shadowOffsetY`]));var s=i.get(`size`);G(s)||(s=[s,s]),r.scaleX=s[0]/2,r.scaleY=s[1]/2,Xk(this,`_doDispatchAxisPointer`,i.get(`throttle`)||0,`fixRate`),this._moveHandleToValue(e,o)}},e.prototype._moveHandleToValue=function(e,t){zB(this._axisPointerModel,!t&&this._moveAnimation,this._handle,HB(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},e.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var r=this.updateHandleTransform(HB(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=r,n.stopAnimation(),n.attr(HB(r)),FB(n).lastProp=null,this._doDispatchAxisPointer()}},e.prototype._doDispatchAxisPointer=function(){if(this._handle){var e=this._payloadInfo,t=this._axisModel;this._api.dispatchAction({type:`updateAxisPointer`,x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:t.axis.dim,axisIndex:t.componentIndex}]})}},e.prototype._onHandleDragEnd=function(){if(this._dragging=!1,this._handle){var e=this._axisPointerModel.get(`value`);this._moveHandleToValue(e),this._api.dispatchAction({type:`hideTip`})}},e.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,r=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),r&&t.remove(r),this._group=null,this._handle=null,this._payloadInfo=null),Zk(this,`_doDispatchAxisPointer`)},e.prototype.doClear=function(){},e.prototype.buildLabel=function(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},e}();function zB(e,t,n,r){BB(FB(n).lastProp,r)||(FB(n).lastProp=r,t?U_(n,r,e):(n.stopAnimation(),n.attr(r)))}function BB(e,t){if(J(e)&&J(t)){var n=!0;return H(t,function(t,r){n&&=BB(e[r],t)}),!!n}return e===t}function VB(e,t){e[t.get([`label`,`show`])?`show`:`hide`]()}function HB(e){return{x:e.x||0,y:e.y||0,rotation:e.rotation||0}}function UB(e,t,n){var r=t.get(`z`),i=t.get(`zlevel`);e&&e.traverse(function(e){e.type!==`group`&&(r!=null&&(e.z=r),i!=null&&(e.zlevel=i),e.silent=n)})}function WB(e){var t=e.get(`type`),n=e.getModel(t+`Style`),r;return t===`line`?(r=n.getLineStyle(),r.fill=null):t===`shadow`&&(r=n.getAreaStyle(),r.stroke=null),r}function GB(e,t,n,r,i){var a=qB(n.get(`value`),t.axis,t.ecModel,n.get(`seriesDataIndices`),{precision:n.get([`label`,`precision`]),formatter:n.get([`label`,`formatter`])}),o=n.getModel(`label`),s=zS(o.get(`padding`)||0),c=o.getFont(),l=dc(a,c),u=i.position,d=l.width+s[1]+s[3],f=l.height+s[0]+s[2],p=i.align;p===`right`&&(u[0]-=d),p===`center`&&(u[0]-=d/2);var m=i.verticalAlign;m===`bottom`&&(u[1]-=f),m===`middle`&&(u[1]-=f/2),KB(u,d,f,r);var h=o.get(`backgroundColor`);(!h||h===`auto`)&&(h=t.get([`axisLine`,`lineStyle`,`color`])),e.label={x:u[0],y:u[1],style:Yv(o,{text:a,font:c,fill:o.getTextColor(),padding:s,backgroundColor:h}),z2:10}}function KB(e,t,n,r){var i=r.getWidth(),a=r.getHeight();e[0]=Math.min(e[0]+t,i)-t,e[1]=Math.min(e[1]+n,a)-n,e[0]=Math.max(e[0],0),e[1]=Math.max(e[1],0)}function qB(e,t,n,r,i){e=t.scale.parse(e);var a=t.scale.getLabel({value:e},{precision:i.precision}),o=i.formatter;if(o){var s={value:bE(t,{value:e}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};H(r,function(e){var t=n.getSeriesByIndex(e.seriesIndex),r=e.dataIndexInside,i=t&&t.getDataParams(r);i&&s.seriesData.push(i)}),q(o)?a=o.replace(`{value}`,a):K(o)&&(a=o(s))}return a}function JB(e,t,n){var r=os();return ds(r,r,n.rotation),us(r,r,n.position),mv([e.dataToCoord(t),(n.labelOffset||0)+(n.labelDirection||1)*(n.labelMargin||0)],r)}function YB(e,t,n,r,i,a){var o=jO.innerTextLayout(n.rotation,0,n.labelDirection);n.labelMargin=i.get([`label`,`margin`]),GB(t,r,i,a,{position:JB(r.axis,e,n),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function XB(e,t,n){return n||=0,{x1:e[n],y1:e[1-n],x2:t[n],y2:t[1-n]}}function ZB(e,t,n){return n||=0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}}function QB(e,t,n){return qD(e,{fromStat:{sers:U(t,function(e){return n.getSeriesByIndex(e.seriesIndex)})},min:1}).w}function $B(e,t,n){return[cp(sp(t[0],t[1]),e-n/2),sp(e+n/2,cp(t[0],t[1]))]}var eV=function(e){z(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,t,n,r,i){var a=n.axis,o=a.grid,s=r.get(`type`),c=a.getGlobalExtent(),l=tV(o,a).getOtherAxis(a).getGlobalExtent(),u=a.toGlobalCoord(a.dataToCoord(t,!0));if(s&&s!==`none`){var d=WB(r),f=nV[s](a,u,c,l,r.get(`seriesDataIndices`),r.ecModel);f.style=d,e.graphicKey=f.type,e.pointer=f}YB(t,e,QO(o.getRect(),n),n,r,i)},t.prototype.getHandleTransform=function(e,t,n){var r=QO(t.axis.grid.getRect(),t,{labelInside:!1});r.labelMargin=n.get([`handle`,`margin`]);var i=JB(t.axis,e,r);return{x:i[0],y:i[1],rotation:r.rotation+(r.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,t,n,r){var i=n.axis,a=i.grid,o=i.getGlobalExtent(!0),s=tV(a,i).getOtherAxis(i).getGlobalExtent(),c=i.dim===`x`?0:1,l=[e.x,e.y];l[c]+=t[c],l[c]=sp(o[1],l[c]),l[c]=cp(o[0],l[c]);var u=(s[1]+s[0])/2,d=[u,u];return d[c]=l[c],{x:l[0],y:l[1],rotation:e.rotation,cursorPoint:d,tooltipOption:[{verticalAlign:`middle`},{align:`center`}][c]}},t}(RB);function tV(e,t){var n={};return n[t.dim+`AxisIndex`]=t.index,e.getCartesian(n)}var nV={line:function(e,t,n,r){return{type:`Line`,subPixelOptimize:!0,shape:XB([t,r[0]],[t,r[1]],rV(e))}},shadow:function(e,t,n,r,i,a){var o=QB(e,i,a),s=r[1]-r[0],c=$B(t,n,o),l=c[0],u=c[1];return{type:`Rect`,shape:ZB([l,r[0]],[u-l,s],rV(e))}}};function rV(e){return e.dim===`x`?0:1}var iV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`axisPointer`,t.defaultOption={show:`auto`,z:50,type:`line`,snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:Q.color.border,width:1,type:`dashed`},shadowStyle:{color:Q.color.shadowTint},label:{show:!0,formatter:null,precision:`auto`,margin:3,color:Q.color.neutral00,padding:[5,7,5,7],backgroundColor:Q.color.accent60,borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:`M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z`,size:45,margin:50,color:Q.color.accent40,throttle:40}},t}(cC),aV=xm(),oV=H;function sV(e,t,n){if(!No.node){var r=t.getZr();aV(r).records||(aV(r).records={}),cV(r,t);var i=aV(r).records[e]||(aV(r).records[e]={});i.handler=n}}function cV(e,t){if(aV(e).initialized)return;aV(e).initialized=!0,n(`click`,ao(dV,`click`)),n(`mousemove`,ao(dV,`mousemove`)),n(`mousewheel`,ao(dV,`mousewheel`)),n(`globalout`,uV);function n(n,r){e.on(n,function(n){var i=fV(t);oV(aV(e).records,function(e){e&&r(e,n,i.dispatchAction)}),lV(i.pendings,t)})}}function lV(e,t){var n=e.showTip.length,r=e.hideTip.length,i;n?i=e.showTip[n-1]:r&&(i=e.hideTip[r-1]),i&&(i.dispatchAction=null,t.dispatchAction(i))}function uV(e,t,n){e.handler(`leave`,null,n)}function dV(e,t,n,r){t.handler(e,n,r)}function fV(e){var t={showTip:[],hideTip:[]},n=function(r){var i=t[r.type];i?i.push(r):(r.dispatchAction=n,e.dispatchAction(r))};return{dispatchAction:n,pendings:t}}function pV(e,t){if(!No.node){var n=t.getZr();(aV(n).records||{})[e]&&(aV(n).records[e]=null)}}var mV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.render=function(e,t,n){var r=t.getComponent(`tooltip`),i=e.get(`triggerOn`)||r&&r.get(`triggerOn`)||`mousemove|click|mousewheel`;sV(`axisPointer`,n,function(e,t,n){i!==`none`&&(e===`leave`||i.indexOf(e)>=0)&&n({type:`updateAxisPointer`,currTrigger:e,x:t&&t.offsetX,y:t&&t.offsetY})})},t.prototype.remove=function(e,t){pV(`axisPointer`,t)},t.prototype.dispose=function(e,t){pV(`axisPointer`,t)},t.type=`axisPointer`,t}(QM);function hV(e,t){var n=[],r=e.seriesIndex,i;if(r==null||!(i=t.getSeriesByIndex(r)))return{point:[]};var a=i.getData(),o=bm(a,e);if(o==null||o<0||G(o))return{point:[]};var s=a.getItemGraphicEl(o),c=i.coordinateSystem;if(i.getTooltipPosition)n=i.getTooltipPosition(o)||[];else if(c&&c.dataToPoint){if(e.isStacked){var l=c.getBaseAxis(),u=c.getOtherAxis(l).dim,d=l.dim,f=+(u===`x`||u===`radius`),p=a.mapDimension(d),m=[];m[f]=a.get(p,o),m[1-f]=a.get(a.getCalculationInfo(`stackResultDimension`),o),n=c.dataToPoint(m)||[]}else n=c.dataToPoint(a.getValues(U(c.dimensions,function(e){return a.mapDimension(e)}),o))||[]}else if(s){var h=s.getBoundingRect().clone();h.applyTransform(s.transform),n=[h.x+h.width/2,h.y+h.height/2]}return{point:n,el:s}}var gV=xm();function _V(e,t,n){var r=e.currTrigger,i=[e.x,e.y],a=e,o=e.dispatchAction||W(n.dispatchAction,n),s=t.getComponent(`axisPointer`).coordSysAxesInfo;if(s){DV(i)&&(i=hV({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},t).point);var c=DV(i),l=a.axesInfo,u=s.axesInfo,d=r===`leave`||DV(i),f={},p={},m={list:[],map:{}},h={showPointer:ao(bV,p),showTooltip:ao(xV,m)};H(s.coordSysMap,function(e,t){var n=c||e.containPoint(i);H(s.coordSysAxesInfo[t],function(e,t){var r=e.axis,a=TV(l,e);if(!d&&n&&(!l||a)){var o=a&&a.value;o==null&&!c&&(o=r.pointToData(i)),o!=null&&vV(e,o,h,!1,f)}})});var g={};return H(u,function(e,t){var n=e.linkGroup;n&&!p[t]&&H(n.axesInfo,function(t,r){var i=p[r];if(t!==e&&i){var a=i.value;n.mapper&&(a=e.axis.scale.parse(n.mapper(a,EV(t),EV(e)))),g[e.key]=a}})}),H(g,function(e,t){vV(u[t],e,h,!0,f)}),SV(p,u,f),CV(m,i,e,o),wV(u,o,n),f}}function vV(e,t,n,r,i){var a=e.axis;if(!a.scale.isBlank()&&a.containData(t)){if(!e.involveSeries){n.showPointer(e,t);return}var o=yV(t,e),s=o.payloadBatch,c=o.snapToValue;s[0]&&i.seriesIndex==null&&V(i,s[0]),!r&&e.snap&&a.containData(c)&&c!=null&&(t=c),n.showPointer(e,t,s),n.showTooltip(e,o,c)}}function yV(e,t){var n=t.axis,r=n.dim,i=e,a=[],o=Number.MAX_VALUE,s=-1;return H(t.seriesModels,function(t,c){var l=t.getData().mapDimensionsAll(r),u,d;if(t.getAxisTooltipData){var f=t.getAxisTooltipData(l,e,n);d=f.dataIndices,u=f.nestestValue}else{if(d=t.indicesOfNearest(r,l[0],e,n.type===`category`?.5:null),!d.length)return;u=t.getData().get(l[0],d[0])}if(Wp(u)){var p=e-u,m=Math.abs(p);m<=o&&((m=0&&s<0)&&(o=m,s=p,i=u,a.length=0),H(d,function(e){a.push({seriesIndex:t.seriesIndex,dataIndexInside:e,dataIndex:t.getData().getRawIndex(e)})}))}}),{payloadBatch:a,snapToValue:i}}function bV(e,t,n,r){e[t.key]={value:n,payloadBatch:r}}function xV(e,t,n,r){var i=n.payloadBatch,a=t.axis,o=a.model,s=t.axisPointerModel;if(t.triggerTooltip&&i.length){var c=t.coordSys.model,l=fL(c),u=e.map[l];u||(u=e.map[l]={coordSysId:c.id,coordSysIndex:c.componentIndex,coordSysType:c.type,coordSysMainType:c.mainType,dataByAxis:[]},e.list.push(u)),u.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:r,valueLabelOpt:{precision:s.get([`label`,`precision`]),formatter:s.get([`label`,`formatter`])},seriesDataIndices:i.slice()})}}function SV(e,t,n){var r=n.axesInfo=[];H(t,function(t,n){var i=t.axisPointerModel.option,a=e[n];a?(!t.useHandle&&(i.status=`show`),i.value=a.value,i.seriesDataIndices=(a.payloadBatch||[]).slice()):!t.useHandle&&(i.status=`hide`),i.status===`show`&&r.push({axisDim:t.axis.dim,axisIndex:t.axis.model.componentIndex,value:i.value})})}function CV(e,t,n,r){if(DV(t)||!e.list.length){r({type:`hideTip`});return}var i=((e.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};r({type:`showTip`,escapeConnect:!0,x:t[0],y:t[1],tooltipOption:n.tooltipOption,position:n.position,dataIndexInside:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:e.list})}function wV(e,t,n){var r=n.getZr(),i=`axisPointerLastHighlights`,a=gV(r)[i]||{},o=gV(r)[i]={};H(e,function(e,t){var n=e.axisPointerModel.option;n.status===`show`&&e.triggerEmphasis&&H(n.seriesDataIndices,function(e){o[e.seriesIndex+`|`+e.dataIndex]=e})});var s=[],c=[];function l(e){return{seriesIndex:e.seriesIndex,dataIndex:e.dataIndex}}H(a,function(e,t){!o[t]&&c.push(l(e))}),H(o,function(e,t){!a[t]&&s.push(l(e))}),c.length&&n.dispatchAction({type:`downplay`,escapeConnect:!0,notBlur:!0,batch:c}),s.length&&n.dispatchAction({type:`highlight`,escapeConnect:!0,notBlur:!0,batch:s})}function TV(e,t){for(var n=0;n<(e||[]).length;n++){var r=e[n];if(t.axis.dim===r.axisDim&&t.axis.model.componentIndex===r.axisIndex)return r}}function EV(e){var t=e.axis.model,n={},r=n.axisDim=e.axis.dim;return n.axisIndex=n[r+`AxisIndex`]=t.componentIndex,n.axisName=n[r+`AxisName`]=t.name,n.axisId=n[r+`AxisId`]=t.id,n}function DV(e){return!e||e[0]==null||isNaN(e[0])||e[1]==null||isNaN(e[1])}function OV(e){mL.registerAxisPointerClass(`CartesianAxisPointer`,eV),e.registerComponentModel(iV),e.registerComponentView(mV),e.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!G(t)&&(e.axisPointer.link=[t])}}),e.registerProcessor(e.PRIORITY.PROCESSOR.STATISTIC,{overallReset:function(e,t){e.getComponent(`axisPointer`).coordSysAxesInfo=nL(e,t)}}),e.registerAction({type:`updateAxisPointer`,event:`updateAxisPointer`,update:`:updateAxisPointer`},_V)}function kV(e){yI(TL),yI(OV)}function AV(e,t){var n=zS(t.get(`padding`)),r=t.getItemStyle([`color`,`opacity`]);return r.fill=t.get(`backgroundColor`),new zf({shape:{x:e.x-n[3],y:e.y-n[0],width:e.width+n[1]+n[3],height:e.height+n[0]+n[2],r:t.get(`borderRadius`)},style:r,silent:!0,z2:-1})}var jV=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.type=`tooltip`,t.dependencies=[`axisPointer`],t.defaultOption={z:60,show:!0,showContent:!0,trigger:`item`,triggerOn:`mousemove|click|mousewheel`,alwaysShowContent:!1,renderMode:`auto`,confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:Q.color.neutral00,shadowBlur:10,shadowColor:`rgba(0, 0, 0, .2)`,shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:Q.color.border,padding:null,extraCssText:``,axisPointer:{type:`line`,axis:`auto`,animation:`auto`,animationDurationUpdate:200,animationEasingUpdate:`exponentialOut`,crossStyle:{color:Q.color.borderShade,width:1,type:`dashed`,textStyle:{}}},textStyle:{color:Q.color.tertiary,fontSize:14}},t}(cC);function MV(e){var t=e.get(`confine`);return t==null?e.get(`renderMode`)===`richText`:!!t}function NV(e){if(No.domSupported){for(var t=document.documentElement.style,n=0,r=e.length;n-1?(s+=`top:50%`,c+=`translateY(-50%) rotate(`+(l=a===`left`?-225:-45)+`deg)`):(s+=`left:50%`,c+=`translateX(-50%) rotate(`+(l=a===`top`?225:45)+`deg)`);var u=l*Math.PI/180,d=o+i,f=d*Math.abs(Math.cos(u))+d*Math.abs(Math.sin(u)),p=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-d)/2)*100)/100;s+=`;`+a+`:-`+p+`px`;var m=t+` solid `+i+`px;`;return`
`}function UV(e,t,n){var r=`cubic-bezier(0.23,1,0.32,1)`,i=``,a=``;return n&&(i=` `+e/2+`s `+r,a=`opacity`+i+`,visibility`+i),t||(i=` `+e+`s `+r,a+=(a.length?`,`:``)+(No.transformSupported?``+zV+i:`,left`+i+`,top`+i)),RV+`:`+a}function WV(e,t,n){var r=e.toFixed(0)+`px`,i=t.toFixed(0)+`px`;if(!No.transformSupported)return n?`top:`+i+`;left:`+r+`;`:[[`top`,i],[`left`,r]];var a=No.transform3dSupported,o=`translate`+(a?`3d`:``)+`(`+r+`,`+i+(a?`,0`:``)+`)`;return n?`top:0;left:0;`+zV+`:`+o+`;`:[[`top`,0],[`left`,0],[PV,o]]}function GV(e){var t=[],n=e.get(`fontSize`),r=e.getTextColor();r&&t.push(`color:`+r),t.push(`font:`+e.getFont());var i=Y(e.get(`lineHeight`),Math.round(n*3/2));n&&t.push(`line-height:`+i+`px`);var a=e.get(`textShadowColor`),o=e.get(`textShadowBlur`)||0,s=e.get(`textShadowOffsetX`)||0,c=e.get(`textShadowOffsetY`)||0;return a&&o&&t.push(`text-shadow:`+s+`px `+c+`px `+o+`px `+a),H([`decoration`,`align`],function(n){var r=e.get(n);r&&t.push(`text-`+n+`:`+r)}),t.join(`;`)}function KV(e,t,n,r){var i=[],a=e.get(`transitionDuration`),o=e.get(`backgroundColor`),s=e.get(`shadowBlur`),c=e.get(`shadowColor`),l=e.get(`shadowOffsetX`),u=e.get(`shadowOffsetY`),d=e.getModel(`textStyle`),f=aw(e,`html`),p=l+`px `+u+`px `+s+`px `+c;return i.push(`box-shadow:`+p),t&&a>0&&i.push(UV(a,n,r)),o&&i.push(`background-color:`+o),H([`width`,`color`,`radius`],function(t){var n=`border-`+t,r=RS(n),a=e.get(r);a!=null&&i.push(n+`:`+a+(t===`color`?``:`px`))}),i.push(GV(d)),f!=null&&i.push(`padding:`+zS(f).join(`px `)+`px`),i.join(`;`)+`;`}function qV(e,t,n,r,i){var a=t&&t.painter;if(n){var o=a&&a.getViewportRoot();o&&kx(e,o,n,r,i)}else{e[0]=r,e[1]=i;var s=a&&a.getViewportRootOffset();s&&(e[0]+=s.offsetLeft,e[1]+=s.offsetTop)}e[2]=e[0]/t.getWidth(),e[3]=e[1]/t.getHeight()}var JV=function(){function e(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,No.wxa)return null;var n=document.createElement(`div`);n.domBelongToZr=!0,this.el=n;var r=this._zr=e.getZr(),i=t.appendTo,a=i&&(q(i)?document.querySelector(i):uo(i)?i:K(i)&&i(e.getDom()));qV(this._styleCoord,r,a,e.getWidth()/2,e.getHeight()/2),(a||e.getDom()).appendChild(n),this._api=e,this._container=a;var o=this;n.onmouseenter=function(){o._enterable&&(clearTimeout(o._hideTimeout),o._show=!0),o._inContent=!0},n.onmousemove=function(e){if(e||=window.event,!o._enterable){var t=r.handler;HA(r.painter.getViewportRoot(),e,!0),t.dispatch(`mousemove`,e)}},n.onmouseleave=function(){o._inContent=!1,o._enterable&&o._show&&o.hideLater(o._hideDelay)}}return e.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=LV(t,`position`),r=t.style;r.position!==`absolute`&&n!==`absolute`&&(r.position=`relative`)}var i=e.get(`alwaysShowContent`);i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get(`displayTransition`)&&e.get(`transitionDuration`)>0,this.el.className=e.get(`className`)||``},e.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,r=n.style,i=this._styleCoord;n.innerHTML?r.cssText=BV+KV(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+WV(i[0],i[1],!0)+(`border-color:`+GS(t)+`;`)+(e.get(`extraCssText`)||``)+(`;pointer-events:`+(this._enterable?`auto`:`none`)):r.display=`none`,this._show=!0,this._firstShow=!1,this._longHide=!1},e.prototype.setContent=function(e,t,n,r,i){var a=this.el;if(e==null){a.innerHTML=``;return}var o=``;if(q(i)&&n.get(`trigger`)===`item`&&!MV(n)&&(o=HV(n,r,i)),q(e))a.innerHTML=e+o;else if(e){a.innerHTML=``,G(e)||(e=[e]);for(var s=0;s=0?this._tryShow(n,r):t===`leave`&&this._hide(r))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,t=this._ecModel,n=this._api,r=e.get(`triggerOn`);if(e.get(`trigger`)!==`axis`&&(this._lastDataByCoordSys=null,this._cbParamsList=null),this._lastX!=null&&this._lastY!=null&&r!==`none`&&r!==`click`){var i=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&i.manuallyShowTip(e,t,n,{x:i._lastX,y:i._lastY,dataByCoordSys:i._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,t,n,r){if(r.from!==this.uid&&!No.node&&n.getDom()){var i=nH(r,n);this._ticket=``;var a=r.dataByCoordSys,o=sH(r,t,n);if(o){var s=o.el.getBoundingRect().clone();s.applyTransform(o.el.transform),this._tryShow({offsetX:s.x+s.width/2,offsetY:s.y+s.height/2,target:o.el,position:r.position,positionDefault:`bottom`},i)}else if(r.tooltip&&r.x!=null&&r.y!=null){var c=$V;c.x=r.x,c.y=r.y,c.update(),Xm(c).tooltipConfig={name:null,option:r.tooltip},this._tryShow({offsetX:r.x,offsetY:r.y,target:c},i)}else if(a)this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,dataByCoordSys:a,tooltipOption:r.tooltipOption},i);else if(r.seriesIndex!=null){if(this._manuallyAxisShowTip(e,t,n,r))return;var l=hV(r,t),u=l.point[0],d=l.point[1];u!=null&&d!=null&&this._tryShow({offsetX:u,offsetY:d,target:l.el,position:r.position,positionDefault:`bottom`},i)}else r.x!=null&&r.y!=null&&(n.dispatchAction({type:`updateAxisPointer`,x:r.x,y:r.y}),this._tryShow({offsetX:r.x,offsetY:r.y,position:r.position,target:n.getZr().findHover(r.x,r.y).target},i))}},t.prototype.manuallyHideTip=function(e,t,n,r){var i=this._tooltipContent;this._tooltipModel&&i.hideLater(this._tooltipModel.get(`hideDelay`)),this._lastX=this._lastY=this._lastDataByCoordSys=null,this._cbParamsList=null,r.from!==this.uid&&this._hide(nH(r,n))},t.prototype._manuallyAxisShowTip=function(e,t,n,r){var i=r.seriesIndex,a=r.dataIndex,o=t.getComponent(`axisPointer`).coordSysAxesInfo;if(i!=null&&a!=null&&o!=null){var s=t.getSeriesByIndex(i);if(s&&tH([s.getData().getItemModel(a),s,(s.coordinateSystem||{}).model],this._tooltipModel).get(`trigger`)===`axis`)return n.dispatchAction({type:`updateAxisPointer`,seriesIndex:i,dataIndex:a,position:r.position}),!0}},t.prototype._tryShow=function(e,t){var n=e.target;if(this._tooltipModel){this._lastX=e.offsetX,this._lastY=e.offsetY;var r=e.dataByCoordSys;if(r&&r.length)this._showAxisTooltip(r,e);else if(n){if(Xm(n).ssrType===`legend`)return;this._lastDataByCoordSys=null,this._cbParamsList=null;var i,a;LN(n,function(e){if(e.tooltipDisabled)return i=a=null,!0;i||a||(Xm(e).dataIndex==null?Xm(e).tooltipConfig!=null&&(a=e):i=e)},!0),i?this._showSeriesItemTooltip(e,i,t):a?this._showComponentItemTooltip(e,a,t):this._hide(t)}else this._lastDataByCoordSys=null,this._cbParamsList=null,this._hide(t)}},t.prototype._showOrMove=function(e,t){var n=e.get(`showDelay`);t=W(t,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(t,n):t()},t.prototype._showAxisTooltip=function(e,t){var n=this._ecModel,r=this._tooltipModel,i=[t.offsetX,t.offsetY],a=tH([t.tooltipOption],r),o=this._renderMode,s=[],c=GC(`section`,{blocks:[],noHeader:!0}),l=[],u=new ow;H(e,function(e){H(e.dataByAxis,function(e){var t=n.getComponent(e.axisDim+`Axis`,e.axisIndex),i=e.value,a=t.axis,d=a.scale.parse(i);if(t&&i!=null){var f=qB(i,a,n,e.seriesDataIndices,e.valueLabelOpt),p=GC(`section`,{header:f,noHeader:!yo(f),sortBlocks:!0,blocks:[]});c.blocks.push(p),H(e.seriesDataIndices,function(i){var a=n.getSeriesByIndex(i.seriesIndex),c=i.dataIndexInside,m=a.getDataParams(c);if(!(m.dataIndex<0)){m.axisDim=e.axisDim,m.axisIndex=e.axisIndex,m.axisType=e.axisType,m.axisId=e.axisId,m.axisValue=bE(t.axis,{value:d}),m.axisValueLabel=f,m.marker=u.makeTooltipMarker(`item`,GS(m.color),o);var h=yC(a.formatTooltip(c,!0,null)),g=h.frag;if(g){var _=tH([a],r).get(`valueFormatter`);p.blocks.push(_?V({valueFormatter:_},g):g)}h.text&&l.push(h.text),s.push(m)}})}})}),c.blocks.reverse(),l.reverse();var d=t.position,f=ZC(c,u,o,a.get(`order`),n.get(`useUTC`),a.get(`textStyle`));f&&l.unshift(f);var p=o===`richText`?` -`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=qm(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=QV([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new rw;h.marker=g.makeTooltipMarker(`item`,HS(h.color),d);var _=gC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?JC(y?V({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=qm(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=B(a),a.content=Px(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=QV(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new rw;this._showOrMove(d,function(){var n=B(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=gS(m.axisValue,d,p)),d=BS(d,n,!0)}else if(K(u)){var g=W(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=gp(t[0],s),r=gp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=YS(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=nH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=eH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=rH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=rH(d)?l[1]/2:d===`bottom`?l[1]:0),kV(e)){var h=tH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&H(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&H(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&H(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&H(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!Ao.node&&t.getDom()&&(Jk(this,`_updatePosition`),this._tooltipContent.dispose(),uV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(YM);function QV(e,t,n){var r=t.ecModel,i;n?(i=new my(n,r,r),i=new my(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof my&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new my(o,i,r)))}return i}function $V(e,t){return e.dispatchAction||W(t.dispatchAction,t)}function eH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function tH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function nH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function rH(e){return e===`center`||e===`middle`}function iH(e,t,n){var r=xm(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Cm(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=qm(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function aH(e){gI(TV),e.registerComponentModel(OV),e.registerComponentView(ZV),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Do),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Do)}var oH=H;function sH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function cH(e,t,n){var r={};return oH(t,function(t){var a=r[t]=i();oH(e[t],function(e,r){if(YR.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new YR(i),r===`opacity`&&(i=B(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new YR(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function lH(e,t,n){var r;H(n,function(e){t.hasOwnProperty(e)&&sH(t[e])&&(r=!0)}),r&&H(n,function(n){t.hasOwnProperty(n)&&sH(t[n])?e[n]=B(t[n]):delete e[n]})}function uH(e,t,n,r){var i={};return H(e,function(e){i[e]=YR.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return jN(a,l,e)}function c(e,t){NN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var dH=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},fH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&H(t,function(e,r){q(e)&&(e={type:e}),t[r]=Wa(e,dH(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(aC),pH=no,mH=H,hH=Lg,gH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new hH),this.group.add(this._selectorGroup=new hH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=QS(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=YS(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=YS(Ka({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=DV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),mH(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` -`)){var p=new hH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,pH(yH,f,null,r,d)).on(`mouseover`,pH(bH,m.name,null,r,d)).on(`mouseout`,pH(xH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=qm(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=Il(h.fill);_&&_[3]===0&&(_[3]=.2,h=V(V({},h),{fill:Wl(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,pH(yH,null,f,r,d)).on(`mouseover`,pH(bH,null,f,r,d)).on(`mouseout`,pH(xH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=qm(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};qm(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();mH(e,function(e){var r=e.type,i=new Vf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),Wv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ng(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=_H(c,r,o,s,d,m,u),y=new hH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(vH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Vf({style:Kv(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new If({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&Ev({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ng(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();qS(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){qS(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(YM);function _H(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),mH(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:AP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function vH(e){var t=e.icon||`roundRect`,n=Cw(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function yH(e,t,n,r){xH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),bH(e,t,n,r)}function bH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function xH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function SH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),CH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){H(i,function(t,n){e[t?`select`:`unSelect`](n)}),CH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function CH(e,t){var n=t||{};return H(e.getData(),function(t){var r=t.get(`name`);if(r!==` -`&&r!==``){var i=e.isSelected(r);n[r]=Eo(n,r)?n[r]&&i:i}}),n}function wH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,no(SH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,no(SH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,no(SH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,no(SH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,no(SH,`unSelect`))}var TH=Km(EH);function EH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new If({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&B_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;H([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=jH[i],o=MH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(gH);function PH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function FH(e){gI(DH),e.registerComponentModel(OH),e.registerComponentView(NH),PH(e)}function IH(e){gI(DH),gI(FH)}var LH={get:function(e,t,n){var r=B((RH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},RH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},zH=YR.mapVisual,BH=YR.eachVisual,VH=G,HH=H,UH=Sp,WH=hp,GH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&lH(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=W(e,this),this.controllerVisuals=cH(this.option.controller,t,e),this.targetVisuals=cH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return HH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Cm(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){H(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(q(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(K(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=UH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=$a(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};Wa(r,n),Wa(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){VH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},HH(r,function(e,t){if(YR.isValidType(t)){var n=LH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;HH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&B(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&B(n)||(a?s[0]:[s[0],s[0]])),c.symbol=zH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;BH(l,function(e){e>u&&(u=e)}),c.symbolSize=zH(l,function(e){return WH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(aC),KH=[20,140],qH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=KH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=KH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),H(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Sp((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=JH(this,`outOfRange`,this.getExtent()),n=JH(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Lg(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);eU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=$H(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=dv(n.handleLabelPoints[l],uv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=$H(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=dv(c.indicatorLabelPoint,uv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||cU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=gm(u,d);this._dispatchHighDown(`downplay`,QH(f[0],n)),this._dispatchHighDown(`highlight`,QH(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(PN(e.target,function(e){var n=qm(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function pU(e,t,n,r){for(var i=t.targetVisuals[r],a=YR.prepareVisualTypes(i),o={color:MN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(uU,dU),H(fU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(hU))}function yU(e){e.registerComponentModel(qH),e.registerComponentView(aU),vU(e)}var bU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],xU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=B(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=U(this._pieceList,function(e){return e=B(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=YR.listVisualTypes(),i=this.isCategory();H(t.pieces,function(e){H(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),H(n,function(e,n){var r=!1;H(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&H(this.stateList,function(e){(t[e]||(t[e]={}))[n]=LH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,H(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;H(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=B(e)},t.prototype.getValueState=function(e){var t=YR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){YR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return H(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=yx(GH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(GH),xU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function SU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var CU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=uo(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),H(o.viewPieceList,function(o){var s=o.piece,u=new Lg;u.onclick=W(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Vf({style:Kv(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),qS(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:QH(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return ZH(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Lg,o=this.visualMapModel.textStyleModel;a.add(new Vf({style:Kv(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=U(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Cw(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=B(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,H(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(YH);function wU(e){e.registerComponentModel(bU),e.registerComponentView(CU),vU(e)}function TU(e){gI(yU),gI(wU)}var EU={label:{enabled:!0},decal:{show:!1}},DU=vm(),OU=vm(),kU=Km(AU);function AU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=OU(e).scope||(OU(e).scope={}),i=B(EU);Wa(i.label,e.getLocaleModel().get(`aria`),!1),Wa(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(DU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=uC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=DU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=uC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?V(V({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=Ka(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=IU:-c>=IU),f=c>0?c%IU:c%IU+IU,p=!1;p=d?!0:!Zl(u)&&f>=FU==!!l;var m=e+n*PU(a),h=t+r*NU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*LU);if(d){var _=1/this._p,v=(l?1:-1)*(IU-_);this._add(`A`,n,r,g,1,+l,e+n*PU(a+v),t+r*NU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*PU(o),b=t+r*NU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function eW(e){return``}function tW(e,t){t||={};var n=t.newline?` -`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return $U(i,a)+(i===`style`?o||``:Px(o))+(t?``+n+U(t,function(e){return r(e)}).join(n)+n:``)+eW(i)}return r(e)}function nW(e,t,n){n||={};var r=n.newline?` -`:``,i=` {`+r,a=r+`}`,o=U(eo(e),function(t){return t+i+U(eo(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=U(eo(t),function(e){return`@keyframes `+e+i+U(eo(t[e]),function(n){return n+i+U(eo(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function rW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function iW(e,t,n,r){return QU(`svg`,`root`,{width:e,height:t,xmlns:KU,"xmlns:xlink":qU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var aW=0;function oW(){return aW++}var sW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},cW=`transform-origin`;function lW(e,t,n){var r=V({},e.shape);V(r,t),e.buildPath(n,r);var i=new RU;return i.reset(fu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function uW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[cW]=n+`px `+r+`px`)}var dW={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function fW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function pW(e,t,n){var r=e.shape.paths,i={},a,o;if(H(r,function(e){var t=rW(n.zrId);t.animation=!0,hW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=eo(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=fW(i,n);return a.replace(o,s)}}function mW(e){return q(e)?sW[e]?`cubic-bezier(`+sW[e]+`)`:xl(e)?e:``:``}function hW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof S_){var s=pW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return fW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+oW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function gW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};_W(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=ql(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),_W(r,t,n,!0)}}}function _W(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+oW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var vW=Math.round;function yW(e){return e&&q(e.src)}function bW(e){return e&&K(e.toDataURL)}function xW(e,t,n,r){GU(function(i,a){var o=i===`fill`||i===`stroke`;o&&uu(a)?IW(t,e,i,r):o&&su(a)?LW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),FW(n,e,r)}function SW(e,t){var n=Xj(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[XU+`silent`]=`true`))}function CW(e){return Zl(e[0]-1)&&Zl(e[1])&&Zl(e[2])&&Zl(e[3]-1)}function wW(e){return Zl(e[4])&&Zl(e[5])}function TW(e,t,n){if(t&&!(wW(t)&&CW(t))){var r=n?10:1e4;e.transform=CW(t)?`translate(`+vW(t[4]*r)/r+` `+vW(t[5]*r)/r+`)`:eu(t)}}function EW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;ho(f,g),ho(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=es(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=QU(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=B(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=pu(i);x&&(o.patternTransform=x);var S=QU(`pattern`,``,o,[d]),C=tW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=QU(`pattern`,T,o,[d])),t[n]=du(T)}}function RW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=QU(`clipPath`,a,o,[jW(e,n)])}t[`clip-path`]=du(a)}function zW(e){return document.createTextNode(e)}function BW(e,t,n){e.insertBefore(t,n)}function VW(e,t){e.removeChild(t)}function HW(e,t){e.appendChild(t)}function UW(e){return e.parentNode}function WW(e){return e.nextSibling}function GW(e,t){e.textContent=t}var KW=58,qW=120,JW=QU(``,``);function YW(e){return e===void 0}function XW(e){return e!==void 0}function ZW(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function QW(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function $W(e){var t,n=e.children,r=e.tag;if(XW(r)){var i=e.elm=ZU(r);if(nG(JW,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,eG(e,m,n,i,c)):tG(e,t,r,a))}function iG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(nG(e,t),YW(t.text)?XW(r)&&XW(i)?r!==i&&rG(n,r,i):XW(i)?(XW(e.text)&&GW(n,``),eG(n,null,i,0,i.length-1)):XW(r)?tG(n,r,0,r.length-1):XW(e.text)&&GW(n,``):e.text!==t.text&&(XW(r)&&tG(n,r,0,r.length-1),GW(n,t.text)))}function aG(e,t){if(QW(e,t))iG(e,t);else{var n=e.elm,r=UW(n);$W(t),r!==null&&(BW(r,t.elm,WW(n)),tG(r,[e],0,0))}return t}var oG=0,sG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=cG(`configLayer`),this.storage=t,this._opts=n=V({},n),this.root=e,this._id=`zr`+oG++,this._oldVNode=iW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=ZU(`svg`);nG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,aG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return PW(e,rW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=rW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=lG(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=QU(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=U(eo(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(QU(`defs`,`defs`,{},c)),e.animation){var l=nW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=QU(`style`,`stl`,{},[],l);a.push(u)}}return iW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},tW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=XF(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,L.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,R.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function fG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function pG(e){return we[e?`dark`:`light`]}function mG(e){let t=e?5:7;return{ok:Ae[t],warn:je[t],bad:De[t],info:Oe[t]}}function hG(e,t){let n=be[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function gG(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function _G(e){return e===`unknown`?`dashed`:`solid`}function vG(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}function yG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function bG(e,t){let n=mG(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:pG(t).muted}function xG({label:e,value:t,color:n,hint:r,children:i}){return(0,R.jsxs)(ce,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,R.jsx)(y,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,R.jsx)(y,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,R.jsx)(se,{mt:4,children:i})]})}var SG={unhealthy:`◆`,degraded:`■`,healthy:`●`,unknown:`○`},CG={unhealthy:`unhealthy`,degraded:`degraded`,healthy:`healthy`,unknown:`health unknown`};function wG({health:e,label:t}){return(0,R.jsxs)(Ne,{color:fG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},leftSection:(0,R.jsx)(se,{component:`span`,"aria-hidden":!0,style:{fontSize:Te.micro,lineHeight:1},children:SG[e]??SG.unknown}),children:[t,(0,R.jsxs)(We,{children:[` — `,CG[e]??CG.unknown]})]})}function TG({text:e}){return(0,R.jsxs)(A,{py:`xl`,children:[(0,R.jsx)(On,{size:20}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function EG({retry:e}){return(0,R.jsxs)(A,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,R.jsxs)(se,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,R.jsx)($e,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,R.jsx)(y,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,R.jsx)(ae,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}gI([YE]);function DG({values:e,color:t,label:n,format:r}){let i=e.length?Math.max(...e):0,a=(0,L.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},aria:{enabled:!0,decal:{show:!1},description:n},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t,n]);return(0,R.jsxs)(se,{children:[(0,R.jsx)(dG,{option:a,height:28,label:n}),i>0&&r&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ta:`right`,mt:2,children:[`peak `,r(i)]})]})}var OG={unhealthy:0,degraded:1,healthy:2};function kG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=Ce(`overview`,Se(t,e.config,[`service`]));if(i.isError)return(0,R.jsx)(EG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(OG[e.health]??3)-(OG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,R.jsx)(TG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,R.jsx)(Re,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,R.jsxs)(Xe,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,R.jsx)(Xe.Thead,{children:(0,R.jsxs)(Xe.Tr,{children:[(0,R.jsx)(Xe.Th,{children:`Service`}),(0,R.jsx)(Xe.Th,{ta:`right`,children:`P95`}),(0,R.jsx)(Xe.Th,{ta:`right`,children:`Errors`})]})}),(0,R.jsx)(Xe.Tbody,{children:a.map(e=>(0,R.jsxs)(Xe.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,R.jsx)(Xe.Td,{children:(0,R.jsx)(wG,{health:e.health,label:e.service})}),(0,R.jsx)(Xe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,c:ya(e.p95_ms),children:_a(e.p95_ms)})}),(0,R.jsx)(Xe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,c:ba(e.error_rate),children:ga(e.error_rate)})})]},e.service))})]})})}function AG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,R.jsx)(y,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=ve(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,R.jsx)(re,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,R.jsx)(ae,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,R.jsx)(ye,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var jG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function MG(e){return Object.hasOwn(jG,e)?jG[e]:void 0}function NG(e){return(MG(e)?.length??0)>0}function PG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,L.useState)({service:``,severity:``,search:``,trace_id:``});(0,L.useEffect)(()=>{e&&o({service:xe(t.config,`service`),severity:xe(t.config,`severity`),search:xe(t.config,`search`),trace_id:xe(t.config,`trace_id`)})},[e,t.config]);let s=MG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,R.jsx)(Ke,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,R.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,R.jsxs)(re,{children:[s.includes(`service`)&&(0,R.jsx)(ln,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,R.jsx)(ln,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,R.jsx)(I,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,R.jsx)(I,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,R.jsxs)(w,{justify:`flex-end`,children:[(0,R.jsx)(ae,{variant:`default`,onClick:r,children:`Cancel`}),(0,R.jsx)(ae,{type:`submit`,children:`Save`})]})]})})})}gI([DA]);function FG({widget:e,filters:t,dark:n}){let r=Ce(`logs`,Se(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=pG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>bG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},xAxis:{type:`category`,data:r.map(e=>va(e,t)),axisLabel:{color:e.muted,fontSize:Te.micro,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Te.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,R.jsx)(EG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,R.jsx)(TG,{text:`No matching logs in this window`}):(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{h:72,children:(0,R.jsx)(dG,{option:a,height:72,label:`Log volume by severity`})}),(0,R.jsx)(Re,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,R.jsx)(Xe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Xe.Tbody,{children:o.map((e,t)=>(0,R.jsxs)(Xe.Tr,{children:[(0,R.jsx)(Xe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,children:i?va(e.time,i.provenance.window,!0):e.time})}),(0,R.jsx)(Xe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(Ne,{size:`xs`,color:yG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,R.jsx)(Xe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,R.jsx)(Xe.Td,{style:{width:`100%`},children:(0,R.jsx)(y,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function IG({widget:e,filters:t,dark:n}){let r=Se(t,e.config,[`service`]),i=Ce(`overview`,r),a=Ce(`performance`,r);if(i.isError)return(0,R.jsx)(EG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=mG(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(vn,{cols:2,spacing:`sm`,children:[(0,R.jsx)(xG,{label:`Health`,value:d,color:o?fG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${ha.format(o.service_count)} services`:void 0}),(0,R.jsx)(xG,{label:`Error rate`,value:o&&!u?ga(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${ha.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,R.jsx)(DG,{values:s,color:l.bad,label:`Error rate trend`,format:e=>`${e.toFixed(2)}%`})})]}),o&&!u&&(0,R.jsxs)(se,{children:[(0,R.jsxs)(sn.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,R.jsx)(sn.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,R.jsx)(sn.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,R.jsx)(sn.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,R.jsxs)(w,{mt:6,gap:`md`,children:[(0,R.jsx)(LG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,R.jsx)(LG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,R.jsx)(LG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function LG({color:e,text:t}){return(0,R.jsxs)(w,{gap:6,children:[(0,R.jsx)(se,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:t})]})}gI([YE]);function RG({widget:e,filters:t,dark:n}){let r=Ce(`performance`,Se(t,e.config,[`service`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=pG(n),t=i.provenance.window;return{color:[hG(`operations`,n),mG(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:Te.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},xAxis:{type:`category`,data:i.data.points.map(e=>va(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:Te.micro,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Te.micro}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:Te.micro,formatter:e=>_a(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,R.jsx)(EG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,R.jsx)(TG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{style:{flex:1,minHeight:120},children:(0,R.jsx)(dG,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,R.jsx)(Xe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Xe.Tbody,{children:o.map(e=>(0,R.jsxs)(Xe.Tr,{children:[(0,R.jsxs)(Xe.Td,{children:[(0,R.jsx)(Ne,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,R.jsx)(Xe.Td,{ta:`right`,children:(0,R.jsxs)(y,{component:`span`,size:`sm`,c:`dimmed`,children:[ha.format(e.calls),` calls`]})}),(0,R.jsx)(Xe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:_a(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}gI([OB]);function zG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=Se(t,e.config,[`service`]),a=Ce(`topology`,i),o=a.data?.data,s=(0,L.useMemo)(()=>{if(!o)return null;let e=pG(n),t=mG(n),r=n=>n===`unhealthy`?t.bad:n===`degraded`?t.warn:n===`unknown`?e.muted:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Te.micro}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:Te.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbol:gG(t.health),symbolSize:vG(t.health)*Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3,borderType:_G(t.health)}})),links:o.edges.map(n=>{let r=n.error_rate>=.05;return{source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:r?3.5:Math.min(3,1+Math.log10(Math.max(n.calls,1))),color:r?t.bad:e.muted,opacity:r?.95:.35,curveness:.08}}}),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,R.jsx)(EG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,R.jsx)(TG,{text:`No service relationships in this window`}):(0,R.jsxs)(re,{gap:4,h:`100%`,children:[s&&(0,R.jsx)(dG,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function BG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function VG({widget:e,filters:t,dark:n}){let r=Ce(`trace`,Se(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,R.jsx)(EG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,R.jsx)(TG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(vn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,R.jsx)(xG,{label:`Duration`,value:i?_a(i.duration_ms):`—`}),(0,R.jsx)(xG,{label:`Spans`,value:i?ha.format(i.spans.length):`—`}),(0,R.jsx)(xG,{label:`Services`,value:i?ha.format(i.services.length):`—`}),(0,R.jsx)(xG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,R.jsx)(HG,{spans:a,dark:n}),i&&(0,R.jsxs)(w,{gap:4,children:[(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,BG(i.trace_id)]}),(0,R.jsx)(UG,{value:i.trace_id})]})]})}function HG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,R.jsx)(re,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,R.jsxs)(w,{gap:`sm`,wrap:`nowrap`,children:[(0,R.jsxs)(se,{w:170,miw:0,children:[(0,R.jsx)(y,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,R.jsx)(ze,{label:`${e.service} · ${e.operation} · ${_a(e.duration_ms)}`,withArrow:!0,children:(0,R.jsx)(se,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,R.jsx)(se,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:hG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,R.jsx)(y,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:_a(e.duration_ms)})]},e.span_id)})})}function UG({value:e}){let{state:t,copy:n}=Ze();return(0,R.jsx)(ze,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,R.jsx)(Ye,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,R.jsx)(E,{size:12,weight:`bold`}):(0,R.jsx)(ne,{size:12})})})}var WG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},GG={overview:IG,topology:zG,activity:kG,assistant:AG,performance:RG,trace:VG,logs:FG};function KG(){return(0,R.jsx)(TG,{text:`This view type is not supported by this version`})}function qG(e){return Object.hasOwn(GG,e)?GG[e]:KG}function JG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),d=qG(t.type);return(0,R.jsxs)(ce,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,R.jsxs)(re,{h:`100%`,gap:`sm`,children:[(0,R.jsxs)(w,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,R.jsx)(P,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,R.jsxs)(fe,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,R.jsx)(fe.Target,{children:(0,R.jsx)(Ye,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,R.jsx)(ge,{size:18,weight:`bold`})})}),(0,R.jsxs)(fe.Dropdown,{children:[NG(t.type)&&(0,R.jsx)(fe.Item,{leftSection:(0,R.jsx)(An,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,R.jsx)(fe.Item,{color:`bad`,leftSection:(0,R.jsx)(Fe,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,R.jsx)(`div`,{className:`widget-body`,children:(0,R.jsx)(d,{...e})})]}),(0,R.jsx)(PG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,R.jsx)(Ke,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,R.jsxs)(re,{gap:`md`,children:[(0,R.jsx)(y,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,R.jsxs)(w,{justify:`flex-end`,gap:`sm`,children:[(0,R.jsx)(ae,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,R.jsx)(ae,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var YG=ca(oa),XG=`fanout.dashboard-id`,ZG={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function QG(e){return Object.hasOwn(fa,e)?fa[e]:void 0}function $G({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=Ue(),s=He(`light`)===`dark`,c=Ge({queryKey:Je,queryFn:()=>qe(`/api/dashboards`),refetchInterval:3e4}),[l,u]=(0,L.useState)(()=>e||localStorage.getItem(XG)||``),d=Qe({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await F(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:Je})},onError:e=>console.error(`Dashboard save failed`,e)}),f=Ge({queryKey:[`dashboard`,l],queryFn:()=>qe(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4}),[p,m]=(0,L.useState)(ZG),[h,g]=(0,L.useState)(`lg`),[_,v]=(0,L.useState)(null),b=(0,L.useMemo)(()=>({window:ke.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),x=Ce(`overview`,Se(b),!!f.data),C=(0,L.useMemo)(()=>(x.data?.data.services??[]).map(e=>e.service),[x.data]),T=Ee();(0,L.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem(XG,e))},[e,l]),(0,L.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,L.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,L.useEffect)(()=>{d.reset()},[l]);let E=(0,L.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=QG(e.get(t.i)??`overview`)??fa.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:ua(t,6),xs:ua(t,2),xxs:ua(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem(XG,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Me(),n=fa[e],r=ma(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:WG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function A(e){O({...p,filters:e}),a?.(e)}function j(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,R.jsx)(eK,{label:`Loading your dashboard…`});let N=c.data?.dashboards??[];if(e&&N.length>0&&!N.some(t=>t.id===e))return(0,R.jsx)(tK,{onOpenDefault:()=>D((N.find(e=>e.is_default)??N[0]).id,!0)});if(c.isError||f.isError)return(0,R.jsx)(eK,{label:`Your dashboard is unavailable. Try refreshing.`});let ee=f.data;return ee?(0,R.jsxs)(se,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,R.jsxs)(re,{gap:`md`,mb:`lg`,children:[(0,R.jsxs)(se,{children:[(0,R.jsx)(P,{order:1,fz:32,lts:`-0.03em`,children:ee.name}),(0,R.jsx)(y,{c:`dimmed`,mt:2,children:ee.description||`A focused view of the signals that matter now.`})]}),(0,R.jsxs)(ct,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,children:[(0,R.jsx)(ln,{"aria-label":`Window`,value:b.window,onChange:e=>e&&A({...b,window:e}),data:ke,w:{base:`100%`,xs:150},size:`sm`}),(0,R.jsx)(I,{"aria-label":`Namespace`,value:_??b.namespace,onChange:e=>v(e.currentTarget.value),onBlur:e=>{v(null),A({...b,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T))]}),(0,R.jsxs)(fe,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,R.jsx)(fe.Target,{children:(0,R.jsx)(ae,{variant:`default`,size:`sm`,leftSection:(0,R.jsx)(Pe,{size:15,weight:`bold`}),rightSection:(0,R.jsx)(En,{size:13,weight:`bold`}),children:`Add view`})}),(0,R.jsx)(fe.Dropdown,{children:da.filter(e=>t||e!==`assistant`).map(e=>(0,R.jsx)(fe.Item,{onClick:()=>k(e),children:WG[e]},e))})]}),t&&(0,R.jsx)(ae,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,R.jsx)(wn,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,R.jsx)(S,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,R.jsx)($e,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,R.jsxs)(w,{justify:`space-between`,gap:`sm`,children:[(0,R.jsx)(y,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,R.jsx)(ae,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,R.jsx)(YG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,R.jsx)(`div`,{children:(0,R.jsx)(JG,{widget:e,filters:b,dark:s,services:C,agentAvailable:t,onOpenChat:n,onRemove:()=>j(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,R.jsx)(eK,{label:`Preparing your dashboard…`})}function eK({label:e}){return(0,R.jsxs)(A,{mih:`50vh`,children:[(0,R.jsx)(m,{size:`sm`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function tK({onOpenDefault:e}){return(0,R.jsx)(A,{mih:`50vh`,children:(0,R.jsxs)(re,{align:`center`,gap:`xs`,children:[(0,R.jsx)(P,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,R.jsx)(ae,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{$G as t}; \ No newline at end of file +`:`
`,m=l.join(p);this._showOrMove(a,function(){this._updateContentNotChangedOnAxis(e,s)?this._updatePosition(a,d,i[0],i[1],this._tooltipContent,s):this._showTooltipContent(a,m,s,Math.random()+``,i[0],i[1],d,null,u)})},t.prototype._showSeriesItemTooltip=function(e,t,n){var r=this._ecModel,i=Xm(t),a=i.seriesIndex,o=r.getSeriesByIndex(a),s=i.dataModel||o,c=i.dataIndex,l=i.dataType,u=s.getData(l),d=this._renderMode,f=e.positionDefault,p=tH([u.getItemModel(c),s,o&&(o.coordinateSystem||{}).model],this._tooltipModel,f?{position:f}:null),m=p.get(`trigger`);if(m==null||m===`item`){var h=s.getDataParams(c,l),g=new ow;h.marker=g.makeTooltipMarker(`item`,GS(h.color),d);var _=yC(s.formatTooltip(c,!1,l)),v=p.get(`order`),y=p.get(`valueFormatter`),b=_.frag,x=b?ZC(y?V({valueFormatter:y},b):b,g,d,v,r.get(`useUTC`),p.get(`textStyle`)):_.text,S=`item_`+s.name+`_`+c;this._showOrMove(p,function(){this._showTooltipContent(p,x,h,S,e.offsetX,e.offsetY,e.position,e.target,g)}),n({type:`showTip`,dataIndexInside:c,dataIndex:u.getRawIndex(c),seriesIndex:a,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,t,n){var r=this._renderMode===`html`,i=Xm(t),a=i.tooltipConfig.option||{},o=a.encodeHTMLContent;if(q(a)){var s=a;a={content:s,formatter:s},o=!0}o&&r&&a.content&&(a=B(a),a.content=Lx(a.content));var c=[a],l=this._ecModel.getComponent(i.componentMainType,i.componentIndex);l&&c.push(l),c.push({formatter:a.content});var u=e.positionDefault,d=tH(c,this._tooltipModel,u?{position:u}:null),f=d.get(`content`),p=Math.random()+``,m=new ow;this._showOrMove(d,function(){var n=B(d.get(`formatterParams`)||{});this._showTooltipContent(d,f,n,p,e.offsetX,e.offsetY,e.position,t,m)}),n({type:`showTip`,from:this.uid})},t.prototype._showTooltipContent=function(e,t,n,r,i,a,o,s,c){if(this._ticket=``,e.get(`showContent`)&&e.get(`show`)){var l=this._tooltipContent;l.setEnterable(e.get(`enterable`));var u=e.get(`formatter`);o||=e.get(`position`);var d=t,f=this._getNearestPoint([i,a],n,e.get(`trigger`),e.get(`borderColor`),e.get(`defaultBorderColor`,!0)).color;if(u){if(q(u)){var p=e.ecModel.get(`useUTC`),m=G(n)?n[0]:n,h=m&&m.axisType&&m.axisType.indexOf(`time`)>=0;d=u,h&&(d=yS(m.axisValue,d,p)),d=US(d,n,!0)}else if(K(u)){var g=W(function(t,r){t===this._ticket&&(l.setContent(r,c,e,f,o),this._updatePosition(e,o,i,a,l,n,s))},this);this._ticket=r,d=u(n,r,g)}else d=u}l.setContent(d,c,e,f,o),l.show(e,f),this._updatePosition(e,o,i,a,l,n,s)}},t.prototype._getNearestPoint=function(e,t,n,r,i){if(n===`axis`||G(t))return{color:r||i};if(!G(t))return{color:r||t.color||t.borderColor}},t.prototype._updatePosition=function(e,t,n,r,i,a,o){var s=this._api.getWidth(),c=this._api.getHeight();t||=e.get(`position`);var l=i.getSize(),u=e.get(`align`),d=e.get(`verticalAlign`),f=o&&o.getBoundingRect().clone();if(o&&f.applyTransform(o.transform),K(t)&&(t=t([n,r],a,i.el,f,{viewSize:[s,c],contentSize:l.slice()})),G(t))n=yp(t[0],s),r=yp(t[1],c);else if(J(t)){var p=t;p.width=l[0],p.height=l[1];var m=QS(p,{width:s,height:c});n=m.x,r=m.y,u=null,d=null}else if(q(t)&&o){var h=aH(t,f,l,e.get(`borderWidth`));n=h[0],r=h[1]}else{var h=rH(n,r,i,s,c,u?null:20,d?null:20);n=h[0],r=h[1]}if(u&&(n-=oH(u)?l[0]/2:u===`right`?l[0]:0),d&&(r-=oH(d)?l[1]/2:d===`bottom`?l[1]:0),MV(e)){var h=iH(n,r,i,s,c);n=h[0],r=h[1]}i.moveTo(n,r)},t.prototype._updateContentNotChangedOnAxis=function(e,t){var n=this._lastDataByCoordSys,r=this._cbParamsList,i=!!n&&n.length===e.length;return i&&H(n,function(n,a){var o=n.dataByAxis||[],s=(e[a]||{}).dataByAxis||[];i&&=o.length===s.length,i&&H(o,function(e,n){var a=s[n]||{},o=e.seriesDataIndices||[],c=a.seriesDataIndices||[];i=i&&e.value===a.value&&e.axisType===a.axisType&&e.axisId===a.axisId&&o.length===c.length,i&&H(o,function(e,t){var n=c[t];i=i&&e.seriesIndex===n.seriesIndex&&e.dataIndex===n.dataIndex}),r&&H(e.seriesDataIndices,function(e){var n=e.seriesIndex,a=t[n],o=r[n];a&&o&&o.data!==a.data&&(i=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=t,!!i},t.prototype._hide=function(e){this._lastDataByCoordSys=null,this._cbParamsList=null,e({type:`hideTip`,from:this.uid})},t.prototype.dispose=function(e,t){!No.node&&t.getDom()&&(Zk(this,`_updatePosition`),this._tooltipContent.dispose(),pV(`itemTooltip`,t),this._tooltipContent=null,this._tooltipModel=null,this._lastDataByCoordSys=null,this._cbParamsList=null)},t.type=`tooltip`,t}(QM);function tH(e,t,n){var r=t.ecModel,i;n?(i=new _y(n,r,r),i=new _y(t.option,i,r)):i=t;for(var a=e.length-1;a>=0;a--){var o=e[a];o&&(o instanceof _y&&(o=o.get(`tooltip`,!0)),q(o)&&(o={formatter:o}),o&&(i=new _y(o,i,r)))}return i}function nH(e,t){return e.dispatchAction||W(t.dispatchAction,t)}function rH(e,t,n,r,i,a,o){var s=n.getSize(),c=s[0],l=s[1];return a!=null&&(e+c+a+2>r?e-=c+a:e+=a),o!=null&&(t+l+o>i?t-=l+o:t+=o),[e,t]}function iH(e,t,n,r,i){var a=n.getSize(),o=a[0],s=a[1];return e=Math.min(e+o,r)-o,t=Math.min(t+s,i)-s,e=Math.max(e,0),t=Math.max(t,0),[e,t]}function aH(e,t,n,r){var i=n[0],a=n[1],o=Math.ceil(Math.SQRT2*r)+8,s=0,c=0,l=t.width,u=t.height;switch(e){case`inside`:s=t.x+l/2-i/2,c=t.y+u/2-a/2;break;case`top`:s=t.x+l/2-i/2,c=t.y-a-o;break;case`bottom`:s=t.x+l/2-i/2,c=t.y+u+o;break;case`left`:s=t.x-i-o,c=t.y+u/2-a/2;break;case`right`:s=t.x+l+o,c=t.y+u/2-a/2}return[s,c]}function oH(e){return e===`center`||e===`middle`}function sH(e,t,n){var r=wm(e).queryOptionMap,i=r.keys()[0];if(i&&i!==`series`){var a=Em(t,i,r.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];if(a){var o=n.getViewOfComponentModel(a),s;if(o.group.traverse(function(t){var n=Xm(t).tooltipConfig;if(n&&n.name===e.name)return s=t,!0}),s)return{componentMainType:i,componentIndex:a.componentIndex,el:s}}}}function cH(e){yI(OV),e.registerComponentModel(jV),e.registerComponentView(eH),e.registerAction({type:`showTip`,event:`showTip`,update:`tooltip:manuallyShowTip`},Ao),e.registerAction({type:`hideTip`,event:`hideTip`,update:`tooltip:manuallyHideTip`},Ao)}var lH=H;function uH(e){if(e){for(var t in e)if(e.hasOwnProperty(t))return!0}}function dH(e,t,n){var r={};return lH(t,function(t){var a=r[t]=i();lH(e[t],function(e,r){if(QR.isValidType(r)){var i={type:r,visual:e};n&&n(i,t),a[r]=new QR(i),r===`opacity`&&(i=B(i),i.type=`colorAlpha`,a.__hidden.__alphaForOpacity=new QR(i))}})}),r;function i(){var e=function(){};return e.prototype.__hidden=e.prototype,new e}}function fH(e,t,n){var r;H(n,function(e){t.hasOwnProperty(e)&&uH(t[e])&&(r=!0)}),r&&H(n,function(n){t.hasOwnProperty(n)&&uH(t[n])?e[n]=B(t[n]):delete e[n]})}function pH(e,t,n,r){var i={};return H(e,function(e){i[e]=QR.prepareVisualTypes(t[e])}),{progress:function(e,a){var o;r!=null&&(o=a.getDimensionIndex(r));function s(e){return PN(a,l,e)}function c(e,t){IN(a,l,e,t)}for(var l,u=a.getStore();(l=e.next())!=null;){var d=a.getRawDataItem(l);if(!(d&&d.visualMap===!1))for(var f=r==null?l:u.get(o,l),p=n(f),m=t[p],h=i[p],g=0,_=h.length;g<_;g++){var v=h[g];m[v]&&m[v].applyVisual(f,s,c)}}}}}var mH=function(e,t){if(t===`all`)return{type:`all`,title:e.getLocaleModel().get([`legend`,`selector`,`all`])};if(t===`inverse`)return{type:`inverse`,title:e.getLocaleModel().get([`legend`,`selector`,`inverse`])}},hH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.layoutMode={type:`box`,ignoreSize:!0},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(t,n){e.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},t.prototype._updateSelector=function(e){var t=e.selector,n=this.ecModel;t===!0&&(t=e.selector=[`all`,`inverse`]),G(t)&&H(t,function(e,r){q(e)&&(e={type:e}),t[r]=qa(e,mH(n,e.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get(`selectedMode`)===`single`){for(var t=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get(`orient`)===`vertical`?{index:1,name:`vertical`}:{index:0,name:`horizontal`}},t.type=`legend.plain`,t.dependencies=[`series`],t.defaultOption={z:4,show:!0,orient:`horizontal`,left:`center`,bottom:Q.size.m,align:`auto`,backgroundColor:Q.color.transparent,borderColor:Q.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:`inherit`,symbolKeepAspect:!0,inactiveColor:Q.color.disabled,inactiveBorderColor:Q.color.disabled,inactiveBorderWidth:`auto`,itemStyle:{color:`inherit`,opacity:`inherit`,borderColor:`inherit`,borderWidth:`auto`,borderCap:`inherit`,borderJoin:`inherit`,borderDashOffset:`inherit`,borderMiterLimit:`inherit`},lineStyle:{width:`auto`,color:`inherit`,inactiveColor:Q.color.disabled,inactiveWidth:2,opacity:`inherit`,type:`inherit`,cap:`inherit`,join:`inherit`,dashOffset:`inherit`,miterLimit:`inherit`},textStyle:{color:Q.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:`sans-serif`,color:Q.color.tertiary,borderWidth:1,borderColor:Q.color.border},emphasis:{selectorLabel:{show:!0,color:Q.color.quaternary}},selectorPosition:`auto`,selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(cC),gH=ao,_H=H,vH=Bg,yH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.newlineDisabled=!1,n}return t.prototype.init=function(){this.group.add(this._contentGroup=new vH),this.group.add(this._selectorGroup=new vH),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,t,n){var r=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),e.get(`show`,!0)){var i=e.get(`align`),a=e.get(`orient`);(!i||i===`auto`)&&(i=e.get(`left`)===`right`&&a===`vertical`?`right`:`left`);var o=e.get(`selector`,!0),s=e.get(`selectorPosition`,!0);o&&(!s||s===`auto`)&&(s=a===`horizontal`?`end`:`start`),this.renderInner(i,e,t,n,o,a,s);var c=tC(e,n).refContainer,l=e.getBoxLayoutParams(),u=e.get(`padding`),d=QS(l,c,u),f=this.layoutInner(e,i,d,r,o,s),p=QS(Ya({width:f.width,height:f.height},l),c,u);this.group.x=p.x-f.x,this.group.y=p.y-f.y,this.group.markRedraw(),this.group.add(this._backgroundEl=AV(f,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,t,n,r,i,a,o){var s=this.getContentGroup(),c=X(),l=t.get(`selectedMode`),u=t.get(`triggerEvent`),d=[];n.eachRawSeries(function(e){!e.get(`legendHoverLink`)&&d.push(e.id)}),_H(t.getData(),function(i,a){var o=this,f=i.get(`name`);if(!this.newlineDisabled&&(f===``||f===` +`)){var p=new vH;p.newline=!0,s.add(p);return}var m=n.getSeriesByName(f)[0];if(!c.get(f)){if(m){var h=m.getData(),g=h.getVisual(`legendLineStyle`)||{},_=h.getVisual(`legendIcon`),v=h.getVisual(`style`),y=this._createItem(m,f,a,i,t,e,g,v,_,l,r);y.on(`click`,gH(SH,f,null,r,d)).on(`mouseover`,gH(CH,m.name,null,r,d)).on(`mouseout`,gH(wH,m.name,null,r,d)),n.ssr&&y.eachChild(function(e){var t=Xm(e);t.seriesIndex=m.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&y.eachChild(function(e){o.packEventData(e,t,m,a,f)}),c.set(f,!0)}else n.eachRawSeries(function(o){var s=this;if(!c.get(f)&&o.legendVisualProvider){var p=o.legendVisualProvider;if(!p.containName(f))return;var m=p.indexOfName(f),h=p.getItemVisual(m,`style`),g=p.getItemVisual(m,`legendIcon`),_=zl(h.fill);_&&_[3]===0&&(_[3]=.2,h=V(V({},h),{fill:ql(_,`rgba`)}));var v=this._createItem(o,f,a,i,t,e,{},h,g,l,r);v.on(`click`,gH(SH,null,f,r,d)).on(`mouseover`,gH(CH,null,f,r,d)).on(`mouseout`,gH(wH,null,f,r,d)),n.ssr&&v.eachChild(function(e){var t=Xm(e);t.seriesIndex=o.seriesIndex,t.dataIndex=a,t.ssrType=`legend`}),u&&v.eachChild(function(e){s.packEventData(e,t,o,a,f)}),c.set(f,!0)}},this)}},this),i&&this._createSelector(i,t,r,a,o)},t.prototype.packEventData=function(e,t,n,r,i){var a={componentType:`legend`,componentIndex:t.componentIndex,dataIndex:r,value:i,seriesIndex:n.seriesIndex};Xm(e).eventData=a},t.prototype._createSelector=function(e,t,n,r,i){var a=this.getSelectorGroup();_H(e,function(e){var r=e.type,i=new Wf({style:{x:0,y:0,align:`center`,verticalAlign:`middle`},onclick:function(){n.dispatchAction({type:r===`all`?`legendAllSelect`:`legendInverseSelect`,legendId:t.id})}});a.add(i),qv(i,{normal:t.getModel(`selectorLabel`),emphasis:t.getModel([`emphasis`,`selectorLabel`])},{defaultText:e.title}),ag(i)})},t.prototype._createItem=function(e,t,n,r,i,a,o,s,c,l,u){var d=e.visualDrawType,f=i.get(`itemWidth`),p=i.get(`itemHeight`),m=i.isSelected(t),h=r.get(`symbolRotate`),g=r.get(`symbolKeepAspect`),_=r.get(`icon`);c=_||c||`roundRect`;var v=bH(c,r,o,s,d,m,u),y=new vH,b=r.getModel(`textStyle`);if(K(e.getLegendIcon)&&(!_||_===`inherit`))y.add(e.getLegendIcon({itemWidth:f,itemHeight:p,icon:c,iconRotate:h,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}));else{var x=_===`inherit`&&e.getData().getVisual(`symbol`)?h===`inherit`?e.getData().getVisual(`symbolRotate`):h:0;y.add(xH({itemWidth:f,itemHeight:p,icon:c,iconRotate:x,itemStyle:v.itemStyle,lineStyle:v.lineStyle,symbolKeepAspect:g}))}var S=a===`left`?f+5:-5,C=a,w=i.get(`formatter`),T=t;q(w)&&w?T=w.replace(`{name}`,t??``):K(w)&&(T=w(t));var E=m?b.getTextColor():r.get(`inactiveColor`);y.add(new Wf({style:Yv(b,{text:T,x:S,y:p/2,fill:E,align:C,verticalAlign:`middle`},{inheritColor:E})}));var D=new zf({shape:y.getBoundingRect(),style:{fill:`transparent`}}),O=r.getModel(`tooltip`);return O.get(`show`)&&kv({el:D,componentModel:i,itemName:t,itemTooltipOption:O.option}),y.add(D),y.eachChild(function(e){e.silent=!0}),D.silent=!l,this.getContentGroup().add(y),ag(y),y.__legendDataIndex=n,y},t.prototype.layoutInner=function(e,t,n,r,i,a){var o=this.getContentGroup(),s=this.getSelectorGroup();XS(e.get(`orient`),o,e.get(`itemGap`),n.width,n.height);var c=o.getBoundingRect(),l=[-c.x,-c.y];if(s.markRedraw(),o.markRedraw(),i){XS(`horizontal`,s,e.get(`selectorItemGap`,!0));var u=s.getBoundingRect(),d=[-u.x,-u.y],f=e.get(`selectorButtonGap`,!0),p=e.getOrient().index,m=p===0?`width`:`height`,h=p===0?`height`:`width`,g=p===0?`y`:`x`;a===`end`?d[p]+=c[m]+f:l[p]+=u[m]+f,d[1-p]+=c[h]/2-u[h]/2,s.x=d[0],s.y=d[1],o.x=l[0],o.y=l[1];var _={x:0,y:0};return _[m]=c[m]+f+u[m],_[h]=Math.max(c[h],u[h]),_[g]=Math.min(0,u[g]+d[1-p]),_}return o.x=l[0],o.y=l[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type=`legend.plain`,t}(QM);function bH(e,t,n,r,i,a,o){function s(e,t){e.lineWidth===`auto`&&(e.lineWidth=t.lineWidth>0?2:0),_H(e,function(n,r){e[r]===`inherit`&&(e[r]=t[r])})}var c=t.getModel(`itemStyle`),l=c.getItemStyle(),u=e.lastIndexOf(`empty`,0)===0?`fill`:`stroke`,d=c.getShallow(`decal`);l.decal=!d||d===`inherit`?r.decal:NP(d,o),l.fill===`inherit`&&(l.fill=r[i]),l.stroke===`inherit`&&(l.stroke=r[u]),l.opacity===`inherit`&&(l.opacity=(i===`fill`?r:n).opacity),s(l,r);var f=t.getModel(`lineStyle`),p=f.getLineStyle();if(s(p,n),l.fill===`auto`&&(l.fill=r.fill),l.stroke===`auto`&&(l.stroke=r.fill),p.stroke===`auto`&&(p.stroke=r.fill),!a){var m=t.get(`inactiveBorderWidth`),h=l[u];l.lineWidth=m===`auto`?r.lineWidth>0&&h?2:0:l.lineWidth,l.fill=t.get(`inactiveColor`),l.stroke=t.get(`inactiveBorderColor`),p.stroke=f.get(`inactiveColor`),p.lineWidth=f.get(`inactiveWidth`)}return{itemStyle:l,lineStyle:p}}function xH(e){var t=e.icon||`roundRect`,n=Ew(t,0,0,e.itemWidth,e.itemHeight,e.itemStyle.fill,e.symbolKeepAspect);return n.setStyle(e.itemStyle),n.rotation=(e.iconRotate||0)*Math.PI/180,n.setOrigin([e.itemWidth/2,e.itemHeight/2]),t.indexOf(`empty`)>-1&&(n.style.stroke=n.style.fill,n.style.fill=Q.color.neutral00,n.style.lineWidth=2),n}function SH(e,t,n,r){wH(e,t,n,r),n.dispatchAction({type:`legendToggleSelect`,name:e??t}),CH(e,t,n,r)}function CH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`highlight`,seriesName:e,name:t,excludeSeriesId:r})}function wH(e,t,n,r){n.usingTHL()||n.dispatchAction({type:`downplay`,seriesName:e,name:t,excludeSeriesId:r})}function TH(e,t,n){var r=e===`allSelect`||e===`inverseSelect`,i={},a=[];n.eachComponent({mainType:`legend`,query:t},function(n){r?n[e]():n[e](t.name),EH(n,i),a.push(n.componentIndex)});var o={};return n.eachComponent(`legend`,function(e){H(i,function(t,n){e[t?`select`:`unSelect`](n)}),EH(e,o)}),r?{selected:o,legendIndex:a}:{name:t.name,selected:o}}function EH(e,t){var n=t||{};return H(e.getData(),function(t){var r=t.get(`name`);if(r!==` +`&&r!==``){var i=e.isSelected(r);n[r]=ko(n,r)?n[r]&&i:i}}),n}function DH(e){e.registerAction(`legendToggleSelect`,`legendselectchanged`,ao(TH,`toggleSelected`)),e.registerAction(`legendAllSelect`,`legendselectall`,ao(TH,`allSelect`)),e.registerAction(`legendInverseSelect`,`legendinverseselect`,ao(TH,`inverseSelect`)),e.registerAction(`legendSelect`,`legendselected`,ao(TH,`select`)),e.registerAction(`legendUnSelect`,`legendunselected`,ao(TH,`unSelect`))}var OH=Ym(kH);function kH(e){var t=e.findComponents({mainType:`legend`});t&&t.length&&e.filterSeries(function(e){for(var n=0;nn[i],m=[-d.x,-d.y];t||(m[r]=c[s]);var h=[0,0],g=[-f.x,-f.y],_=Y(e.get(`pageButtonGap`,!0),e.get(`itemGap`,!0));p&&(e.get(`pageButtonPosition`,!0)===`end`?g[r]+=n[i]-f[i]:h[r]+=f[i]+_),g[1-r]+=d[a]/2-f[a]/2,c.setPosition(m),l.setPosition(h),u.setPosition(g);var v={x:0,y:0};if(v[i]=p?n[i]:d[i],v[a]=Math.max(d[a],f[a]),v[o]=Math.min(0,f[o]+g[1-r]),l.__rectSize=n[i],p){var y={x:0,y:0};y[i]=Math.max(n[i]-f[i]-_,0),y[a]=v[a],l.setClipPath(new zf({shape:y})),l.__rectSize=y[i]}else u.eachChild(function(e){e.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&U_(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),v},t.prototype._pageGo=function(e,t,n){var r=this._getPageInfo(t)[e];r!=null&&n.dispatchAction({type:`legendScroll`,scrollDataIndex:r,legendId:t.id})},t.prototype._updatePageInfoView=function(e,t){var n=this._controllerGroup;H([`pagePrev`,`pageNext`],function(r){var i=t[r+`DataIndex`]!=null,a=n.childOfName(r);a&&(a.setStyle(`fill`,i?e.get(`pageIconColor`,!0):e.get(`pageIconInactiveColor`,!0)),a.cursor=i?`pointer`:`default`)});var r=n.childOfName(`pageText`),i=e.get(`pageFormatter`),a=t.pageIndex,o=a==null?0:a+1,s=t.pageCount;r&&i&&r.setStyle(`text`,q(i)?i.replace(`{current}`,o==null?``:o+``).replace(`{total}`,s==null?``:s+``):i({current:o,total:s}))},t.prototype._getPageInfo=function(e){var t=e.get(`scrollDataIndex`,!0),n=this.getContentGroup(),r=this._containerGroup.__rectSize,i=e.getOrient().index,a=PH[i],o=FH[i],s=this._findTargetItemIndex(t),c=n.children(),l=c[s],u=c.length,d=+!!u,f={contentPosition:[n.x,n.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!l)return f;var p=v(l);f.contentPosition[i]=-p.s;for(var m=s+1,h=p,g=p,_=null;m<=u;++m)_=v(c[m]),(!_&&g.e>h.s+r||_&&!y(_,h.s))&&(h=g.i>h.i?g:_,h&&(f.pageNextDataIndex??=h.i,++f.pageCount)),g=_;for(var m=s-1,h=p,g=p,_=null;m>=-1;--m)_=v(c[m]),(!_||!y(g,_.s))&&h.i=t&&e.s<=t+r}},t.prototype._findTargetItemIndex=function(e){if(!this._showController)return 0;var t,n=this.getContentGroup(),r;return n.eachChild(function(n,i){var a=n.__legendDataIndex;r==null&&a!=null&&(r=i),a===e&&(t=i)}),t??r},t.type=`legend.scroll`,t}(yH);function LH(e){e.registerAction(`legendScroll`,`legendscroll`,function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:`legend`,subType:`scroll`,query:e},function(e){e.setScrollDataIndex(n)})})}function RH(e){yI(AH),e.registerComponentModel(jH),e.registerComponentView(IH),LH(e)}function zH(e){yI(AH),yI(RH)}var BH={get:function(e,t,n){var r=B((VH[e]||{})[t]);return n&&G(r)?r[r.length-1]:r}},VH={color:{active:[`#006edd`,`#e0ffff`],inactive:[Q.color.transparent]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:[`circle`,`roundRect`,`diamond`],inactive:[`none`]},symbolSize:{active:[10,50],inactive:[0,0]}},HH=QR.mapVisual,UH=QR.eachVisual,WH=G,GH=H,KH=Tp,qH=vp,JH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n.stateList=[`inRange`,`outOfRange`],n.replacableOptionKeys=[`inRange`,`outOfRange`,`target`,`controller`,`color`],n.layoutMode={type:`box`,ignoreSize:!0},n.dataBound=[-1/0,1/0],n.targetVisuals={},n.controllerVisuals={},n}return t.prototype.init=function(e,t,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,t){var n=this.option;!t&&fH(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel(`textStyle`),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var t=this.stateList;e=W(e,this),this.controllerVisuals=dH(this.option.controller,t,e),this.targetVisuals=dH(this.option.target,t,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this,t=this.option.seriesTargets;if(t){var n=[];return GH(t,function(t){if(t.seriesIndex!=null)n.push(t.seriesIndex);else if(t.seriesId!=null){var r;e.ecModel.eachSeries(function(e){e.id===t.seriesId&&(r=e)}),r&&n.push(r.componentIndex)}}),n}var r=this.option.seriesId,i=this.option.seriesIndex;i==null&&r==null&&(i=`all`);var a=Em(this.ecModel,`series`,{index:i,id:r},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return U(a,function(e){return e.componentIndex})},t.prototype.eachTargetSeries=function(e,t){H(this.getTargetSeriesIndices(),function(n){var r=this.ecModel.getSeriesByIndex(n);r&&e.call(t,r)},this)},t.prototype.isTargetSeries=function(e){var t=!1;return this.eachTargetSeries(function(n){n===e&&(t=!0)}),t},t.prototype.formatValueText=function(e,t,n){var r=this.option,i=r.precision,a=this.dataBound,o=r.formatter,s;n||=[`<`,`>`],G(e)&&(e=e.slice(),s=!0);var c=t?e:s?[l(e[0]),l(e[1])]:l(e);if(q(o))return o.replace(`{value}`,s?c[0]:c).replace(`{value2}`,s?c[1]:c);if(K(o))return s?o(e[0],e[1]):o(e);if(s)return e[0]===a[0]?n[0]+` `+c[1]:e[1]===a[1]?n[1]+` `+c[0]:c[0]+` - `+c[1];return c;function l(e){return e===a[0]?`min`:e===a[1]?`max`:(+e).toFixed(Math.min(i,20))}},t.prototype.resetExtent=function(){var e=this.option,t=KH([e.min,e.max]);this._dataExtent=t},t.prototype.getDimension=function(e){var t=this,n=this.option.seriesTargets;if(n){var r=no(n,function(n){return n.seriesIndex!=null&&n.seriesIndex===e||n.seriesId!=null&&n.seriesId===t.ecModel.getSeriesByIndex(e).id});if(r)return r.dimension}return this.option.dimension},t.prototype.getDataDimensionIndex=function(e){var t=e.hostModel.seriesIndex,n=this.getDimension(t);if(n!=null)return e.getDimensionIndex(n);for(var r=e.dimensions,i=r.length-1;i>=0;i--){var a=r[i],o=e.getDimensionInfo(a);if(!o.isCalculationCoord)return o.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,t=this.option,n={inRange:t.inRange,outOfRange:t.outOfRange},r=t.target||={},i=t.controller||={};qa(r,n),qa(i,n);var a=this.isCategory();o.call(this,r),o.call(this,i),s.call(this,r,`inRange`,`outOfRange`),c.call(this,i);function o(n){WH(t.color)&&!n.inRange&&(n.inRange={color:t.color.slice().reverse()}),n.inRange=n.inRange||{color:e.get(`gradientColor`)}}function s(e,t,n){var r=e[t],i=e[n];r&&!i&&(i=e[n]={},GH(r,function(e,t){if(QR.isValidType(t)){var n=BH.get(t,`inactive`,a);n!=null&&(i[t]=n,t===`color`&&!i.hasOwnProperty(`opacity`)&&!i.hasOwnProperty(`colorAlpha`)&&(i.opacity=[0,0]))}}))}function c(e){var t=(e.inRange||{}).symbol||(e.outOfRange||{}).symbol,n=(e.inRange||{}).symbolSize||(e.outOfRange||{}).symbolSize,r=this.get(`inactiveColor`),i=this.getItemSymbol()||`roundRect`;GH(this.stateList,function(o){var s=this.itemSize,c=e[o];c||=e[o]={color:a?r:[r]},c.symbol??(c.symbol=t&&B(t)||(a?i:[i])),c.symbolSize??(c.symbolSize=n&&B(n)||(a?s[0]:[s[0],s[0]])),c.symbol=HH(c.symbol,function(e){return e===`none`?i:e});var l=c.symbolSize;if(l!=null){var u=-1/0;UH(l,function(e){e>u&&(u=e)}),c.symbolSize=HH(l,function(e){return qH(e,[0,u],[0,s[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get(`itemWidth`)),parseFloat(this.get(`itemHeight`))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type=`visualMap`,t.dependencies=[`series`],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:`vertical`,backgroundColor:Q.color.transparent,borderColor:Q.color.borderTint,contentColor:Q.color.theme[0],inactiveColor:Q.color.disabled,borderWidth:0,padding:Q.size.m,textGap:10,precision:0,textStyle:{color:Q.color.secondary}},t}(cC),YH=[20,140],XH=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(e){e.mappingMethod=`linear`,e.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){e.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=YH[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=YH[1])},t.prototype._resetRange=function(){var e=this.getExtent(),t=this.option.range;!t||t.auto?(e.auto=1,this.option.range=e):G(t)&&(t[0]>t[1]&&t.reverse(),t[0]=Math.max(t[0],e[0]),t[1]=Math.min(t[1],e[1]))},t.prototype.completeVisualOption=function(){e.prototype.completeVisualOption.apply(this,arguments),H(this.stateList,function(e){var t=this.option.controller[e].symbolSize;t&&t[0]!==t[1]&&(t[0]=t[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),t=Tp((this.get(`range`)||[]).slice());return t[0]>e[1]&&(t[0]=e[1]),t[1]>e[1]&&(t[1]=e[1]),t[0]=n[1]||e<=t[1])?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[];return this.eachTargetSeries(function(n){var r=[],i=n.getData();i.each(this.getDataDimensionIndex(i),function(t,n){e[0]<=t&&t<=e[1]&&r.push(n)},this),t.push({seriesId:n.id,dataIndex:r})},this),t},t.prototype.getVisualMeta=function(e){var t=ZH(this,`outOfRange`,this.getExtent()),n=ZH(this,`inRange`,this.option.range.slice()),r=[];function i(t,n){r.push({value:t,color:e(t,n)})}for(var a=0,o=0,s=n.length,c=t.length;oe[1])break;r.push({color:this.getControllerVisual(o,`color`,t),offset:a/n})}return r.push({color:this.getControllerVisual(e[1],`color`,t),offset:1}),r},t.prototype._createBarPoints=function(e,t){var n=this.visualMapModel.itemSize;return[[n[0]-t[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-t[1],e[1]]]},t.prototype._createBarGroup=function(e){var t=this._orient,n=this.visualMapModel.get(`inverse`);return new Bg(t===`horizontal`&&!n?{scaleX:e===`bottom`?1:-1,rotation:Math.PI/2}:t===`horizontal`&&n?{scaleX:e===`bottom`?-1:1,rotation:-Math.PI/2}:t===`vertical`&&!n?{scaleX:e===`left`?1:-1,scaleY:-1}:{scaleX:e===`left`?1:-1})},t.prototype._updateHandle=function(e,t){if(this._useHandle){var n=this._shapes,r=this.visualMapModel,i=n.handleThumbs,a=n.handleLabels,o=r.itemSize,s=r.getExtent(),c=this._applyTransform(`left`,n.mainGroup);rU([0,1],function(l){var u=i[l];u.setStyle(`fill`,t.handlesColor[l]),u.y=e[l];var d=nU(e[l],[0,o[1]],s,!0),f=this.getControllerVisual(d,`symbolSize`);u.scaleX=u.scaleY=f/o[0],u.x=o[0]-f/2;var p=mv(n.handleLabelPoints[l],pv(u,this.group));if(this._orient===`horizontal`){var m=c===`left`||c===`top`?(o[0]-f)/2:(o[0]-f)/-2;p[1]+=m}a[l].setStyle({x:p[0],y:p[1],text:r.formatValueText(this._dataInterval[l]),verticalAlign:`middle`,align:this._orient===`vertical`?this._applyTransform(`left`,n.mainGroup):`center`})},this)}},t.prototype._showIndicator=function(e,t,n,r){var i=this.visualMapModel,a=i.getExtent(),o=i.itemSize,s=[0,o[1]],c=this._shapes,l=c.indicator;if(l){l.attr(`invisible`,!1);var u=this.getControllerVisual(e,`color`,{convertOpacityToAlpha:!0}),d=this.getControllerVisual(e,`symbolSize`),f=nU(e,a,s,!0),p=o[0]-d/2,m={x:l.x,y:l.y};l.y=f,l.x=p;var h=mv(c.indicatorLabelPoint,pv(l,this.group)),g=c.indicatorLabel;g.attr(`invisible`,!1);var _=this._applyTransform(`left`,c.mainGroup),v=this._orient===`horizontal`;g.setStyle({text:(n||``)+i.formatValueText(t),verticalAlign:v?_:`middle`,align:v?`center`:_});var y={x:p,y:f,style:{fill:u}},b={style:{x:h[0],y:h[1]}};if(i.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var x={duration:100,easing:`cubicInOut`,additive:!0};l.x=m.x,l.y=m.y,l.animateTo(y,x),g.animateTo(b,x)}else l.attr(y),g.attr(b);this._firstShowIndicator=!1;var S=this._shapes.handleLabels;if(S)for(var C=0;Ci[1]&&(l[1]=1/0),t&&(l[0]===-1/0?this._showIndicator(c,l[1],`< `,o):l[1]===1/0?this._showIndicator(c,l[0],`> `,o):this._showIndicator(c,c,`≈ `,o));var u=this._hoverLinkDataIndices,d=[];(t||dU(n))&&(d=this._hoverLinkDataIndices=n.findTargetDataIndices(l));var f=ym(u,d);this._dispatchHighDown(`downplay`,tU(f[0],n)),this._dispatchHighDown(`highlight`,tU(f[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var t;if(LN(e.target,function(e){var n=Xm(e);if(n.dataIndex!=null)return t=n,!0},!0),t){var n=this.ecModel.getSeriesByIndex(t.seriesIndex),r=this.visualMapModel;if(r.isTargetSeries(n)){var i=n.getData(t.dataType),a=i.getStore().get(r.getDataDimensionIndex(i),t.dataIndex);isNaN(a)||this._showIndicator(a,a)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr(`invisible`,!0),e.indicatorLabel&&e.indicatorLabel.attr(`invisible`,!0);var t=this._shapes.handleLabels;if(t)for(var n=0;n=0&&(i.dimension=a,r.push(i))}}),e.getData().setVisual(`visualMeta`,r)}}];function gU(e,t,n,r){for(var i=t.targetVisuals[r],a=QR.prepareVisualTypes(i),o={color:FN(e.getData(),`color`)},s=0,c=a.length;s0:e.splitNumber>0)||e.calculable)?`continuous`:`piecewise`}),e.registerAction(pU,mU),H(hU,function(t){e.registerVisual(e.PRIORITY.VISUAL.COMPONENT,t)}),e.registerPreprocessor(vU))}function SU(e){e.registerComponentModel(XH),e.registerComponentView(cU),xU(e)}var CU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n._pieceList=[],n}return t.prototype.optionUpdated=function(t,n){e.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var r=this._mode=this._determineMode();this._pieceList=[],wU[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(e,t){r===`categories`?(e.mappingMethod=`category`,e.categories=B(i)):(e.dataExtent=this.getExtent(),e.mappingMethod=`piecewise`,e.pieceList=U(this._pieceList,function(e){return e=B(e),t!==`inRange`&&(e.visual=null),e}))})},t.prototype.completeVisualOption=function(){var t=this.option,n={},r=QR.listVisualTypes(),i=this.isCategory();H(t.pieces,function(e){H(r,function(t){e.hasOwnProperty(t)&&(n[t]=1)})}),H(n,function(e,n){var r=!1;H(this.stateList,function(e){r=r||a(t,e,n)||a(t.target,e,n)},this),!r&&H(this.stateList,function(e){(t[e]||(t[e]={}))[n]=BH.get(n,e===`inRange`?`active`:`inactive`,i)})},this);function a(e,t,n){return e&&e[t]&&e[t].hasOwnProperty(n)}e.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,t){var n=this.option,r=this._pieceList,i=(t?n:e).selected||{};if(n.selected=i,H(r,function(e,t){var n=this.getSelectedMapKey(e);i.hasOwnProperty(n)||(i[n]=!0)},this),n.selectedMode===`single`){var a=!1;H(r,function(e,t){var n=this.getSelectedMapKey(e);i[n]&&(a?i[n]=!1:a=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get(`itemSymbol`)},t.prototype.getSelectedMapKey=function(e){return this._mode===`categories`?e.value+``:e.index+``},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?`pieces`:this.option.categories?`categories`:`splitNumber`},t.prototype.setSelected=function(e){this.option.selected=B(e)},t.prototype.getValueState=function(e){var t=QR.findPieceIndex(e,this._pieceList);return t==null?`outOfRange`:this.option.selected[this.getSelectedMapKey(this._pieceList[t])]?`inRange`:`outOfRange`},t.prototype.findTargetDataIndices=function(e){var t=[],n=this._pieceList;return this.eachTargetSeries(function(r){var i=[],a=r.getData();a.each(this.getDataDimensionIndex(a),function(t,r){QR.findPieceIndex(t,n)===e&&i.push(r)},this),t.push({seriesId:r.id,dataIndex:i})},this),t},t.prototype.getRepresentValue=function(e){var t;if(this.isCategory())t=e.value;else if(e.value!=null)t=e.value;else{var n=e.interval||[];t=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return t},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var t=[],n=[``,``],r=this;function i(i,a){var o=r.getRepresentValue({interval:i});a||=r.getValueState(o);var s=e(o,a);i[0]===-1/0?n[0]=s:i[1]===1/0?n[1]=s:t.push({value:i[0],color:s},{value:i[1],color:s})}var a=this._pieceList.slice();if(!a.length)a.push({interval:[-1/0,1/0]});else{var o=a[0].interval[0];o!==-1/0&&a.unshift({interval:[-1/0,o]}),o=a[a.length-1].interval[1],o!==1/0&&a.push({interval:[o,1/0]})}var s=-1/0;return H(a,function(e){var t=e.interval;t&&(t[0]>s&&i([s,t[0]],`outOfRange`),i(t.slice()),s=t[1])},this),{stops:t,outerColors:n}},t.type=`visualMap.piecewise`,t.defaultOption=Sx(JH.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:`auto`,itemWidth:20,itemHeight:14,itemSymbol:`roundRect`,pieces:null,categories:null,splitNumber:5,selectedMode:`multiple`,itemGap:10,hoverLink:!0}),t}(JH),wU={splitNumber:function(e){var t=this.option,n=Math.min(t.precision,20),r=this.getExtent(),i=t.splitNumber;i=Math.max(parseInt(i,10),1),t.splitNumber=i;for(var a=(r[1]-r[0])/i;+a.toFixed(n)!==a&&n<5;)n++;t.precision=n,a=+a.toFixed(n),t.minOpen&&e.push({interval:[-1/0,r[0]],close:[0,0]});for(var o=0,s=r[0];o`,`≥`][t[0]]];e.text=e.text||this.formatValueText(e.value==null?e.interval:e.value,!1,n)},this)}};function TU(e,t){var n=e.inverse;(e.orient===`vertical`?!n:n)&&t.reverse()}var EU=function(e){z(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.type=t.type,n}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var t=this.visualMapModel,n=t.get(`textGap`),r=t.textStyleModel,i=this._getItemAlign(),a=t.itemSize,o=this._getViewData(),s=o.endsText,c=mo(t.get(`showLabel`,!0),!s),l=!t.get(`selectedMode`);s&&this._renderEndsText(e,s[0],a,c,i),H(o.viewPieceList,function(o){var s=o.piece,u=new Bg;u.onclick=W(this._onItemClick,this,s),this._enableHoverLink(u,o.indexInModelPieceList);var d=t.getRepresentValue(s);if(this._createItemSymbol(u,d,[0,0,a[0],a[1]],l),c){var f=this.visualMapModel.getValueState(d),p=r.get(`align`)||i;u.add(new Wf({style:Yv(r,{x:p===`right`?-n:a[0]+n,y:a[1]/2,text:s.text,verticalAlign:r.get(`verticalAlign`)||`middle`,align:p,opacity:Y(r.get(`opacity`),f===`outOfRange`?.5:1)}),silent:l}))}e.add(u)},this),s&&this._renderEndsText(e,s[1],a,c,i),XS(t.get(`orient`),e,t.get(`itemGap`)),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,t){var n=this;e.on(`mouseover`,function(){return r(`highlight`)}).on(`mouseout`,function(){return r(`downplay`)});var r=function(e){var r=n.visualMapModel;r.option.hoverLink&&n.api.dispatchAction({type:e,batch:tU(r.findTargetDataIndices(t),r)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,t=e.option;if(t.orient===`vertical`)return eU(e,this.api,e.itemSize);var n=t.align;return(!n||n===`auto`)&&(n=`left`),n},t.prototype._renderEndsText=function(e,t,n,r,i){if(t){var a=new Bg,o=this.visualMapModel.textStyleModel;a.add(new Wf({style:Yv(o,{x:r?i===`right`?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:`middle`,align:r?i:`center`,text:t})})),e.add(a)}},t.prototype._getViewData=function(){var e=this.visualMapModel,t=U(e.getPieceList(),function(e,t){return{piece:e,indexInModelPieceList:t}}),n=e.get(`text`),r=e.get(`orient`),i=e.get(`inverse`);return(r===`horizontal`?i:!i)?t.reverse():n&&=n.slice().reverse(),{viewPieceList:t,endsText:n}},t.prototype._createItemSymbol=function(e,t,n,r){var i=Ew(this.getControllerVisual(t,`symbol`),n[0],n[1],n[2],n[3],this.getControllerVisual(t,`color`));i.silent=r,e.add(i)},t.prototype._onItemClick=function(e){var t=this.visualMapModel,n=t.option,r=n.selectedMode;if(r){var i=B(n.selected),a=t.getSelectedMapKey(e);r===`single`||r===!0?(i[a]=!0,H(i,function(e,t){i[t]=t===a})):i[a]=!i[a],this.api.dispatchAction({type:`selectDataRange`,from:this.uid,visualMapId:this.visualMapModel.id,selected:i})}},t.type=`visualMap.piecewise`,t}(QH);function DU(e){e.registerComponentModel(CU),e.registerComponentView(EU),xU(e)}function OU(e){yI(SU),yI(DU)}var kU={label:{enabled:!0},decal:{show:!1}},AU=xm(),jU=xm(),MU=Ym(NU);function NU(e,t){var n=e.getModel(`aria`);if(!n.get(`enabled`))return;var r=jU(e).scope||(jU(e).scope={}),i=B(kU);qa(i.label,e.getLocaleModel().get(`aria`),!1),qa(n.option,i,!1),a(),o();function a(){if(n.getModel(`decal`).get(`show`)){var t=X();e.eachSeries(function(e){e.isColorBySeries()||(AU(e).scope=t.get(e.type)||t.set(e.type,{}))}),e.eachSeries(function(t){if(K(t.enableAriaDecal)){t.enableAriaDecal();return}var n=t.getData();if(t.isColorBySeries()){var i=pC(t.ecModel,t.name,r,e.getSeriesCount()),a=n.getVisual(`decal`);n.setVisual(`decal`,u(a,i))}else{var o=t.getRawData(),s={},c=AU(t).scope;n.each(function(e){var t=n.getRawIndex(e);s[t]=e});var l=o.count();o.each(function(e){var r=s[e],i=o.getName(e)||e+``,a=pC(t.ecModel,i,c,l),d=n.getItemVisual(r,`decal`);n.setItemVisual(r,`decal`,u(d,a))})}function u(e,t){var n=e?V(V({},t),e):t;return n.dirty=!0,n}})}}function o(){var r=t.getZr().dom;if(r){var i=e.getLocaleModel().get(`aria`),a=n.getModel(`label`);if(a.option=Ya(a.option,i),a.get(`enabled`)){if(r.setAttribute(`role`,`img`),a.get(`description`)){r.setAttribute(`aria-label`,a.get(`description`));return}var o=e.getSeriesCount(),u=a.get([`data`,`maxCount`])||10,d=a.get([`series`,`maxCount`])||10,f=Math.min(o,d),p;if(!(o<1)){var m=c();p=m?s(a.get([`general`,`withTitle`]),{title:m}):a.get([`general`,`withoutTitle`]);var h=[],g=o>1?a.get([`series`,`multiple`,`prefix`]):a.get([`series`,`single`,`prefix`]);p+=s(g,{seriesCount:o}),e.eachSeries(function(e,t){if(t1?a.get([`series`,`multiple`,r]):a.get([`series`,`single`,r]),n=s(n,{seriesId:e.seriesIndex,seriesName:e.get(`name`),seriesType:l(e.subType)});var i=e.getData();if(i.count()>u){var c=a.get([`data`,`partialData`]);n+=s(c,{displayCnt:u})}else n+=a.get([`data`,`allData`]);for(var d=a.get([`data`,`separator`,`middle`]),p=a.get([`data`,`separator`,`end`]),m=a.get([`data`,`excludeDimensionId`]),g=[],_=0;_=zU:-c>=zU),f=c>0?c%zU:c%zU+zU,p=!1;p=d?!0:!eu(u)&&f>=RU==!!l;var m=e+n*LU(a),h=t+r*IU(a);this._start&&this._add(`M`,m,h);var g=Math.round(i*BU);if(d){var _=1/this._p,v=(l?1:-1)*(zU-_);this._add(`A`,n,r,g,1,+l,e+n*LU(a+v),t+r*IU(a+v)),_>.01&&this._add(`A`,n,r,g,0,+l,m,h)}else{var y=e+n*LU(o),b=t+r*IU(o);this._add(`A`,n,r,g,+p,+l,y,b)}},e.prototype.rect=function(e,t,n,r){this._add(`M`,e,t),this._add(`l`,n,0),this._add(`l`,0,r),this._add(`l`,-n,0),this._add(`Z`)},e.prototype.closePath=function(){this._d.length>0&&this._add(`Z`)},e.prototype._add=function(e,t,n,r,i,a,o,s,c){for(var l=[],u=this._p,d=1;d`}function rW(e){return``}function iW(e,t){t||={};var n=t.newline?` +`:``;function r(e){var t=e.children,i=e.tag,a=e.attrs,o=e.text;return nW(i,a)+(i===`style`?o||``:Lx(o))+(t?``+n+U(t,function(e){return r(e)}).join(n)+n:``)+rW(i)}return r(e)}function aW(e,t,n){n||={};var r=n.newline?` +`:``,i=` {`+r,a=r+`}`,o=U(ro(e),function(t){return t+i+U(ro(e[t]),function(n){return n+`:`+e[t][n]+`;`}).join(r)+a}).join(r),s=U(ro(t),function(e){return`@keyframes `+e+i+U(ro(t[e]),function(n){return n+i+U(ro(t[e][n]),function(r){var i=t[e][n][r];return r===`d`&&(i=`path("`+i+`")`),r+`:`+i+`;`}).join(r)+a}).join(r)+a}).join(r);return!o&&!s?``:[``].join(r)}function oW(e){return{zrId:e,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function sW(e,t,n,r){return tW(`svg`,`root`,{width:e,height:t,xmlns:YU,"xmlns:xlink":XU,version:`1.1`,baseProfile:`full`,viewBox:r?`0 0 `+e+` `+t:!1},n)}var cW=0;function lW(){return cW++}var uW={cubicIn:`0.32,0,0.67,0`,cubicOut:`0.33,1,0.68,1`,cubicInOut:`0.65,0,0.35,1`,quadraticIn:`0.11,0,0.5,0`,quadraticOut:`0.5,1,0.89,1`,quadraticInOut:`0.45,0,0.55,1`,quarticIn:`0.5,0,0.75,0`,quarticOut:`0.25,1,0.5,1`,quarticInOut:`0.76,0,0.24,1`,quinticIn:`0.64,0,0.78,0`,quinticOut:`0.22,1,0.36,1`,quinticInOut:`0.83,0,0.17,1`,sinusoidalIn:`0.12,0,0.39,0`,sinusoidalOut:`0.61,1,0.88,1`,sinusoidalInOut:`0.37,0,0.63,1`,exponentialIn:`0.7,0,0.84,0`,exponentialOut:`0.16,1,0.3,1`,exponentialInOut:`0.87,0,0.13,1`,circularIn:`0.55,0,1,0.45`,circularOut:`0,0.55,0.45,1`,circularInOut:`0.85,0,0.15,1`},dW=`transform-origin`;function fW(e,t,n){var r=V({},e.shape);V(r,t),e.buildPath(n,r);var i=new VU;return i.reset(hu(e)),n.rebuildPath(i,1),i.generateStr(),i.getStr()}function pW(e,t){var n=t.originX,r=t.originY;(n||r)&&(e[dW]=n+`px `+r+`px`)}var mW={fill:`fill`,opacity:`opacity`,lineWidth:`stroke-width`,lineDashOffset:`stroke-dashoffset`};function hW(e,t){var n=t.zrId+`-ani-`+t.cssAnimIdx++;return t.cssAnims[n]=e,n}function gW(e,t,n){var r=e.shape.paths,i={},a,o;if(H(r,function(e){var t=oW(n.zrId);t.animation=!0,vW(e,{},t,!0);var r=t.cssAnims,s=t.cssNodes,c=ro(r),l=c.length;if(l){o=c[l-1];var u=r[o];for(var d in u){var f=u[d];i[d]=i[d]||{d:``},i[d].d+=f.d||``}for(var p in s){var m=s[p].animation;m.indexOf(o)>=0&&(a=m)}}}),a){t.d=!1;var s=hW(i,n);return a.replace(o,s)}}function _W(e){return q(e)?uW[e]?`cubic-bezier(`+uW[e]+`)`:wl(e)?e:``:``}function vW(e,t,n,r){var i=e.animators,a=i.length,o=[];if(e instanceof T_){var s=gW(e,t,n);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var c={},l=0;l0}).length)return hW(l,n)+` `+i[0]+` both`}for(var g in c){var s=h(c[g]);s&&o.push(s)}if(o.length){var _=n.zrId+`-cls-`+lW();n.cssNodes[`.`+_]={animation:o.join(`,`)},t.class=_}}function yW(e,t,n){if(!e.ignore){if(e.isSilent()){var r={"pointer-events":`none`};bW(r,t,n,!0)}else{var i=e.states.emphasis&&e.states.emphasis.style?e.states.emphasis.style:{},a=i.fill;if(!a){var o=e.style&&e.style.fill,s=e.states.select&&e.states.select.style&&e.states.select.style.fill,c=e.currentStates.indexOf(`select`)>=0&&s||o;c&&(a=Xl(c))}var l=i.lineWidth;if(l){var u=!i.strokeNoScale&&e.transform?e.transform[0]:1;l/=u}var r={cursor:`pointer`};a&&(r.fill=a),i.stroke&&(r.stroke=i.stroke),l&&(r[`stroke-width`]=l),bW(r,t,n,!0)}}}function bW(e,t,n,r){var i=JSON.stringify(e),a=n.cssStyleCache[i];a||(a=n.zrId+`-cls-`+lW(),n.cssStyleCache[i]=a,n.cssNodes[`.`+a+(r?`:hover`:``)]=e),t.class=t.class?t.class+` `+a:a}var xW=Math.round;function SW(e){return e&&q(e.src)}function CW(e){return e&&K(e.toDataURL)}function wW(e,t,n,r){JU(function(i,a){var o=i===`fill`||i===`stroke`;o&&pu(a)?zW(t,e,i,r):o&&uu(a)?BW(n,e,i,r):e[i]=a,o&&r.ssr&&a===`none`&&(e[`pointer-events`]=`visible`)},t,n,!1),RW(n,e,r)}function TW(e,t){var n=$j(t);n&&(n.each(function(t,n){t!=null&&(e[(`ecmeta_`+n).toLowerCase()]=t+``)}),t.isSilent()&&(e[$U+`silent`]=`true`))}function EW(e){return eu(e[0]-1)&&eu(e[1])&&eu(e[2])&&eu(e[3]-1)}function DW(e){return eu(e[4])&&eu(e[5])}function OW(e,t,n){if(t&&!(DW(t)&&EW(t))){var r=n?10:1e4;e.transform=EW(t)?`translate(`+xW(t[4]*r)/r+` `+xW(t[5]*r)/r+`)`:ru(t)}}function kW(e,t,n){for(var r=e.points,i=[],a=0;a`u`){var g=`Image width/height must been given explictly in svg-ssr renderer.`;vo(f,g),vo(p,g)}else if(f==null||p==null){var _=function(e,t){if(e){var n=e.elm,r=f||t.width,i=p||t.height;e.tag===`pattern`&&(l?(i=1,r/=a.width):u&&(r=1,i/=a.height)),e.attrs.width=r,e.attrs.height=i,n&&(n.setAttribute(`width`,r),n.setAttribute(`height`,i))}},v=rs(m,null,e,function(e){c||_(S,e),_(d,e)});v&&v.width&&v.height&&(f||=v.width,p||=v.height)}d=tW(`image`,`img`,{href:m,width:f,height:p}),o.width=f,o.height=p}else i.svgElement&&(d=B(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(d){var y,b;c?y=b=1:l?(b=1,y=o.width/a.width):u?(y=1,b=o.height/a.height):o.patternUnits=`userSpaceOnUse`,y!=null&&!isNaN(y)&&(o.width=y),b!=null&&!isNaN(b)&&(o.height=b);var x=gu(i);x&&(o.patternTransform=x);var S=tW(`pattern`,``,o,[d]),C=iW(S),w=r.patternCache,T=w[C];T||(T=r.zrId+`-p`+r.patternIdx++,w[C]=T,o.id=T,S=r.defs[T]=tW(`pattern`,T,o,[d])),t[n]=mu(T)}}function VW(e,t,n){var r=n.clipPathCache,i=n.defs,a=r[e.id];if(!a){a=n.zrId+`-c`+n.clipPathIdx++;var o={id:a};r[e.id]=a,i[a]=tW(`clipPath`,a,o,[PW(e,n)])}t[`clip-path`]=mu(a)}function HW(e){return document.createTextNode(e)}function UW(e,t,n){e.insertBefore(t,n)}function WW(e,t){e.removeChild(t)}function GW(e,t){e.appendChild(t)}function KW(e){return e.parentNode}function qW(e){return e.nextSibling}function JW(e,t){e.textContent=t}var YW=58,XW=120,ZW=tW(``,``);function QW(e){return e===void 0}function $W(e){return e!==void 0}function eG(e,t,n){for(var r={},i=t;i<=n;++i){var a=e[i].key;a!==void 0&&(r[a]=i)}return r}function tG(e,t){var n=e.key===t.key;return e.tag===t.tag&&n}function nG(e){var t,n=e.children,r=e.tag;if($W(r)){var i=e.elm=eW(r);if(aG(ZW,e),G(n))for(t=0;ta?(m=n[c+1]==null?null:n[c+1].elm,rG(e,m,n,i,c)):iG(e,t,r,a))}function sG(e,t){var n=t.elm=e.elm,r=e.children,i=t.children;e!==t&&(aG(e,t),QW(t.text)?$W(r)&&$W(i)?r!==i&&oG(n,r,i):$W(i)?($W(e.text)&&JW(n,``),rG(n,null,i,0,i.length-1)):$W(r)?iG(n,r,0,r.length-1):$W(e.text)&&JW(n,``):e.text!==t.text&&($W(r)&&iG(n,r,0,r.length-1),JW(n,t.text)))}function cG(e,t){if(tG(e,t))sG(e,t);else{var n=e.elm,r=KW(n);nG(t),r!==null&&(UW(r,t.elm,qW(n)),iG(r,[e],0,0))}return t}var lG=0,uG=function(){function e(e,t,n){if(this.type=`svg`,this.configLayer=dG(`configLayer`),this.storage=t,this._opts=n=V({},n),this.root=e,this._id=`zr`+lG++,this._oldVNode=sW(n.width,n.height),e&&!n.ssr){var r=this._viewport=document.createElement(`div`);r.style.cssText=`position:relative;overflow:hidden`;var i=this._svgDom=this._oldVNode.elm=eW(`svg`);aG(null,this._oldVNode),r.appendChild(i),e.appendChild(r)}this.resize(n.width,n.height)}return e.prototype.getType=function(){return this.type},e.prototype.getViewportRoot=function(){return this._viewport},e.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},e.prototype.getSvgDom=function(){return this._svgDom},e.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style=`position:absolute;left:0;top:0;user-select:none`,cG(this._oldVNode,e),this._oldVNode=e}},e.prototype.renderOneToVNode=function(e){return LW(e,oW(this._id))},e.prototype.renderToVNode=function(e){e||={};var t=this.storage.getDisplayList(!0),n=this._width,r=this._height,i=oW(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var a=[],o=this._bgVNode=fG(n,r,this._backgroundColor,i);o&&a.push(o);var s=e.compress?null:this._mainVNode=tW(`g`,`main`,{},[]);this._paintList(t,i,s?s.children:a),s&&a.push(s);var c=U(ro(i.defs),function(e){return i.defs[e]});if(c.length&&a.push(tW(`defs`,`defs`,{},c)),e.animation){var l=aW(i.cssNodes,i.cssAnims,{newline:!0});if(l){var u=tW(`style`,`stl`,{},[],l);a.push(u)}}return sW(n,r,a,e.useViewBox)},e.prototype.renderToString=function(e){return e||={},iW(this.renderToVNode({animation:Y(e.cssAnimation,!0),emphasis:Y(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:Y(e.useViewBox,!0)}),{newline:!0})},e.prototype.setBackgroundColor=function(e){this._backgroundColor=e},e.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},e.prototype._paintList=function(e,t,n){for(var r=e.length,i=[],a=0,o,s,c=0,l=0;l=0&&!(d&&s&&d[m]===s[m]);m--);for(var h=p-1;h>m;h--)a--,o=i[a-1];for(var g=m+1;g{if(!a.current)return;let e=$F(a.current,void 0,{renderer:`svg`});o.current=e,e.on(`click`,e=>s.current?.(e));let t=new ResizeObserver(()=>e.resize());return t.observe(a.current),()=>{t.disconnect(),e.dispose(),o.current=null}},[]),(0,L.useEffect)(()=>{o.current?.setOption({animationDuration:280,aria:{enabled:!0,decal:{show:!0},description:n},...e},{notMerge:!0})},[n,e]),(0,R.jsx)(`div`,{ref:a,className:i?`echart ${i}`:`echart`,style:{height:t,width:`100%`,minWidth:0},role:`img`,"aria-label":n})}function hG(e){return e===`healthy`?`ok`:e===`degraded`?`warn`:e===`unknown`?`gray`:`bad`}function gG(e){return we[e?`dark`:`light`]}function _G(e){let t=e?5:7;return{ok:je[t],warn:Me[t],bad:Oe[t],info:ke[t]}}function vG(e,t){let n=be[t?`dark`:`light`],r=0;for(let t of e)r=r*31+t.charCodeAt(0)|0;return n[Math.abs(r)%n.length]}function yG(e){return e===`unhealthy`?`diamond`:e===`degraded`?`roundRect`:`circle`}function bG(e){return e===`unknown`?`dashed`:`solid`}function xG(e){return e===`unhealthy`?1.25:e===`degraded`?.91:1}function SG(e){let t=String(e).toUpperCase();return t===`ERROR`||t===`FATAL`?`bad`:t===`WARN`||t===`WARNING`?`warn`:t===`INFO`?`info`:`gray`}function CG(e,t){let n=_G(t),r=String(e).toUpperCase();return r===`ERROR`||r===`FATAL`?n.bad:r===`WARN`||r===`WARNING`?n.warn:r===`INFO`?n.info:gG(t).muted}function wG({label:e,value:t,color:n,hint:r,children:i}){return(0,R.jsxs)(ce,{withBorder:!0,radius:`md`,p:`sm`,bg:`var(--mantine-color-default)`,miw:0,h:`100%`,children:[(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e}),(0,R.jsx)(y,{fw:600,fz:`xl`,c:n,mt:2,lh:1.2,truncate:!0,children:t}),r&&(0,R.jsx)(y,{c:`dimmed`,size:`xs`,mt:2,truncate:!0,children:r}),i&&(0,R.jsx)(se,{mt:4,children:i})]})}var TG={unhealthy:`◆`,degraded:`■`,healthy:`●`,unknown:`○`},EG={unhealthy:`unhealthy`,degraded:`degraded`,healthy:`healthy`,unknown:`health unknown`};function DG({health:e,label:t}){return(0,R.jsxs)(_e,{color:hG(e),variant:`light`,tt:`none`,style:{minWidth:`max-content`},leftSection:(0,R.jsx)(se,{component:`span`,"aria-hidden":!0,style:{fontSize:Ee.micro,lineHeight:1},children:TG[e]??TG.unknown}),children:[t,(0,R.jsxs)(Ge,{children:[` — `,EG[e]??EG.unknown]})]})}function OG({text:e}){return(0,R.jsxs)(A,{py:`xl`,children:[(0,R.jsx)(Fn,{size:20}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`xs`,children:e})]})}function kG({retry:e}){return(0,R.jsxs)(A,{py:`xl`,style:{flexDirection:`column`,gap:8},children:[(0,R.jsxs)(se,{display:`flex`,style:{alignItems:`center`,gap:8},children:[(0,R.jsx)(ot,{size:20,weight:`fill`,color:`var(--mantine-color-bad-filled)`}),(0,R.jsx)(y,{c:`bad`,fw:500,size:`sm`,children:`Couldn't load this view`})]}),(0,R.jsx)(ae,{size:`compact-xs`,variant:`light`,color:`bad`,onClick:e,children:`Retry now`}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:`Retrying automatically`})]})}yI([QE]);function AG({values:e,color:t,label:n,format:r}){let i=e.length?Math.max(...e):0,a=(0,L.useMemo)(()=>({animation:!1,grid:{left:0,right:0,top:2,bottom:2},xAxis:{type:`category`,show:!1,data:e.map((e,t)=>t)},yAxis:{type:`value`,show:!1,min:0},tooltip:{show:!1},aria:{enabled:!0,decal:{show:!1},description:n},series:[{type:`line`,data:e,showSymbol:!1,smooth:.3,lineStyle:{width:1.5,color:t},areaStyle:{opacity:.12,color:t}}]}),[e,t,n]);return(0,R.jsxs)(se,{children:[(0,R.jsx)(mG,{option:a,height:28,label:n}),i>0&&r&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ta:`right`,mt:2,children:[`peak `,r(i)]})]})}var jG={unhealthy:0,degraded:1,healthy:2};function MG({widget:e,filters:t,agentAvailable:n,onOpenChat:r}){let i=Se(`overview`,ve(t,e.config,[`service`]));if(i.isError)return(0,R.jsx)(kG,{retry:()=>void i.refetch()});let a=[...i.data?.data.services??[]].sort((e,t)=>(jG[e.health]??3)-(jG[t.health]??3)||t.error_rate-e.error_rate);if(i.data&&a.length===0)return(0,R.jsx)(OG,{text:`No recent activity`});let o=e=>r(`Investigate the ${e} service. Explain its errors and latency.`);return(0,R.jsx)(ze,{type:`auto`,offsetScrollbars:!0,h:`100%`,children:(0,R.jsxs)(Qe,{verticalSpacing:`xs`,fz:`sm`,highlightOnHover:n,children:[(0,R.jsx)(Qe.Thead,{children:(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsx)(Qe.Th,{children:`Service`}),(0,R.jsx)(Qe.Th,{ta:`right`,children:`P95`}),(0,R.jsx)(Qe.Th,{ta:`right`,children:`Errors`})]})}),(0,R.jsx)(Qe.Tbody,{children:a.map(e=>(0,R.jsxs)(Qe.Tr,{...n&&{onClick:()=>o(e.service),onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),o(e.service))},tabIndex:0,role:`button`,"aria-label":`Investigate ${e.service}`,style:{cursor:`pointer`}},children:[(0,R.jsx)(Qe.Td,{children:(0,R.jsx)(DG,{health:e.health,label:e.service})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,c:Sa(e.p95_ms),children:it(e.p95_ms)})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,c:Ca(e.error_rate),children:$e(e.error_rate)})})]},e.service))})]})})}function NG({filters:e,agentAvailable:t,onOpenChat:n}){if(!t)return(0,R.jsx)(y,{c:`dimmed`,size:`sm`,children:`Configure an AI provider to enable this view. The rest of this dashboard remains available.`});let r=Ne(e.window),i=[`Summarize the last ${r}`,`What changed in the last ${r}?`,`Which service needs attention right now?`];return(0,R.jsx)(re,{gap:`xs`,align:`flex-start`,children:i.map(e=>(0,R.jsx)(ae,{variant:`default`,size:`xs`,radius:`xl`,leftSection:(0,R.jsx)(Fe,{size:13,weight:`fill`}),onClick:()=>n(e),children:e},e))})}var PG={overview:[`service`],topology:[`service`],performance:[`service`],logs:[`service`,`severity`,`search`],trace:[`trace_id`,`service`]};function FG(e){return Object.hasOwn(PG,e)?PG[e]:void 0}function IG(e){return(FG(e)?.length??0)>0}function LG({opened:e,widget:t,services:n,onClose:r,onSave:i}){let[a,o]=(0,L.useState)({service:``,severity:``,search:``,trace_id:``});(0,L.useEffect)(()=>{e&&o({service:xe(t.config,`service`),severity:xe(t.config,`severity`),search:xe(t.config,`search`),trace_id:xe(t.config,`trace_id`)})},[e,t.config]);let s=FG(t.type)??[],c=[...new Set([...n,a.service].filter(Boolean))];function l(){let e={...t.config??{}};for(let t of s){let n=a[t].trim();n?e[t]=n:delete e[t]}i(e),r()}return(0,R.jsx)(qe,{opened:e,onClose:r,title:`Configure ${t.title}`,centered:!0,children:(0,R.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),l()},children:(0,R.jsxs)(re,{children:[s.includes(`service`)&&(0,R.jsx)(gn,{label:`Service`,placeholder:`All services`,data:c,value:a.service||null,onChange:e=>o({...a,service:e??``}),clearable:!0,searchable:!0,"aria-label":`Service`}),s.includes(`severity`)&&(0,R.jsx)(gn,{label:`Severity`,placeholder:`All severities`,data:[`ERROR`,`WARN`,`INFO`,`DEBUG`],value:a.severity||null,onChange:e=>o({...a,severity:e??``}),clearable:!0,"aria-label":`Severity`}),s.includes(`search`)&&(0,R.jsx)(I,{label:`Search`,placeholder:`Text the log body must contain`,value:a.search,onChange:e=>o({...a,search:e.currentTarget.value}),"aria-label":`Search`}),s.includes(`trace_id`)&&(0,R.jsx)(I,{label:`Trace id`,placeholder:`Leave empty for the most relevant recent trace`,value:a.trace_id,onChange:e=>o({...a,trace_id:e.currentTarget.value}),ff:`monospace`,"aria-label":`Trace id`}),(0,R.jsxs)(w,{justify:`flex-end`,children:[(0,R.jsx)(ae,{variant:`default`,onClick:r,children:`Cancel`}),(0,R.jsx)(ae,{type:`submit`,children:`Save`})]})]})})})}yI([AA]);function RG({widget:e,filters:t,dark:n}){let r=Se(`logs`,ve(t,e.config,[`service`,`severity`,`search`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.buckets.length===0)return null;let e=gG(n),t=i.provenance.window,r=[...new Set(i.data.buckets.map(e=>e.time))],a=[...new Set(i.data.buckets.map(e=>e.severity))],o=new Map(i.data.buckets.map(e=>[`${e.time} ${e.severity}`,e.count]));return{color:a.map(e=>CG(e,n)),grid:{left:28,right:8,top:8,bottom:20},tooltip:{trigger:`axis`,axisPointer:{type:`shadow`},backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},xAxis:{type:`category`,data:r.map(e=>tt(e,t)),axisLabel:{color:e.muted,fontSize:Ee.micro,hideOverlap:!0},axisLine:{lineStyle:{color:e.border}}},yAxis:{type:`value`,minInterval:1,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Ee.micro}},series:a.map(e=>({name:e,type:`bar`,stack:`logs`,barMaxWidth:14,data:r.map(t=>o.get(`${t} ${e}`)??0),itemStyle:{borderRadius:[2,2,0,0]}}))}},[n,i]);if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});let o=(i?.data.entries??[]).slice(0,5);return i&&o.length===0?(0,R.jsx)(OG,{text:`No matching logs in this window`}):(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{h:72,children:(0,R.jsx)(mG,{option:a,height:72,label:`Log volume by severity`})}),(0,R.jsx)(ze,{type:`auto`,offsetScrollbars:!0,style:{flex:1},children:(0,R.jsx)(Qe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Qe.Tbody,{children:o.map((e,t)=>(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`xs`,ff:`monospace`,c:`dimmed`,title:et(e.time),children:i?tt(e.time,i.provenance.window,!0):e.time})}),(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(_e,{size:`xs`,color:SG(e.severity),variant:`light`,style:{minWidth:`max-content`},children:e.severity||`LOG`})}),(0,R.jsx)(Qe.Td,{style:{whiteSpace:`nowrap`},children:(0,R.jsx)(y,{component:`span`,size:`sm`,fw:600,children:e.service})}),(0,R.jsx)(Qe.Td,{style:{width:`100%`},children:(0,R.jsx)(y,{size:`sm`,lineClamp:1,title:e.body,children:e.body})})]},`${e.time}-${t}`))})})})]})}function zG({widget:e,filters:t,dark:n}){let r=ve(t,e.config,[`service`]),i=Se(`overview`,r),a=Se(`performance`,r);if(i.isError)return(0,R.jsx)(kG,{retry:()=>void i.refetch()});let o=i.data?.data,s=(a.data?.data.points??[]).map(e=>e.error_rate*100),c=Math.max(o?.service_count??0,1),l=_G(n),u=o?.health===`unknown`,d=o?u?`No data`:o.health.charAt(0).toUpperCase()+o.health.slice(1):`—`;return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(Tn,{cols:2,spacing:`sm`,children:[(0,R.jsx)(wG,{label:`Health`,value:d,color:o?hG(o.health):void 0,hint:o?u?`No telemetry in this window`:`${nt.format(o.service_count)} services`:void 0}),(0,R.jsx)(wG,{label:`Error rate`,value:o&&!u?$e(o.error_rate):`—`,color:o&&o.error_rate>=.01?`bad`:void 0,hint:o&&!u?`${nt.format(o.total_spans)} operations`:void 0,children:s.length>1&&(0,R.jsx)(AG,{values:s,color:l.bad,label:`Error rate trend`,format:e=>`${e.toFixed(2)}%`})})]}),o&&!u&&(0,R.jsxs)(se,{children:[(0,R.jsxs)(mn.Root,{size:`md`,"aria-label":`Service health distribution`,children:[(0,R.jsx)(mn.Section,{value:o.counts.healthy/c*100,color:`ok`}),(0,R.jsx)(mn.Section,{value:o.counts.degraded/c*100,color:`warn`}),(0,R.jsx)(mn.Section,{value:o.counts.unhealthy/c*100,color:`bad`})]}),(0,R.jsxs)(w,{mt:6,gap:`md`,children:[(0,R.jsx)(BG,{color:`ok`,text:`${o.counts.healthy} healthy`}),(0,R.jsx)(BG,{color:`warn`,text:`${o.counts.degraded} degraded`}),(0,R.jsx)(BG,{color:`bad`,text:`${o.counts.unhealthy} unhealthy`})]})]})]})}function BG({color:e,text:t}){return(0,R.jsxs)(w,{gap:6,children:[(0,R.jsx)(se,{w:8,h:8,bg:e,style:{borderRadius:`50%`}}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,children:t})]})}yI([QE]);function VG({widget:e,filters:t,dark:n}){let r=Se(`performance`,ve(t,e.config,[`service`])),i=r.data,a=(0,L.useMemo)(()=>{if(!i||i.data.points.length===0)return null;let e=gG(n),t=i.provenance.window;return{color:[vG(`operations`,n),_G(n).warn],grid:{left:36,right:40,top:24,bottom:22},legend:{top:0,left:0,textStyle:{color:e.muted,fontSize:Ee.micro},icon:`circle`,itemWidth:7,itemHeight:7},tooltip:{trigger:`axis`,backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},xAxis:{type:`category`,data:i.data.points.map(e=>tt(e.time,t)),boundaryGap:!1,axisLine:{lineStyle:{color:e.border}},axisTick:{show:!1},axisLabel:{color:e.muted,fontSize:Ee.micro,hideOverlap:!0}},yAxis:[{type:`value`,splitLine:{lineStyle:{color:e.grid}},axisLabel:{color:e.muted,fontSize:Ee.micro}},{type:`value`,splitLine:{show:!1},axisLabel:{color:e.muted,fontSize:Ee.micro,formatter:e=>it(e)}}],series:[{name:`Operations`,type:`line`,data:i.data.points.map(e=>e.spans),smooth:.22,showSymbol:!1,lineStyle:{width:2},areaStyle:{opacity:.05}},{name:`P95`,type:`line`,yAxisIndex:1,data:i.data.points.map(e=>e.p95_ms),smooth:.22,showSymbol:!1,lineStyle:{width:2}}]}},[n,i]);if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});if(i&&i.data.points.length===0)return(0,R.jsx)(OG,{text:`No endpoint activity in this window`});let o=(i?.data.endpoints??[]).slice(0,3);return(0,R.jsxs)(re,{gap:`xs`,h:`100%`,children:[a&&(0,R.jsx)(se,{style:{flex:1,minHeight:120},children:(0,R.jsx)(mG,{option:a,height:`100%`,label:`Operations and P95 latency`})}),o.length>0&&(0,R.jsx)(Qe,{verticalSpacing:4,fz:`sm`,children:(0,R.jsx)(Qe.Tbody,{children:o.map(e=>(0,R.jsxs)(Qe.Tr,{children:[(0,R.jsxs)(Qe.Td,{children:[(0,R.jsx)(_e,{variant:`light`,size:`xs`,mr:6,style:{minWidth:`max-content`},children:e.method}),(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:e.path})]}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsxs)(y,{component:`span`,size:`sm`,c:`dimmed`,children:[nt.format(e.calls),` calls`]})}),(0,R.jsx)(Qe.Td,{ta:`right`,children:(0,R.jsx)(y,{component:`span`,size:`sm`,ff:`monospace`,children:it(e.p95_ms)})})]},`${e.method}-${e.path}`))})})]})}yI([jB]);function HG({widget:e,filters:t,dark:n,onOpenChat:r}){let i=ve(t,e.config,[`service`]),a=Se(`topology`,i),o=a.data?.data,s=(0,L.useMemo)(()=>{if(!o)return null;let e=gG(n),t=_G(n),r=n=>n===`unhealthy`?t.bad:n===`degraded`?t.warn:n===`unknown`?e.muted:t.ok,i=[...o.nodes].sort((e,t)=>e.service.localeCompare(t.service));return{tooltip:{backgroundColor:e.surface,borderColor:e.border,textStyle:{color:e.text,fontSize:Ee.micro}},series:[{type:`graph`,layout:`circular`,circular:{rotateLabel:!1},roam:!1,draggable:!1,label:{show:!0,position:`bottom`,color:e.text,fontSize:Ee.micro},edgeSymbol:[`none`,`arrow`],edgeSymbolSize:6,data:i.map(t=>({id:t.service,name:t.service,value:t.spans,symbol:yG(t.health),symbolSize:xG(t.health)*Math.min(34,18+Math.log10(Math.max(t.spans,1))*4),itemStyle:{color:e.surface,borderColor:r(t.health),borderWidth:3,borderType:bG(t.health)}})),links:o.edges.map(n=>{let r=n.error_rate>=.05;return{source:n.caller,target:n.callee,value:n.calls,lineStyle:{width:r?3.5:Math.min(3,1+Math.log10(Math.max(n.calls,1))),color:r?t.bad:e.muted,opacity:r?.95:.35,curveness:.08}}}),emphasis:{focus:`adjacency`}}]}},[n,o]);return a.isError?(0,R.jsx)(kG,{retry:()=>void a.refetch()}):o&&o.nodes.length===0?(0,R.jsx)(OG,{text:`No service relationships in this window`}):(0,R.jsxs)(re,{gap:4,h:`100%`,children:[s&&(0,R.jsx)(mG,{option:s,height:`100%`,className:`widget-chart`,label:`Service dependency graph`,onClick:e=>{let t=e;t.dataType===`node`&&t.data?.id&&r(`Investigate the ${t.data.id} service. Explain its errors and latency.`)}}),o&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,children:[o.nodes.length,` services · `,o.edges.length,` `,o.edges.length===1?`route`:`routes`]})]})}function UG(e){return e.length>12?`${e.slice(0,8)}…${e.slice(-4)}`:e}function WG({widget:e,filters:t,dark:n}){let r=Se(`trace`,ve(t,e.config,[`trace_id`,`service`]));if(r.isError)return(0,R.jsx)(kG,{retry:()=>void r.refetch()});let i=r.data?.data;if(i&&i.spans.length===0)return(0,R.jsx)(OG,{text:`No traces in this window`});let a=[...i?.spans??[]].sort((e,t)=>t.duration_ms-e.duration_ms).slice(0,6);return(0,R.jsxs)(re,{gap:`sm`,children:[(0,R.jsxs)(Tn,{cols:{base:2,sm:4},spacing:`sm`,children:[(0,R.jsx)(wG,{label:`Duration`,value:i?it(i.duration_ms):`—`}),(0,R.jsx)(wG,{label:`Spans`,value:i?nt.format(i.spans.length):`—`}),(0,R.jsx)(wG,{label:`Services`,value:i?nt.format(i.services.length):`—`}),(0,R.jsx)(wG,{label:`Status`,value:i?i.has_error?`Error`:`OK`:`—`,color:i?i.has_error?`bad`:`ok`:void 0})]}),a.length>0&&(0,R.jsx)(GG,{spans:a,dark:n}),i&&(0,R.jsxs)(w,{gap:4,children:[(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,ff:`monospace`,children:[`Trace `,UG(i.trace_id)]}),(0,R.jsx)(KG,{value:i.trace_id})]})]})}function GG({spans:e,dark:t}){let n=Math.min(...e.map(e=>new Date(e.start).valueOf())),r=Math.max(...e.map(e=>new Date(e.start).valueOf()+e.duration_ms)),i=Math.max(r-n,1);return(0,R.jsx)(re,{gap:4,children:e.map(e=>{let r=(new Date(e.start).valueOf()-n)/i*100,a=Math.max(e.duration_ms/i*100,.6),o=e.status.toUpperCase().includes(`ERROR`);return(0,R.jsxs)(w,{gap:`sm`,wrap:`nowrap`,children:[(0,R.jsxs)(se,{w:170,miw:0,children:[(0,R.jsx)(y,{size:`xs`,fw:600,truncate:!0,children:e.operation}),(0,R.jsx)(y,{c:`dimmed`,size:`xs`,truncate:!0,children:e.service})]}),(0,R.jsx)(Be,{label:`${e.service} · ${e.operation} · ${it(e.duration_ms)}`,withArrow:!0,children:(0,R.jsx)(se,{pos:`relative`,h:10,flex:1,bg:`var(--mantine-color-default-hover)`,style:{borderRadius:`var(--mantine-radius-sm)`},children:(0,R.jsx)(se,{pos:`absolute`,left:`${r}%`,w:`${Math.min(a,100-r)}%`,h:`100%`,bg:o?`bad`:vG(e.service,t),style:{borderRadius:`var(--mantine-radius-sm)`,minWidth:3}})})}),(0,R.jsx)(y,{size:`xs`,ff:`monospace`,w:56,ta:`right`,children:it(e.duration_ms)})]},e.span_id)})})}function KG({value:e}){let{state:t,copy:n}=rt();return(0,R.jsx)(Be,{label:t===`failed`?`Could not copy`:t===`copied`?`Copied`:`Copy trace id`,children:(0,R.jsx)(Xe,{variant:`subtle`,color:`gray`,size:`xs`,"aria-label":`Copy trace id`,"data-state":t===`idle`?void 0:t,onClick:()=>n(e),children:t===`copied`?(0,R.jsx)(E,{size:12,weight:`bold`}):(0,R.jsx)(ne,{size:12})})})}var qG={overview:`System health`,topology:`Service map`,activity:`Recent activity`,assistant:`Ask Fanout`,performance:`Performance`,trace:`Trace focus`,logs:`Logs`},JG={overview:zG,topology:HG,activity:MG,assistant:NG,performance:VG,trace:WG,logs:RG};function YG(){return(0,R.jsx)(OG,{text:`This view type is not supported by this version`})}function XG(e){return Object.hasOwn(JG,e)?JG[e]:YG}function ZG(e){let{widget:t,services:n,onRemove:r,onConfigure:i}=e,[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),d=XG(t.type);return(0,R.jsxs)(ce,{withBorder:!0,radius:`lg`,p:`md`,h:`100%`,className:`widget-card`,style:{overflow:`hidden`},children:[(0,R.jsxs)(re,{h:`100%`,gap:`sm`,children:[(0,R.jsxs)(w,{justify:`space-between`,align:`center`,wrap:`nowrap`,className:`widget-drag`,style:{cursor:`grab`},children:[(0,R.jsx)(P,{order:2,fz:`md`,fw:500,lineClamp:1,miw:0,children:t.title}),(0,R.jsxs)(Pe,{position:`bottom-end`,withinPortal:!0,opened:a,onChange:o,children:[(0,R.jsx)(Pe.Target,{children:(0,R.jsx)(Xe,{className:`widget-actions`,"data-open":a||void 0,variant:`subtle`,color:`gray`,size:`sm`,"aria-label":`Actions for ${t.title}`,children:(0,R.jsx)(de,{size:18,weight:`bold`})})}),(0,R.jsxs)(Pe.Dropdown,{children:[IG(t.type)&&(0,R.jsx)(Pe.Item,{leftSection:(0,R.jsx)(Ln,{size:15}),onClick:()=>c(!0),children:`Configure`}),(0,R.jsx)(Pe.Item,{color:`bad`,leftSection:(0,R.jsx)(ye,{size:15}),onClick:()=>u(!0),children:`Remove`})]})]})]}),(0,R.jsx)(`div`,{className:`widget-body`,children:(0,R.jsx)(d,{...e})})]}),(0,R.jsx)(LG,{opened:s,widget:t,services:n,onClose:()=>c(!1),onSave:i}),(0,R.jsx)(qe,{opened:l,onClose:()=>u(!1),title:`Remove ${t.title}?`,centered:!0,radius:`md`,children:(0,R.jsxs)(re,{gap:`md`,children:[(0,R.jsx)(y,{size:`sm`,c:`dimmed`,children:`This takes the card off the dashboard for everyone who opens it. You can add it again from Add view, but its size and settings are not kept.`}),(0,R.jsxs)(w,{justify:`flex-end`,gap:`sm`,children:[(0,R.jsx)(ae,{variant:`default`,size:`sm`,onClick:()=>u(!1),children:`Cancel`}),(0,R.jsx)(ae,{color:`bad`,size:`sm`,onClick:()=>{u(!1),r()},children:`Remove`})]})]})})]})}var QG=ha(pa),$G=`fanout.dashboard-id`,eK={layout:[],widgets:[],filters:{window:`1h`,namespace:``}};function tK(e){return Object.hasOwn(ya,e)?ya[e]:void 0}function nK({dashboardID:e=``,agentAvailable:t,onOpenChat:n,onDashboardChange:r,urlFilters:i,onFiltersChange:a}){let o=We(),s=Ue(`light`)===`dark`,c=Ke({queryKey:Ye,queryFn:()=>Je(`/api/dashboards`),refetchInterval:3e4,staleTime:De}),[l,u]=(0,L.useState)(()=>e||localStorage.getItem($G)||``),d=at({mutationFn:async e=>{if(!f.data)throw Error(`No dashboard selected`);let t=await F(`/api/dashboards/${encodeURIComponent(f.data.id)}`,{method:`PUT`,headers:{"content-type":`application/json`},body:JSON.stringify({name:f.data.name,description:f.data.description,state:e})});if(!t.ok)throw Error(`Unable to save dashboard`);return t.json()},scope:{id:`dashboard-${l}`},onSuccess:e=>{o.setQueryData([`dashboard`,e.id],e),o.invalidateQueries({queryKey:Ye})},onError:e=>console.error(`Dashboard save failed`,e)}),f=Ke({queryKey:[`dashboard`,l],queryFn:()=>Je(`/api/dashboards/${encodeURIComponent(l)}`),enabled:!!l,refetchInterval:d.isPending||d.isError?!1:3e4,staleTime:De}),[p,m]=(0,L.useState)(eK),[h,g]=(0,L.useState)(`lg`),[_,v]=(0,L.useState)(null),b=(0,L.useMemo)(()=>({window:Ae.some(e=>e.value===i?.window)?i.window:p.filters.window,namespace:i?.namespace??p.filters.namespace}),[i?.window,i?.namespace,p.filters.window,p.filters.namespace]),x=Se(`overview`,ve(b),!!f.data),C=(0,L.useMemo)(()=>(x.data?.data.services??[]).map(e=>e.service),[x.data]),T=Ce();(0,L.useEffect)(()=>{e&&e!==l&&(u(e),localStorage.setItem($G,e))},[e,l]),(0,L.useEffect)(()=>{let t=c.data?.dashboards;if(t?.length&&!(e&&t.some(t=>t.id===e))&&!e){if(l&&t.some(e=>e.id===l)){r?.(l,!0);return}D((t.find(e=>e.is_default)??t[0]).id,!0)}},[e,c.data,l]),(0,L.useEffect)(()=>{d.isPending||d.isError||f.data?.state&&m(f.data.state)},[f.data?.updated_at,d.isPending,d.isError]),(0,L.useEffect)(()=>{d.reset()},[l]);let E=(0,L.useMemo)(()=>{let e=new Map(p.widgets.map(e=>[e.id,e.type])),t=p.layout.map(t=>{let n=tK(e.get(t.i)??`overview`)??ya.overview;return{...t,h:Math.max(t.h,n.minH),minW:Math.max(t.minW??0,n.minW),minH:Math.max(t.minH??0,n.minH)}});return{lg:t,md:t,sm:_a(t,6),xs:_a(t,2),xxs:_a(t,1)}},[p.layout,p.widgets]);function D(e,t=!1){u(e),localStorage.setItem($G,e),r?.(e,t)}function O(e){m(e),d.mutate(e)}function k(e){let t=Ie(),n=ya[e],r=xa(p.layout,n.w,n.h,12,n.minW);O({...p,widgets:[...p.widgets,{id:t,type:e,title:qG[e],enabled:!0}],layout:[...p.layout,{i:t,x:r.x,y:r.y,w:r.w,h:n.h,minW:n.minW,minH:n.minH}]})}function A(e){O({...p,filters:e}),a?.(e)}function j(e){O({...p,widgets:p.widgets.filter(t=>t.id!==e),layout:p.layout.filter(t=>t.i!==e)})}function M(e,t){O({...p,widgets:p.widgets.map(n=>n.id===e?{...n,config:t}:n)})}if(c.isLoading||l&&f.isLoading)return(0,R.jsx)(rK,{label:`Loading your dashboard…`});let N=c.data?.dashboards??[];if(e&&N.length>0&&!N.some(t=>t.id===e))return(0,R.jsx)(iK,{onOpenDefault:()=>D((N.find(e=>e.is_default)??N[0]).id,!0)});if(c.isError||f.isError)return(0,R.jsx)(rK,{label:`Your dashboard is unavailable. Try refreshing.`});let ee=f.data;return ee?(0,R.jsxs)(se,{component:`main`,maw:1440,mx:`auto`,px:{base:`md`,sm:`xl`},pt:{base:`lg`,sm:`xl`},pb:`xl`,children:[(0,R.jsxs)(re,{gap:`md`,mb:`lg`,children:[(0,R.jsxs)(se,{children:[(0,R.jsx)(P,{order:1,fz:32,lts:`-0.03em`,children:ee.name}),(0,R.jsx)(y,{c:`dimmed`,mt:2,children:ee.description||`A focused view of the signals that matter now.`})]}),(0,R.jsxs)(ht,{align:{base:`stretch`,md:`center`},justify:`space-between`,direction:{base:`column`,md:`row`},gap:`sm`,role:`group`,"aria-label":`Dashboard controls`,children:[(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,children:[(0,R.jsx)(gn,{"aria-label":`Window`,value:b.window,onChange:e=>e&&A({...b,window:e}),data:Ae,w:{base:`100%`,xs:150},size:`sm`}),(0,R.jsx)(I,{"aria-label":`Namespace`,value:_??b.namespace,onChange:e=>v(e.currentTarget.value),onBlur:e=>{v(null),A({...b,namespace:e.currentTarget.value.trim()})},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},placeholder:`All namespaces`,w:{base:`100%`,xs:200},size:`sm`})]}),(0,R.jsxs)(w,{gap:`sm`,wrap:`wrap`,justify:`flex-end`,children:[T&&(0,R.jsxs)(y,{c:`dimmed`,size:`xs`,title:et(T),children:[`Updated `,new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(new Date(T)),` `,Ze(T)]}),(0,R.jsxs)(Pe,{shadow:`md`,position:`bottom-end`,withinPortal:!0,children:[(0,R.jsx)(Pe.Target,{children:(0,R.jsx)(ae,{variant:`default`,size:`sm`,leftSection:(0,R.jsx)(ge,{size:15,weight:`bold`}),rightSection:(0,R.jsx)(Nn,{size:13,weight:`bold`}),children:`Add view`})}),(0,R.jsx)(Pe.Dropdown,{children:va.filter(e=>t||e!==`assistant`).map(e=>(0,R.jsx)(Pe.Item,{onClick:()=>k(e),children:qG[e]},e))})]}),t&&(0,R.jsx)(ae,{variant:`subtle`,color:`gray`,size:`sm`,rightSection:(0,R.jsx)(jn,{size:15,weight:`bold`}),onClick:()=>n(),children:`Ask Fanout`})]})]})]}),d.isError&&(0,R.jsx)(S,{color:`bad`,radius:`lg`,mb:`lg`,icon:(0,R.jsx)(ot,{size:18,weight:`fill`}),title:`Dashboard changes not saved`,children:(0,R.jsxs)(w,{justify:`space-between`,gap:`sm`,children:[(0,R.jsx)(y,{size:`sm`,children:`Your latest edits are kept on this screen but Fanout could not store them.`}),(0,R.jsx)(ae,{size:`compact-sm`,color:`bad`,variant:`light`,onClick:()=>d.mutate(p),children:`Retry save`})]})}),(0,R.jsx)(QG,{className:`dashboard-grid`,layouts:E,breakpoints:{lg:1100,md:800,sm:600,xs:420,xxs:0},cols:{lg:12,md:10,sm:6,xs:2,xxs:1},rowHeight:76,margin:[16,16],containerPadding:[0,0],compactType:`vertical`,draggableHandle:`.widget-drag`,draggableCancel:`button,input,select,textarea,a,label,[role=menu],[role=dialog],.widget-actions`,onBreakpointChange:g,onDragStop:e=>{h===`lg`&&O({...p,layout:[...e]})},onResizeStop:e=>{h===`lg`&&O({...p,layout:[...e]})},children:p.widgets.map(e=>(0,R.jsx)(`div`,{children:(0,R.jsx)(ZG,{widget:e,filters:b,dark:s,services:C,agentAvailable:t,onOpenChat:n,onRemove:()=>j(e.id),onConfigure:t=>M(e.id,t)})},e.id))})]}):(0,R.jsx)(rK,{label:`Preparing your dashboard…`})}function rK({label:e}){return(0,R.jsxs)(A,{mih:`50vh`,children:[(0,R.jsx)(m,{size:`sm`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ml:`sm`,children:e})]})}function iK({onOpenDefault:e}){return(0,R.jsx)(A,{mih:`50vh`,children:(0,R.jsxs)(re,{align:`center`,gap:`xs`,children:[(0,R.jsx)(P,{order:1,fz:24,lts:`-0.02em`,children:`This dashboard isn't here`}),(0,R.jsx)(y,{c:`dimmed`,size:`sm`,ta:`center`,children:`The link may be out of date, or the dashboard may have been renamed or deleted.`}),(0,R.jsx)(ae,{mt:`sm`,variant:`default`,size:`sm`,onClick:e,children:`Open your default dashboard`})]})})}export{nK as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards._dashboardId-BS6OaA2t.js b/internal/ui/dist/assets/dashboards._dashboardId-CMjPkGKO.js similarity index 81% rename from internal/ui/dist/assets/dashboards._dashboardId-BS6OaA2t.js rename to internal/ui/dist/assets/dashboards._dashboardId-CMjPkGKO.js index fd56079f3..efdb8d83a 100644 --- a/internal/ui/dist/assets/dashboards._dashboardId-BS6OaA2t.js +++ b/internal/ui/dist/assets/dashboards._dashboardId-CMjPkGKO.js @@ -1 +1 @@ -import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-BeUORN-q.js";import{t as n}from"./dashboard-7dM548yK.js";import{a as r}from"./preload-helper-BL3qEkUh.js";import{t as i}from"./index-BLac8tJW.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file +import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-BeUORN-q.js";import{t as n}from"./dashboard-BfR0ACHf.js";import{a as r}from"./preload-helper-BL3qEkUh.js";import{t as i}from"./index-C8q_YUYV.js";var a=e();function o(){let{dashboardId:e}=i.useParams(),o=i.useSearch(),s=t(),{agentAvailable:c,openChat:l}=r();return(0,a.jsx)(n,{dashboardID:e,agentAvailable:c,onOpenChat:l,onDashboardChange:(e,t)=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:o,replace:t}),urlFilters:o,onFiltersChange:t=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e},search:{window:t.window,namespace:t.namespace||void 0},replace:!0})})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/dashboards.index-C3Dkh40b.js b/internal/ui/dist/assets/dashboards.index-Bm8hpWIl.js similarity index 73% rename from internal/ui/dist/assets/dashboards.index-C3Dkh40b.js rename to internal/ui/dist/assets/dashboards.index-Bm8hpWIl.js index 59f51a403..f91cd1015 100644 --- a/internal/ui/dist/assets/dashboards.index-C3Dkh40b.js +++ b/internal/ui/dist/assets/dashboards.index-Bm8hpWIl.js @@ -1 +1 @@ -import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-BeUORN-q.js";import{t as n}from"./dashboard-7dM548yK.js";import{a as r}from"./preload-helper-BL3qEkUh.js";import{n as i}from"./index-BLac8tJW.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file +import{mt as e}from"./brand-MzZ03bSa.js";import{u as t}from"./auth-BeUORN-q.js";import{t as n}from"./dashboard-BfR0ACHf.js";import{a as r}from"./preload-helper-BL3qEkUh.js";import{n as i}from"./index-C8q_YUYV.js";var a=e();function o(){let e=i.useSearch(),o=t(),{agentAvailable:s,openChat:c}=r();return(0,a.jsx)(n,{agentAvailable:s,onOpenChat:c,onDashboardChange:t=>void o({to:`/dashboards/$dashboardId`,params:{dashboardId:t},search:e,replace:!0}),urlFilters:e})}export{o as component}; \ No newline at end of file diff --git a/internal/ui/dist/assets/copy-Bzg2uCpz.js b/internal/ui/dist/assets/format-urrStEsn.js similarity index 75% rename from internal/ui/dist/assets/copy-Bzg2uCpz.js rename to internal/ui/dist/assets/format-urrStEsn.js index 65a80b097..4a04307b2 100644 --- a/internal/ui/dist/assets/copy-Bzg2uCpz.js +++ b/internal/ui/dist/assets/format-urrStEsn.js @@ -1 +1 @@ -import{C as e,K as t,St as n,X as r,ct as i,dt as a,gt as o,j as s,k as c,mt as l,x as u}from"./brand-MzZ03bSa.js";import{o as d,w as f}from"./Tooltip-BJiO7C_G.js";var[p,m]=f(`Table component was not found in the tree`),h={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`},g=l();function _(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function v(t,n){let r=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,i=e(e=>{let i=s(r,{},e),{classNames:a,className:o,style:c,styles:l,...d}=i,f=m();return(0,g.jsx)(u,{component:t,..._(f,n),...f.getStyles(t,{className:o,classNames:a,style:c,styles:l,props:i}),...d})});return i.displayName=`@mantine/core/${r}`,i.classes=h,i}var y=v(`th`,{columnBorder:!0}),b=v(`td`,{columnBorder:!0}),x=v(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),S=v(`thead`,{stickyHeader:!0}),C=v(`tbody`),w=v(`tfoot`),T=v(`caption`,{captionSide:!0}),E={type:`scrollarea`},D=r((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":a(t),"--table-max-height":a(n),"--table-overflow":r===`native`?`auto`:void 0}})),O=e(e=>{let t=s(`TableScrollContainer`,E,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,children:f,minWidth:p,maxHeight:m,type:_,scrollAreaProps:v,attributes:y,...b}=t,x=c({name:`TableScrollContainer`,classes:h,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:D,rootSelector:`scrollContainer`});return(0,g.jsx)(u,{component:_===`scrollarea`?d:`div`,..._===`scrollarea`?m?{offsetScrollbars:`xy`,...v}:{offsetScrollbars:`x`,...v}:{},...x(`scrollContainer`),...b,children:(0,g.jsx)(`div`,{...x(`scrollContainerInner`),children:f})})});O.classes=h,O.varsResolver=D,O.displayName=`@mantine/core/TableScrollContainer`;function k({data:e}){return(0,g.jsxs)(g.Fragment,{children:[e.caption&&(0,g.jsx)(T,{children:e.caption}),e.head&&(0,g.jsx)(S,{children:(0,g.jsx)(x,{children:e.head.map((e,t)=>(0,g.jsx)(y,{children:e},t))})}),e.body&&(0,g.jsx)(C,{children:e.body.map((e,t)=>(0,g.jsx)(x,{children:e.map((e,t)=>(0,g.jsx)(b,{children:e},t))},t))}),e.foot&&(0,g.jsx)(w,{children:(0,g.jsx)(x,{children:e.foot.map((e,t)=>(0,g.jsx)(y,{children:e},t))})})]})}k.displayName=`@mantine/core/TableDataRenderer`;var A={withRowBorders:!0,verticalSpacing:7},j=r((e,{layout:n,captionSide:r,horizontalSpacing:o,verticalSpacing:s,borderColor:c,stripedColor:l,highlightOnHoverColor:u,striped:d,highlightOnHover:f,stickyHeaderOffset:p,stickyHeader:m})=>({table:{"--table-layout":n,"--table-caption-side":r,"--table-horizontal-spacing":i(o),"--table-vertical-spacing":i(s),"--table-border-color":c?t(c,e):void 0,"--table-striped-color":d&&l?t(l,e):void 0,"--table-highlight-on-hover-color":f&&u?t(u,e):void 0,"--table-sticky-header-offset":m?a(p):void 0}})),M=e(e=>{let t=s(`Table`,A,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,horizontalSpacing:d,verticalSpacing:f,captionSide:m,stripedColor:_,highlightOnHoverColor:v,striped:y,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,withTableBorder:C,borderColor:w,layout:T,data:E,children:D,stickyHeader:O,stickyHeaderOffset:M,mod:N,tabularNums:P,attributes:F,...I}=t,L=c({name:`Table`,props:t,className:r,style:i,classes:h,classNames:n,styles:a,unstyled:o,attributes:F,rootSelector:`table`,vars:l,varsResolver:j});return(0,g.jsx)(p,{value:{getStyles:L,stickyHeader:O,striped:y===!0?`odd`:y||void 0,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,captionSide:m||`bottom`},children:(0,g.jsx)(u,{component:`table`,mod:[{"data-with-table-border":C,"data-tabular-nums":P},N],...L(`table`),...I,children:D||!!E&&(0,g.jsx)(k,{data:E})})})});M.classes=h,M.varsResolver=j,M.displayName=`@mantine/core/Table`,M.Td=b,M.Th=y,M.Tr=x,M.Thead=S,M.Tbody=C,M.Tfoot=w,M.Caption=T,M.ScrollContainer=O,M.DataRenderer=k;var N=n(o(),1);function P(e=1500){let[t,n]=(0,N.useState)(`idle`),r=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}export{M as n,P as t}; \ No newline at end of file +import{C as e,K as t,St as n,X as r,ct as i,dt as a,gt as o,j as s,k as c,mt as l,x as u}from"./brand-MzZ03bSa.js";import{o as d,w as f}from"./Tooltip-BJiO7C_G.js";var[p,m]=f(`Table component was not found in the tree`),h={table:`m_b23fa0ef`,th:`m_4e7aa4f3`,tr:`m_4e7aa4fd`,td:`m_4e7aa4ef`,tbody:`m_b2404537`,thead:`m_b242d975`,caption:`m_9e5a3ac7`,scrollContainer:`m_a100c15`,scrollContainerInner:`m_62259741`},g=l();function _(e,t){if(!t)return;let n={};return t.columnBorder&&e.withColumnBorders&&(n[`data-with-column-border`]=!0),t.rowBorder&&e.withRowBorders&&(n[`data-with-row-border`]=!0),t.striped&&e.striped&&(n[`data-striped`]=e.striped),t.highlightOnHover&&e.highlightOnHover&&(n[`data-hover`]=!0),t.captionSide&&e.captionSide&&(n[`data-side`]=e.captionSide),t.stickyHeader&&e.stickyHeader&&(n[`data-sticky`]=!0),n}function v(t,n){let r=`Table${t.charAt(0).toUpperCase()}${t.slice(1)}`,i=e(e=>{let i=s(r,{},e),{classNames:a,className:o,style:c,styles:l,...d}=i,f=m();return(0,g.jsx)(u,{component:t,..._(f,n),...f.getStyles(t,{className:o,classNames:a,style:c,styles:l,props:i}),...d})});return i.displayName=`@mantine/core/${r}`,i.classes=h,i}var y=v(`th`,{columnBorder:!0}),b=v(`td`,{columnBorder:!0}),x=v(`tr`,{rowBorder:!0,striped:!0,highlightOnHover:!0}),S=v(`thead`,{stickyHeader:!0}),C=v(`tbody`),w=v(`tfoot`),T=v(`caption`,{captionSide:!0}),E={type:`scrollarea`},D=r((e,{minWidth:t,maxHeight:n,type:r})=>({scrollContainer:{"--table-min-width":a(t),"--table-max-height":a(n),"--table-overflow":r===`native`?`auto`:void 0}})),O=e(e=>{let t=s(`TableScrollContainer`,E,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,children:f,minWidth:p,maxHeight:m,type:_,scrollAreaProps:v,attributes:y,...b}=t,x=c({name:`TableScrollContainer`,classes:h,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:l,varsResolver:D,rootSelector:`scrollContainer`});return(0,g.jsx)(u,{component:_===`scrollarea`?d:`div`,..._===`scrollarea`?m?{offsetScrollbars:`xy`,...v}:{offsetScrollbars:`x`,...v}:{},...x(`scrollContainer`),...b,children:(0,g.jsx)(`div`,{...x(`scrollContainerInner`),children:f})})});O.classes=h,O.varsResolver=D,O.displayName=`@mantine/core/TableScrollContainer`;function k({data:e}){return(0,g.jsxs)(g.Fragment,{children:[e.caption&&(0,g.jsx)(T,{children:e.caption}),e.head&&(0,g.jsx)(S,{children:(0,g.jsx)(x,{children:e.head.map((e,t)=>(0,g.jsx)(y,{children:e},t))})}),e.body&&(0,g.jsx)(C,{children:e.body.map((e,t)=>(0,g.jsx)(x,{children:e.map((e,t)=>(0,g.jsx)(b,{children:e},t))},t))}),e.foot&&(0,g.jsx)(w,{children:(0,g.jsx)(x,{children:e.foot.map((e,t)=>(0,g.jsx)(y,{children:e},t))})})]})}k.displayName=`@mantine/core/TableDataRenderer`;var A={withRowBorders:!0,verticalSpacing:7},j=r((e,{layout:n,captionSide:r,horizontalSpacing:o,verticalSpacing:s,borderColor:c,stripedColor:l,highlightOnHoverColor:u,striped:d,highlightOnHover:f,stickyHeaderOffset:p,stickyHeader:m})=>({table:{"--table-layout":n,"--table-caption-side":r,"--table-horizontal-spacing":i(o),"--table-vertical-spacing":i(s),"--table-border-color":c?t(c,e):void 0,"--table-striped-color":d&&l?t(l,e):void 0,"--table-highlight-on-hover-color":f&&u?t(u,e):void 0,"--table-sticky-header-offset":m?a(p):void 0}})),M=e(e=>{let t=s(`Table`,A,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:l,horizontalSpacing:d,verticalSpacing:f,captionSide:m,stripedColor:_,highlightOnHoverColor:v,striped:y,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,withTableBorder:C,borderColor:w,layout:T,data:E,children:D,stickyHeader:O,stickyHeaderOffset:M,mod:N,tabularNums:P,attributes:F,...I}=t,L=c({name:`Table`,props:t,className:r,style:i,classes:h,classNames:n,styles:a,unstyled:o,attributes:F,rootSelector:`table`,vars:l,varsResolver:j});return(0,g.jsx)(p,{value:{getStyles:L,stickyHeader:O,striped:y===!0?`odd`:y||void 0,highlightOnHover:b,withColumnBorders:x,withRowBorders:S,captionSide:m||`bottom`},children:(0,g.jsx)(u,{component:`table`,mod:[{"data-with-table-border":C,"data-tabular-nums":P},N],...L(`table`),...I,children:D||!!E&&(0,g.jsx)(k,{data:E})})})});M.classes=h,M.varsResolver=j,M.displayName=`@mantine/core/Table`,M.Td=b,M.Th=y,M.Tr=x,M.Thead=S,M.Tbody=C,M.Tfoot=w,M.Caption=T,M.ScrollContainer=O,M.DataRenderer=k;var N=n(o(),1);function P(e=1500){let[t,n]=(0,N.useState)(`idle`),r=(0,N.useRef)(null);(0,N.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]);function i(t){r.current&&clearTimeout(r.current),n(`idle`),(navigator.clipboard?navigator.clipboard.writeText(t):Promise.reject(Error(`clipboard unavailable`))).then(()=>n(`copied`),()=>n(`failed`)).finally(()=>{r.current=setTimeout(()=>n(`idle`),e)})}return{state:t,copy:i}}var F=new Intl.NumberFormat(void 0,{maximumFractionDigits:0});function I(e){return Number.isFinite(e)?e>0&&e<1e-4?`<0.01%`:`${(e*100).toFixed(e>=.1?1:2)}%`:`—`}function L(e){if(!Number.isFinite(e))return`—`;if(e<0)return`-${L(-e)}`;if(e===0)return`0ms`;if(e<.01)return`<0.01ms`;if(e<1)return`${e.toFixed(2)}ms`;if(Math.round(e*10)/10<100)return`${e.toFixed(1)}ms`;if(Math.round(e)<1e3)return`${Math.round(e)}ms`;let t=Math.round(e/100)/10;if(t<10)return`${(e/1e3).toFixed(2)}s`;if(t<60)return`${t.toFixed(1)}s`;let n=Math.round(e/1e3),r=Math.floor(n/60),i=n%60;if(r<60)return i===0?`${r}m`:`${r}m ${i}s`;let a=Math.floor(r/60),o=r%60;return o===0?`${a}h`:`${a}h ${o}m`}function R(e,t,n=!1){let r=new Date(e);if(Number.isNaN(r.valueOf()))return e;let[i,a]=t.split(`/`),o=new Date(i),s=new Date(a),c=!Number.isNaN(o.valueOf())&&!Number.isNaN(s.valueOf())&&s.valueOf()-o.valueOf()>864e5;return r.toLocaleString([],{...c?{month:`short`,day:`numeric`}:{},hour:`numeric`,minute:`2-digit`,...n?{second:`2-digit`}:{}})}function z(e=new Date){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?z(new Date):new Intl.DateTimeFormat([],{timeZoneName:`short`}).formatToParts(t).find(e=>e.type===`timeZoneName`)?.value??``}function B(e){let t=e instanceof Date?e:new Date(e);return Number.isNaN(t.valueOf())?String(e):t.toLocaleString([],{year:`numeric`,month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`,second:`2-digit`,timeZoneName:`short`})}export{z as a,M as c,I as i,B as n,R as o,F as r,P as s,L as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-BLac8tJW.js b/internal/ui/dist/assets/index-BLac8tJW.js deleted file mode 100644 index 6d53112bd..000000000 --- a/internal/ui/dist/assets/index-BLac8tJW.js +++ /dev/null @@ -1,17 +0,0 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-D1xQhcK4.js","assets/brand-MzZ03bSa.js","assets/auth-BeUORN-q.js","assets/settings-D_2lRZJm.js","assets/Tooltip-BJiO7C_G.js","assets/api-Be5Lq4YA.js","assets/WarningCircle.es-DDq2AFnK.js","assets/chat.index-DvqxaiRx.js","assets/chat-DuN0TFYv.js","assets/preload-helper-BL3qEkUh.js","assets/copy-Bzg2uCpz.js","assets/chat._threadId-DvqxaiRx.js","assets/dashboards.index-C3Dkh40b.js","assets/dashboard-7dM548yK.js","assets/tokens-CvbGYJRX.js","assets/use-computed-color-scheme-6JIsge00.js","assets/dashboards._dashboardId-BS6OaA2t.js"])))=>i.map(i=>d[i]); -import{B as e,C as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,S as p,St as m,V as h,W as g,X as _,Y as v,_ as y,_t as b,a as x,at as ee,b as te,ct as ne,d as re,dt as S,et as ie,f as ae,ft as oe,gt as se,h as ce,ht as le,j as ue,k as de,l as C,mt as fe,nt as pe,pt as me,rt as he,s as ge,st as _e,t as ve,u as ye,ut as be,x as xe,yt as Se}from"./brand-MzZ03bSa.js";import{a as Ce,d as we,f as Te,g as Ee,i as De,l as Oe,n as ke,o as Ae,r as je,t as Me,u as Ne}from"./auth-BeUORN-q.js";import{$ as Pe,A as Fe,B as Ie,C as Le,F as Re,G as ze,H as Be,I as Ve,J as He,K as Ue,L as We,M as Ge,N as Ke,O as qe,P as Je,Q as Ye,R as Xe,S as Ze,U as Qe,V as $e,W as et,X as tt,Y as nt,Z as rt,a as it,at,b as ot,ct as st,d as ct,dt as lt,et as ut,ft as dt,g as ft,h as pt,i as mt,it as ht,j as gt,k as _t,l as vt,lt as yt,n as bt,nt as xt,o as St,ot as Ct,q as wt,r as Tt,rt as Et,s as Dt,st as Ot,t as kt,tt as At,u as jt,ut as Mt,v as Nt,w as Pt,x as Ft,y as It,z as Lt}from"./tokens-CvbGYJRX.js";import{C as Rt,b as zt,o as Bt,t as Vt,w as Ht}from"./Tooltip-BJiO7C_G.js";import{n as Ut,t as Wt}from"./use-computed-color-scheme-6JIsge00.js";import{A as Gt,C as Kt,D as qt,E as Jt,F as Yt,H as Xt,I as Zt,L as Qt,M as $t,N as en,O as tn,P as nn,R as rn,S as an,_ as on,a as sn,b as cn,c as ln,d as un,f as dn,g as fn,h as pn,i as mn,j as hn,k as gn,l as _n,m as vn,n as yn,o as bn,p as xn,r as Sn,t as Cn,u as wn,v as Tn,x as En,y as Dn}from"./api-Be5Lq4YA.js";import{a as On,i as kn,n as An,o as jn,r as Mn,t as Nn}from"./preload-helper-BL3qEkUh.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Pn=b((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}}var ee=!1,te=-1,ne=5,re=-1;function S(){return g?!0:!(e.unstable_now()-ret&&S());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Fn=b(((e,t)=>{t.exports=Pn()})),In=b((e=>{var t=Fn(),n=se(),r=le();function i(e){var t=`https://react.dev/errors/`+e;if(1he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){e.memoizedState!==null&&ve(Se,e);var t=ye.current,n=ef(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),sp._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1)`:-1i||c[r]!==l[i]){var u=` -`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return` -Error generating stack: `+e.message+` -`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),wn=!1;if(Cn)try{var Tn={};Object.defineProperty(Tn,"passive",{get:function(){wn=!0}}),window.addEventListener(`test`,Tn,Tn),window.removeEventListener(`test`,Tn,Tn)}catch{wn=!1}var En=null,Dn=null,On=null;function kn(){if(On)return On;var e,t=Dn,n=t.length,r,i=`value`in En?En.value:En.textContent,a=i.length;for(e=0;e=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=kn(),On=Dn=En=null,hr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xt(e.document)}return t}function Ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Wr=Cn&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==Xt(r)||(r=Gr,`selectionStart`in r&&Ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Rr(qr,r)||(qr=r,r=Ld(Kr,`onSelect`),0>=o,i-=o,zi=1<<32-Ze(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),Ji&&Vi(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),Ji&&Vi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),Ji&&Vi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=Ha(o),x(e,r,o,c)}if(de(o))return v(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,Ja(o),c);if(o.$$typeof===b)return x(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=x(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=Ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Wl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=bi(e),yi(e,null,n),t}return gi(e,r,t,n),bi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(ql&p)===p:(r&p)===p){p!==0&&p===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:eo=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),tu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=C.T,s={};C.T=s,Ws(e,!1,t,n);try{var c=i(),l=C.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Us(e,t,Aa(c,r),Cu(e)):Us(e,t,r,Cu(e))}catch(n){Us(e,t,{then:function(){},status:`rejected`,reason:n},Cu())}finally{fe.p=a,o!==null&&s.types!==null&&(o.types=s.types),C.T=o}}function Ns(){}function Ps(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Fs(e).queue;Ms(e,a,t,pe,n===null?Ns:function(){return Is(e),n(r)})}function Fs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Is(e){var t=Fs(e);t.next===null&&(t=e.alternate.memoizedState),Us(e,t.next.queue,{},Cu())}function Ls(){return ha(sp)}function Rs(){return Ko().memoizedState}function zs(){return Ko().memoizedState}function Bs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Cu();e=ro(n);var r=io(t,e,n);r!==null&&(Tu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Vs(e,t,n){var r=Cu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Gs(e)?Ks(t,n):(n=_i(e,t,n,r),n!==null&&(Tu(n,e,r),qs(n,t,r)))}function Hs(e,t,n){Us(e,t,n,Cu())}function Us(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))Ks(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return gi(e,t,i,0),Gl===null&&hi(),!1}catch{}if(n=_i(e,t,i,r),n!==null)return Tu(n,e,r),qs(n,t,r),!0}return!1}function Ws(e,t,n,r){if(r={lane:2,revertLane:Sd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Gs(e)){if(t)throw Error(i(479))}else t=_i(e,n,r,2),t!==null&&Tu(t,e,2)}function Gs(e){var t=e.alternate;return e===E||t!==null&&t===E}function Ks(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qs(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var Js={readContext:ha,use:k,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};Js.useEffectEvent=Lo;var Ys={readContext:ha,use:k,useCallback:function(e,t){return D().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:ys,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),_s(4194308,4,Ts.bind(null,t,e),n)},useLayoutEffect:function(e,t){return _s(4194308,4,e,t)},useInsertionEffect:function(e,t){_s(4,2,e,t)},useMemo:function(e,t){var n=D();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=D();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Vs.bind(null,E,e),[r.memoizedState,e]},useRef:function(e){var t=D();return e={current:e},t.memoizedState=e},useState:function(e){e=rs(e);var t=e.queue,n=Hs.bind(null,E,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ds,useDeferredValue:function(e,t){return As(D(),e,t)},useTransition:function(){var e=rs(!1);return e=Ms.bind(null,E,e.queue,!0,!1),D().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=E,a=D();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Gl===null)throw Error(i(349));ql&127||$o(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,ys(es.bind(null,r,o,e),[e]),r.flags|=2048,hs(9,{destroy:void 0},j.bind(null,r,o,n,t),null),n},useId:function(){var e=D(),t=Gl.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[bt]=t,o[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&zc(t)}}return Wc(t),Bc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&zc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Qi(t,!0)}else e=Qd(e).createTextNode(r),e[bt]=t,t.stateNode=e}return Wc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[bt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return Wc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[bt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Wc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Hc(t,t.updateQueue),Wc(t),null);case 4:return we(),e===null&&Nd(t.stateNode.containerInfo),Wc(t),null;case 10:return la(t.type),Wc(t),null;case 19:if(_e(To),r=t.memoizedState,r===null)return Wc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Uc(r,!1);else{if(eu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Uc(r,!1),e=o.updateQueue,t.updateQueue=e,Hc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return ve(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>du&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Hc(t,e),Uc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return Wc(t),null}else 2*ze()-r.renderingStartTime>du&&n!==536870912&&(t.flags|=128,a=!0,Uc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Wc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,ve(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Wc(t),t.subtreeFlags&6&&(t.flags|=8192)):Wc(t),n=t.updateQueue,n!==null&&Hc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),Wc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Kc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(To),null;case 4:return we(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&_e(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function qc(e,t){switch(Wi(t),t.tag){case 3:la(xa),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:_e(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&_e(Ma);break;case 24:la(xa)}}function Jc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){td(t,t.return,e)}}function Yc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){td(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){td(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){td(e,e.return,t)}}}function Zc(e,t,n){n.props=nc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){td(e,t,n)}}function R(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){td(e,t,n)}}function Qc(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){td(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){td(e,t,n)}else n.current=null}}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){td(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[xt]=t}catch(t){td(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[bt]=e,t[xt]=n}catch(t){td(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Xd=hp,e=Hr(e),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},hp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[bt]=e,Nt(o),r=o;break a;case`link`:var s=Zf(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Br(s,h),v=Br(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,C.T=null,n=yu,yu=null;var o=hu,s=_u;if(mu=0,gu=hu=null,_u=0,Wl&6)throw Error(i(331));var c=Wl;if(Wl|=4,zl(o.current),jl(o,o.current,s,n),Wl=c,hd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{fe.p=a,C.T=r,Zu(e,t)}}function ed(e,t,n){t=ji(n,t),t=cc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),md(e))}function td(e,t,n){if(e.tag===3)ed(e,e,n);else for(;t!==null;){if(t.tag===3){ed(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(pu===null||!pu.has(r))){e=ji(n,e),n=lc(2),r=io(t,n,2),r!==null&&(uc(n,r,t,e),ut(r,2),md(r));break}}t=t.return}}function nd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Ul;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Ql=!0,i.add(n),e=rd.bind(null,e,t,n),t.then(e,e))}function rd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Gl===e&&(ql&n)===n&&(eu===4||eu===3&&(ql&62914560)===ql&&300>ze()-lu?!(Wl&2)&&Mu(e,0):ru|=n,au===ql&&(au=0)),md(e)}function id(e,t){t===0&&(t=ct()),e=vi(e,t),e!==null&&(ut(e,t),md(e))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),id(e,n)}function od(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),id(e,n)}function sd(e,t){return Fe(e,t)}var cd=null,ld=null,ud=!1,dd=!1,fd=!1,pd=0;function md(e){e!==ld&&e.next===null&&(ld===null?cd=ld=e:ld=ld.next=e),dd=!0,ud||(ud=!0,xd())}function hd(e,t){if(!fd&&dd){fd=!0;do for(var n=!1,r=cd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,bd(r,a))}else a=ql,a=at(r,r===Gl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,bd(r,a))}r=r.next}while(n);fd=!1}}function gd(){_d()}function _d(){dd=ud=!1;var e=0;pd!==0&&rf()&&(e=pd);for(var t=ze(),n=null,r=cd;r!==null;){var i=r.next,a=vd(r,t);a===0?(r.next=null,n===null?cd=i:n.next=i,i===null&&(ld=n)):(n=r,(e!==0||a&3)&&(dd=!0)),r=i}mu!==0&&mu!==5||hd(e,!1),pd!==0&&(pd=0)}function vd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Qt(n.imageSizes)+`"]`)):i+=`[href="`+Qt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Qt(r)+`"][href="`+Qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=Mt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);Nt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=xe.current)?Df(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=Mt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=Mt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=Mt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+Qt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),Nt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Qt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Qt(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),Kd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,Nt(a),a):(r=n,(a=Tf.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=rp.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=rp.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function W(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function rp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,rp.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=In()}));function Rn(e){return e?.isNotFound===!0}function zn(){try{return sessionStorage}catch{return}}var Bn=`tsr-scroll-restoration-v1_3`,Vn=zn();function Hn(){try{return JSON.parse(Vn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Un(){try{Vn?.setItem(Bn,JSON.stringify(Wn))}catch{}}var Wn=Hn(),Gn=`data-scroll-restoration-id`,Kn=e=>e.state.__TSR_key||e.href;function qn(e){let t=e.getAttribute(Gn);if(t)return`[${Gn}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Jn=!1,Yn=`window`;function Xn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Zn(e){let t=new Set;for(let n of e){if(n===Yn)continue;let e=Xn(n);e&&t.add(e)}return t}function Qn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Kn,a=new Set,o=e=>{let t=Wn[e]||={};for(let e of a)e===document?t[Yn]={scrollX,scrollY}:e.isConnected&&(t[qn(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Jn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Jn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Un()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Wn[d];if(e){let t=Wn[u];for(let n in e){if(n===Yn){if(s)continue}else{let e=Xn(n);if(!e||s&&o&&(l??=Zn(o),l.has(e)))continue}t||=Wn[u]={},t[n]??=e[n]}}}Jn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Zn(o));let t=e&&i&&c,s=r.restoring?Wn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Yn){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Xn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Jn=!1}}))}function $n(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function er(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function tr(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=er(r):Array.isArray(t)?t.push(er(r)):n[e]=[t,er(r)]}return n}var nr=/^(?:\s|["[{\d-]|fa|nu|tr)/,rr=ar(JSON.parse),ir=or(JSON.stringify,JSON.parse);function ar(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=tr(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function or(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!nr.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=$n(e,r);return t?`?${t}`:``}}function sr(e){return{input:({url:t})=>{for(let n of e)t=lr(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=ur(e[n],t);return t}}}function cr(e){let t=wt(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=ze([`/`,t,e.pathname]),e)}}function lr(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ur(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dr(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{Et(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var fr=`__TSR_index`,pr=`popstate`,mr=`beforeunload`;function hr(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=yr(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[fr];i=gr(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[fr];i=gr(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[fr]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gr(e,t){t||={};let n=br();return{...t,key:n,__TSR_key:n,[fr]:e}}function _r(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>yr(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=br();t.history.replaceState({[fr]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(ee._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),ee._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=yr(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),ee.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[fr]-l.state[fr],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),ee.notify(u);return}}}l=c(),ee.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},ee=hr({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mr,x,{capture:!0}),t.removeEventListener(pr,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(mr,x,{capture:!0}),t.addEventListener(pr,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return ee._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return ee._ignoreSubscribers||y(`REPLACE`),n},ee}function vr(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function yr(e,t){let n=vr(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=br();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[fr]:0,key:a,__TSR_key:a}}}function br(){return(Math.random()+1).toString(36).substring(7)}function xr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Sr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Cr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function wr(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var Tr=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=Qe(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:_r()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=At(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=dr(this.latestLocation,e),Qn(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=wt(a);t&&t!==`/`&&e.push(cr({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:sr(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ut(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&Pe(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ht(e).path,external:!1,searchStr:o,search:lt(t?.search,i),hash:ht(r.slice(1)).path,state:dt(t?.state,a)}}let o=new URL(i,this.origin),s=lr(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ht(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:lt(t?.search,c),hash:ht(s.hash.slice(1)).path,state:dt(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Ue({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=rt(He(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=yr(t.href,{});t={...t,to:lr(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=jr(t.params,o),l=this.routesByPath[He(s)],u;if(l)u=this.getRouteBranch(l);else if(s.includes(`$`))u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}if(u.length&&st(c))for(let e of u){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let d=e.leaveParams?s:ht(et({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,f=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Or(t.options.validateSearch,{...e,...f}))}catch{}}),f=e}f=kr(f,t,u,e._includeValidateSearch),f=lt(a,f);let p=this.options.stringifySearch(f),m=t.hash===!0?n.hash:t.hash?Ot(t.hash,n.hash):void 0,h=m?`#${m}`:``,g=t.state===!0?n.state:t.state?Ot(t.state,n.state):{};t.state&&(g=dt(n.state,g));let _=`${d}${p}${h}`,v,y,b=!1;if(this.rewrite){let e=new URL(_,this.origin),t=ur(this.rewrite,e);v=e.href.replace(e.origin,``),t.origin===this.origin?y=t.pathname+t.search+t.hash:(y=t.href,b=!0)}else v=Ct(_),y=v;return{publicHref:y,href:v,pathname:d,search:f,searchStr:p,state:g,hash:m??``,external:b,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=tt(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=jr(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=He(this.latestLocation.href)===He(n.href)&&at(Cr(n.state),Cr(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(yt(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Si(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Sr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&xr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&yt(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Fr,this.preloadRoute=e=>Ci(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Ye(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!at(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?at(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ir,parseSearch:e.parseSearch??rr,protocolAllowlist:e.protocolAllowlist??xt}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=nt(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:He(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Ar(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=Or(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=Ot(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function Ar(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Be}function jr(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,Ot(e,n))}function Mr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Nr(e,t){return e.options[t]?.preload?.()}function Pr(e,t){let n=Nr(e,`component`),r=Nr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Fr(e,t,n){let r=()=>t===!1?void 0:t?Nr(e,t):Pr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Ir(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function Wr(e,t){return e.routesById[t.routeId]}function Gr(e,t,n){return $e(e)?[Br,e]:Rn(e)?(e.routeId||=n,[zr,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[Rr,e]):[Lr,e]}function Kr(e,t){let n=Gr(t,!0,e.id);if(n[0]!==Rr)return n;try{e.options.onError?.(n[1])}catch(t){n=Gr(t,!0,e.id)}return n}function qr(e,t,n,r,i){return i[0].signal.aborted?Vr:li(e,t,n,Kr(n,r),i)}async function Jr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Xr(e,r),[i,qr(e,t,u,a,n)]}if(c.aborted)return[i,Vr];let p=r.paramsError??r.searchError;if(p!==void 0)return Xr(e,r),[i,qr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{$r(e,r,`beforeLoad`,n[0]);let a=await Ur(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,Vr];let o=li(e,t,u,Gr(a,!1,u.id),n);if(o[0]!==Lr)return Xr(e,r),[i,o];r.context={...r.context,...a}}catch(a){return Xr(e,r),[i,qr(e,t,u,a,n)]}finally{r.status=h,$r(e,r,!1,n[0])}}i()}function Yr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Xr(e,t){let n=t._flight;t._flight=void 0,Yr(e,t,n)?.abort()}function Zr(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Yr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Qr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function $r(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function ei(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function ti(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Vr;if(!i)return[Lr,void 0];let l=n._flight;$r(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(ei(e,t,n,r,s,a,!!o[3]))).then(e=>Gr(e,!1,r.id),e=>Gr(e,!0,r.id)).then(t=>(t[0]!==Lr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===Rr&&l[2]?Kr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],li(e,t,r,await Ur(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Xr(e,n),Vr}finally{$r(e,n,!1,s)}}function ni(e,t,n){t[0]!==Br&&(e.status=`success`,e.error=void 0,t[0]===Lr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ri(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Xr(e,r)}function ii(e,t){return t[0]===Rr||t[0]===zr?{...e,status:t[0]===Rr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function ai(e,t,n,r,i,a,o){let s=t[1][n],c=Wr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(ei(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Vr)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Xr(e,s),p=qr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),ee=n>=o?a[7]:void 0,te=c.lazyFn&&c._lazy!==!0?ee:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Yr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),ee?.()}b||(s.isFetching=!1);let ne=(p?Promise.resolve(p):x?ti(e,t,s,c,g,i,a):Promise.resolve([Lr,s.loaderData])).then(t=>(x&&(ni(s,t,l),t[0]===Lr&&(m&&!a[0].signal.aborted&&ri(e,s,u),n>=o&&(s.status=`pending`))),t)),re=Ur(Promise.resolve().then(()=>Fr(c,void 0,te)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,qr(e,t,c,r,a)]).then(e=>ne.then(t=>(x&&!e&&t[0]===Lr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,ee?.()),e)));if(r.push([n,ne,re]),!y)return ne.then(e=>ii(s,e));let S={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ie=ti(e,t,S,c,g,i,a).then(e=>(s.isFetching=!1,ni(S,e,!1),e));return(t[2]??=[]).push([n,ie,re,S]),ie.then(e=>ii(S,e))}async function oi(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Wr(e,t[n]);try{let e=Fr(i,!1);e&&await Ur(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function si(e,t){t[2]&&=(Zr(e,t[2].map(e=>e[3])),void 0)}async function ci(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Br)throw[a,t];!i&&t[0]!==Lr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Br)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function li(e,t,n,r,i,a){for(;r[0]===Br;){let o=r[1],s=o.options;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[Br,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}catch(e){r=a?[Rr,e]:Kr(n,e),a=!0}}return r}async function ui(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===zr?oi(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Br)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Lr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Br){let n=s[1];if(n[0]!==Br||n[1].options.reloadDocument||n[2])return si(e,t),n;c=!0,s=[0,[Rr,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===Rr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Wr(e,u);try{await Ur(i?Promise.resolve().then(()=>Fr(m,l===Rr?`errorComponent`:`notFoundComponent`)):Promise.all([Fr(m),Fr(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return si(e,t),Vr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),si(e,t),Zr(e,o),p()):u.status=`success`}return t}async function di(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await oi(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=Br&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=ui(e,i,u,r[0],ci(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=ci(i[2],void 0,void 0,h.then(e=>Hr(e)?0:Ir(n).length,()=>0))),o=await h}catch(t){if(si(e,i),t===a&&a.aborted)return Vr;throw t}return Hr(o)?o:di(e,o,a,r[6]===n.length?r[6]:0)}function pi(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>pi(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function mi(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function hi(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Ir(t[3]).some(e=>e.id===n[1]))return;let i;try{await Ur(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function gi(e,t){e._committed=t,e.stores.setMatches(t)}function _i(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Ir(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,gi(e,n),Zr(e,[...a.values(),...i],[...n,...s.values()]),wr(e,i,n,t)}async function vi(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}function yi(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function bi(e,t,n,r,i){let a=n.map(e=>({...e}));Qr(a);for(let t of r)Xr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await ui(e,o,r,t[0],i)}catch(t){throw Zr(e,a),t}if(Hr(s)){Zr(e,a),s[0]===Br&&e._tx===t&&e._committed===n&&await yi(e,t,s);return}if(await di(e,s,t[0].signal),e._tx!==t||e._committed!==n){Zr(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Xr(e,n))}gi(e,a),Zr(e,n,a)}async function xi(e,t,n,r,i,a){let o=await fi(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Hr(o)){let n=o[0]===Br&&e._tx===t;if((!n||o[1].options.reloadDocument)&&mi(e,t),Zr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){mi(e,t);return}await yi(e,t,o);return}let s=o[1];if(e._tx===t&&await hi(e,t),e._tx!==t){mi(e,t),Zr(e,s),si(e,o);return}let c=t[2],l=Sr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await hi(e,t),e._tx!==t){mi(e,t),Zr(e,s),si(e,o);return}let n=await e.startTransition(()=>{mi(e,t),_i(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){si(e,o);return}u?.length&&bi(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Si(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Sr(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await vi(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});Qr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Zr(e,m),await vi(e,n);return}e._preflight=void 0;let g,_=()=>xi(e,y,f,()=>pi(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_).then(),y=[p,s,a,m,Date.now(),v];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&$r(e,t,!1)}n[0].abort(),Zr(e,n[3],y[3],!0)}if(e._tx!==y){Zr(e,y[3]),y[3]=[],g?.(),await vi(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&pi(e,y),g?.(_()),await v,await vi(e,y)}async function Ci(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),Qr(a),o=(e._preloads??=new Map).set(i,a),s=await fi(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Zr(e,a)),i.abort()}if(!Hr(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){Rn(e)||console.error(e);return}}}var w=m(se(),1),T=fe(),wi=class extends w.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??Ti,{error:e,reset:this.reset}):this.props.children}};function Ti({error:e}){let[t,n]=w.useState(!1);return(0,T.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,T.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,T.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,T.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,T.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,T.jsx)(`div`,{children:(0,T.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,T.jsx)(`code`,{children:e.message}):null})}):null]})}var Ei=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Ei||{});function Di({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function Oi(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var ki=[],Ai=0,{link:ji,unlink:Mi,propagate:Ni,checkDirty:Pi,shallowPropagate:Fi}=Di({update(e){return e._update()},notify(e){ki[Li++]=e,e.flags&=~Ei.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Ei.Mutable|Ei.Dirty,Vi(e))}}),Ii=0,Li=0,Ri,zi=0;function Bi(e){try{++zi,e()}finally{--zi||Hi()}}function Vi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Mi(n,e)}function Hi(){if(!(zi>0)){for(;Ii{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=Ri,o=t?.compare??Object.is;if(n)Ri=i,++Ai,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Ei.Mutable|Ei.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{Ri=a,n&&(i.flags&=~Ei.RecursedCheck),Vi(i)}}};return n?(i.flags=Ei.Mutable|Ei.Dirty,i.get=function(){let e=i.flags;if(e&Ei.Dirty||e&Ei.Pending&&Pi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Fi(e)}}else e&Ei.Pending&&(i.flags=e&~Ei.Pending);return Ri!==void 0&&ji(i,Ri,Ai),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Ni(e),Fi(e),Hi())}},i}function Wi(e){let t=()=>{let t=Ri;Ri=n,++Ai,n.depsTail=void 0,n.flags=Ei.Watching|Ei.RecursedCheck;try{return e()}finally{Ri=t,n.flags&=~Ei.RecursedCheck,Vi(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Ei.Watching|Ei.RecursedCheck,notify(){let e=this.flags;e&Ei.Dirty||e&Ei.Pending&&Pi(this.deps,this)?t():this.flags=Ei.Watching},stop(){this.flags=Ei.None,this.depsTail=void 0,Vi(this)}};return t(),n}function Gi(e){let t=we(),n=`not-found-${Xe(t.stores.location,e=>e.pathname)}-${Xe(t.stores.status,e=>e)}`;return(0,T.jsx)(wi,{getResetKey:()=>n,onCatch:(t,n)=>{if(Rn(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(Rn(t))return e.fallback?.(t);throw t},children:e.children})}function Ki(){return(0,T.jsx)(`p`,{children:`Not Found`})}function qi(e){return(0,T.jsx)(T.Fragment,{children:e.children})}function Ji(e,t,n){return t.options.notFoundComponent?(0,T.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,T.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,T.jsx)(Ki,{})}function Yi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,T.jsx)(n,{}):null}var Xi=(e,t)=>e[0]===t[0]&&e[1]===t[1],Zi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Qi=w.memo(function({routeId:e}){let t=we();return(0,T.jsx)($i,{router:t,match:Xe(t.stores.getMatchStore(e),e=>e)})});function $i({router:e,match:t}){let n=e.routesById[t.routeId],r=Yi(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Zi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?w.Suspense:qi,l=i?wi:qi,u=o?Gi:qi;return(0,T.jsxs)(n.isRoot?n.options.shellComponent??qi:qi,{children:[(0,T.jsx)(Lt.Provider,{value:t.routeId,children:(0,T.jsx)(c,{fallback:r,children:(0,T.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(Rn(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,T.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:s?(0,T.jsx)(Ie,{fallback:r,children:(0,T.jsx)(ea,{match:t})}):(0,T.jsx)(ea,{match:t})})})})}),null]})}var ea=w.memo(function({match:e}){let t=we(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,T.jsx)(e,{},i):(0,T.jsx)(ta,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Zi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Yi(t,r)}if(e.status===`notFound`)return Ji(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ta=w.memo(function(){let e=we(),t=w.useContext(Lt),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Xe(a,e=>[!!e._notFound,e.error],Xi),i=Xe(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ji(e,e.routesById[t],r);if(!i)return null;let a=(0,T.jsx)(Qi,{routeId:i});return t===`__root__`?(0,T.jsx)(w.Suspense,{fallback:Yi(e),children:a}):a});function na(e,t){let n=e[1];e.length=0,n?.(t)}function ra({t:e}){let t=we(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{na(n,!1),n.push(i,a),e(t),w.startTransition(r)}),Ee(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(He(r.publicHref)!==He(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Sr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ia(){let e=we(),t=e.routesById[Be],n=Yi(e,t),r=e.ssr?qi:w.Suspense,i=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ra,{t:w.useState()[1]}),(0,T.jsx)(r,{fallback:n,children:(0,T.jsx)(aa,{})})]});return e.options.InnerWrap?(0,T.jsx)(e.options.InnerWrap,{children:i}):i}function aa(){let e=we(),t=e._rendered,n=Xe(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Ee(()=>{t[0]===n&&na(t,!0)},[t,n]);let a=i?(0,T.jsx)(Qi,{routeId:i}):null;return(0,T.jsx)(Lt.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,T.jsx)(wi,{getResetKey:()=>r,onCatch:void 0,children:a})})}var oa=e=>({createMutableStore:Ui,createReadonlyStore:Ui,batch:Bi}),sa=e=>new ca(e),ca=class extends Tr{constructor(e){super(e,oa)}};function la({router:e,children:t,...n}){st(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,T.jsx)(Te.Provider,{value:e,children:t});return e.options.Wrap?(0,T.jsx)(e.options.Wrap,{children:r}):r}function ua({router:e,...t}){return(0,T.jsx)(la,{router:e,...t,children:(0,T.jsx)(ia,{})})}function da(e){let t=we({warn:e?.router===void 0}),n=e?.router||t;return Xe(n.stores.__store,We(e,n))}function fa(e,t,n={leading:!1}){let[r,i]=(0,w.useState)(e),a=(0,w.useRef)(!1),o=(0,w.useRef)(null),s=(0,w.useRef)(!1),c=(0,w.useRef)(e);c.current=e;let l=(0,w.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,w.useCallback)(()=>{l(),s.current=!1},[]),d=(0,w.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,w.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,w.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}function pa(e=!1,t={}){let[n,r]=(0,w.useState)(e),i=(0,w.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,w.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,w.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function ma(e){return e===`auto`||e===`dark`||e===`light`}function ha({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return ma(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&ma(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function ga(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function _a({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,w.useRef)(null),[a,o]=(0,w.useState)(()=>e.get(t)),s=r||a,c=(0,w.useCallback)(t=>{r||(ga(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,w.useCallback)(()=>{o(t),ga(t,n),e.clear()},[e.clear,t]);return(0,w.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),pe(()=>{ga(e.get(t),n)},[]),(0,w.useEffect)(()=>{if(r)return ga(r,n),()=>{};r===void 0&&ga(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&ga(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function va(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function ya(e,t){let n=t?[t]:[`:root`,`:host`],r=va(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=va(e.dark),o=va(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function ba({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:a=!0}){if(!e.colors[t])return{};if(n===`light`){let n=o(e,`light`),s={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][n],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...s}:s}let s=o(e,`dark`),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:g(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:g(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][Math.max(s-4,0)],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...c}:c}function xa(e,t,n){me(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Sa=e=>{let t=o(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:S(e.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":qe(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":qe(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};xa(i.variables,e.breakpoints,`breakpoint`),xa(i.variables,e.spacing,`spacing`),xa(i.variables,e.fontSizes,`font-size`),xa(i.variables,e.lineHeights,`line-height`),xa(i.variables,e.shadows,`shadow`),xa(i.variables,e.radius,`radius`),xa(i.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),me(e.colors).forEach(t=>{let n=e.colors[t];if(r(n)){Object.assign(i.light,ba({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,ba({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),i.light[`--mantine-color-${n.name}-contrast`]=_t(n,e,`light`),i.dark[`--mantine-color-${n.name}-contrast`]=_t(n,e,`dark`);return}n.forEach((e,n)=>{i.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(i.light,ba({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,ba({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let a=e.headings.sizes;return me(a).forEach(t=>{i.variables[`--mantine-${t}-font-size`]=a[t].fontSize,i.variables[`--mantine-${t}-line-height`]=a[t].lineHeight,i.variables[`--mantine-${t}-font-weight`]=a[t].fontWeight||e.headings.fontWeight}),i};function Ca(){let t=u(),n=e(),r=me(t.breakpoints).reduce((e,n)=>{let r=t.breakpoints[n].includes(`px`),i=Ge(t.breakpoints[n]);return`${e}@media (max-width: ${r?`${i-.1}px`:be(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:be(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,T.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function wa({theme:e,generator:t}){let n=Sa(e),r=t?.(e);return r?oe(n,r):n}var Ta=Sa(f);function Ea(e){let t={variables:{},light:{},dark:{}};return me(e.variables).forEach(n=>{Ta.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),me(e.light).forEach(n=>{Ta.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),me(e.dark).forEach(n=>{Ta.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Da(e){return ya({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Oa({cssVariablesSelector:t,deduplicateCssVariables:n}){let r=u(),i=e(),a=wa({theme:r,generator:c()}),o=(t===void 0||t===`:root`||t===`:host`)&&n,s=ya(o?Ea(a):a,t);return s?(0,T.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:Da(t)}`}}):null}Oa.displayName=`@mantine/CssVariables`;function ka({respectReducedMotion:e,getRootElement:t}){pe(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Aa({theme:e,children:t,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:u=`mantine`,colorSchemeManager:d=ha(),defaultColorScheme:f=`light`,getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:h,stylesTransform:g,env:_,deduplicateInlineStyles:v=!1}){let{colorScheme:y,setColorScheme:b,clearColorScheme:x}=_a({defaultColorScheme:f,forceColorScheme:h,manager:d,getRootElement:p});return ka({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:p}),(0,T.jsx)(n,{value:{colorScheme:y,setColorScheme:b,clearColorScheme:x,getRootElement:p,classNamesPrefix:u,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:g,env:_,deduplicateInlineStyles:v},children:(0,T.jsxs)(l,{theme:e,children:[s&&(0,T.jsx)(Oa,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,T.jsx)(Ca,{}),t]})})}Aa.displayName=`@mantine/core/MantineProvider`;function ja(e){return e}var[Ma,Na]=Ht(`AppShell was not found in tree`),Pa={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Fa=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellAside`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:v({[rn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Fa.classes=Pa,Fa.displayName=`@mantine/core/AppShellAside`;var Ia=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellFooter`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:v({[rn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Ia.classes=Pa,Ia.displayName=`@mantine/core/AppShellFooter`;var La=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellHeader`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:v({[rn.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});La.classes=Pa,La.displayName=`@mantine/core/AppShellHeader`;var Ra=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`AppShellMain`,null,e);return(0,T.jsx)(xe,{component:`main`,...Na().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Ra.classes=Pa,Ra.displayName=`@mantine/core/AppShellMain`;var za=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellNavbar`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});za.classes=Pa,za.displayName=`@mantine/core/AppShellNavbar`;var Ba=p(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=ue(`AppShellSection`,null,e),l=Na();return(0,T.jsx)(xe,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Ba.classes=Pa,Ba.displayName=`@mantine/core/AppShellSection`;function Va(e){return typeof e==`object`?e.base:e}function Ha(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Ua(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Wa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=S(o.base),e[`--app-shell-aside-offset`]=S(o.base)),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=S(o[e]),t[e][`--app-shell-aside-offset`]=S(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=gt(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function Ga({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Ha(i)){let t=S(Va(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=S(i.base),a&&(e[`--app-shell-footer-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=S(i[e]),a&&(t[e][`--app-shell-footer-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Ka({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Ha(i)){let t=S(Va(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=S(i.base),a&&(e[`--app-shell-header-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=S(i[e]),a&&(t[e][`--app-shell-header-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function qa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=S(o.base),e[`--app-shell-navbar-offset`]=S(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=S(o.base))),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=S(o[e]),t[e][`--app-shell-navbar-offset`]=S(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=S(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=gt(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Ja(e){return Number(e)===0?`0px`:ne(e)}function Ya({padding:e,baseStyles:t,minMediaStyles:n}){Ha(e)&&(t[`--app-shell-padding`]=Ja(Va(e))),Ua(e)&&(e.base&&(t[`--app-shell-padding`]=Ja(e.base)),me(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Ja(e[t]))}))}function Xa({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),qa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Wa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Ka({baseStyles:l,minMediaStyles:s,header:t,mode:o}),Ga({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Ya({baseStyles:l,minMediaStyles:s,padding:i});let u=Fe(me(s),a.breakpoints).map(e=>({query:`(min-width: ${be(e.px)})`,styles:s[e.value]})),d=Fe(me(c),a.breakpoints).map(e=>({query:`(max-width: ${be(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function Za({navbar:e,header:t,aside:n,footer:r,padding:i,mode:o,selector:s}){let c=u(),l=a(),{media:f,baseStyles:p}=Xa({navbar:e,header:t,footer:r,aside:n,padding:i,theme:c,mode:o});return(0,T.jsx)(d,{media:f,styles:p,selector:s||l.cssVariablesSelector})}function Qa({transitionDuration:e,disabled:t}){let[n,r]=(0,w.useState)(!0),i=(0,w.useRef)(-1),a=(0,w.useRef)(-1);return Xt(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),200)}),pe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var $a={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:Rt(`app`),mode:`fixed`},eo=_((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),to=t(e=>{let t=ue(`AppShell`,$a,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:ee,id:te,...ne}=t,re=de({name:`AppShell`,classes:Pa,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,vars:s,varsResolver:eo}),S=Qa({disabled:g,transitionDuration:d}),ae=ie(te);return(0,T.jsxs)(Ma,{value:{getStyles:re,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,T.jsx)(Za,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${ae}`:void 0}),(0,T.jsx)(xe,{...re(`root`),id:ae,mod:[{resizing:S,layout:h,disabled:g,mode:b},x],...ne})]})});to.classes=Pa,to.varsResolver=eo,to.displayName=`@mantine/core/AppShell`,to.Navbar=za,to.Header=La,to.Main=Ra,to.Aside=Fa,to.Footer=Ia,to.Section=Ba;var no={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},ro=(0,w.createContext)({withinGroup:!1}),io=_((e,{spacing:t})=>({group:{"--ag-spacing":ne(t)}})),ao=t(e=>{let t=ue(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=de({name:`AvatarGroup`,classes:no,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:io,rootSelector:`group`});return(0,T.jsx)(ro,{value:{withinGroup:!0},children:(0,T.jsx)(xe,{...d(`group`),...u})})});ao.classes=no,ao.varsResolver=io,ao.displayName=`@mantine/core/AvatarGroup`;function oo(e){return(0,T.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,T.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function so(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var fo=_((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?lo(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":_e(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ee(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),po=p(e=>{let t=ue(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,w.use)(ro),[ee,te]=(0,w.useState)(!c),ne=de({name:`Avatar`,props:t,classes:no,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:fo});return(0,w.useEffect)(()=>te(!c),[c]),(0,T.jsx)(xe,{...ne(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:ee||!c?(0,T.jsx)(`span`,{...ne(`placeholder`),title:l,children:m||typeof _==`string`&&uo(_)||(0,T.jsx)(oo,{})}):(0,T.jsx)(`img`,{...p,...ne(`image`),src:c,alt:l,onError:e=>{te(!0),p?.onError?.(e)}})})});po.classes=no,po.varsResolver=fo,po.displayName=`@mantine/core/Avatar`,po.Group=ao;var mo={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},ho=_((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?s(t,e):void 0,"--burger-size":_e(n,`burger-size`),"--burger-line-size":r?S(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),go=t(e=>{let t=ue(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=de({name:`Burger`,classes:mo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:ho});return(0,T.jsxs)(te,{...h(`root`),...m,children:[(0,T.jsx)(xe,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});go.classes=mo,go.varsResolver=ho,go.displayName=`@mantine/core/Burger`;var[_o,vo]=Ht(`Drawer component was not found in tree`),yo={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},bo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerBody`,null,e);return(0,T.jsx)(Zt,{...vo().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});bo.classes=yo,bo.displayName=`@mantine/core/DrawerBody`;var xo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerCloseButton`,null,e);return(0,T.jsx)(Yt,{...vo().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});xo.classes=yo,xo.displayName=`@mantine/core/DrawerCloseButton`;var So=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=ue(`DrawerContent`,null,e),u=vo(),d=u.scrollAreaComponent||Gt;return(0,T.jsx)(nn,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,T.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});So.classes=yo,So.displayName=`@mantine/core/DrawerContent`;var Co=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerHeader`,null,e);return(0,T.jsx)(en,{...vo().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Co.classes=yo,Co.displayName=`@mantine/core/DrawerHeader`;var wo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerOverlay`,null,e);return(0,T.jsx)($t,{...vo().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});wo.classes=yo,wo.displayName=`@mantine/core/DrawerOverlay`;function To(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function Eo(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var Do={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},E={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Oo={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Rt(`modal`),position:`left`},ko=_((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":_e(n,`drawer-size`),"--drawer-flex":Eo(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":To(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":S(r)}})),Ao=t(e=>{let t=ue(`DrawerRoot`,Oo,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=zt(),h=de({name:`Drawer`,classes:yo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ko}),g=(m===`rtl`?E:Do)[l];return(0,T.jsx)(_o,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,T.jsx)(Qt,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===Bt.Autosize||void 0,unstyled:o,...p})})});Ao.classes=yo,Ao.varsResolver=ko,Ao.displayName=`@mantine/core/DrawerRoot`;var jo=(0,w.createContext)(null);function Mo({children:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)(Rt(`modal`));return(0,T.jsx)(jo,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Mo.displayName=`@mantine/core/DrawerStack`;var No=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerTitle`,null,e);return(0,T.jsx)(hn,{...vo().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});No.classes=yo,No.displayName=`@mantine/core/DrawerTitle`;var Po={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:Rt(`modal`),withOverlay:!0,withCloseButton:!0},Fo=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=ue(`Drawer`,Po,e),d=(0,w.use)(jo),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c)}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,w.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||Rt(`modal`)):d.removeModal(c))},[s,c,l]),(0,T.jsxs)(Ao,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,T.jsx)(wo,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,T.jsxs)(So,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,T.jsxs)(Co,{children:[t&&(0,T.jsx)(No,{children:t}),i&&(0,T.jsx)(xo,{...a})]}),(0,T.jsx)(bo,{children:o})]})]})});Fo.classes=yo,Fo.displayName=`@mantine/core/Drawer`,Fo.Root=Ao,Fo.Overlay=wo,Fo.Content=So,Fo.Body=bo,Fo.Header=Co,Fo.Title=No,Fo.CloseButton=xo,Fo.Stack=Mo;var Io={root:`m_dc6f14e2`},Lo=_((e,{size:t})=>({root:{"--kbd-fz":_e(t,`kbd-fz`)}})),Ro=t(e=>{let t=ue(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,T.jsx)(xe,{component:`kbd`,...de({name:`Kbd`,classes:Io,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Lo})(`root`),...l})});Ro.classes=Io,Ro.varsResolver=Lo,Ro.displayName=`@mantine/core/Kbd`;var zo=[];for(let e=0;e<256;++e)zo.push((e+256).toString(16).slice(1));function Bo(e,t=0){return(zo[e[t+0]]+zo[e[t+1]]+zo[e[t+2]]+zo[e[t+3]]+`-`+zo[e[t+4]]+zo[e[t+5]]+`-`+zo[e[t+6]]+zo[e[t+7]]+`-`+zo[e[t+8]]+zo[e[t+9]]+`-`+zo[e[t+10]]+zo[e[t+11]]+zo[e[t+12]]+zo[e[t+13]]+zo[e[t+14]]+zo[e[t+15]]).toLowerCase()}var Vo,Ho=new Uint8Array(16);function Uo(){if(!Vo){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Vo=crypto.getRandomValues.bind(crypto)}return Vo(Ho)}var Wo={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Go(e,t,n){if(Wo.randomUUID&&!t&&!e)return Wo.randomUUID();e||={};let r=e.random??e.rng?.()??Uo();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Bo(r)}var D;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(D||={});var Ko;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Ko||={});var O=D.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),qo=e=>{switch(typeof e){case`undefined`:return O.undefined;case`string`:return O.string;case`number`:return Number.isNaN(e)?O.nan:O.number;case`boolean`:return O.boolean;case`function`:return O.function;case`bigint`:return O.bigint;case`symbol`:return O.symbol;case`object`:return Array.isArray(e)?O.array:e===null?O.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?O.promise:typeof Map<`u`&&e instanceof Map?O.map:typeof Set<`u`&&e instanceof Set?O.set:typeof Date<`u`&&e instanceof Date?O.date:O.object;default:return O.unknown}},k=D.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Jo=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Jo.create=e=>new Jo(e);var Yo=(e,t)=>{let n;switch(e.code){case k.invalid_type:n=e.received===O.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case k.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,D.jsonStringifyReplacer)}`;break;case k.unrecognized_keys:n=`Unrecognized key(s) in object: ${D.joinValues(e.keys,`, `)}`;break;case k.invalid_union:n=`Invalid input`;break;case k.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${D.joinValues(e.options)}`;break;case k.invalid_enum_value:n=`Invalid enum value. Expected ${D.joinValues(e.options)}, received '${e.received}'`;break;case k.invalid_arguments:n=`Invalid function arguments`;break;case k.invalid_return_type:n=`Invalid function return type`;break;case k.invalid_date:n=`Invalid date`;break;case k.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:D.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case k.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case k.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case k.custom:n=`Invalid input`;break;case k.invalid_intersection_types:n=`Intersection results could not be merged`;break;case k.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case k.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,D.assertNever(e)}return{message:n}},Xo=Yo;function Zo(){return Xo}var Qo=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function A(e,t){let n=Zo(),r=Qo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yo?void 0:Yo].filter(e=>!!e)});e.common.issues.push(r)}var $o=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return j;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return j;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},j=Object.freeze({status:`aborted`}),es=e=>({status:`dirty`,value:e}),ts=e=>({status:`valid`,value:e}),ns=e=>e.status===`aborted`,rs=e=>e.status===`dirty`,is=e=>e.status===`valid`,as=e=>typeof Promise<`u`&&e instanceof Promise,M;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(M||={});var os=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ss=(e,t)=>{if(is(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Jo(e.common.issues);return this._error=t,this._error}}};function N(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var cs=class{get description(){return this._def.description}_getType(e){return qo(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $o,ctx:{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(as(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};return ss(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return is(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>is(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)},r=this._parse({data:e,path:n.path,parent:n});return ss(n,await(as(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:k.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new dc({schema:this,typeName:P.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return fc.create(this,this._def)}nullable(){return pc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ks.create(this)}promise(){return uc.create(this,this._def)}or(e){return Ys.create([this,e],this._def)}and(e){return $s.create(this,e,this._def)}transform(e){return new dc({...N(this._def),schema:this,typeName:P.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new mc({...N(this._def),innerType:this,defaultValue:t,typeName:P.ZodDefault})}brand(){return new _c({typeName:P.ZodBranded,type:this,...N(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new hc({...N(this._def),innerType:this,catchValue:t,typeName:P.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return vc.create(this,e)}readonly(){return yc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ls=/^c[^\s-]{8,}$/i,us=/^[0-9a-z]+$/,ds=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fs=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ps=/^[a-z0-9_-]{21}$/i,ms=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hs=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_s=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,vs,ys=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ss=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Cs=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ws=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ts=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Es=RegExp(`^${Ts}$`);function Ds(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Os(e){return RegExp(`^${Ds(e)}$`)}function ks(e){let t=`${Ts}T${Ds(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function As(e,t){return!((t!==`v4`&&t||!ys.test(e))&&(t!==`v6`&&t||!xs.test(e)))}function js(e,t){if(!ms.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ms(e,t){return!((t!==`v4`&&t||!bs.test(e))&&(t!==`v6`&&t||!Ss.test(e)))}var Ns=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==O.string){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.string,received:t.parsedType}),j}let t=new $o,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),A(n,{code:k.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:k.invalid_string,...M.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...M.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...M.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...M.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...M.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...M.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...M.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...M.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...M.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...M.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...M.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...M.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...M.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...M.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...M.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...M.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...M.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...M.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...M.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...M.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...M.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...M.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...M.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...M.errToObj(t)})}nonempty(e){return this.min(1,M.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ns({checks:[],typeName:P.ZodString,coerce:e?.coerce??!1,...N(e)});function Ps(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Fs=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==O.number){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.number,received:t.parsedType}),j}let t,n=new $o;for(let r of this._def.checks)r.kind===`int`?D.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),A(t,{code:k.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),A(t,{code:k.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ps(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),A(t,{code:k.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),A(t,{code:k.not_finite,message:r.message}),n.dirty()):D.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,M.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,M.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,M.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,M.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:M.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:M.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:M.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:M.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:M.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:M.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&D.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Fs({checks:[],typeName:P.ZodNumber,coerce:e?.coerce||!1,...N(e)});var Is=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==O.bigint)return this._getInvalidInput(e);let t,n=new $o;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),A(t,{code:k.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),A(t,{code:k.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):D.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.bigint,received:t.parsedType}),j}gte(e,t){return this.setLimit(`min`,e,!0,M.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,M.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,M.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,M.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:M.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:M.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:M.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:M.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:M.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:M.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Is({checks:[],typeName:P.ZodBigInt,coerce:e?.coerce??!1,...N(e)});var Ls=class extends cs{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==O.boolean){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.boolean,received:t.parsedType}),j}return ts(e.data)}};Ls.create=e=>new Ls({typeName:P.ZodBoolean,coerce:e?.coerce||!1,...N(e)});var Rs=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==O.date){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.date,received:t.parsedType}),j}if(Number.isNaN(e.data.getTime()))return A(this._getOrReturnCtx(e),{code:k.invalid_date}),j;let t=new $o,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),A(n,{code:k.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):D.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:M.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:M.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Rs({checks:[],coerce:e?.coerce||!1,typeName:P.ZodDate,...N(e)});var zs=class extends cs{_parse(e){if(this._getType(e)!==O.symbol){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.symbol,received:t.parsedType}),j}return ts(e.data)}};zs.create=e=>new zs({typeName:P.ZodSymbol,...N(e)});var Bs=class extends cs{_parse(e){if(this._getType(e)!==O.undefined){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.undefined,received:t.parsedType}),j}return ts(e.data)}};Bs.create=e=>new Bs({typeName:P.ZodUndefined,...N(e)});var Vs=class extends cs{_parse(e){if(this._getType(e)!==O.null){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.null,received:t.parsedType}),j}return ts(e.data)}};Vs.create=e=>new Vs({typeName:P.ZodNull,...N(e)});var Hs=class extends cs{constructor(){super(...arguments),this._any=!0}_parse(e){return ts(e.data)}};Hs.create=e=>new Hs({typeName:P.ZodAny,...N(e)});var Us=class extends cs{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ts(e.data)}};Us.create=e=>new Us({typeName:P.ZodUnknown,...N(e)});var Ws=class extends cs{_parse(e){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.never,received:t.parsedType}),j}};Ws.create=e=>new Ws({typeName:P.ZodNever,...N(e)});var Gs=class extends cs{_parse(e){if(this._getType(e)!==O.undefined){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.void,received:t.parsedType}),j}return ts(e.data)}};Gs.create=e=>new Gs({typeName:P.ZodVoid,...N(e)});var Ks=class e extends cs{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==O.array)return A(t,{code:k.invalid_type,expected:O.array,received:t.parsedType}),j;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(A(t,{code:k.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new os(t,e,t.path,n)))).then(e=>$o.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new os(t,e,t.path,n)));return $o.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:M.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:M.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:M.toString(n)}})}nonempty(e){return this.min(1,e)}};Ks.create=(e,t)=>new Ks({type:e,minLength:null,maxLength:null,exactLength:null,typeName:P.ZodArray,...N(t)});function qs(e){if(e instanceof Js){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=fc.create(qs(r))}return new Js({...e._def,shape:()=>t})}return e instanceof Ks?new Ks({...e._def,type:qs(e.element)}):e instanceof fc?fc.create(qs(e.unwrap())):e instanceof pc?pc.create(qs(e.unwrap())):e instanceof ec?ec.create(e.items.map(e=>qs(e))):e}var Js=class e extends cs{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=D.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==O.object){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.object,received:t.parsedType}),j}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ws&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new os(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Ws){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(A(n,{code:k.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new os(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>$o.mergeObjectSync(t,e)):$o.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return M.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:M.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:P.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of D.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of D.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return qs(this)}partial(t){let n={};for(let e of D.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of D.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof fc;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return sc(D.objectKeys(this.shape))}};Js.create=(e,t)=>new Js({shape:()=>e,unknownKeys:`strip`,catchall:Ws.create(),typeName:P.ZodObject,...N(t)}),Js.strictCreate=(e,t)=>new Js({shape:()=>e,unknownKeys:`strict`,catchall:Ws.create(),typeName:P.ZodObject,...N(t)}),Js.lazycreate=(e,t)=>new Js({shape:e,unknownKeys:`strip`,catchall:Ws.create(),typeName:P.ZodObject,...N(t)});var Ys=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Jo(e.ctx.common.issues));return A(t,{code:k.invalid_union,unionErrors:n}),j}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Jo(e));return A(t,{code:k.invalid_union,unionErrors:i}),j}}get options(){return this._def.options}};Ys.create=(e,t)=>new Ys({options:e,typeName:P.ZodUnion,...N(t)});var Xs=e=>e instanceof ac?Xs(e.schema):e instanceof dc?Xs(e.innerType()):e instanceof oc?[e.value]:e instanceof cc?e.options:e instanceof lc?D.objectValues(e.enum):e instanceof mc?Xs(e._def.innerType):e instanceof Bs?[void 0]:e instanceof Vs?[null]:e instanceof fc?[void 0,...Xs(e.unwrap())]:e instanceof pc?[null,...Xs(e.unwrap())]:e instanceof _c||e instanceof yc?Xs(e.unwrap()):e instanceof hc?Xs(e._def.innerType):[],Zs=class e extends cs{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.object)return A(t,{code:k.invalid_type,expected:O.object,received:t.parsedType}),j;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(A(t,{code:k.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),j)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Xs(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:P.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...N(r)})}};function Qs(e,t){let n=qo(e),r=qo(t);if(e===t)return{valid:!0,data:e};if(n===O.object&&r===O.object){let n=D.objectKeys(t),r=D.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Qs(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===O.array&&r===O.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(ns(e)||ns(r))return j;let i=Qs(e.value,r.value);return i.valid?((rs(e)||rs(r))&&t.dirty(),{status:t.value,value:i.data}):(A(n,{code:k.invalid_intersection_types}),j)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};$s.create=(e,t,n)=>new $s({left:e,right:t,typeName:P.ZodIntersection,...N(n)});var ec=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.array)return A(n,{code:k.invalid_type,expected:O.array,received:n.parsedType}),j;if(n.data.lengththis._def.items.length&&(A(n,{code:k.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new os(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>$o.mergeArray(t,e)):$o.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ec.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ec({items:e,typeName:P.ZodTuple,rest:null,...N(t)})};var tc=class e extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.object)return A(n,{code:k.invalid_type,expected:O.object,received:n.parsedType}),j;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new os(n,e,n.path,e)),value:a._parse(new os(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?$o.mergeObjectAsync(t,r):$o.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof cs?new e({keyType:t,valueType:n,typeName:P.ZodRecord,...N(r)}):new e({keyType:Ns.create(),valueType:t,typeName:P.ZodRecord,...N(n)})}},nc=class extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.map)return A(n,{code:k.invalid_type,expected:O.map,received:n.parsedType}),j;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new os(n,e,n.path,[a,`key`])),value:i._parse(new os(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return j;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return j;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};nc.create=(e,t,n)=>new nc({valueType:t,keyType:e,typeName:P.ZodMap,...N(n)});var rc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==O.set)return A(n,{code:k.invalid_type,expected:O.set,received:n.parsedType}),j;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(A(n,{code:k.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return j;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new os(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:M.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:M.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};rc.create=(e,t)=>new rc({valueType:e,minSize:null,maxSize:null,typeName:P.ZodSet,...N(t)});var ic=class e extends cs{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==O.function)return A(t,{code:k.invalid_type,expected:O.function,received:t.parsedType}),j;function n(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:k.invalid_arguments,argumentsError:n}})}function r(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:k.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof uc){let e=this;return ts(async function(...t){let o=new Jo([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return ts(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Jo([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Jo([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ec.create(t).rest(Us.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||ec.create([]).rest(Us.create()),returns:n||Us.create(),typeName:P.ZodFunction,...N(r)})}},ac=class extends cs{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ac.create=(e,t)=>new ac({getter:e,typeName:P.ZodLazy,...N(t)});var oc=class extends cs{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return A(t,{received:t.data,code:k.invalid_literal,expected:this._def.value}),j}return{status:`valid`,value:e.data}}get value(){return this._def.value}};oc.create=(e,t)=>new oc({value:e,typeName:P.ZodLiteral,...N(t)});function sc(e,t){return new cc({values:e,typeName:P.ZodEnum,...N(t)})}var cc=class e extends cs{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return A(t,{expected:D.joinValues(n),received:t.parsedType,code:k.invalid_type}),j}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return A(t,{received:t.data,code:k.invalid_enum_value,options:n}),j}return ts(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};cc.create=sc;var lc=class extends cs{_parse(e){let t=D.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==O.string&&n.parsedType!==O.number){let e=D.objectValues(t);return A(n,{expected:D.joinValues(e),received:n.parsedType,code:k.invalid_type}),j}if(this._cache||=new Set(D.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=D.objectValues(t);return A(n,{received:n.data,code:k.invalid_enum_value,options:e}),j}return ts(e.data)}get enum(){return this._def.values}};lc.create=(e,t)=>new lc({values:e,typeName:P.ZodNativeEnum,...N(t)});var uc=class extends cs{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==O.promise&&t.common.async===!1?(A(t,{code:k.invalid_type,expected:O.promise,received:t.parsedType}),j):ts((t.parsedType===O.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};uc.create=(e,t)=>new uc({type:e,typeName:P.ZodPromise,...N(t)});var dc=class extends cs{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===P.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{A(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return j;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?j:r.status===`dirty`||t.value===`dirty`?es(r.value):r});{if(t.value===`aborted`)return j;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?j:r.status===`dirty`||t.value===`dirty`?es(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?j:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?j:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!is(e))return j;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>is(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):j)}D.assertNever(r)}};dc.create=(e,t,n)=>new dc({schema:e,typeName:P.ZodEffects,effect:t,...N(n)}),dc.createWithPreprocess=(e,t,n)=>new dc({schema:t,effect:{type:`preprocess`,transform:e},typeName:P.ZodEffects,...N(n)});var fc=class extends cs{_parse(e){return this._getType(e)===O.undefined?ts(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fc.create=(e,t)=>new fc({innerType:e,typeName:P.ZodOptional,...N(t)});var pc=class extends cs{_parse(e){return this._getType(e)===O.null?ts(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};pc.create=(e,t)=>new pc({innerType:e,typeName:P.ZodNullable,...N(t)});var mc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===O.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};mc.create=(e,t)=>new mc({innerType:e,typeName:P.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...N(t)});var hc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return as(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};hc.create=(e,t)=>new hc({innerType:e,typeName:P.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...N(t)});var gc=class extends cs{_parse(e){if(this._getType(e)!==O.nan){let t=this._getOrReturnCtx(e);return A(t,{code:k.invalid_type,expected:O.nan,received:t.parsedType}),j}return{status:`valid`,value:e.data}}};gc.create=e=>new gc({typeName:P.ZodNaN,...N(e)});var _c=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},vc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?j:e.status===`dirty`?(t.dirty(),es(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?j:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:P.ZodPipeline})}},yc=class extends cs{_parse(e){let t=this._def.innerType._parse(e),n=e=>(is(e)&&(e.value=Object.freeze(e.value)),e);return as(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};yc.create=(e,t)=>new yc({innerType:e,typeName:P.ZodReadonly,...N(t)}),Js.lazycreate;var P;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(P||={});var F=Ns.create,bc=Fs.create;gc.create,Is.create;var xc=Ls.create;Rs.create,zs.create,Bs.create,Vs.create;var Sc=Hs.create,Cc=Us.create;Ws.create,Gs.create;var wc=Ks.create,I=Js.create;Js.strictCreate;var Tc=Ys.create,Ec=Zs.create;$s.create,ec.create;var Dc=tc.create;nc.create,rc.create,ic.create,ac.create;var L=oc.create,Oc=cc.create,kc=lc.create;uc.create,dc.create,fc.create,pc.create,dc.createWithPreprocess,vc.create;var Ac=Ln(),jc=Dc(Sc()).optional();function Mc(e,t){return t===void 0?e:e===void 0?{...t}:{...e,...t}}var Nc=I({name:F(),arguments:F()}),Pc=I({id:F(),type:L(`function`),function:Nc,encryptedValue:F().optional(),metadata:jc}),Fc=I({id:F(),role:F(),content:F().optional(),name:F().optional(),encryptedValue:F().optional(),subagentRunId:F().optional(),metadata:jc}),Ic=I({type:L(`text`),text:F()}),Lc=Ec(`type`,[I({type:L(`data`),value:F(),mimeType:F()}),I({type:L(`url`),value:F(),mimeType:F().optional()})]),Rc=I({type:L(`image`),source:Lc,metadata:Cc().optional()}),zc=I({type:L(`audio`),source:Lc,metadata:Cc().optional()}),Bc=I({type:L(`video`),source:Lc,metadata:Cc().optional()}),Vc=I({type:L(`document`),source:Lc,metadata:Cc().optional()}),Hc=I({type:L(`binary`),mimeType:F(),id:F().optional(),url:F().optional(),data:F().optional(),filename:F().optional()}),Uc=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:k.custom,message:`BinaryInputContent requires at least one of id, url, or data.`,path:[`id`]})};Hc.superRefine((e,t)=>{Uc(e,t)});var Wc=Ec(`type`,[Ic,Rc,zc,Bc,Vc,Hc]).superRefine((e,t)=>{e.type===`binary`&&Uc(e,t)}),Gc=Ec(`role`,[Fc.extend({role:L(`developer`),content:F()}),Fc.extend({role:L(`system`),content:F()}),Fc.extend({role:L(`assistant`),content:F().optional(),toolCalls:wc(Pc).optional()}),Fc.extend({role:L(`user`),content:Tc([F(),wc(Wc)])}),I({id:F(),content:F(),role:L(`tool`),toolCallId:F(),error:F().optional(),encryptedValue:F().optional(),subagentRunId:F().optional(),metadata:jc}),I({id:F(),role:L(`activity`),activityType:F(),content:Dc(Sc()),subagentRunId:F().optional(),metadata:jc}),I({id:F(),role:L(`reasoning`),content:F(),encryptedValue:F().optional(),subagentRunId:F().optional(),metadata:jc})]);Tc([L(`developer`),L(`system`),L(`assistant`),L(`user`),L(`tool`),L(`activity`),L(`reasoning`)]);var Kc=I({description:F(),value:F()}),qc=I({name:F(),description:F(),parameters:Sc(),metadata:Dc(Sc()).optional()}),Jc=I({id:F(),reason:F(),message:F().optional(),toolCallId:F().optional(),responseSchema:Dc(Sc()).optional(),expiresAt:F().optional(),metadata:Dc(Sc()).optional(),subagentRunId:F().optional()}),Yc=I({interruptId:F(),status:Oc([`resolved`,`cancelled`]),payload:Sc().optional(),metadata:jc}),Xc=I({threadId:F(),runId:F(),parentRunId:F().optional(),state:Sc().transform(e=>e??void 0),messages:wc(Gc),tools:wc(qc),context:wc(Kc),forwardedProps:Sc(),resume:wc(Yc).optional()}),Zc=Sc(),R=class extends Error{constructor(e){super(e)}},Qc=class extends R{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}},$c=I({name:F(),description:F().optional()}),el=I({name:F().optional(),type:F().optional(),description:F().optional(),version:F().optional(),provider:F().optional(),documentationUrl:F().optional(),metadata:Dc(Cc()).optional()}),tl=I({streaming:xc().optional(),websocket:xc().optional(),httpBinary:xc().optional(),pushNotifications:xc().optional(),resumable:xc().optional()}),nl=I({supported:xc().optional(),items:wc(qc).optional(),parallelCalls:xc().optional(),clientProvided:xc().optional()}),rl=I({structuredOutput:xc().optional(),supportedMimeTypes:wc(F()).optional()}),il=I({snapshots:xc().optional(),deltas:xc().optional(),memory:xc().optional(),persistentState:xc().optional()}),al=I({supported:xc().optional(),delegation:xc().optional(),handoffs:xc().optional(),subAgents:wc($c).optional()}),ol=I({supported:xc().optional(),streaming:xc().optional(),encrypted:xc().optional()}),sl=I({image:xc().optional(),audio:xc().optional(),video:xc().optional(),pdf:xc().optional(),file:xc().optional()}),cl=I({image:xc().optional(),audio:xc().optional()}),ll=I({input:sl.optional(),output:cl.optional()}),ul=I({codeExecution:xc().optional(),sandboxed:xc().optional(),maxIterations:bc().optional(),maxExecutionTime:bc().optional()}),dl=I({supported:xc().optional(),approvals:xc().optional(),interventions:xc().optional(),feedback:xc().optional(),interrupts:xc().optional(),approveWithEdits:xc().optional()});I({identity:el.optional(),transport:tl.optional(),tools:nl.optional(),output:rl.optional(),state:il.optional(),multiAgent:al.optional(),reasoning:ol.optional(),multimodal:ll.optional(),execution:ul.optional(),humanInTheLoop:dl.optional(),custom:Dc(Cc()).optional()});var fl=Tc([L(`developer`),L(`system`),L(`assistant`),L(`user`)]),z=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.THINKING_START=`THINKING_START`,e.THINKING_END=`THINKING_END`,e.THINKING_TEXT_MESSAGE_START=`THINKING_TEXT_MESSAGE_START`,e.THINKING_TEXT_MESSAGE_CONTENT=`THINKING_TEXT_MESSAGE_CONTENT`,e.THINKING_TEXT_MESSAGE_END=`THINKING_TEXT_MESSAGE_END`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e.SUBAGENT_STARTED=`SUBAGENT_STARTED`,e.SUBAGENT_FINISHED=`SUBAGENT_FINISHED`,e.SUBAGENT_ERROR=`SUBAGENT_ERROR`,e}({}),B=I({type:kc(z),timestamp:bc().optional(),rawEvent:Sc().optional(),metadata:jc}).passthrough(),pl=B.extend({type:L(z.TEXT_MESSAGE_START),messageId:F(),role:fl.default(`assistant`),name:F().optional(),subagentRunId:F().optional()}),ml=B.extend({type:L(z.TEXT_MESSAGE_CONTENT),messageId:F(),delta:F(),subagentRunId:F().optional()}),hl=B.extend({type:L(z.TEXT_MESSAGE_END),messageId:F(),subagentRunId:F().optional()}),gl=B.extend({type:L(z.TEXT_MESSAGE_CHUNK),messageId:F().optional(),role:fl.optional(),delta:F().optional(),name:F().optional(),subagentRunId:F().optional()}),_l=B.extend({type:L(z.THINKING_TEXT_MESSAGE_START)}),vl=ml.omit({messageId:!0,type:!0,subagentRunId:!0}).extend({type:L(z.THINKING_TEXT_MESSAGE_CONTENT)}),yl=B.extend({type:L(z.THINKING_TEXT_MESSAGE_END)}),bl=B.extend({type:L(z.TOOL_CALL_START),toolCallId:F(),toolCallName:F(),parentMessageId:F().nullable().optional().transform(e=>e??void 0),subagentRunId:F().optional()}),xl=B.extend({type:L(z.TOOL_CALL_ARGS),toolCallId:F(),delta:F(),subagentRunId:F().optional()}),Sl=B.extend({type:L(z.TOOL_CALL_END),toolCallId:F(),subagentRunId:F().optional()}),Cl=B.extend({messageId:F(),type:L(z.TOOL_CALL_RESULT),toolCallId:F(),content:F(),role:L(`tool`).optional(),subagentRunId:F().optional()}),wl=B.extend({type:L(z.TOOL_CALL_CHUNK),toolCallId:F().optional(),toolCallName:F().optional(),parentMessageId:F().nullable().optional().transform(e=>e??void 0),delta:F().optional(),subagentRunId:F().optional()}),Tl=B.extend({type:L(z.THINKING_START),title:F().optional()}),El=B.extend({type:L(z.THINKING_END)}),Dl=B.extend({type:L(z.STATE_SNAPSHOT),snapshot:Zc,subagentRunId:F().optional()}),Ol=B.extend({type:L(z.STATE_DELTA),delta:wc(Sc()),subagentRunId:F().optional()}),kl=B.extend({type:L(z.MESSAGES_SNAPSHOT),messages:wc(Gc)}),Al=B.extend({type:L(z.ACTIVITY_SNAPSHOT),messageId:F(),activityType:F(),content:Dc(Sc()),replace:xc().optional().default(!0),subagentRunId:F().optional()}),jl=B.extend({type:L(z.ACTIVITY_DELTA),messageId:F(),activityType:F(),patch:wc(Sc()),subagentRunId:F().optional()}),Ml=B.extend({type:L(z.RAW),event:Sc(),source:F().optional(),subagentRunId:F().optional()}),Nl=B.extend({type:L(z.CUSTOM),name:F(),value:Sc(),subagentRunId:F().optional()}),Pl=B.extend({type:L(z.RUN_STARTED),threadId:F(),runId:F(),parentRunId:F().optional(),input:Xc.optional()}),Fl=Ec(`type`,[I({type:L(`success`)}).strict(),I({type:L(`interrupt`),interrupts:wc(Jc).min(1)}).strict()]),Il=I({provider:F().optional(),model:F().optional(),inputTokens:bc().int().nonnegative().optional(),outputTokens:bc().int().nonnegative().optional(),totalTokens:bc().int().nonnegative().optional(),reasoningTokens:bc().int().nonnegative().optional(),cachedInputTokens:bc().int().nonnegative().optional()}),Ll=B.extend({type:L(z.RUN_FINISHED),threadId:F(),runId:F(),result:Sc().optional(),outcome:Fl.nullable().optional().transform(e=>e??void 0),usage:wc(Il).optional()}),Rl=B.extend({type:L(z.RUN_ERROR),message:F(),code:F().optional(),usage:wc(Il).optional()}),zl=B.extend({type:L(z.STEP_STARTED),stepName:F(),subagentRunId:F().optional()}),Bl=B.extend({type:L(z.STEP_FINISHED),stepName:F(),subagentRunId:F().optional()}),Vl=Tc([L(`tool-call`),L(`message`)]),Hl=B.extend({type:L(z.REASONING_START),messageId:F(),subagentRunId:F().optional()}),Ul=B.extend({type:L(z.REASONING_MESSAGE_START),messageId:F(),role:L(`reasoning`),subagentRunId:F().optional()}),Wl=B.extend({type:L(z.REASONING_MESSAGE_CONTENT),messageId:F(),delta:F(),subagentRunId:F().optional()}),Gl=B.extend({type:L(z.REASONING_MESSAGE_END),messageId:F(),subagentRunId:F().optional()}),Kl=B.extend({type:L(z.REASONING_MESSAGE_CHUNK),messageId:F().optional(),delta:F().optional(),subagentRunId:F().optional()}),ql=B.extend({type:L(z.REASONING_END),messageId:F(),subagentRunId:F().optional()}),Jl=B.extend({type:L(z.REASONING_ENCRYPTED_VALUE),subtype:Vl,entityId:F(),encryptedValue:F(),subagentRunId:F().optional()}),Yl=B.extend({type:L(z.SUBAGENT_STARTED),subagentRunId:F(),name:F(),description:F().optional(),parentSubagentRunId:F().optional(),parentToolCallId:F().optional(),parentMessageId:F().optional()}),Xl=Ec(`type`,[I({type:L(`success`)}).strict(),I({type:L(`suspended`),interruptIds:wc(F()).optional()}).strict()]),Zl=Ec(`type`,[pl,ml,hl,gl,Tl,El,_l,vl,yl,bl,xl,Sl,wl,Cl,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Ll,Rl,zl,Bl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,B.extend({type:L(z.SUBAGENT_FINISHED),subagentRunId:F(),result:Sc().optional(),outcome:Xl.optional()}),B.extend({type:L(z.SUBAGENT_ERROR),subagentRunId:F(),message:F(),code:F().optional()})]),Ql=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$l=Object.prototype.hasOwnProperty;function eu(e,t){return $l.call(e,t)}function tu(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function iu(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function au(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function ou(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tuu,_areEquals:()=>bu,applyOperation:()=>hu,applyPatch:()=>gu,applyReducer:()=>_u,deepClone:()=>du,getValueByPointer:()=>mu,validate:()=>yu,validator:()=>vu}),uu=cu,du=nu,fu={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=mu(n,this.path);r&&=nu(r);var i=hu(n,{op:`remove`,path:this.from}).removed;return hu(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=mu(n,this.from);return hu(n,{op:`add`,path:this.path,value:nu(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:bu(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},pu={add:function(e,t,n){return ru(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:fu.move,copy:fu.copy,test:fu.test,_get:fu._get};function mu(e,t){if(t==``)return e;var n={op:`_get`,path:t};return hu(e,n),n.value}function hu(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):vu(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=mu(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=bu(e,t.value),o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new uu("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=nu(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:vu;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=au(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!ru(f))throw new uu(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else ru(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new uu(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=pu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=fu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new uu('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new uu("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&ou(e.value))throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new uu("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new uu(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=yu([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new uu(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function yu(e,t,n){try{if(!Array.isArray(e))throw new uu(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)gu(nu(t),nu(e),n||!0);else{n||=vu;for(var r=0;rMu,generate:()=>Au,observe:()=>ku,unobserve:()=>Ou}),Su=new WeakMap,Cu=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),wu=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function Tu(e){return Su.get(e)}function Eu(e,t){return e.observers.get(t)}function Du(e,t){e.observers.delete(t.callback)}function Ou(e,t){t.unobserve()}function ku(e,t){var n=[],r,i=Tu(e);if(!i)i=new Cu(e),Su.set(e,i);else{var a=Eu(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=nu(e),t){r.callback=t,r.next=null;var o=function(){Au(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){Au(r),clearTimeout(r.next),Du(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new wu(t,r)),r}function Au(e,t){t===void 0&&(t=!1);var n=Su.get(e.object);ju(n.value,e.object,e.patches,``,t),e.patches.length&&gu(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ju(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=tu(t),o=tu(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(eu(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?ju(u,d,n,r+`/`+iu(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`replace`,path:r+`/`+iu(l),value:nu(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`remove`,path:r+`/`+iu(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;c0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function zu(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Bu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Vu?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Uu(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ru==`function`?Ru(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function Wu(e){return typeof e==`function`}function Gu(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ku=Gu(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: -`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` - `):``,this.name=`UnsubscriptionError`,this.errors=t}});function qu(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ju=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=Ru(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(Wu(c))try{c()}catch(e){i=e instanceof Ku?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Ru(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Zu(f)}catch(e){i??=[],e instanceof Ku?i=Bu(Bu([],zu(i)),zu(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Ku(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)Zu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qu(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&qu(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Yu=Ju.EMPTY;function Xu(e){return e instanceof Ju||e&&`closed`in e&&Wu(e.remove)&&Wu(e.add)&&Wu(e.unsubscribe)}function Zu(e){Wu(e)?e():e.unsubscribe()}var Qu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$u={setTimeout:function(e,t){var n=[...arguments].slice(2),r=$u.delegate;return r?.setTimeout?r.setTimeout.apply(r,Bu([e,t],zu(n))):setTimeout.apply(void 0,Bu([e,t],zu(n)))},clearTimeout:function(e){return($u.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ed(e){$u.setTimeout(function(){var t=Qu.onUnhandledError;if(t)t(e);else throw e})}function td(){}var nd=(function(){return ad(`C`,void 0,void 0)})();function rd(e){return ad(`E`,void 0,e)}function id(e){return ad(`N`,e,void 0)}function ad(e,t,n){return{kind:e,value:t,error:n}}var od=null;function sd(e){if(Qu.useDeprecatedSynchronousErrorHandling){var t=!od;if(t&&(od={errorThrown:!1,error:null}),e(),t){var n=od,r=n.errorThrown,i=n.error;if(od=null,r)throw i}}else e()}function cd(e){Qu.useDeprecatedSynchronousErrorHandling&&od&&(od.errorThrown=!0,od.error=e)}var ld=function(e){Fu(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Xu(t)&&t.add(n)):n.destination=_d,n}return t.create=function(e,t,n){return new pd(e,t,n)},t.prototype.next=function(e){this.isStopped?gd(id(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?gd(rd(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?gd(nd,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ju),ud=Function.prototype.bind;function dd(e,t){return ud.call(e,t)}var fd=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){md(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){md(e)}else md(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){md(e)}},e}(),pd=function(e){Fu(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Wu(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Qu.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&dd(t.next,o),error:t.error&&dd(t.error,o),complete:t.complete&&dd(t.complete,o)}):a=t}return i.destination=new fd(a),i}return t}(ld);function md(e){Qu.useDeprecatedSynchronousErrorHandling?cd(e):ed(e)}function hd(e){throw e}function gd(e,t){var n=Qu.onStoppedNotification;n&&$u.setTimeout(function(){return n(e,t)})}var _d={closed:!0,next:td,error:hd,complete:td},vd=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function yd(e){return e}function bd(){return xd([...arguments])}function xd(e){return e.length===0?yd:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Sd=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Td(e)?e:new pd(e,t,n);return sd(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Cd(t),new t(function(t,r){var i=new pd({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[vd]=function(){return this},e.prototype.pipe=function(){return xd([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Cd(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Cd(e){return e??Qu.Promise??Promise}function wd(e){return e&&Wu(e.next)&&Wu(e.error)&&Wu(e.complete)}function Td(e){return e&&e instanceof ld||wd(e)&&Xu(e)}function Ed(e){return Wu(e?.lift)}function Dd(e){return function(t){if(Ed(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Od(e,t,n,r,i){return new kd(e,t,n,r,i)}var kd=function(e){Fu(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(ld),Ad=Gu(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),V=function(e){Fu(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new jd(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ad},t.prototype.next=function(e){var t=this;sd(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Ru(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;sd(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;sd(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Yu:(this.currentObservers=null,a.push(e),new Ju(function(){t.currentObservers=null,qu(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Sd;return e.source=this,e},t.create=function(e,t){return new jd(e,t)},t}(Sd),jd=function(e){Fu(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Yu},t}(V),Md={now:function(){return(Md.delegate||Date).now()},delegate:void 0},Nd=function(e){Fu(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Md);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function jf(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():Af(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:Af(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function Mf(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=Nf&&(i+=r/Nf|0,r%=Nf)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?zf(r,i):Rf(r,i)}function Ff(e,t){let n=Rf(e,t),r=n.hi&2147483648;r&&(n=zf(n.lo,n.hi));let i=If(n.lo,n.hi);return r?`-`+i:i}function If(e,t){if({lo:e,hi:t}=Lf(e,t),t<=2097151)return String(Nf*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+Bf(o)+Bf(a)}function Lf(e,t){return{lo:e>>>0,hi:t>>>0}}function Rf(e,t){return{lo:e|0,hi:t|0}}function zf(e,t){return t=~t,e?e=~e+1:t+=1,Rf(e,t)}var Bf=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function Vf(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var Hf=Uf();function Uf(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),qf(i)}return Kf}function Yf(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var Xf;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Xf||={});var U=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?Yf(e):Jf().encodeUtf8Into,this.buffer=$f,this.viewCache=ep,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||Zf;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity(Qf),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-Qf,n=np(t);return n>Qf&&(this.ensureCapacity(n-Qf),this.buffer.copyWithin(e+n,e+Qf,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(ip(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(rp(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=tp){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=np(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=np(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return ap(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return ip(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return rp(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return rp(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=Hf.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=Hf.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=Hf.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=Hf.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=Hf.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},Zf=128,Qf=1,$f=new Uint8Array,ep=new DataView($f.buffer),tp=32;function np(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var W=class{constructor(e,t=Jf().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Mf,this.uint32=Vf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case Xf.Varint:for(;this.buf[this.pos++]&128;);break;case Xf.Bit64:this.pos+=4;case Xf.Bit32:this.pos+=4;break;case Xf.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Xf.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===Xf.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),Hf.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),Hf.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,Hf.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Hf.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Hf.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=tp){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function rp(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function ip(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function ap(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var op=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function sp(){return{fields:{}}}var cp={encode(e,t=new U){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&up.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=sp();for(;n.pos>>3){case 1:{if(e!==10)break;let t=up.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cp.fromPartial(e??{})},fromPartial(e){let t=sp();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=sp();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function lp(){return{key:``,value:void 0}}var up={encode(e,t=new U){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=lp();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return up.fromPartial(e??{})},fromPartial(e){let t=lp();return t.key=e.key??``,t.value=e.value??void 0,t}};function dp(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var G={encode(e,t=new U){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&cp.encode(cp.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&pp.encode(pp.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=dp();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=cp.unwrap(cp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=pp.unwrap(pp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=dp();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=dp();if(e===null)t.nullValue=op.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function fp(){return{values:[]}}var pp={encode(e,t=new U){for(let n of e.values)G.encode(G.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=fp();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(G.unwrap(G.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return pp.fromPartial(e??{})},fromPartial(e){let t=fp();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=fp();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},mp=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function hp(){return{op:0,path:``,from:void 0,value:void 0}}var gp={encode(e,t=new U){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=hp();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gp.fromPartial(e??{})},fromPartial(e){let t=hp();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function _p(){return{id:``,type:``,function:void 0,metadata:void 0}}var vp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&bp.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&cp.encode(cp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=_p();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=bp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=cp.unwrap(cp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vp.fromPartial(e??{})},fromPartial(e){let t=_p();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?bp.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t}};function yp(){return{name:``,arguments:``}}var bp={encode(e,t=new U){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=yp();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bp.fromPartial(e??{})},fromPartial(e){let t=yp();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function xp(){return{value:``,mimeType:``}}var Sp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=xp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Sp.fromPartial(e??{})},fromPartial(e){let t=xp();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function Cp(){return{value:``,mimeType:void 0}}var wp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Cp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wp.fromPartial(e??{})},fromPartial(e){let t=Cp();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function Tp(){return{data:void 0,url:void 0}}var Ep={encode(e,t=new U){return e.data!==void 0&&Sp.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&wp.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Tp();for(;n.pos>>3){case 1:if(e!==10)break;i.data=Sp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=wp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ep.fromPartial(e??{})},fromPartial(e){let t=Tp();return t.data=e.data!==void 0&&e.data!==null?Sp.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?wp.fromPartial(e.url):void 0,t}};function Dp(){return{text:``}}var Op={encode(e,t=new U){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Dp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Op.fromPartial(e??{})},fromPartial(e){let t=Dp();return t.text=e.text??``,t}};function kp(){return{source:void 0,metadata:void 0}}var Ap={encode(e,t=new U){return e.source!==void 0&&Ep.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=kp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Ep.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ap.fromPartial(e??{})},fromPartial(e){let t=kp();return t.source=e.source!==void 0&&e.source!==null?Ep.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function jp(){return{source:void 0,metadata:void 0}}var Mp={encode(e,t=new U){return e.source!==void 0&&Ep.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=jp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Ep.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Mp.fromPartial(e??{})},fromPartial(e){let t=jp();return t.source=e.source!==void 0&&e.source!==null?Ep.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Np(){return{source:void 0,metadata:void 0}}var Pp={encode(e,t=new U){return e.source!==void 0&&Ep.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Np();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Ep.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Pp.fromPartial(e??{})},fromPartial(e){let t=Np();return t.source=e.source!==void 0&&e.source!==null?Ep.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Fp(){return{source:void 0,metadata:void 0}}var Ip={encode(e,t=new U){return e.source!==void 0&&Ep.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Fp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Ep.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Ip.fromPartial(e??{})},fromPartial(e){let t=Fp();return t.source=e.source!==void 0&&e.source!==null?Ep.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Lp(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var Rp={encode(e,t=new U){return e.text!==void 0&&Op.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&Ap.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&Mp.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&Pp.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&Ip.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Lp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=Op.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=Ap.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=Mp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=Pp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=Ip.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Rp.fromPartial(e??{})},fromPartial(e){let t=Lp();return t.text=e.text!==void 0&&e.text!==null?Op.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?Ap.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?Mp.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?Pp.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?Ip.fromPartial(e.document):void 0,t}};function zp(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0}}var Bp={encode(e,t=new U){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)vp.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)Rp.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&cp.encode(cp.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=zp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(vp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(Rp.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=cp.unwrap(cp.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Bp.fromPartial(e??{})},fromPartial(e){let t=zp();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>vp.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>Rp.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Vp(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var Hp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&G.encode(G.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Vp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=G.unwrap(G.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Hp.fromPartial(e??{})},fromPartial(e){let t=Vp();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},Up=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function Wp(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var K={encode(e,t=new U){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&G.encode(G.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&cp.encode(cp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Wp();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=Lm(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=cp.unwrap(cp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return K.fromPartial(e??{})},fromPartial(e){let t=Wp();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function Gp(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var Kp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Gp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Kp.fromPartial(e??{})},fromPartial(e){let t=Gp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function qp(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var Jp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=qp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Jp.fromPartial(e??{})},fromPartial(e){let t=qp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Yp(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var Xp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Yp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Xp.fromPartial(e??{})},fromPartial(e){let t=Yp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Zp(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var Qp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Zp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Qp.fromPartial(e??{})},fromPartial(e){let t=Zp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function $p(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var em={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=$p();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return em.fromPartial(e??{})},fromPartial(e){let t=$p();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function tm(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var nm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=tm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return nm.fromPartial(e??{})},fromPartial(e){let t=tm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function rm(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var im={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&G.encode(G.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=rm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return im.fromPartial(e??{})},fromPartial(e){let t=rm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function am(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var om={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)gp.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=am();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(gp.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return om.fromPartial(e??{})},fromPartial(e){let t=am();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>gp.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function sm(){return{baseEvent:void 0,messages:[]}}var cm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)Bp.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=sm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(Bp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return cm.fromPartial(e??{})},fromPartial(e){let t=sm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>Bp.fromPartial(e))||[],t}};function lm(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var um={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&G.encode(G.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=lm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return um.fromPartial(e??{})},fromPartial(e){let t=lm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function dm(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var fm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=dm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return fm.fromPartial(e??{})},fromPartial(e){let t=dm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function pm(){return{baseEvent:void 0,threadId:``,runId:``}}var mm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=pm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mm.fromPartial(e??{})},fromPartial(e){let t=pm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function hm(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var gm={encode(e,t=new U){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=hm();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=Lm(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=Lm(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=Lm(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=Lm(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=Lm(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return gm.fromPartial(e??{})},fromPartial(e){let t=hm();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function _m(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var vm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)Hp.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)gm.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=_m();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(Hp.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(gm.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return vm.fromPartial(e??{})},fromPartial(e){let t=_m();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>Hp.fromPartial(e))||[],t.usage=e.usage?.map(e=>gm.fromPartial(e))||[],t}};function ym(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var bm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)gm.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=ym();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(gm.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return bm.fromPartial(e??{})},fromPartial(e){let t=ym();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>gm.fromPartial(e))||[],t}};function xm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Sm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=xm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Sm.fromPartial(e??{})},fromPartial(e){let t=xm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Cm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var wm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Cm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return wm.fromPartial(e??{})},fromPartial(e){let t=Cm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Tm(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var Em={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Tm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Em.fromPartial(e??{})},fromPartial(e){let t=Tm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Dm(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var Om={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Dm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Om.fromPartial(e??{})},fromPartial(e){let t=Dm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function km(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var Am={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=km();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Am.fromPartial(e??{})},fromPartial(e){let t=km();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function jm(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var Mm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=jm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Mm.fromPartial(e??{})},fromPartial(e){let t=jm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function Nm(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var Pm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Nm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Pm.fromPartial(e??{})},fromPartial(e){let t=Nm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function Fm(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0}}var Im={encode(e,t=new U){return e.textMessageStart!==void 0&&Kp.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Jp.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Xp.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&Qp.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&em.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&nm.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&im.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&om.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&cm.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&um.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&fm.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&mm.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&vm.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&bm.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&Sm.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&wm.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&Em.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&Om.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&Am.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&Mm.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&Pm.encode(e.subagentError,t.uint32(170).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Fm();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=Kp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=Jp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=Xp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=Qp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=em.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=nm.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=im.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=om.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=cm.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=um.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=fm.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=mm.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=vm.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=bm.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=Sm.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=wm.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=Em.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=Om.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=Am.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=Mm.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=Pm.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Im.fromPartial(e??{})},fromPartial(e){let t=Fm();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?Kp.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Jp.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Xp.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?Qp.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?em.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?nm.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?im.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?om.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?cm.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?um.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?fm.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?mm.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?vm.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?bm.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?Sm.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?wm.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?Em.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?Om.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?Am.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?Mm.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?Pm.fromPartial(e.subagentError):void 0,t}};function Lm(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,zm=e=>{let t=Rm(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},Bm=e=>{let t=Rm(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:zm(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:zm(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:zm(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:zm(e.source),metadata:e.metadata}}}};function Vm(e){let t=Im.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=Up[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,n.baseEvent.metadata!==void 0&&(n.metadata=n.baseEvent.metadata),delete n.baseEvent,n.type===z.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>Bm(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===z.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if(n.type===z.SUBAGENT_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interruptIds)?e.interruptIds:[];delete e.interruptIds,t===`suspended`?e.outcome={type:`suspended`,...r.length>0&&{interruptIds:r}}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===z.RUN_FINISHED||n.type===z.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===z.STATE_DELTA)for(let e of n.delta)e.op=mp[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Zl.parse(n)}var Hm;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Hm||={});var Um;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Um||={});var q=Hm.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Wm=e=>{switch(typeof e){case`undefined`:return q.undefined;case`string`:return q.string;case`number`:return Number.isNaN(e)?q.nan:q.number;case`boolean`:return q.boolean;case`function`:return q.function;case`bigint`:return q.bigint;case`symbol`:return q.symbol;case`object`:return Array.isArray(e)?q.array:e===null?q.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?q.promise:typeof Map<`u`&&e instanceof Map?q.map:typeof Set<`u`&&e instanceof Set?q.set:typeof Date<`u`&&e instanceof Date?q.date:q.object;default:return q.unknown}},J=Hm.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Gm=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Gm.create=e=>new Gm(e);var Km=(e,t)=>{let n;switch(e.code){case J.invalid_type:n=e.received===q.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Hm.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Hm.joinValues(e.keys,`, `)}`;break;case J.invalid_union:n=`Invalid input`;break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Hm.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Hm.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n=`Invalid function arguments`;break;case J.invalid_return_type:n=`Invalid function return type`;break;case J.invalid_date:n=`Invalid date`;break;case J.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Hm.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case J.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case J.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case J.custom:n=`Invalid input`;break;case J.invalid_intersection_types:n=`Intersection results could not be merged`;break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Hm.assertNever(e)}return{message:n}},qm=Km;function Jm(){return qm}var Ym=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Y(e,t){let n=Jm(),r=Ym({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Km?void 0:Km].filter(e=>!!e)});e.common.issues.push(r)}var Xm=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return X;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return X;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},X=Object.freeze({status:`aborted`}),Zm=e=>({status:`dirty`,value:e}),Qm=e=>({status:`valid`,value:e}),$m=e=>e.status===`aborted`,eh=e=>e.status===`dirty`,th=e=>e.status===`valid`,nh=e=>typeof Promise<`u`&&e instanceof Promise,Z;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Z||={});var rh=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ih=(e,t)=>{if(th(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Gm(e.common.issues);return this._error=t,this._error}}};function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var ah=class{get description(){return this._def.description}_getType(e){return Wm(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Wm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Xm,ctx:{common:e.parent.common,data:e.data,parsedType:Wm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(nh(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wm(e)};return ih(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wm(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return th(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>th(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Wm(e)},r=this._parse({data:e,path:n.path,parent:n});return ih(n,await(nh(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:J.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new cg({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return lg.create(this,this._def)}nullable(){return ug.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Uh.create(this)}promise(){return sg.create(this,this._def)}or(e){return Kh.create([this,e],this._def)}and(e){return Xh.create(this,e,this._def)}transform(e){return new cg({...Q(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new dg({...Q(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new mg({typeName:$.ZodBranded,type:this,...Q(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new fg({...Q(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return hg.create(this,e)}readonly(){return gg.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},oh=/^c[^\s-]{8,}$/i,sh=/^[0-9a-z]+$/,ch=/^[0-9A-HJKMNP-TV-Z]{26}$/i,lh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,uh=/^[a-z0-9_-]{21}$/i,dh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,fh=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,ph=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,mh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,hh,gh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,_h=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,vh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,yh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,bh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,xh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Sh=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Ch=RegExp(`^${Sh}$`);function wh(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Th(e){return RegExp(`^${wh(e)}$`)}function Eh(e){let t=`${Sh}T${wh(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Dh(e,t){return!((t!==`v4`&&t||!gh.test(e))&&(t!==`v6`&&t||!vh.test(e)))}function Oh(e,t){if(!dh.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function kh(e,t){return!((t!==`v4`&&t||!_h.test(e))&&(t!==`v6`&&t||!yh.test(e)))}var Ah=class e extends ah{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.string,received:t.parsedType}),X}let t=new Xm,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:J.invalid_string,...Z.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Z.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Z.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Z.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Z.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Z.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Z.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Z.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Z.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Z.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Z.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Z.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Z.errToObj(t)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ah({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...Q(e)});function jh(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Mh=class e extends ah{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.number,received:t.parsedType}),X}let t,n=new Xm;for(let r of this._def.checks)r.kind===`int`?Hm.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?jh(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_finite,message:r.message}),n.dirty()):Hm.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Z.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Z.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Z.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Z.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Hm.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Mh({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...Q(e)});var Nh=class e extends ah{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let t,n=new Xm;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Hm.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.bigint,received:t.parsedType}),X}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Nh({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});var Ph=class extends ah{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.boolean,received:t.parsedType}),X}return Qm(e.data)}};Ph.create=e=>new Ph({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});var Fh=class e extends ah{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.date,received:t.parsedType}),X}if(Number.isNaN(e.data.getTime()))return Y(this._getOrReturnCtx(e),{code:J.invalid_date}),X;let t=new Xm,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Hm.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Z.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Z.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Fh({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...Q(e)});var Ih=class extends ah{_parse(e){if(this._getType(e)!==q.symbol){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.symbol,received:t.parsedType}),X}return Qm(e.data)}};Ih.create=e=>new Ih({typeName:$.ZodSymbol,...Q(e)});var Lh=class extends ah{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.undefined,received:t.parsedType}),X}return Qm(e.data)}};Lh.create=e=>new Lh({typeName:$.ZodUndefined,...Q(e)});var Rh=class extends ah{_parse(e){if(this._getType(e)!==q.null){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.null,received:t.parsedType}),X}return Qm(e.data)}};Rh.create=e=>new Rh({typeName:$.ZodNull,...Q(e)});var zh=class extends ah{constructor(){super(...arguments),this._any=!0}_parse(e){return Qm(e.data)}};zh.create=e=>new zh({typeName:$.ZodAny,...Q(e)});var Bh=class extends ah{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Qm(e.data)}};Bh.create=e=>new Bh({typeName:$.ZodUnknown,...Q(e)});var Vh=class extends ah{_parse(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.never,received:t.parsedType}),X}};Vh.create=e=>new Vh({typeName:$.ZodNever,...Q(e)});var Hh=class extends ah{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.void,received:t.parsedType}),X}return Qm(e.data)}};Hh.create=e=>new Hh({typeName:$.ZodVoid,...Q(e)});var Uh=class e extends ah{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==q.array)return Y(t,{code:J.invalid_type,expected:q.array,received:t.parsedType}),X;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(Y(t,{code:J.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new rh(t,e,t.path,n)))).then(e=>Xm.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new rh(t,e,t.path,n)));return Xm.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Z.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};Uh.create=(e,t)=>new Uh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...Q(t)});function Wh(e){if(e instanceof Gh){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=lg.create(Wh(r))}return new Gh({...e._def,shape:()=>t})}return e instanceof Uh?new Uh({...e._def,type:Wh(e.element)}):e instanceof lg?lg.create(Wh(e.unwrap())):e instanceof ug?ug.create(Wh(e.unwrap())):e instanceof Zh?Zh.create(e.items.map(e=>Wh(e))):e}var Gh=class e extends ah{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Hm.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==q.object){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Vh&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new rh(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Vh){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Y(n,{code:J.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new rh(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Xm.mergeObjectSync(t,e)):Xm.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Z.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Z.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Hm.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Hm.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Wh(this)}partial(t){let n={};for(let e of Hm.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Hm.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof lg;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return ig(Hm.objectKeys(this.shape))}};Gh.create=(e,t)=>new Gh({shape:()=>e,unknownKeys:`strip`,catchall:Vh.create(),typeName:$.ZodObject,...Q(t)}),Gh.strictCreate=(e,t)=>new Gh({shape:()=>e,unknownKeys:`strict`,catchall:Vh.create(),typeName:$.ZodObject,...Q(t)}),Gh.lazycreate=(e,t)=>new Gh({shape:e,unknownKeys:`strip`,catchall:Vh.create(),typeName:$.ZodObject,...Q(t)});var Kh=class extends ah{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Gm(e.ctx.common.issues));return Y(t,{code:J.invalid_union,unionErrors:n}),X}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Gm(e));return Y(t,{code:J.invalid_union,unionErrors:i}),X}}get options(){return this._def.options}};Kh.create=(e,t)=>new Kh({options:e,typeName:$.ZodUnion,...Q(t)});var qh=e=>e instanceof ng?qh(e.schema):e instanceof cg?qh(e.innerType()):e instanceof rg?[e.value]:e instanceof ag?e.options:e instanceof og?Hm.objectValues(e.enum):e instanceof dg?qh(e._def.innerType):e instanceof Lh?[void 0]:e instanceof Rh?[null]:e instanceof lg?[void 0,...qh(e.unwrap())]:e instanceof ug?[null,...qh(e.unwrap())]:e instanceof mg||e instanceof gg?qh(e.unwrap()):e instanceof fg?qh(e._def.innerType):[],Jh=class e extends ah{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.object)return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Y(t,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),X)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=qh(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Q(r)})}};function Yh(e,t){let n=Wm(e),r=Wm(t);if(e===t)return{valid:!0,data:e};if(n===q.object&&r===q.object){let n=Hm.objectKeys(t),r=Hm.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Yh(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===q.array&&r===q.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if($m(e)||$m(r))return X;let i=Yh(e.value,r.value);return i.valid?((eh(e)||eh(r))&&t.dirty(),{status:t.value,value:i.data}):(Y(n,{code:J.invalid_intersection_types}),X)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Xh.create=(e,t,n)=>new Xh({left:e,right:t,typeName:$.ZodIntersection,...Q(n)});var Zh=class e extends ah{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return Y(n,{code:J.invalid_type,expected:q.array,received:n.parsedType}),X;if(n.data.lengththis._def.items.length&&(Y(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new rh(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Xm.mergeArray(t,e)):Xm.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Zh.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Zh({items:e,typeName:$.ZodTuple,rest:null,...Q(t)})};var Qh=class e extends ah{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return Y(n,{code:J.invalid_type,expected:q.object,received:n.parsedType}),X;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new rh(n,e,n.path,e)),value:a._parse(new rh(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Xm.mergeObjectAsync(t,r):Xm.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof ah?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...Q(r)}):new e({keyType:Ah.create(),valueType:t,typeName:$.ZodRecord,...Q(n)})}},$h=class extends ah{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return Y(n,{code:J.invalid_type,expected:q.map,received:n.parsedType}),X;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new rh(n,e,n.path,[a,`key`])),value:i._parse(new rh(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};$h.create=(e,t,n)=>new $h({valueType:t,keyType:e,typeName:$.ZodMap,...Q(n)});var eg=class e extends ah{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return Y(n,{code:J.invalid_type,expected:q.set,received:n.parsedType}),X;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(Y(n,{code:J.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return X;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new rh(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Z.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};eg.create=(e,t)=>new eg({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...Q(t)});var tg=class e extends ah{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.function)return Y(t,{code:J.invalid_type,expected:q.function,received:t.parsedType}),X;function n(e,n){return Ym({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Jm(),Km].filter(e=>!!e),issueData:{code:J.invalid_arguments,argumentsError:n}})}function r(e,n){return Ym({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Jm(),Km].filter(e=>!!e),issueData:{code:J.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof sg){let e=this;return Qm(async function(...t){let o=new Gm([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return Qm(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Gm([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Gm([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Zh.create(t).rest(Bh.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Zh.create([]).rest(Bh.create()),returns:n||Bh.create(),typeName:$.ZodFunction,...Q(r)})}},ng=class extends ah{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ng.create=(e,t)=>new ng({getter:e,typeName:$.ZodLazy,...Q(t)});var rg=class extends ah{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Y(t,{received:t.data,code:J.invalid_literal,expected:this._def.value}),X}return{status:`valid`,value:e.data}}get value(){return this._def.value}};rg.create=(e,t)=>new rg({value:e,typeName:$.ZodLiteral,...Q(t)});function ig(e,t){return new ag({values:e,typeName:$.ZodEnum,...Q(t)})}var ag=class e extends ah{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{expected:Hm.joinValues(n),received:t.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{received:t.data,code:J.invalid_enum_value,options:n}),X}return Qm(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};ag.create=ig;var og=class extends ah{_parse(e){let t=Hm.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let e=Hm.objectValues(t);return Y(n,{expected:Hm.joinValues(e),received:n.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(Hm.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Hm.objectValues(t);return Y(n,{received:n.data,code:J.invalid_enum_value,options:e}),X}return Qm(e.data)}get enum(){return this._def.values}};og.create=(e,t)=>new og({values:e,typeName:$.ZodNativeEnum,...Q(t)});var sg=class extends ah{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==q.promise&&t.common.async===!1?(Y(t,{code:J.invalid_type,expected:q.promise,received:t.parsedType}),X):Qm((t.parsedType===q.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};sg.create=(e,t)=>new sg({type:e,typeName:$.ZodPromise,...Q(t)});var cg=class extends ah{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return X;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Zm(r.value):r});{if(t.value===`aborted`)return X;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Zm(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?X:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?X:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!th(e))return X;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>th(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):X)}Hm.assertNever(r)}};cg.create=(e,t,n)=>new cg({schema:e,typeName:$.ZodEffects,effect:t,...Q(n)}),cg.createWithPreprocess=(e,t,n)=>new cg({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...Q(n)});var lg=class extends ah{_parse(e){return this._getType(e)===q.undefined?Qm(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};lg.create=(e,t)=>new lg({innerType:e,typeName:$.ZodOptional,...Q(t)});var ug=class extends ah{_parse(e){return this._getType(e)===q.null?Qm(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ug.create=(e,t)=>new ug({innerType:e,typeName:$.ZodNullable,...Q(t)});var dg=class extends ah{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};dg.create=(e,t)=>new dg({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Q(t)});var fg=class extends ah{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return nh(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Gm(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Gm(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};fg.create=(e,t)=>new fg({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Q(t)});var pg=class extends ah{_parse(e){if(this._getType(e)!==q.nan){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.nan,received:t.parsedType}),X}return{status:`valid`,value:e.data}}};pg.create=e=>new pg({typeName:$.ZodNaN,...Q(e)});var mg=class extends ah{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},hg=class e extends ah{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),Zm(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},gg=class extends ah{_parse(e){let t=this._def.innerType._parse(e),n=e=>(th(e)&&(e.value=Object.freeze(e.value)),e);return nh(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};gg.create=(e,t)=>new gg({innerType:e,typeName:$.ZodReadonly,...Q(t)}),Gh.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={});var _g=Ah.create;Mh.create,pg.create,Nh.create;var vg=Ph.create;Fh.create,Ih.create,Lh.create,Rh.create;var yg=zh.create;Bh.create,Vh.create,Hh.create,Uh.create;var bg=Gh.create;Gh.strictCreate,Kh.create;var xg=Jh.create;Xh.create,Zh.create,Qh.create,$h.create,eg.create,tg.create,ng.create;var Sg=rg.create,Cg=ag.create;og.create,sg.create,cg.create,lg.create,ug.create,cg.createWithPreprocess,hg.create;var wg=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Tg=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(wg);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Eg=e=>e===`*`||e===`x`||e===`X`,Dg=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},Og=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],kg=(e,t)=>{if(Eg(e)||Eg(t))return 0;let[n,r]=Og(Dg(e),Dg(t));return n>r?1:n{for(let n=0;n{let n=Tg(e),r=Tg(t),i=n.pop(),a=r.pop(),o=Ag(n,r);return o===0?i&&a?Ag(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},Mg=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function Ng(){return Go()}function Pg(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&Pg(t);return e}var Fg=524288;function Ig(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function Lg(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!Ig(t,n,Fg),c=s?Mg(t):t,l=s?Mg(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(Pg(c),Pg(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=Mg(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=Mg(e.state),d=!0,n=!0),s&&n&&Ig(c,l,Fg)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?Mg(c):c}:{},...d?{state:Object.isFrozen(l)?Mg(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function Rg(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function zg(e){if(e instanceof Bg)return e;if(e===!0)return new Bg(Rg(!0))}var Bg=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function Vg(e){return e.enabled?new Bg(e):void 0}function Hg(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function Ug(e,t){return!e||t.metadata===void 0?!1:(e.metadata=Mc(e.metadata,Mg(t.metadata)),!0)}var Wg=(e,t,n,r,i)=>{let a=zg(i),o=Mg(n.messages),s=Mg(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=Mg(c);return c={},e.messages!==void 0||e.state!==void 0?mf(e):Pd};return t.pipe(wf(async t=>{let i=await Lg(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return u();switch(t.type){case z.TEXT_MESSAGE_START:{let i=await Lg(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),u();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=Ug(s,t);(!a||c)&&l({messages:o})}return u()}case z.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),u();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let d=await Lg(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Ug(c,t),l({messages:o})),u()}case z.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),u();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let c=await Lg(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Ug(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case z.TOOL_CALL_START:{let i=await Lg(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t,a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(Ug(a,t)||r)&&l({messages:o}),u()}let s=new Set(o.map(e=>e.id)),c=Hg(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let d={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(d),Ug(d,t),l({messages:o})}return u()}case z.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await Lg(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=jf(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,Ug(d,t),l({messages:o})),u()}case z.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),u();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u();let d=await Lg(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return l(d),d.stopPropagation!==!0&&Ug(c,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()}case z.TOOL_CALL_RESULT:{let i=await Lg(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u,subagentRunId:d}=t,f={id:i,toolCallId:a,role:u||`tool`,content:c,...d!=null&&{subagentRunId:d}};Ug(f,t);let p=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(p===-1)o.push(f);else{let e=p+1;for(;e{t.onNewMessage?.({message:f,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case z.STATE_SNAPSHOT:{let i=await Lg(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case z.STATE_DELTA:{let i=await Lg(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=Nu.applyPatch(s,e,!0,!1).newDocument,l({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return u()}case z.MESSAGES_SNAPSHOT:{let i=await Lg(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=n.some(e=>e.role===`activity`),a=n.some(e=>e.role===`reasoning`),s=e=>e.role===`activity`&&!i||e.role===`reasoning`&&!a;o=o.filter(e=>s(e)||r.has(e.id)).map(e=>s(e)?e:r.get(e.id));let c=new Set(o.map(e=>e.id));for(let e of n)c.has(e.id)||o.push(e);l({messages:o})}return u()}case z.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await Lg(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:Mg(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,u;a===-1?(o.push(t),c=t,u=t):d?(f&&(o[a]={...d,activityType:i.activityType,content:Mg(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),u=o[a]):f&&(o[a]=t,c=t,u=t),Ug(u,i),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case z.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await Lg(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{Ug(d,i)&&l({messages:o});let e=Mg(d.content??{}),t=Nu.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:Mg(t),activityType:i.activityType},l({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return u()}case z.RAW:return l(await Lg(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.CUSTOM:return l(await Lg(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.RUN_STARTED:{let i=await Lg(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}l({messages:o})}}return u()}case z.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await Lg(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),u()}case z.RUN_ERROR:return l(await Lg(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.STEP_STARTED:return l(await Lg(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.STEP_FINISHED:return l(await Lg(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case z.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case z.THINKING_START:return u();case z.THINKING_END:return u();case z.THINKING_TEXT_MESSAGE_START:return u();case z.THINKING_TEXT_MESSAGE_CONTENT:return u();case z.THINKING_TEXT_MESSAGE_END:return u();case z.REASONING_START:return l(await Lg(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.REASONING_MESSAGE_START:{let i=await Lg(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e),i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=Ug(i,t);(!r||a)&&l({messages:o})}return u()}case z.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),u();let d=await Lg(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Ug(c,t),l({messages:o})),u()}case z.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),u();let c=await Lg(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Ug(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case z.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case z.REASONING_END:return l(await Lg(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await Lg(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}case z.SUBAGENT_STARTED:return l(await Lg(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.SUBAGENT_FINISHED:return l(await Lg(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case z.SUBAGENT_ERROR:return l(await Lg(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u()}return t.type,u()}),bf(),r.length>0?Tf({}):e=>e)},Gg=e=>t=>{let n=zg(e),r=new Set,i=new Set,a=new Set,o={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},s=!1,c=!1,l=!1,u=new Map,d=e=>{let t=u.get(e);return t||(t=new Map,u.set(e,t)),t},f=()=>{for(let e of u.values())if(e.size>0)return!0;return!1},p=new Map,m=new Set,h=!1,g=!1,_=!1,v=()=>{r.clear(),i.clear(),a.clear(),o.message.clear(),o.toolCall.clear(),o.activity.clear(),o.reasoning.clear(),u.clear(),p.clear(),m.clear(),h=!1,g=!1,s=!1,c=!1,_=!0},y=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new R(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?o.reasoning:e.role===`activity`?o.activity:o.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!o.toolCall.has(n.id))&&o.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},b=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new R(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(yf(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),c&&t!==z.RUN_STARTED)return H(()=>new R(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==z.RUN_ERROR&&t!==z.RUN_STARTED)return H(()=>new R(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!l){if(l=!0,t!==z.RUN_STARTED&&t!==z.RUN_ERROR)return H(()=>new R(`First event must be 'RUN_STARTED'`))}else if(t===z.RUN_STARTED){if(_&&!s&&!c)return H(()=>new R(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(s||c)&&v()}if(e.subagentRunId===null)return H(()=>new R(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===z.SUBAGENT_STARTED||t===z.SUBAGENT_FINISHED||t===z.SUBAGENT_ERROR){let n=t===z.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===z.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return H(()=>new R(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return H(()=>new R(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return H(()=>new R(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return H(()=>new R(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===z.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return H(()=>new R(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case z.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return H(()=>new R(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=o.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return H(()=>r)}return r.add(n),i||o.message.set(n,{subagentRunId:e.subagentRunId}),mf(e)}case z.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return H(()=>new R(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):mf(e)}case z.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return H(()=>new R(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):(r.delete(n),mf(e))}case z.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return H(()=>new R(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,s;if(r!==void 0){let e=o.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return H(()=>new R(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));s=e}}let c=o.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return H(()=>e);if(a===void 0&&s&&s.subagentRunId!==c.subagentRunId)return H(()=>new R(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${s.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||o.toolCall.set(n,a===void 0?s??{subagentRunId:void 0}:{subagentRunId:a}),mf(e)}case z.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return H(()=>new R(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):mf(e)}case z.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return H(()=>new R(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):(i.delete(n),mf(e))}case z.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return d(n).has(t)?H(()=>new R(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(d(n).set(t,!0),mf(e))}case z.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!d(n).has(t)){let e,r=!1;for(let[i,a]of u)if(i!==n&&a.has(t)){e=i,r=!0;break}return H(r?()=>new R(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new R(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return d(n).delete(t),mf(e)}case z.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!o.activity.has(t)||e.replace!==!1)&&o.activity.set(t,{subagentRunId:e.subagentRunId}),mf(e)}case z.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&o.message.set(t,{subagentRunId:e.subagentRunId}),mf(e)}case z.REASONING_START:case z.REASONING_MESSAGE_START:{let n=e.messageId,r=o.reasoning.get(n);if(r){let i=b(t,e.subagentRunId,r,`reasoning message`,n);if(i)return H(()=>i)}return a.add(n),r||o.reasoning.set(n,{subagentRunId:e.subagentRunId}),mf(e)}case z.REASONING_MESSAGE_CONTENT:case z.REASONING_MESSAGE_END:case z.REASONING_END:{let n=e.messageId,r=b(t,e.subagentRunId,o.reasoning.get(n),`reasoning message`,n);return r?H(()=>r):(t===z.REASONING_END&&a.delete(n),mf(e))}case z.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?o.toolCall.get(n):r===`message`?o.message.get(n)??o.reasoning.get(n):o.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,s=b(t,e.subagentRunId,i,a,n);return s?H(()=>s):mf(e)}case z.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,o.activity.get(n),`activity`,n);return r?H(()=>r):mf(e)}case z.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return H(()=>new R(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return H(()=>new R(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return p.has(t)?H(()=>new R(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):m.has(t)?H(()=>new R(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!p.has(n)&&!m.has(n)?H(()=>new R(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(p.set(t,!0),mf(e))}case z.SUBAGENT_FINISHED:case z.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return H(()=>new R(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===z.SUBAGENT_ERROR&&typeof e.message!=`string`)return H(()=>new R(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return p.has(n)?(p.delete(n),m.add(n),mf(e)):H(()=>new R(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case z.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return H(()=>t)}return mf(e);case z.RUN_STARTED:_=!0;{let t=y((e.input??{}).messages,!1);if(t)return H(()=>t)}return mf(e);case z.RUN_FINISHED:if(f()){let e=[];for(let[t,n]of u)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return H(()=>new R(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return H(()=>new R(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return H(()=>new R(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(p.size>0){let e=Array.from(p.keys()).join(`, `);return H(()=>new R(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return s=!0,mf(e);case z.RUN_ERROR:return c=!0,mf(e);case z.CUSTOM:return mf(e);case z.THINKING_TEXT_MESSAGE_START:return h?g?H(()=>new R(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(g=!0,mf(e)):H(()=>new R(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case z.THINKING_TEXT_MESSAGE_CONTENT:return g?mf(e):H(()=>new R(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case z.THINKING_TEXT_MESSAGE_END:return g?(g=!1,mf(e)):H(()=>new R(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case z.THINKING_START:return h?H(()=>new R(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(h=!0,mf(e));case z.THINKING_END:return h?(h=!1,mf(e)):H(()=>new R(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return mf(e)}}))},Kg=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),qg=e=>xf(()=>pf(e())).pipe(Df(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return pf(e.text()).pipe(yf(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,H(()=>i)}))}let t={type:Kg.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new Sd(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:Kg.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):H(()=>Error(`Failed to getReader() from response`))})),Jg=(e,t)=>{let n=zg(t),r=new V,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==Kg.HEADERS&&e.type===Kg.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e)}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` -`),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` -`),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},Yg=e=>{let t=new V,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==Kg.HEADERS&&e.type===Kg.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=zg(t),r=new V,i=new Nd,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===Kg.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?Yg(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):Jg(i,n).subscribe({next:e=>{try{let t=Zl.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:z.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},Zg=Cg([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),Qg=Cg([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);xg(`type`,[bg({type:Sg(Zg.enum.TextMessageStart),messageId:_g(),parentMessageId:_g().optional(),role:_g().optional()}),bg({type:Sg(Zg.enum.TextMessageContent),messageId:_g(),content:_g()}),bg({type:Sg(Zg.enum.TextMessageEnd),messageId:_g()}),bg({type:Sg(Zg.enum.ActionExecutionStart),actionExecutionId:_g(),actionName:_g(),parentMessageId:_g().optional()}),bg({type:Sg(Zg.enum.ActionExecutionArgs),actionExecutionId:_g(),args:_g()}),bg({type:Sg(Zg.enum.ActionExecutionEnd),actionExecutionId:_g()}),bg({type:Sg(Zg.enum.ActionExecutionResult),actionName:_g(),actionExecutionId:_g(),result:_g()}),bg({type:Sg(Zg.enum.AgentStateMessage),threadId:_g(),agentName:_g(),nodeName:_g(),runId:_g(),active:vg(),role:_g(),state:_g(),running:vg()}),bg({type:Sg(Zg.enum.MetaEvent),name:Qg,value:yg()}),bg({type:Sg(Zg.enum.RunError),message:_g(),code:_g().optional()})]),bg({id:_g(),role:_g(),content:_g(),parentMessageId:_g().optional()}),bg({id:_g(),name:_g(),arguments:yg(),parentMessageId:_g().optional()}),bg({id:_g(),result:yg(),actionExecutionId:_g(),actionName:_g()});var $g=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` -`)},e_=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(yf(r=>{switch(r.type){case z.TEXT_MESSAGE_START:{let e=r;return[{type:Zg.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case z.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:Zg.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case z.TEXT_MESSAGE_END:{let e=r;return[{type:Zg.enum.TextMessageEnd,messageId:e.messageId}]}case z.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:Zg.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case z.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(jf(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:Zg.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case z.TOOL_CALL_END:{let e=r;return[{type:Zg.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case z.TOOL_CALL_RESULT:{let e=r;return[{type:Zg.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case z.RAW:return[];case z.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:Zg.enum.MetaEvent,name:e.name,value:e.value}]}case z.STATE_SNAPSHOT:return f(r.snapshot),[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case z.STATE_DELTA:{let c=r,l=Nu.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case z.MESSAGES_SNAPSHOT:return c=r.messages,[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case z.RUN_STARTED:return[];case z.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:t_(c)}:{}}),active:!1}];case z.RUN_ERROR:{let e=r;return[{type:Zg.enum.RunError,message:e.message,code:e.code}]}case z.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case z.STEP_FINISHED:return u=[],l=null,[{type:Zg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function t_(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=$g(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var n_=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,r_=e=>e===`tool`?`toolCallId`:`messageId`,i_=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},a_=e=>t=>{let n=zg(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:z.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:z.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:z.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&n_(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${r_(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(yf(e=>{switch(e.type){case z.TEXT_MESSAGE_START:case z.TEXT_MESSAGE_CONTENT:case z.TEXT_MESSAGE_END:case z.TOOL_CALL_START:case z.TOOL_CALL_ARGS:case z.TOOL_CALL_END:case z.TOOL_CALL_RESULT:case z.STATE_SNAPSHOT:case z.STATE_DELTA:case z.CUSTOM:case z.STEP_STARTED:case z.STEP_FINISHED:case z.THINKING_START:case z.THINKING_END:case z.THINKING_TEXT_MESSAGE_START:case z.THINKING_TEXT_MESSAGE_CONTENT:case z.THINKING_TEXT_MESSAGE_END:case z.REASONING_START:case z.REASONING_MESSAGE_START:case z.REASONING_MESSAGE_CONTENT:case z.REASONING_MESSAGE_END:case z.REASONING_END:return[...i(e.subagentRunId??void 0),e];case z.RUN_STARTED:case z.RUN_FINISHED:case z.RUN_ERROR:case z.MESSAGES_SNAPSHOT:return[...a(),e];case z.RAW:case z.ACTIVITY_SNAPSHOT:case z.ACTIVITY_DELTA:case z.REASONING_ENCRYPTED_VALUE:case z.SUBAGENT_STARTED:return[e];case z.SUBAGENT_FINISHED:case z.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case z.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=i_({type:z.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=i_({type:z.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:z.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case z.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=i_({type:z.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=i_({type:z.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:z.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case z.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=i_({type:z.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=i_({type:z.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:z.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),Ef(()=>{a()}))};function o_(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var s_=class{runNext(e,t){return t.run(e).pipe(a_(!1))}runNextWithState(e,t){let n=Mg(e.messages||[]),r=Mg(e.state||{}),i=new Nd;return Wg(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(wf(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:Mg(n),state:Mg(r)})))}},c_=class extends s_{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function l_(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var u_=class extends s_{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(l_)};return this.runNext(i,t)}},d_=`THINKING_START`,f_=`THINKING_END`,p_=`THINKING_TEXT_MESSAGE_START`,m_=`THINKING_TEXT_MESSAGE_CONTENT`,h_=`THINKING_TEXT_MESSAGE_END`,g_=class extends s_{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(_f(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case d_:{this.currentReasoningId=Ng();let{title:t,...n}=e;return this.warnAboutTransformation(d_,z.REASONING_START),{...n,type:z.REASONING_START,messageId:this.currentReasoningId}}case p_:return this.currentMessageId=Ng(),this.warnAboutTransformation(p_,z.REASONING_MESSAGE_START),{...e,type:z.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case m_:{let{delta:t,...n}=e;return this.warnAboutTransformation(m_,z.REASONING_MESSAGE_CONTENT),{...n,type:z.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??Ng(),delta:t}}case h_:{let t=this.currentMessageId??Ng();return this.warnAboutTransformation(h_,z.REASONING_MESSAGE_END),{...e,type:z.REASONING_MESSAGE_END,messageId:t}}case f_:{let t=this.currentReasoningId??Ng();return this.warnAboutTransformation(f_,z.REASONING_END),{...e,type:z.REASONING_END,messageId:t}}default:return e}}};function __(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function v_(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function y_(e){let t=__(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e}function b_(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>v_(e)?y_(e):e);return{...e,content:n}}var x_=class extends s_{run(e,t){let n={...e,messages:e.messages.map(b_)};return this.runNext(n,t)}},S_=`SUBAGENT_STARTED`,C_=`SUBAGENT_FINISHED`,w_=`SUBAGENT_ERROR`;function T_(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function E_(e){return e.map(e=>T_(e))}var D_=class extends s_{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>T_(e))};return this.runNext(n,t).pipe(kf(e=>{let t=e.type;(t===S_||t===C_||t===w_)&&this.warnDroppedLifecycleEvent(t)}),Sf(e=>{let t=e.type;return t!==S_&&t!==C_&&t!==w_}),_f(e=>{let t=T_(e);if(t.type===z.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:E_(e.messages)}}if(t.type===z.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>T_(e))}}}if(t.type===z.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:E_(e.input.messages)}}}return t}))}},O_=`0.0.59`,k_=class{get maxVersion(){return O_}get debug(){return this._debug}set debug(e){this._debug=Rg(e),this._debugLogger=Vg(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?Vg(Rg(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Go(),this.messages=Mg(r??[]),this.state=Mg(i??{}),this._debug=Rg(a),this._debugLogger=Vg(this._debug),jg(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new u_),jg(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new g_),jg(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new x_),jg(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new D_)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new c_(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new V;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await gf(bd(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),a_(this.debugLogger),Gg(this.debugLogger),e=>e.pipe(Of(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),Cf(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Ef(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(mf(null)));let s=Mg(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Qc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new V;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await gf(bd(()=>xf(()=>this.connect(n)),a_(this.debugLogger),Gg(this.debugLogger),e=>e.pipe(Of(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),Cf(e=>(this.isRunning=!1,e instanceof Qc?Pd:this.onError(n,e,a))),Ef(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(mf(null)),{defaultValue:void 0});let s=Mg(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return Wg(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(kf(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=Mg(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Go(),tools:Mg(e?.tools??[]),context:Mg(e?.context??[]),forwardedProps:Mg(e?.forwardedProps??{}),state:Mg(this.state),messages:n,...e?.resume===void 0?{}:{resume:Mg(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new R(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(o_(e))throw new R(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await Lg(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return pf(Lg(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(_f(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await Lg(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Mg(this.messages),e.state=Mg(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=Mg(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=Mg(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=Mg(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Go();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(a_(this.debugLogger),Gg(this.debugLogger),e_(this.threadId,t.runId,this.agentId),e=>e.pipe(_f(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function A_(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var j_=class extends k_{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(A_(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Mg(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return Xg(qg(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=Mg(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},M_=class extends ln{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:wn(t,n.data),hasPreviousPage:un(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},N_=class extends pn{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new bn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=P_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=P_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=P_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=P_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){xn.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>Dn(t,e))}findAll(e={}){return this.getAll().filter(t=>Dn(e,t))}notify(e){xn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return xn.batch(()=>Promise.all(e.map(e=>e.continue().catch(En))))}};function P_(e){return e.options.scope?.id}var F_=class extends pn{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??Tn(r,t),a=this.get(i);return a||(a=new _n({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){xn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>cn(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>cn(e,t)):t}notify(e){xn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){xn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){xn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},I_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new F_,this.#t=e.mutationCache||new N_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=vn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=dn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Kt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=fn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return xn.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;xn.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return xn.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=xn.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(En).catch(En)}invalidateQueries(e,t={}){return xn.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=xn.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(En)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(En)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(Kt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(Kt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(En).catch(En)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(En).catch(En)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return dn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(on(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{an(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(on(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{an(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=Tn(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Jt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function L_(e,t){return sn(e,M_,t)}var R_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),z_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),B_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),V_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),H_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),U_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),W_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),G_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:R_}));G_.displayName=`BookOpenIcon`;var K_=G_,q_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:z_}));q_.displayName=`MagnifyingGlassIcon`;var J_=q_,Y_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:B_}));Y_.displayName=`MoonIcon`;var X_=Y_,Z_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:V_}));Z_.displayName=`PencilSimpleIcon`;var Q_=Z_,$_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:H_}));$_.displayName=`PlugsConnectedIcon`;var ev=$_,tv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:U_}));tv.displayName=`SignOutIcon`;var nv=tv,rv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:W_}));rv.displayName=`SunIcon`;var iv=rv,av={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function ov(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await De(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function sv({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=tn(),[f,p]=(0,w.useState)(``),[m]=fa(f.trim(),250),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(null),[b,x]=(0,w.useState)(``),[ee,ne]=(0,w.useState)(``),[S,ie]=(0,w.useState)(!1),oe=(0,w.useRef)(null);(0,w.useImperativeHandle)(u,()=>({focusSearch:()=>oe.current?.focus()}),[]),(0,w.useEffect)(()=>{r&&requestAnimationFrame(()=>oe.current?.focus())},[r]);let se=L_({queryKey:[...Sn,m],queryFn:({pageParam:e})=>ov(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),le=mn({queryKey:Cn,queryFn:()=>yn(`/api/dashboards`),refetchInterval:3e4}),ue=(0,w.useMemo)(()=>se.data?.pages.flatMap(e=>e.threads)??[],[se.data]),de=(0,w.useMemo)(()=>pv(ue),[ue]),fe=pt(`overview`,ft({window:`1h`,namespace:``}),!!m&&!!l),pe=(0,w.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),me=(0,w.useMemo)(()=>{let e=le.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[le.data,m]);function he(e){ne(``),x(e.title),g(e)}async function _e(){if(h&&b.trim()){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:b.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:Sn}),g(null)}catch(e){ne(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{ie(!1)}}}async function ve(){if(_){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(_.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.threadId;v(null),await d.invalidateQueries({queryKey:Sn}),o(t)}catch(e){ne(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{ie(!1)}}}return(0,T.jsxs)(ge,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,T.jsx)(ye,{leftSection:(0,T.jsx)(Ft,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,T.jsx)(Bt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,T.jsxs)(ge,{gap:`lg`,pb:`sm`,children:[e&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(cv,{children:`Chats`}),se.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),se.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!se.isLoading&&!se.isError&&ue.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),de.map(e=>(0,T.jsxs)(ge,{gap:2,children:[de.length>1&&(0,T.jsx)(re,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,T.jsx)(lv,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>he(e),onDelete:()=>{ne(``),v(e)}},e.threadId))]},e.label)),se.hasNextPage&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:se.isFetchingNextPage,onClick:()=>void se.fetchNextPage(),children:`See all`})]}),pe.length>0&&l&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(cv,{children:`Services`}),pe.map(e=>(0,T.jsx)(te,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,T.jsx)(re,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(cv,{children:`Dashboards`}),le.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),le.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!le.isLoading&&!le.isError&&m&&me.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),me.map(e=>{let t=e.id===n;return(0,T.jsx)(te,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,T.jsxs)(ce,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,T.jsx)(Pt,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,T.jsx)(ot,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,T.jsx)(Ae,{ref:oe,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,T.jsx)(J_,{size:15}),rightSection:(0,T.jsx)(Ro,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,T.jsx)(gn,{opened:h!==null,onClose:()=>!S&&g(null),title:`Rename chat`,centered:!0,children:(0,T.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),_e()},children:(0,T.jsxs)(ge,{children:[(0,T.jsx)(Ae,{label:`Name`,value:b,onChange:e=>x(e.currentTarget.value),maxLength:120,autoFocus:!0}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>g(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{type:`submit`,loading:S,disabled:!b.trim(),children:`Save`})]})]})})}),(0,T.jsx)(gn,{opened:_!==null,onClose:()=>!S&&v(null),title:`Delete chat?`,centered:!0,children:(0,T.jsxs)(ge,{children:[(0,T.jsxs)(re,{size:`sm`,children:[`This permanently removes `,(0,T.jsx)(re,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>v(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{color:`bad`,loading:S,onClick:()=>void ve(),children:`Delete`})]})]})})]})}function cv({children:e}){return(0,T.jsx)(re,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function lv({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,T.jsx)(xe,{"data-active":t||void 0,className:`rail-row`,children:(0,T.jsxs)(ce,{gap:2,wrap:`nowrap`,children:[(0,T.jsx)(te,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,T.jsxs)(ge,{gap:0,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,T.jsx)(re,{c:`dimmed`,size:`xs`,children:mv(e.updatedAt)})]})}),(0,T.jsxs)(Le,{position:`bottom-end`,withinPortal:!0,children:[(0,T.jsx)(Le.Target,{children:(0,T.jsx)(jn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,T.jsx)(Ze,{size:18,weight:`bold`})})}),(0,T.jsxs)(Le.Dropdown,{children:[(0,T.jsx)(Le.Item,{leftSection:(0,T.jsx)(Q_,{size:15}),onClick:r,children:`Rename`}),(0,T.jsx)(Le.Item,{color:`bad`,leftSection:(0,T.jsx)(It,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function uv(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function dv(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var fv=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function pv(e){let t=dv(new Date),n=new Map;for(let r of e){let e=Math.floor((t-dv(uv(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return fv.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function mv(e){let t=uv(e),n=dv(new Date);return Math.floor((n-dv(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function hv({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=On(),s=Ne(),c=da({select:e=>e.location.pathname}),{dashboardId:l}=Ve({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=pa(!1),[p,m]=(0,w.useState)(!1),[h,g]=(0,w.useState)(``),_=(0,w.useRef)(null),v=he(`(max-width: 62em)`),y=(0,w.useRef)(v);y.current=v,(0,w.useEffect)(()=>{f.close()},[c]),(0,w.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(kn),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,T.jsxs)(to,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,T.jsx)(to.Header,{children:(0,T.jsxs)(ce,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,T.jsxs)(ce,{gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(go,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,T.jsx)(ve,{size:`small`})]}),(0,T.jsxs)(ce,{gap:`xs`,wrap:`nowrap`,children:[(0,T.jsx)(Vt,{label:`Documentation`,children:(0,T.jsx)(jn,{component:`a`,href:av.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,T.jsx)(K_,{size:17,weight:`bold`})})}),(0,T.jsx)(gv,{}),(0,T.jsx)(_v,{onError:g})]})]})}),(0,T.jsx)(to.Navbar,{p:`sm`,children:(0,T.jsx)(sv,{ref:_,...b})}),(0,T.jsx)(Fo,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,T.jsx)(ve,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,T.jsx)(sv,{...b,autoFocusSearch:d&&p})}),(0,T.jsxs)(to.Main,{children:[h&&(0,T.jsx)(ae,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function gv(){let{setColorScheme:e}=Ut(),t=Wt(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`;return(0,T.jsx)(Vt,{label:`Switch to ${n} theme`,children:(0,T.jsx)(jn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onClick:()=>e(n),children:t===`dark`?(0,T.jsx)(iv,{size:17,weight:`bold`}):(0,T.jsx)(X_,{size:17,weight:`bold`})})})}function _v({onError:e}){let t=Ne(),n=je(),r=(n.name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,T.jsxs)(Le,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,T.jsx)(Le.Target,{children:(0,T.jsx)(jn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,T.jsx)(po,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,T.jsxs)(Le.Dropdown,{children:[(0,T.jsx)(Le.Label,{children:n.email||`Signed in`}),(0,T.jsx)(Le.Item,{leftSection:(0,T.jsx)(ev,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,T.jsx)(Le.Divider,{}),(0,T.jsx)(Le.Item,{leftSection:(0,T.jsx)(nv,{size:15}),onClick:()=>void Ce().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function vv(){let{agent_available:e}=ke(),t=Ne(),n=tn(),{threadId:r}=Ve({strict:!1}),[i,a]=(0,w.useState)(Nt),o=(0,w.useRef)(new Set),s=r??i,[c,l]=(0,w.useState)([]),[u,d]=(0,w.useState)({}),[f,p]=(0,w.useState)(``),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(!1),[v,y]=(0,w.useState)(``),[b,x]=(0,w.useState)(``),[ee,te]=(0,w.useState)(``),[ne,re]=(0,w.useState)(0),S=(0,w.useRef)(``),ie=(0,w.useRef)(null),ae=(0,w.useRef)(null),oe=(0,w.useRef)(0),se=(0,w.useMemo)(()=>new j_({url:`/api/agent`,threadId:s,fetch:(e,t)=>De(e,t)}),[s]),ce=!e||f===s;function le(){oe.current=0,y(``)}(0,w.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),le(),te(``),!e){p(s);return}!r||o.current.has(s)?(se.setMessages([]),p(s)):De(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}se.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(S.current=``,te(`This chat could not be restored. Start a new chat or try again.`))});let i=se.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),te(``)},onToolCallStartEvent:({event:e})=>{oe.current+=1,y(Mn(e.toolCallName))},onToolCallEndEvent:()=>{oe.current=Math.max(0,oe.current-1),oe.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:Sn})},onRunFailed:e=>{console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s),n.invalidateQueries({queryKey:Sn})}});return()=>{t=!1,i.unsubscribe(),se.abortRun()}},[se,e,n,ne,s]),(0,w.useEffect)(()=>{ie.current?.scrollIntoView({behavior:`smooth`,block:`end`})},[c,g]),(0,w.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ae.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ae.current?.focus()))),e.key===`Escape`&&n===ae.current&&(x(``),ae.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function ue(){_(!0),te(``);try{await se.runAgent()}catch(e){console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),le(),o.current.delete(s)}}async function de(n){let i=n.trim();if(!e||!i||g||!ce||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Nt(),role:`user`,content:i};se.addMessage(a),l([...se.messages]),d(e=>({...e,[a.id]:Date.now()})),x(``),await ue()}(0,w.useEffect)(()=>{let e=S.current;ce&&r&&e&&(S.current=``,de(e))},[ce,r,s]);function C(e){e.preventDefault(),de(b)}function fe(){se.abortRun(),_(!1),le(),o.current.delete(s)}function pe(){!g&&se.messages.some(e=>e.role===`user`)&&ue()}function me(n){if(!e)return;let r=Nt();o.current.add(r),S.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function he(){se.abortRun(),S.current=``,a(Nt()),t({to:`/chat`})}function ge(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function _e(){re(e=>e+1)}return(0,T.jsx)(An.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:ce,running:g,activity:v,input:b,setInput:x,error:ee,bottomRef:ie,inputRef:ae,send:de,submit:C,stop:fe,retry:pe,reloadThread:_e,openChat:me,newThread:he,selectThread:ge},children:(0,T.jsx)(hv,{children:(0,T.jsx)(ta,{})})})}function yv(){let e=(0,w.useMemo)(()=>new I_,[]);return(0,T.jsx)(qt,{client:e,children:(0,T.jsx)(Me,{children:(0,T.jsx)(vv,{})})})}var bv=Re({component:yv,notFoundComponent:()=>(0,T.jsx)(Oe,{to:`/`,replace:!0})}),xv=Je(`/`)({component:Ke(()=>Nn(()=>import(`./routes-D1xQhcK4.js`),__vite__mapDeps([0,1,2])),`component`)}),Sv=Je(`/settings`)({component:Ke(()=>Nn(()=>import(`./settings-D_2lRZJm.js`),__vite__mapDeps([3,1,2,4,5,6])),`component`)}),Cv=Je(`/chat/`)({component:Ke(()=>Nn(()=>import(`./chat.index-DvqxaiRx.js`),__vite__mapDeps([7,8,1,4,9,10])),`component`)}),wv=Je(`/chat/$threadId`)({component:Ke(()=>Nn(()=>import(`./chat._threadId-DvqxaiRx.js`),__vite__mapDeps([11,8,1,4,9,10])),`component`)}),Tv=Je(`/dashboards/`)({component:Ke(()=>Nn(()=>import(`./dashboards.index-C3Dkh40b.js`),__vite__mapDeps([12,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:ct}),Ev=Je(`/dashboards/$dashboardId`)({component:Ke(()=>Nn(()=>import(`./dashboards._dashboardId-BS6OaA2t.js`),__vite__mapDeps([16,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:ct}),Dv=xv.update({id:`/`,path:`/`,getParentRoute:()=>bv}),Ov=Sv.update({id:`/settings`,path:`/settings`,getParentRoute:()=>bv}),kv=Cv.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>bv}),Av=wv.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>bv}),jv=Tv.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>bv}),Mv={IndexRoute:Dv,SettingsRoute:Ov,ChatThreadIdRoute:Av,DashboardsDashboardIdRoute:Ev.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>bv}),ChatIndexRoute:kv,DashboardsIndexRoute:jv},Nv=sa({routeTree:bv._addFileChildren(Mv)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),Pv={brand:Tt,ok:Dt,warn:jt,bad:bt,info:St},Fv={light:7,dark:5};function Iv(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Lv(e){let t=Iv(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Rv(e){return Object.fromEntries(Object.entries(Pv).map(([t,n])=>[`--fanout-color-${t}-contrast`,Lv(n[Fv[e]])]))}function zv(e){return t=>{let n=t.color??Hv.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Pv,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Bv=.25,Vv={xs:9,sm:10,md:11,lg:13,xl:16},Hv={primaryColor:`brand`,primaryShade:Fv,autoContrast:!0,luminanceThreshold:Bv,colors:{dark:kt,brand:Tt,ok:Dt,warn:jt,bad:bt,info:St},defaultRadius:`md`,fontFamily:it.body,fontFamilyMonospace:it.display,headings:{fontFamily:it.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Gv(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Gv(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Wv(t.size)})}}},Uv=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":mt.light.muted,...Rv(`light`)},dark:Rv(`dark`)});function Wv(e){let t=Vv[e??`md`];return t===void 0||t>=vt.micro?{}:{"--badge-fz":`${vt.micro/16}rem`}}function Gv(e,t){return!e||e===Hv.primaryColor?{[t]:`var(--fanout-color-${Hv.primaryColor}-contrast)`}:{}}var Kv=zv(h),qv=ja({...Hv,variantColorResolver:Kv});(0,Ac.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(w.StrictMode,{children:(0,T.jsx)(Aa,{theme:qv,defaultColorScheme:`auto`,cssVariablesResolver:Uv,children:(0,T.jsx)(ua,{router:Nv})})}));export{Tv as n,av as r,Ev as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/index-C8q_YUYV.js b/internal/ui/dist/assets/index-C8q_YUYV.js new file mode 100644 index 000000000..96e0d2ce9 --- /dev/null +++ b/internal/ui/dist/assets/index-C8q_YUYV.js @@ -0,0 +1,17 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/routes-D1xQhcK4.js","assets/brand-MzZ03bSa.js","assets/auth-BeUORN-q.js","assets/settings-D20O7uBo.js","assets/Tooltip-BJiO7C_G.js","assets/api-Be5Lq4YA.js","assets/WarningCircle.es-DDq2AFnK.js","assets/chat.index-B6mb73V8.js","assets/chat-B-nb-Yp3.js","assets/preload-helper-BL3qEkUh.js","assets/format-urrStEsn.js","assets/chat._threadId-B6mb73V8.js","assets/dashboards.index-Bm8hpWIl.js","assets/dashboard-BfR0ACHf.js","assets/tokens-DNprTSRA.js","assets/use-computed-color-scheme-6JIsge00.js","assets/dashboards._dashboardId-CMjPkGKO.js"])))=>i.map(i=>d[i]); +import{B as e,C as t,F as n,G as r,H as i,I as a,J as o,K as s,L as c,M as l,N as u,O as d,P as f,S as p,St as m,V as h,W as g,X as _,Y as v,_ as y,_t as b,a as x,at as ee,b as te,ct as ne,d as re,dt as S,et as ie,f as ae,ft as oe,gt as se,h as ce,ht as le,j as ue,k as de,l as C,mt as fe,nt as pe,pt as me,rt as he,s as ge,st as _e,t as ve,u as ye,ut as be,x as xe,yt as Se}from"./brand-MzZ03bSa.js";import{a as Ce,d as we,f as Te,g as Ee,i as De,l as Oe,n as ke,o as Ae,r as je,t as Me,u as Ne}from"./auth-BeUORN-q.js";import{$ as Pe,A as Fe,B as Ie,C as Le,F as Re,G as ze,H as Be,I as Ve,J as He,K as Ue,L as We,M as Ge,N as Ke,P as qe,Q as Je,R as Ye,S as Xe,T as Ze,U as Qe,V as $e,W as et,X as tt,Y as nt,Z as rt,_ as it,a as at,at as ot,b as st,ct,d as lt,dt as ut,et as dt,ft,g as pt,i as mt,it as ht,j as gt,k as _t,l as vt,lt as yt,m as bt,n as xt,nt as St,o as Ct,ot as wt,pt as Tt,q as Et,r as Dt,rt as Ot,s as kt,st as At,t as jt,tt as Mt,u as Nt,ut as Pt,w as Ft,x as It,y as Lt,z as Rt}from"./tokens-DNprTSRA.js";import{C as zt,b as Bt,o as Vt,t as Ht,w as Ut}from"./Tooltip-BJiO7C_G.js";import{n as Wt,t as Gt}from"./use-computed-color-scheme-6JIsge00.js";import{A as Kt,C as qt,D as Jt,E as Yt,F as Xt,H as Zt,I as Qt,L as $t,M as en,N as tn,O as nn,P as rn,R as an,S as on,_ as sn,a as cn,b as ln,c as un,d as dn,f as fn,g as pn,h as mn,i as hn,j as gn,k as _n,l as vn,m as yn,n as bn,o as xn,p as Sn,r as Cn,t as wn,u as Tn,v as En,x as Dn,y as On}from"./api-Be5Lq4YA.js";import{a as kn,i as An,n as jn,o as Mn,r as Nn,t as Pn}from"./preload-helper-BL3qEkUh.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Fn=b((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0>>1,a=e[r];if(0>>1;ri(c,n))li(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(li(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,ee||(ee=!0,ae());else{var t=n(l);t!==null&&ce(x,t.startTime-e)}}}var ee=!1,te=-1,ne=5,re=-1;function S(){return g?!0:!(e.unstable_now()-ret&&S());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ce(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ae():ee=!1}}}var ae;if(typeof y==`function`)ae=function(){y(ie)};else if(typeof MessageChannel<`u`){var oe=new MessageChannel,se=oe.port2;oe.port1.onmessage=ie,ae=function(){se.postMessage(null)}}else ae=function(){_(ie,0)};function ce(t,n){te=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(te),te=-1):h=!0,ce(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ee||(ee=!0,ae()))),r},e.unstable_shouldYield=S,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),In=b(((e,t)=>{t.exports=Fn()})),Ln=b((e=>{var t=In(),n=se(),r=le();function i(e){var t=`https://react.dev/errors/`+e;if(1he||(e.current=me[he],me[he]=null,he--)}function ve(e,t){he++,me[he]=e.current,e.current=t}var ye=ge(null),be=ge(null),xe=ge(null),Se=ge(null);function Ce(e,t){switch(ve(xe,t),ve(be,e),ve(ye,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$d(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$d(t),e=ef(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}_e(ye),ve(ye,e)}function we(){_e(ye),_e(be),_e(xe)}function Te(e){e.memoizedState!==null&&ve(Se,e);var t=ye.current,n=ef(t,e.type);t!==n&&(ve(be,e),ve(ye,n))}function Ee(e){be.current===e&&(_e(ye),_e(be)),Se.current===e&&(_e(Se),sp._currentValue=pe)}var De,Oe;function ke(e){if(De===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);De=t&&t[1]||``,Oe=-1)`:-1i||c[r]!==l[i]){var u=` +`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(``)&&(u=u.replace(``,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Ae=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?ke(n):``}function Me(e,t){switch(e.tag){case 26:case 27:case 5:return ke(e.type);case 16:return ke(`Lazy`);case 13:return e.child!==t&&t!==null?ke(`Suspense Fallback`):ke(`Suspense`);case 19:return ke(`SuspenseList`);case 0:case 15:return je(e.type,!1);case 11:return je(e.type.render,!1);case 1:return je(e.type,!0);case 31:return ke(`Activity`);default:return``}}function Ne(e){try{var t=``,n=null;do t+=Me(e,n),n=e,e=e.return;while(e);return t}catch(e){return` +Error generating stack: `+e.message+` +`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0`u`||window.document===void 0||window.document.createElement===void 0),wn=!1;if(Cn)try{var Tn={};Object.defineProperty(Tn,"passive",{get:function(){wn=!0}}),window.addEventListener(`test`,Tn,Tn),window.removeEventListener(`test`,Tn,Tn)}catch{wn=!1}var En=null,Dn=null,On=null;function kn(){if(On)return On;var e,t=Dn,n=t.length,r,i=`value`in En?En.value:En.textContent,a=i.length;for(e=0;e=cr),dr=` `,fr=!1;function pr(e,t){switch(e){case`keyup`:return or.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function mr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var hr=!1;function gr(e,t){switch(e){case`compositionend`:return mr(t);case`keypress`:return t.which===32?(fr=!0,dr):null;case`textInput`:return e=t.data,e===dr&&fr?null:e;default:return null}}function _r(e,t){if(hr)return e===`compositionend`||!sr&&pr(e,t)?(e=kn(),On=Dn=En=null,hr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=zr(n)}}function Vr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Vr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Hr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Xt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Xt(e.document)}return t}function Ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Wr=Cn&&`documentMode`in document&&11>=document.documentMode,Gr=null,Kr=null,qr=null,Jr=!1;function Yr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Jr||Gr==null||Gr!==Xt(r)||(r=Gr,`selectionStart`in r&&Ur(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),qr&&Rr(qr,r)||(qr=r,r=Ld(Kr,`onSelect`),0>=o,i-=o,zi=1<<32-Ze(t)+i|n<m?(h=d,d=null):h=d.sibling;var g=p(i,d,s[m],c);if(g===null){d===null&&(d=h);break}e&&d&&g.alternate===null&&t(i,d),a=o(g,a,m),u===null?l=g:u.sibling=g,u=g,d=h}if(m===s.length)return n(i,d),E&&Vi(i,m),l;if(d===null){for(;mh?(g=m,m=null):g=m.sibling;var y=p(a,m,v.value,l);if(y===null){m===null&&(m=g);break}e&&m&&y.alternate===null&&t(a,m),s=o(y,s,h),d===null?u=y:d.sibling=y,d=y,m=g}if(v.done)return n(a,m),E&&Vi(a,h),u;if(m===null){for(;!v.done;h++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return E&&Vi(a,h),u}for(m=r(m);!v.done;h++,v=c.next())v=_(m,a,h,v.value,l),v!==null&&(e&&v.alternate!==null&&m.delete(v.key===null?h:v.key),s=o(v,s,h),d===null?u=v:d.sibling=v,d=v);return e&&m.forEach(function(e){return t(a,e)}),E&&Vi(a,h),u}function x(e,r,o,c){if(typeof o==`object`&&o&&o.type===g&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case m:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===g){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===re&&Va(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ja(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===g?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ja(c,o),c.return=e,e=c)}return s(e);case h:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case re:return o=Va(o),x(e,r,o,c)}if(de(o))return v(e,r,o,c);if(oe(o)){if(l=oe(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return x(e,r,qa(o),c);if(o.$$typeof===b)return x(e,r,ha(e,o),c);Ya(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{Ka=0;var i=x(e,t,n,r);return Ga=null,i}catch(t){if(t===Fa||t===La)throw t;var a=Ci(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Za=Xa(!0),Qa=Xa(!1),$a=!1;function eo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function to(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function no(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ro(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Ul&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=bi(e),yi(e,null,n),t}return gi(e,r,t,n),bi(e)}function io(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function ao(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var oo=!1;function so(){if(oo){var e=Ea;if(e!==null)throw e}}function co(e,t,n,r){oo=!1;var i=e.updateQueue;$a=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var p=s.lane&-536870913,m=p!==s.lane;if(m?(Kl&p)===p:(r&p)===p){p!==0&&p===Ta&&(oo=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;p=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,p);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,p=typeof h==`function`?h.call(_,d,p):h,p==null)break a;d=f({},d,p);break a;case 2:$a=!0}}p=s.callback,p!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[p]:m.push(p))}else m={lane:p,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=p;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),eu|=o,e.lanes=o,e.memoizedState=d}}function lo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function uo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;ea?a:8;var o=C.T,s={};C.T=s,Us(e,!1,t,n);try{var c=i(),l=C.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Hs(e,t,ka(c,r),Su(e)):Hs(e,t,r,Su(e))}catch(n){Hs(e,t,{then:function(){},status:`rejected`,reason:n},Su())}finally{fe.p=a,o!==null&&s.types!==null&&(o.types=s.types),C.T=o}}function Ms(){}function Ns(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Ps(e).queue;js(e,a,t,pe,n===null?Ms:function(){return Fs(e),n(r)})}function Ps(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:pe},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Fs(e){var t=Ps(e);t.next===null&&(t=e.alternate.memoizedState),Hs(e,t.next.queue,{},Su())}function Is(){return ma(sp)}function Ls(){return O().memoizedState}function Rs(){return O().memoizedState}function zs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Su();e=no(n);var r=ro(t,e,n);r!==null&&(wu(r,t,n),io(r,t,n)),t={cache:xa()},e.payload=t;return}t=t.return}}function Bs(e,t,n){var r=Su();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Ws(e)?Gs(t,n):(n=_i(e,t,n,r),n!==null&&(wu(n,e,r),Ks(n,t,r)))}function Vs(e,t,n){Hs(e,t,n,Su())}function Hs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ws(e))Gs(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Lr(s,o))return gi(e,t,i,0),Wl===null&&hi(),!1}catch{}if(n=_i(e,t,i,r),n!==null)return wu(n,e,r),Ks(n,t,r),!0}return!1}function Us(e,t,n,r){if(r={lane:2,revertLane:xd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Ws(e)){if(t)throw Error(i(479))}else t=_i(e,n,r,2),t!==null&&wu(t,e,2)}function Ws(e){var t=e.alternate;return e===D||t!==null&&t===D}function Gs(e,t){Ao=ko=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Ks(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var qs={readContext:ma,use:qo,useCallback:Io,useContext:Io,useEffect:Io,useImperativeHandle:Io,useLayoutEffect:Io,useInsertionEffect:Io,useMemo:Io,useReducer:Io,useRef:Io,useState:Io,useDebugValue:Io,useDeferredValue:Io,useTransition:Io,useSyncExternalStore:Io,useId:Io,useHostTransitionStatus:Io,useFormState:Io,useActionState:Io,useOptimistic:Io,useMemoCache:Io,useCacheRefresh:Io};qs.useEffectEvent=Io;var Js={readContext:ma,use:qo,useCallback:function(e,t){return Go().memoizedState=[e,t===void 0?null:t],e},useContext:ma,useEffect:vs,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),gs(4194308,4,ws.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gs(4194308,4,e,t)},useInsertionEffect:function(e,t){gs(4,2,e,t)},useMemo:function(e,t){var n=Go();t=t===void 0?null:t;var r=e();if(jo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Go();if(n!==void 0){var i=n(t);if(jo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Bs.bind(null,D,e),[r.memoizedState,e]},useRef:function(e){var t=Go();return e={current:e},t.memoizedState=e},useState:function(e){e=ns(e);var t=e.queue,n=Vs.bind(null,D,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Es,useDeferredValue:function(e,t){return ks(Go(),e,t)},useTransition:function(){var e=ns(!1);return e=js.bind(null,D,e.queue,!0,!1),Go().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=D,a=Go();if(E){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),Wl===null)throw Error(i(349));Kl&127||j(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,vs(M.bind(null,r,o,e),[e]),r.flags|=2048,ms(9,{destroy:void 0},$o.bind(null,r,o,n,t),null),n},useId:function(){var e=Go(),t=Wl.identifierPrefix;if(E){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Mo++,0<\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[bt]=t,o[xt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Kd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Rc(t)}}return Uc(t),zc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Rc(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=xe.current,ea(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[bt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Ud(e.nodeValue,n)),e||Zi(t,!0)}else e=Qd(e).createTextNode(r),e[bt]=t,t.stateNode=e}return Uc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ea(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[bt]=t}else ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),e=!1}else n=na(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Co(t),t):(Co(t),null);if(t.flags&128)throw Error(i(558))}return Uc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ea(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[bt]=t}else ta(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;Uc(t),a=!1}else a=na(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Co(t),t):(Co(t),null)}return Co(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Vc(t,t.updateQueue),Uc(t),null);case 4:return we(),e===null&&Nd(t.stateNode.containerInfo),Uc(t),null;case 10:return ca(t.type),Uc(t),null;case 19:if(_e(wo),r=t.memoizedState,r===null)return Uc(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)Hc(r,!1);else{if($l!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=To(e),o!==null){for(t.flags|=128,Hc(r,!1),e=o.updateQueue,t.updateQueue=e,Vc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)T(n,e),n=n.sibling;return ve(wo,wo.current&1|2),E&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>uu&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}}else{if(!a){if(e=To(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Vc(t,e),Hc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!E)return Uc(t),null}else 2*ze()-r.renderingStartTime>uu&&n!==536870912&&(t.flags|=128,a=!0,Hc(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(Uc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=wo.current,ve(wo,a?n&1|2:n&1),E&&Vi(t,r.treeForkCount),e);case 22:case 23:return Co(t),go(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Uc(t),t.subtreeFlags&6&&(t.flags|=8192)):Uc(t),n=t.updateQueue,n!==null&&Vc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&_e(ja),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ca(ba),Uc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Gc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ca(ba),we(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Ee(t),null;case 31:if(t.memoizedState!==null){if(Co(t),t.alternate===null)throw Error(i(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Co(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return _e(wo),null;case 4:return we(),null;case 10:return ca(t.type),null;case 22:case 23:return Co(t),go(),e!==null&&_e(ja),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ca(ba),null;case 25:return null;default:return null}}function Kc(e,t){switch(Wi(t),t.tag){case 3:ca(ba),we();break;case 26:case 27:case 5:Ee(t);break;case 4:we();break;case 31:t.memoizedState!==null&&Co(t);break;case 13:Co(t);break;case 19:_e(wo);break;case 10:ca(t.type);break;case 22:case 23:Co(t),go(),e!==null&&_e(ja);break;case 24:ca(ba)}}function qc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){ed(t,t.return,e)}}function Jc(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){ed(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){ed(t,t.return,e)}}function Yc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{uo(t,n)}catch(t){ed(e,e.return,t)}}}function Xc(e,t,n){n.props=tc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){ed(e,t,n)}}function Zc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){ed(e,t,n)}}function z(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){ed(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){ed(e,t,n)}else n.current=null}}function Qc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){ed(e,e.return,t)}}function $c(e,t,n){try{var r=e.stateNode;qd(r,e.type,n,t),r[xt]=t}catch(t){ed(e,e.return,t)}}function el(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&uf(e.type)||e.tag===4}function tl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||el(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&uf(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function nl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=mn));else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(nl(e,t,n),e=e.sibling;e!==null;)nl(e,t,n),e=e.sibling}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&uf(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Kd(t,r,n),t[bt]=e,t[xt]=n}catch(t){ed(e,e.return,t)}}var al=!1,ol=!1,sl=!1,cl=typeof WeakSet==`function`?WeakSet:Set,ll=null;function ul(e,t){if(e=e.containerInfo,Xd=hp,e=Hr(e),Ur(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for(Zd={focusedElem:e,selectionRange:n},hp=!1,ll=t;ll!==null;)if(t=ll,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ll=e;else for(;ll!==null;){switch(t=ll,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n title`))),Kd(o,r,n),o[bt]=e,Nt(o),r=o;break a;case`link`:var s=U(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;cg&&(o=g,g=h,h=o);var _=Br(s,h),v=Br(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;sn?32:n,C.T=null,n=vu,vu=null;var o=mu,s=gu;if(pu=0,hu=mu=null,gu=0,Ul&6)throw Error(i(331));var c=Ul;if(Ul|=4,Rl(o.current),Al(o,o.current,s,n),Ul=c,md(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{fe.p=a,C.T=r,Xu(e,t)}}function $u(e,t,n){t=ji(n,t),t=sc(e.stateNode,t,2),e=ro(e,t,2),e!==null&&(ut(e,2),pd(e))}function ed(e,t,n){if(e.tag===3)$u(e,e,n);else for(;t!==null;){if(t.tag===3){$u(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(fu===null||!fu.has(r))){e=ji(n,e),n=cc(2),r=ro(t,n,2),r!==null&&(lc(n,r,t,e),ut(r,2),pd(r));break}}t=t.return}}function td(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Hl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(Zl=!0,i.add(n),e=nd.bind(null,e,t,n),t.then(e,e))}function nd(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Wl===e&&(Kl&n)===n&&($l===4||$l===3&&(Kl&62914560)===Kl&&300>ze()-cu?!(Ul&2)&&ju(e,0):nu|=n,iu===Kl&&(iu=0)),pd(e)}function rd(e,t){t===0&&(t=ct()),e=vi(e,t),e!==null&&(ut(e,t),pd(e))}function id(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rd(e,n)}function ad(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),rd(e,n)}function od(e,t){return Fe(e,t)}var sd=null,cd=null,ld=!1,ud=!1,dd=!1,fd=0;function pd(e){e!==cd&&e.next===null&&(cd===null?sd=cd=e:cd=cd.next=e),ud=!0,ld||(ld=!0,bd())}function md(e,t){if(!dd&&ud){dd=!0;do for(var n=!1,r=sd;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,yd(r,a))}else a=Kl,a=at(r,r===Wl?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,yd(r,a))}r=r.next}while(n);dd=!1}}function hd(){gd()}function gd(){ud=ld=!1;var e=0;fd!==0&&rf()&&(e=fd);for(var t=ze(),n=null,r=sd;r!==null;){var i=r.next,a=_d(r,t);a===0?(r.next=null,n===null?sd=i:n.next=i,i===null&&(cd=n)):(n=r,(e!==0||a&3)&&(ud=!0)),r=i}pu!==0&&pu!==5||md(e,!1),fd!==0&&(fd=0)}function _d(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0s)break;var u=c.transferSize,d=c.initiatorType;u&&Jd(d)&&(c=c.responseEnd,o+=u*(c`u`?null:document;function Mf(e,t,n){var r=jf;if(r&&typeof t==`string`&&t){var i=Qt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Ef.has(i)||(Ef.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function Nf(e){Of.D(e),Mf(`dns-prefetch`,e,null)}function Pf(e,t){Of.C(e,t),Mf(`preconnect`,e,t)}function Ff(e,t,n){Of.L(e,t,n);var r=jf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Qt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Qt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Qt(n.imageSizes)+`"]`)):i+=`[href="`+Qt(e)+`"]`;var a=i;switch(t){case`style`:a=Vf(e);break;case`script`:a=Gf(e)}Tf.has(a)||(e=f({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Tf.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Hf(a))||t===`script`&&r.querySelector(Kf(a))||(t=r.createElement(`link`),Kd(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function If(e,t){Of.m(e,t);var n=jf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Qt(r)+`"][href="`+Qt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Gf(e)}if(!Tf.has(a)&&(e=f({rel:`modulepreload`,href:e},t),Tf.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Kf(a)))return}r=n.createElement(`link`),Kd(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Lf(e,t,n){Of.S(e,t,n);var r=jf;if(r&&e){var i=Mt(r).hoistableStyles,a=Vf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Hf(a)))s.loading=5;else{e=f({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Tf.get(a))&&Yf(e,n);var c=o=r.createElement(`link`);Nt(c),Kd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Jf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Rf(e,t){Of.X(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function zf(e,t){Of.M(e,t);var n=jf;if(n&&e){var r=Mt(n).hoistableScripts,i=Gf(e),a=r.get(i);a||(a=n.querySelector(Kf(i)),a||(e=f({src:e,async:!0,type:`module`},t),(t=Tf.get(i))&&Xf(e,t),a=n.createElement(`script`),Nt(a),Kd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Bf(e,t,n,r){var a=(a=xe.current)?Df(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Vf(n.href),n=Mt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Vf(n.href);var o=Mt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Hf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Tf.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Tf.set(e,n),o||Wf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Gf(n),n=Mt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Vf(e){return`href="`+Qt(e)+`"`}function Hf(e){return`link[rel="stylesheet"][`+e+`]`}function Uf(e){return f({},e,{"data-precedence":e.precedence,precedence:null})}function Wf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Kd(t,`link`,n),Nt(t),e.head.appendChild(t))}function Gf(e){return`[src="`+Qt(e)+`"]`}function Kf(e){return`script[async]`+e}function qf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Qt(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=f({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),Kd(r,`style`,a),Jf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Vf(n.href);var o=e.querySelector(Hf(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=Uf(n),(a=Tf.get(a))&&Yf(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Kd(o,`link`,r),t.state.loading|=4,Jf(o,n.precedence,e),t.instance=o;case`script`:return o=Gf(n.src),(a=e.querySelector(Kf(o)))?(t.instance=a,Nt(a),a):(r=n,(a=Tf.get(o))&&(r=f({},n),Xf(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),Kd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Jf(r,n.precedence,e));return t.instance}function Jf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o title`):null)}function $f(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function ep(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function tp(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Vf(r.href),a=t.querySelector(Hf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=W.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=Uf(r),(i=Tf.get(i))&&Yf(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Kd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=W.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var np=0;function rp(e,t){return e.stylesheets&&e.count===0&&ap(e,e.stylesheets),0np?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function W(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ap(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ip=null;function ap(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ip=new Map,t.forEach(op,e),ip=null,W.call(e))}function op(e,t){if(!(t.state.loading&4)){var n=ip.get(e);if(n)var r=n.get(null);else{n=new Map,ip.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Ln()}));function zn(e){return e?.isNotFound===!0}function Bn(){try{return sessionStorage}catch{return}}var Vn=`tsr-scroll-restoration-v1_3`,Hn=Bn();function Un(){try{return JSON.parse(Hn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Wn(){try{Hn?.setItem(Vn,JSON.stringify(Gn))}catch{}}var Gn=Un(),Kn=`data-scroll-restoration-id`,qn=e=>e.state.__TSR_key||e.href;function Jn(e){let t=e.getAttribute(Kn);if(t)return`[${Kn}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var Yn=!1,Xn=`window`;function Zn(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Qn(e){let t=new Set;for(let n of e){if(n===Xn)continue;let e=Zn(n);e&&t.add(e)}return t}function $n(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||qn,a=new Set,o=e=>{let t=Gn[e]||={};for(let e of a)e===document?t[Xn]={scrollX,scrollY}:e.isConnected&&(t[Jn(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,Yn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{Yn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Wn()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=Gn[d];if(e){let t=Gn[u];for(let n in e){if(n===Xn){if(s)continue}else{let e=Zn(n);if(!e||s&&o&&(l??=Qn(o),l.has(e)))continue}t||=Gn[u]={},t[n]??=e[n]}}}Yn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Qn(o));let t=e&&i&&c,s=r.restoring?Gn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Xn){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Zn(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{Yn=!1}}))}function er(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function tr(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function nr(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=tr(r):Array.isArray(t)?t.push(tr(r)):n[e]=[t,tr(r)]}return n}var rr=/^(?:\s|["[{\d-]|fa|nu|tr)/,ir=or(JSON.parse),ar=sr(JSON.stringify,JSON.parse);function or(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=nr(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function sr(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!rr.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=er(e,r);return t?`?${t}`:``}}function cr(e){return{input:({url:t})=>{for(let n of e)t=ur(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=dr(e[n],t);return t}}}function lr(e){let t=He(e.basepath),n=`/${t}`,r=e.caseSensitive?n:n.toLowerCase(),i=`${r}/`;return{input:({url:t})=>{let a=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return a===r?t.pathname=`/`:a.startsWith(i)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=Ue([`/`,t,e.pathname]),e)}}function ur(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dr(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function fr(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ht(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var pr=`__TSR_index`,mr=`popstate`,hr=`beforeunload`;function gr(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=br(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[pr];i=_r(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[pr];i=_r(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[pr]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function _r(e,t){t||={};let n=xr();return{...t,key:n,__TSR_key:n,[pr]:e}}function vr(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>br(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=xr();t.history.replaceState({[pr]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(ee._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),ee._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=br(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),ee.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[pr]-l.state[pr],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),ee.notify(u);return}}}l=c(),ee.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},ee=gr({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(hr,x,{capture:!0}),t.removeEventListener(mr,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(hr,x,{capture:!0}),t.addEventListener(mr,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return ee._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return ee._ignoreSubscribers||y(`REPLACE`),n},ee}function yr(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function br(e,t){let n=yr(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=xr();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[pr]:0,key:a,__TSR_key:a}}}function xr(){return(Math.random()+1).toString(36).substring(7)}function Sr(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Cr(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function wr({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Tr(e,t,n,r){for(let i of t){if(r&&e._tx!==r)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r&&e._tx!==r)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var Er=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,r=this.basepath===void 0,i=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=et(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:vr()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=St(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=fr(this.latestLocation,e),$n(this)}let a=this.options.basepath??`/`,o=this.options.rewrite;if(r||n!==a||i!==o){this.basepath=a;let e=[],t=He(a);t&&t!==`/`&&e.push(lr({basepath:a})),o&&e.push(o),this.rewrite=e.length===0?void 0:e.length===1?e[0]:cr(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Mt(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&dt(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:ot(e).path,external:!1,searchStr:o,search:ft(t?.search,i),hash:ot(r.slice(1)).path,state:Tt(t?.state,a)}}let o=new URL(i,this.origin),s=ur(this.rewrite,o),c=this.options.parseSearch(s.search),l=this.options.stringifySearch(c);return s.search=l,{href:s.href.replace(s.origin,``),publicHref:i,pathname:ot(s.pathname).path,external:!!this.rewrite&&s.origin!==this.origin,searchStr:l,search:ft(t?.search,c),hash:ot(s.hash.slice(1)).path,state:Tt(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>Et({base:e,to:t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Je(nt(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{if(t.href){let e=br(t.href,{});t={...t,to:ur(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let n=t._fromLocation||this._pendingLocation||this.latestLocation,r=this.matchRoutesLightweight(n);t.from;let i=t.unsafeRelative===`path`?n.pathname:t.from??r[1],a=r[2],o=r[3],s=this.resolvePathWithBase(i,t.to?`${t.to}`:`.`),c=Mr(t.params,o),l=this.routesByPath[nt(s)],u;if(l)u=this.getRouteBranch(l);else if(s.includes(`$`))u=[];else{let[e,t,n]=this.getMatchedRoutes(s);u=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(u=[...u,this.options.notFoundRoute])}if(u.length&&yt(c))for(let e of u){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){c===o&&(c=Object.assign(Object.create(null),c));try{Object.assign(c,t(c))}catch{}}}let d=e.leaveParams?s:ot(ze({path:s,params:c,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,f=a;if(e._includeValidateSearch&&this.options.search?.strict){let e={};u.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,kr(t.options.validateSearch,{...e,...f}))}catch{}}),f=e}f=Ar(f,t,u,e._includeValidateSearch),f=ft(a,f);let p=this.options.stringifySearch(f),m=t.hash===!0?n.hash:t.hash?ct(t.hash,n.hash):void 0,h=m?`#${m}`:``,g=t.state===!0?n.state:t.state?ct(t.state,n.state):{};t.state&&(g=Tt(n.state,g));let _=`${d}${p}${h}`,v,y,b=!1;if(this.rewrite){let e=new URL(_,this.origin),t=dr(this.rewrite,e);v=e.href.replace(e.origin,``),t.origin===this.origin?y=t.pathname+t.search+t.hash:(y=t.href,b=!0)}else v=At(_),y=v;return{publicHref:y,href:v,pathname:d,search:f,searchStr:p,state:g,hash:m??``,external:b,unmaskOnReload:t.unmaskOnReload}},n=t(e);if(e.mask)n.maskedLocation=t({from:e.from,...e.mask});else if(this.options.routeMasks){let r=rt(n.pathname,this.processedTree);if(r){let i=Object.assign(Object.create(null),r.rawParams),{from:a,params:o,...s}=r.route,c=Mr(o,i);n.maskedLocation=t({from:e.from,...s,params:c})}}return n},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=nt(this.latestLocation.href)===nt(n.href)&&wt(wr(n.state),wr(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(Pt(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Ci(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Cr(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&Sr(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href){let t=this.buildLocation(e.options).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&Pt(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=Ir,this.preloadRoute=e=>wi(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Pe(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!wt(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?wt(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??ar,parseSearch:e.parseSearch??ir,protocolAllowlist:e.protocolAllowlist??Ot}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=tt(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:nt(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?jr(this.options.notFoundMode,a):void 0,c=Array(a.length),l=this._committed,u=(e,t)=>{let n=l[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?l.find(t=>t.routeId===e.id):void 0},d;for(let n=0;n{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;r&&n&&i.push(({search:e,next:t,meta:r})=>{let i=t(e);try{let e=kr(n,i);if(r&&e)for(let t in e)t in i||(r.defaulted||=new Map).set(t,e[t]);return{...i,...e}}catch{}return i})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=ct(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function jr(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return Qe}function Mr(e,t){if(e===!1||e===null)return Object.create(null);if((e??!0)===!0)return t;let n=Object.assign(Object.create(null),t);return Object.assign(n,ct(e,n))}function Nr(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Pr(e,t){return e.options[t]?.preload?.()}function Fr(e,t){let n=Pr(e,`component`),r=Pr(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function Ir(e,t,n){let r=()=>t===!1?void 0:t?Pr(e,t):Fr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Lr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function Gr(e,t){return e.routesById[t.routeId]}function Kr(e,t,n){return Be(e)?[Vr,e]:zn(e)?(e.routeId||=n,[Br,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[zr,e]):[Rr,e]}function qr(e,t){let n=Kr(t,!0,e.id);if(n[0]!==zr)return n;try{e.options.onError?.(n[1])}catch(t){n=Kr(t,!0,e.id)}return n}function Jr(e,t,n,r,i){return i[0].signal.aborted?Hr:ui(e,t,n,qr(n,r),i)}async function Yr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;ie.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return Zr(e,r),[i,Jr(e,t,u,a,n)]}if(c.aborted)return[i,Hr];let p=r.paramsError??r.searchError;if(p!==void 0)return Zr(e,r),[i,Jr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{ei(e,r,`beforeLoad`,n[0]);let a=await Wr(m({...f,search:r.search,context:r.context,...e.options.additionalContext}),c);if(c.aborted)return[i,Hr];let o=ui(e,t,u,Kr(a,!1,u.id),n);if(o[0]!==Rr)return Zr(e,r),[i,o];r.context={...r.context,...a}}catch(a){return Zr(e,r),[i,Jr(e,t,u,a,n)]}finally{r.status=h,ei(e,r,!1,n[0])}}i()}function Xr(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function Zr(e,t){let n=t._flight;t._flight=void 0,Xr(e,t,n)?.abort()}function Qr(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Xr(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function $r(e){for(let t of e){let e=t._flight;e&&e[2]++}}function ei(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function ti(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function ni(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return Hr;if(!i)return[Rr,void 0];let l=n._flight;ei(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(ti(e,t,n,r,s,a,!!o[3]))).then(e=>Kr(e,!1,r.id),e=>Kr(e,!0,r.id)).then(t=>(t[0]!==Rr&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===zr&&l[2]?qr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],ui(e,t,r,await Wr(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return Zr(e,n),Hr}finally{ei(e,n,!1,s)}}function ri(e,t,n){t[0]!==Vr&&(e.status=`success`,e.error=void 0,t[0]===Rr?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function ii(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&Zr(e,r)}function ai(e,t){return t[0]===zr||t[0]===Br?{...e,status:t[0]===zr?`error`:`notFound`,error:t[1],_flight:void 0}:e}function oi(e,t,n,r,i,a,o){let s=t[1][n],c=Gr(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(ti(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=Hr)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,Zr(e,s),p=Jr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),ee=n>=o?a[7]:void 0,te=c.lazyFn&&c._lazy!==!0?ee:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,Xr(e,s,t)?.abort(),n>=o&&(s.status=`pending`),ee?.()}b||(s.isFetching=!1);let ne=(p?Promise.resolve(p):x?ni(e,t,s,c,g,i,a):Promise.resolve([Rr,s.loaderData])).then(t=>(x&&(ri(s,t,l),t[0]===Rr&&(m&&!a[0].signal.aborted&&ii(e,s,u),n>=o&&(s.status=`pending`))),t)),re=Wr(Promise.resolve().then(()=>Ir(c,void 0,te)),a[0].signal).then(()=>void 0,r=>t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound))?void 0:[n,Jr(e,t,c,r,a)]).then(e=>ne.then(t=>(x&&!e&&t[0]===Rr&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,ee?.()),e)));if(r.push([n,ne,re]),!y)return ne.then(e=>ai(s,e));let S={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let ie=ni(e,t,S,c,g,i,a).then(e=>(s.isFetching=!1,ri(S,e,!1),e));return(t[2]??=[]).push([n,ie,re,S]),ie.then(e=>ai(S,e))}async function si(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Gr(e,t[n]);try{let e=Ir(i,!1);e&&await Wr(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function ci(e,t){t[2]&&=(Qr(e,t[2].map(e=>e[3])),void 0)}async function li(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=Vr)throw[a,t];!i&&t[0]!==Rr&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===Vr)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function ui(e,t,n,r,i,a){for(;r[0]===Vr;){let o=r[1],s=o.options;if(s.reloadDocument?i[3]:i[1]>=20)return r;try{return s.href&&s.reloadDocument?(e.resolveRedirect(o),r):[Vr,o,e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0})]}catch(e){r=a?[zr,e]:qr(n,e),a=!0}}return r}async function di(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===Br?si(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=Vr)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==Rr&&t[0]=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=Vr){let n=s[1];if(n[0]!==Vr||n[1].options.reloadDocument||n[2])return ci(e,t),n;c=!0,s=[0,[zr,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===zr?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Gr(e,u);try{await Wr(i?Promise.resolve().then(()=>Ir(m,l===zr?`errorComponent`:`notFoundComponent`)):Promise.all([Ir(m),Ir(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return ci(e,t),Hr}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),ci(e,t),Qr(e,o),p()):u.status=`success`}return t}async function fi(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;te._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await si(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l{for(let t=d;t=Vr&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=di(e,i,u,r[0],li(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=li(i[2],void 0,void 0,h.then(e=>Ur(e)?0:Lr(n).length,()=>0))),o=await h}catch(t){if(ci(e,i),t===a&&a.aborted)return Hr;throw t}return Ur(o)?o:fi(e,o,a,r[6]===n.length?r[6]:0)}function mi(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a0){i[3]=setTimeout(()=>mi(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function hi(e,t){let n=e._pending;(e._tx===t||!e._tx?.[3].some(e=>e.id===n?.[1]))&&(clearTimeout(n?.[3]),e._pending=void 0)}async function gi(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!Lr(t[3]).some(e=>e.id===n[1]))return;let i;try{await Wr(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function _i(e,t){e._committed=t,e.stores.setMatches(t)}function vi(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Lr(n).length,s=new Map;{let t=Date.now();for(let r of[...i,...a.values()]){if(r.status!==`success`||n.some((e,t)=>e.id===r.id&&(t=(r.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||s.set(r.id,a.get(r.id)===r?r:{...r,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=s,_i(e,n),Qr(e,[...a.values(),...i],[...n,...s.values()]),Tr(e,i,n,t)}async function yi(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}function bi(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:i.publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function xi(e,t,n,r,i){let a=n.map(e=>({...e}));$r(a);for(let t of r)Zr(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await di(e,o,r,t[0],i)}catch(t){throw Qr(e,a),t}if(Ur(s)){Qr(e,a),s[0]===Vr&&e._tx===t&&e._committed===n&&await bi(e,t,s);return}if(await fi(e,s,t[0].signal),e._tx!==t||e._committed!==n){Qr(e,a);return}for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),Zr(e,n))}_i(e,a),Qr(e,n,a)}async function Si(e,t,n,r,i,a){let o=await pi(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(Ur(o)){let n=o[0]===Vr&&e._tx===t;if((!n||o[1].options.reloadDocument)&&hi(e,t),Qr(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){hi(e,t);return}await bi(e,t,o);return}let s=o[1];if(e._tx===t&&await gi(e,t),e._tx!==t){hi(e,t),Qr(e,s),ci(e,o);return}let c=t[2],l=Cr(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await gi(e,t),e._tx!==t){hi(e,t),Qr(e,s),ci(e,o);return}let n=await e.startTransition(()=>{hi(e,t),vi(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);if(e._tx!==t){ci(e,o);return}u?.length&&xi(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function Ci(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Cr(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await yi(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});$r(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Qr(e,m),await yi(e,n);return}e._preflight=void 0;let g,_=()=>Si(e,y,f,()=>mi(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_).then(),y=[p,s,a,m,Date.now(),v];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&ei(e,t,!1)}n[0].abort(),Qr(e,n[3],y[3],!0)}if(e._tx!==y){Qr(e,y[3]),y[3]=[],g?.(),await yi(e,y);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&mi(e,y),g?.(_()),await v,await yi(e,y)}async function wi(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),$r(a),o=(e._preloads??=new Map).set(i,a),s=await pi(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Qr(e,a)),i.abort()}if(!Ur(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){zn(e)||console.error(e);return}}}var w=m(se(),1),T=fe(),Ti=class extends w.Component{constructor(...e){super(...e),this.state={error:null},this.reset=()=>{this.setState({error:null})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?w.createElement(this.props.errorComponent??Ei,{error:e,reset:this.reset}):this.props.children}};function Ei({error:e}){let[t,n]=w.useState(!1);return(0,T.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,T.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,T.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,T.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,T.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,T.jsx)(`div`,{children:(0,T.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e.message?(0,T.jsx)(`code`,{children:e.message}):null})}):null]})}var Di=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(Di||{});function Oi({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(1)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(1)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function ki(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var Ai=[],ji=0,{link:Mi,unlink:Ni,propagate:Pi,checkDirty:Fi,shallowPropagate:Ii}=Oi({update(e){return e._update()},notify(e){Ai[Ri++]=e,e.flags&=~Di.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Di.Mutable|Di.Dirty,Hi(e))}}),Li=0,Ri=0,zi,Bi=0;function Vi(e){try{++Bi,e()}finally{--Bi||Ui()}}function Hi(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=Ni(n,e)}function Ui(){if(!(Bi>0)){for(;Li{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=zi,o=t?.compare??Object.is;if(n)zi=i,++ji,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=Di.Mutable|Di.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{zi=a,n&&(i.flags&=~Di.RecursedCheck),Hi(i)}}};return n?(i.flags=Di.Mutable|Di.Dirty,i.get=function(){let e=i.flags;if(e&Di.Dirty||e&Di.Pending&&Fi(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&Ii(e)}}else e&Di.Pending&&(i.flags=e&~Di.Pending);return zi!==void 0&&Mi(i,zi,ji),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(Pi(e),Ii(e),Ui())}},i}function Gi(e){let t=()=>{let t=zi;zi=n,++ji,n.depsTail=void 0,n.flags=Di.Watching|Di.RecursedCheck;try{return e()}finally{zi=t,n.flags&=~Di.RecursedCheck,Hi(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Di.Watching|Di.RecursedCheck,notify(){let e=this.flags;e&Di.Dirty||e&Di.Pending&&Fi(this.deps,this)?t():this.flags=Di.Watching},stop(){this.flags=Di.None,this.depsTail=void 0,Hi(this)}};return t(),n}function Ki(e){let t=we(),n=`not-found-${Rt(t.stores.location,e=>e.pathname)}-${Rt(t.stores.status,e=>e)}`;return(0,T.jsx)(Ti,{getResetKey:()=>n,onCatch:(t,n)=>{if(zn(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(zn(t))return e.fallback?.(t);throw t},children:e.children})}function qi(){return(0,T.jsx)(`p`,{children:`Not Found`})}function E(e){return(0,T.jsx)(T.Fragment,{children:e.children})}function Ji(e,t,n){return t.options.notFoundComponent?(0,T.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,T.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,T.jsx)(qi,{})}function Yi(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,T.jsx)(n,{}):null}var Xi=(e,t)=>e[0]===t[0]&&e[1]===t[1],Zi=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Qi=w.memo(function({routeId:e}){let t=we();return(0,T.jsx)($i,{router:t,match:Rt(t.stores.getMatchStore(e),e=>e)})});function $i({router:e,match:t}){let n=e.routesById[t.routeId],r=Yi(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Zi(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s))?w.Suspense:E,l=i?Ti:E,u=o?Ki:E;return(0,T.jsxs)(n.isRoot?n.options.shellComponent??E:E,{children:[(0,T.jsx)(Ie.Provider,{value:t.routeId,children:(0,T.jsx)(c,{fallback:r,children:(0,T.jsx)(l,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(zn(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:(0,T.jsx)(u,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return w.createElement(o,e)},children:s?(0,T.jsx)($e,{fallback:r,children:(0,T.jsx)(ea,{match:t})}):(0,T.jsx)(ea,{match:t})})})})}),null]})}var ea=w.memo(function({match:e}){let t=we(),n=e.routeId,r=t.routesById[n],i=w.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=w.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,T.jsx)(e,{},i):(0,T.jsx)(ta,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Zi(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Yi(t,r)}if(e.status===`notFound`)return Ji(t,r,e.error);if(e.status===`error`)throw e.error;return a}),ta=w.memo(function(){let e=we(),t=w.useContext(Ie),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=Rt(a,e=>[!!e._notFound,e.error],Xi),i=Rt(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Ji(e,e.routesById[t],r);if(!i)return null;let a=(0,T.jsx)(Qi,{routeId:i});return t===`__root__`?(0,T.jsx)(w.Suspense,{fallback:Yi(e),children:a}):a});function na(e,t){let n=e[1];e.length=0,n?.(t)}function ra({t:e}){let t=we(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{na(n,!1),n.push(i,a),e(t),w.startTransition(r)}),Ee(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(nt(r.publicHref)!==nt(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Cr(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function ia(){let e=we(),t=e.routesById[Qe],n=Yi(e,t),r=e.ssr?E:w.Suspense,i=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ra,{t:w.useState()[1]}),(0,T.jsx)(r,{fallback:n,children:(0,T.jsx)(aa,{})})]});return e.options.InnerWrap?(0,T.jsx)(e.options.InnerWrap,{children:i}):i}function aa(){let e=we(),t=e._rendered,n=Rt(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;Ee(()=>{t[0]===n&&na(t,!0)},[t,n]);let a=i?(0,T.jsx)(Qi,{routeId:i}):null;return(0,T.jsx)(Ie.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:(0,T.jsx)(Ti,{getResetKey:()=>r,onCatch:void 0,children:a})})}var oa=e=>({createMutableStore:Wi,createReadonlyStore:Wi,batch:Vi}),sa=e=>new ca(e),ca=class extends Er{constructor(e){super(e,oa)}};function la({router:e,children:t,...n}){yt(n)&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});let r=(0,T.jsx)(Te.Provider,{value:e,children:t});return e.options.Wrap?(0,T.jsx)(e.options.Wrap,{children:r}):r}function ua({router:e,...t}){return(0,T.jsx)(la,{router:e,...t,children:(0,T.jsx)(ia,{})})}function da(e){let t=we({warn:e?.router===void 0}),n=e?.router||t;return Rt(n.stores.__store,Ye(e,n))}function fa(e,t,n={leading:!1}){let[r,i]=(0,w.useState)(e),a=(0,w.useRef)(!1),o=(0,w.useRef)(null),s=(0,w.useRef)(!1),c=(0,w.useRef)(e);c.current=e;let l=(0,w.useCallback)(()=>{window.clearTimeout(o.current),o.current=null},[]),u=(0,w.useCallback)(()=>{l(),s.current=!1},[]),d=(0,w.useCallback)(()=>{o.current&&(u(),s.current=!1,i(c.current))},[]);return(0,w.useEffect)(()=>{a.current&&(l(),!s.current&&n.leading?(s.current=!0,i(e),o.current=window.setTimeout(()=>{s.current=!1},t)):o.current=window.setTimeout(()=>{s.current=!1,i(e)},t))},[e,n.leading,t]),(0,w.useEffect)(()=>(a.current=!0,u),[]),[r,u,{cancel:u,flush:d}]}function pa(e=!1,t={}){let[n,r]=(0,w.useState)(e),i=(0,w.useCallback)(()=>{r(e=>e||(t.onOpen?.(),!0))},[t.onOpen]),a=(0,w.useCallback)(()=>{r(e=>e&&(t.onClose?.(),!1))},[t.onClose]);return[n,{open:i,close:a,toggle:(0,w.useCallback)(()=>{n?a():i()},[a,i,n]),set:r}]}function ma(e){return e===`auto`||e===`dark`||e===`light`}function ha({key:e=`mantine-color-scheme-value`}={}){let t;return{get:t=>{if(typeof window>`u`)return t;try{let n=window.localStorage.getItem(e);return ma(n)?n:t}catch{return t}},set:t=>{try{window.localStorage.setItem(e,t)}catch(e){console.warn(`[@mantine/core] Local storage color scheme manager was unable to save color scheme.`,e)}},subscribe:n=>{t=t=>{t.storageArea===window.localStorage&&t.key===e&&ma(t.newValue)&&n(t.newValue)},window.addEventListener(`storage`,t)},unsubscribe:()=>{window.removeEventListener(`storage`,t)},clear:()=>{window.localStorage.removeItem(e)}}}function ga(e,t){let n=typeof window<`u`&&`matchMedia`in window&&window.matchMedia(`(prefers-color-scheme: dark)`)?.matches,r=e===`auto`?n?`dark`:`light`:e;t()?.setAttribute(`data-mantine-color-scheme`,r)}function _a({manager:e,defaultColorScheme:t,getRootElement:n,forceColorScheme:r}){let i=(0,w.useRef)(null),[a,o]=(0,w.useState)(()=>e.get(t)),s=r||a,c=(0,w.useCallback)(t=>{r||(ga(t,n),o(t),e.set(t))},[e.set,s,r]),l=(0,w.useCallback)(()=>{o(t),ga(t,n),e.clear()},[e.clear,t]);return(0,w.useEffect)(()=>(e.subscribe(c),e.unsubscribe),[e.subscribe,e.unsubscribe]),pe(()=>{ga(e.get(t),n)},[]),(0,w.useEffect)(()=>{if(r)return ga(r,n),()=>{};r===void 0&&ga(a,n),typeof window<`u`&&`matchMedia`in window&&(i.current=window.matchMedia(`(prefers-color-scheme: dark)`));let e=e=>{a===`auto`&&ga(e.matches?`dark`:`light`,n)};return i.current?.addEventListener(`change`,e),()=>i.current?.removeEventListener(`change`,e)},[a,r]),{colorScheme:s,setColorScheme:c,clearColorScheme:l}}function va(e){return Object.entries(e).map(([e,t])=>`${e}: ${t};`).join(``)}function ya(e,t){let n=t?[t]:[`:root`,`:host`],r=va(e.variables),i=r?`${n.join(`, `)}{${r}}`:``,a=va(e.dark),o=va(e.light),s=e=>n.map(t=>t===`:host`?`${t}([data-mantine-color-scheme="${e}"])`:`${t}[data-mantine-color-scheme="${e}"]`).join(`, `);return`${i}\n\n${a?`${s(`dark`)}{${a}}`:``}\n\n${o?`${s(`light`)}{${o}}`:``}`}function ba({theme:e,color:t,colorScheme:n,name:r=t,withColorValues:a=!0}){if(!e.colors[t])return{};if(n===`light`){let n=o(e,`light`),s={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-filled)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${n===9?8:n+1})`,[`--mantine-color-${r}-light`]:`var(--mantine-color-${r}-1)`,[`--mantine-color-${r}-light-hover`]:`var(--mantine-color-${r}-2)`,[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-9)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${n})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][n],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...s}:s}let s=o(e,`dark`),c={[`--mantine-color-${r}-text`]:`var(--mantine-color-${r}-4)`,[`--mantine-color-${r}-filled`]:`var(--mantine-color-${r}-${s})`,[`--mantine-color-${r}-filled-hover`]:`var(--mantine-color-${r}-${s===9?8:s+1})`,[`--mantine-color-${r}-light`]:g(e.colors[t][9],.5),[`--mantine-color-${r}-light-hover`]:g(e.colors[t][9],.3),[`--mantine-color-${r}-light-color`]:`var(--mantine-color-${r}-0)`,[`--mantine-color-${r}-outline`]:`var(--mantine-color-${r}-${Math.max(s-4,0)})`,[`--mantine-color-${r}-outline-hover`]:i(e.colors[t][Math.max(s-4,0)],.05)};return a?{[`--mantine-color-${r}-0`]:e.colors[t][0],[`--mantine-color-${r}-1`]:e.colors[t][1],[`--mantine-color-${r}-2`]:e.colors[t][2],[`--mantine-color-${r}-3`]:e.colors[t][3],[`--mantine-color-${r}-4`]:e.colors[t][4],[`--mantine-color-${r}-5`]:e.colors[t][5],[`--mantine-color-${r}-6`]:e.colors[t][6],[`--mantine-color-${r}-7`]:e.colors[t][7],[`--mantine-color-${r}-8`]:e.colors[t][8],[`--mantine-color-${r}-9`]:e.colors[t][9],...c}:c}function xa(e,t,n){me(t).forEach(r=>Object.assign(e,{[`--mantine-${n}-${r}`]:t[r]}))}var Sa=e=>{let t=o(e,`light`),n=e.defaultRadius in e.radius?e.radius[e.defaultRadius]:S(e.defaultRadius),i={variables:{"--mantine-z-index-app":`100`,"--mantine-z-index-modal":`200`,"--mantine-z-index-popover":`300`,"--mantine-z-index-overlay":`400`,"--mantine-z-index-max":`9999`,"--mantine-scale":e.scale.toString(),"--mantine-cursor-type":e.cursorType,"--mantine-webkit-font-smoothing":e.fontSmoothing?`antialiased`:`unset`,"--mantine-moz-font-smoothing":e.fontSmoothing?`grayscale`:`unset`,"--mantine-color-white":e.white,"--mantine-color-black":e.black,"--mantine-line-height":e.lineHeights.md,"--mantine-font-family":e.fontFamily,"--mantine-font-family-monospace":e.fontFamilyMonospace,"--mantine-font-family-headings":e.headings.fontFamily,"--mantine-heading-font-weight":e.headings.fontWeight,"--mantine-heading-text-wrap":e.headings.textWrap,"--mantine-radius-default":n,"--mantine-primary-color-filled":`var(--mantine-color-${e.primaryColor}-filled)`,"--mantine-primary-color-filled-hover":`var(--mantine-color-${e.primaryColor}-filled-hover)`,"--mantine-primary-color-light":`var(--mantine-color-${e.primaryColor}-light)`,"--mantine-primary-color-light-hover":`var(--mantine-color-${e.primaryColor}-light-hover)`,"--mantine-primary-color-light-color":`var(--mantine-color-${e.primaryColor}-light-color)`},light:{"--mantine-color-scheme":`light`,"--mantine-primary-color-contrast":_t(e,`light`),"--mantine-color-bright":`var(--mantine-color-black)`,"--mantine-color-text":e.black,"--mantine-color-body":e.white,"--mantine-color-error":`var(--mantine-color-red-6)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-gray-5)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-${t})`,"--mantine-color-default":`var(--mantine-color-white)`,"--mantine-color-default-hover":`var(--mantine-color-gray-0)`,"--mantine-color-default-color":`var(--mantine-color-black)`,"--mantine-color-default-border":`var(--mantine-color-gray-4)`,"--mantine-color-dimmed":`var(--mantine-color-gray-6)`,"--mantine-color-disabled":`var(--mantine-color-gray-2)`,"--mantine-color-disabled-color":`var(--mantine-color-gray-5)`,"--mantine-color-disabled-border":`var(--mantine-color-gray-3)`},dark:{"--mantine-color-scheme":`dark`,"--mantine-primary-color-contrast":_t(e,`dark`),"--mantine-color-bright":`var(--mantine-color-white)`,"--mantine-color-text":`var(--mantine-color-dark-0)`,"--mantine-color-body":`var(--mantine-color-dark-7)`,"--mantine-color-error":`var(--mantine-color-red-8)`,"--mantine-color-success":`var(--mantine-color-teal-8)`,"--mantine-color-placeholder":`var(--mantine-color-dark-3)`,"--mantine-color-anchor":`var(--mantine-color-${e.primaryColor}-4)`,"--mantine-color-default":`var(--mantine-color-dark-6)`,"--mantine-color-default-hover":`var(--mantine-color-dark-5)`,"--mantine-color-default-color":`var(--mantine-color-white)`,"--mantine-color-default-border":`var(--mantine-color-dark-4)`,"--mantine-color-dimmed":`var(--mantine-color-dark-2)`,"--mantine-color-disabled":`var(--mantine-color-dark-6)`,"--mantine-color-disabled-color":`var(--mantine-color-dark-3)`,"--mantine-color-disabled-border":`var(--mantine-color-dark-4)`}};xa(i.variables,e.breakpoints,`breakpoint`),xa(i.variables,e.spacing,`spacing`),xa(i.variables,e.fontSizes,`font-size`),xa(i.variables,e.lineHeights,`line-height`),xa(i.variables,e.shadows,`shadow`),xa(i.variables,e.radius,`radius`),xa(i.variables,e.fontWeights,`font-weight`),e.colors[e.primaryColor].forEach((t,n)=>{i.variables[`--mantine-primary-color-${n}`]=`var(--mantine-color-${e.primaryColor}-${n})`}),me(e.colors).forEach(t=>{let n=e.colors[t];if(r(n)){Object.assign(i.light,ba({theme:e,name:n.name,color:n.light,colorScheme:`light`,withColorValues:!0})),Object.assign(i.dark,ba({theme:e,name:n.name,color:n.dark,colorScheme:`dark`,withColorValues:!0})),i.light[`--mantine-color-${n.name}-contrast`]=Fe(n,e,`light`),i.dark[`--mantine-color-${n.name}-contrast`]=Fe(n,e,`dark`);return}n.forEach((e,n)=>{i.variables[`--mantine-color-${t}-${n}`]=e}),Object.assign(i.light,ba({theme:e,color:t,colorScheme:`light`,withColorValues:!1})),Object.assign(i.dark,ba({theme:e,color:t,colorScheme:`dark`,withColorValues:!1}))});let a=e.headings.sizes;return me(a).forEach(t=>{i.variables[`--mantine-${t}-font-size`]=a[t].fontSize,i.variables[`--mantine-${t}-line-height`]=a[t].lineHeight,i.variables[`--mantine-${t}-font-weight`]=a[t].fontWeight||e.headings.fontWeight}),i};function Ca(){let t=u(),n=e(),r=me(t.breakpoints).reduce((e,n)=>{let r=t.breakpoints[n].includes(`px`),i=Ke(t.breakpoints[n]);return`${e}@media (max-width: ${r?`${i-.1}px`:be(i-.1)}) {.mantine-visible-from-${n} {display: none !important;}}@media (min-width: ${r?`${i}px`:be(i)}) {.mantine-hidden-from-${n} {display: none !important;}}`},``);return(0,T.jsx)(`style`,{"data-mantine-styles":`classes`,nonce:n?.(),dangerouslySetInnerHTML:{__html:r}})}function wa({theme:e,generator:t}){let n=Sa(e),r=t?.(e);return r?oe(n,r):n}var Ta=Sa(f);function Ea(e){let t={variables:{},light:{},dark:{}};return me(e.variables).forEach(n=>{Ta.variables[n]!==e.variables[n]&&(t.variables[n]=e.variables[n])}),me(e.light).forEach(n=>{Ta.light[n]!==e.light[n]&&(t.light[n]=e.light[n])}),me(e.dark).forEach(n=>{Ta.dark[n]!==e.dark[n]&&(t.dark[n]=e.dark[n])}),t}function Da(e){return ya({variables:{},dark:{"--mantine-color-scheme":`dark`},light:{"--mantine-color-scheme":`light`}},e)}function Oa({cssVariablesSelector:t,deduplicateCssVariables:n}){let r=u(),i=e(),a=wa({theme:r,generator:c()}),o=(t===void 0||t===`:root`||t===`:host`)&&n,s=ya(o?Ea(a):a,t);return s?(0,T.jsx)(`style`,{"data-mantine-styles":!0,nonce:i?.(),dangerouslySetInnerHTML:{__html:`${s}${o?``:Da(t)}`}}):null}Oa.displayName=`@mantine/CssVariables`;function ka({respectReducedMotion:e,getRootElement:t}){pe(()=>{e&&t()?.setAttribute(`data-respect-reduced-motion`,`true`)},[e])}function Aa({theme:e,children:t,getStyleNonce:r,withStaticClasses:i=!0,withGlobalClasses:a=!0,deduplicateCssVariables:o=!0,withCssVariables:s=!0,cssVariablesSelector:c,classNamesPrefix:u=`mantine`,colorSchemeManager:d=ha(),defaultColorScheme:f=`light`,getRootElement:p=()=>document.documentElement,cssVariablesResolver:m,forceColorScheme:h,stylesTransform:g,env:_,deduplicateInlineStyles:v=!1}){let{colorScheme:y,setColorScheme:b,clearColorScheme:x}=_a({defaultColorScheme:f,forceColorScheme:h,manager:d,getRootElement:p});return ka({respectReducedMotion:e?.respectReducedMotion||!1,getRootElement:p}),(0,T.jsx)(n,{value:{colorScheme:y,setColorScheme:b,clearColorScheme:x,getRootElement:p,classNamesPrefix:u,getStyleNonce:r,cssVariablesResolver:m,cssVariablesSelector:c??`:root`,withStaticClasses:i,stylesTransform:g,env:_,deduplicateInlineStyles:v},children:(0,T.jsxs)(l,{theme:e,children:[s&&(0,T.jsx)(Oa,{cssVariablesSelector:c,deduplicateCssVariables:o}),a&&(0,T.jsx)(Ca,{}),t]})})}Aa.displayName=`@mantine/core/MantineProvider`;function ja(e){return e}var[Ma,Na]=Ut(`AppShell was not found in tree`),Pa={root:`m_89ab340`,navbar:`m_45252eee`,aside:`m_9cdde9a`,header:`m_3b16f56b`,main:`m_8983817`,footer:`m_3840c879`,section:`m_6dcfc7c7`},Fa=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellAside`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`aside`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`aside`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-aside-z-index":`calc(${c??d.zIndex} + 1)`}})});Fa.classes=Pa,Fa.displayName=`@mantine/core/AppShellAside`;var Ia=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellFooter`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`footer`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`footer`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-footer-z-index":(c??d.zIndex)?.toString()}})});Ia.classes=Pa,Ia.displayName=`@mantine/core/AppShellFooter`;var La=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellHeader`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`header`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`header`,{className:v({[an.classNames.zeroRight]:d.offsetScrollbars},n),classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-header-z-index":(c??d.zIndex)?.toString()}})});La.classes=Pa,La.displayName=`@mantine/core/AppShellHeader`;var Ra=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`AppShellMain`,null,e);return(0,T.jsx)(xe,{component:`main`,...Na().getStyles(`main`,{className:n,style:r,classNames:t,styles:i}),...o})});Ra.classes=Pa,Ra.displayName=`@mantine/core/AppShellMain`;var za=t(e=>{let{classNames:t,className:n,style:r,styles:i,unstyled:a,vars:o,withBorder:s,zIndex:c,mod:l,...u}=ue(`AppShellNavbar`,null,e),d=Na();return d.disabled?null:(0,T.jsx)(xe,{component:`nav`,mod:[{"with-border":s??d.withBorder},l],...d.getStyles(`navbar`,{className:n,classNames:t,styles:i,style:r}),...u,__vars:{"--app-shell-navbar-z-index":`calc(${c??d.zIndex} + 1)`}})});za.classes=Pa,za.displayName=`@mantine/core/AppShellNavbar`;var Ba=p(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,grow:o,mod:s,...c}=ue(`AppShellSection`,null,e),l=Na();return(0,T.jsx)(xe,{mod:[{grow:o},s],...l.getStyles(`section`,{className:n,style:r,classNames:t,styles:i}),...c})});Ba.classes=Pa,Ba.displayName=`@mantine/core/AppShellSection`;function Va(e){return typeof e==`object`?e.base:e}function Ha(e){let t=typeof e==`object`&&!!e&&e.base!==void 0&&Object.keys(e).length===1;return typeof e==`number`||typeof e==`string`||t}function Ua(e){return!(typeof e!=`object`||!e||Object.keys(e).length===1&&`base`in e)}function Wa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,aside:r,theme:i,mode:a}){let o=r?.width,s=`translateX(var(--app-shell-aside-width))`,c=`translateX(calc(var(--app-shell-aside-width) * -1))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},a===`fixed`?(n[r?.breakpoint][`--app-shell-aside-width`]=`100%`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`):(n[r?.breakpoint][`--app-shell-aside-width`]=`0px`,n[r?.breakpoint][`--app-shell-aside-offset`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-aside-width`]=t,e[`--app-shell-aside-offset`]=t}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-aside-width`]=S(o.base),e[`--app-shell-aside-offset`]=S(o.base)),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-aside-width`]=S(o[e]),t[e][`--app-shell-aside-offset`]=S(o[e]))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-aside-position`]=`sticky`,t[r.breakpoint][`--app-shell-aside-grid-row`]=`2`,t[r.breakpoint][`--app-shell-aside-grid-column`]=`3`,t[r.breakpoint][`--app-shell-main-column-end`]=`3`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-aside-transform`]=s,t[e][`--app-shell-aside-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-aside-offset`]=`0px !important`:(t[e][`--app-shell-aside-width`]=`0px`,t[e][`--app-shell-aside-display`]=`none`,t[e][`--app-shell-main-column-end`]=`-1`),t[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}if(r?.collapsed?.mobile){let e=Ge(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},a===`fixed`?(n[e][`--app-shell-aside-width`]=`100%`,n[e][`--app-shell-aside-offset`]=`0px`):n[e][`--app-shell-aside-width`]=`0px`,n[e][`--app-shell-aside-transform`]=s,n[e][`--app-shell-aside-transform-rtl`]=c,n[e][`--app-shell-aside-scroll-locked-visibility`]=`hidden`}}function Ga({baseStyles:e,minMediaStyles:t,footer:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-footer-position`]=`sticky`,e[`--app-shell-footer-grid-column`]=`1 / -1`,e[`--app-shell-footer-grid-row`]=`3`),Ha(i)){let t=S(Va(i));e[`--app-shell-footer-height`]=t,a&&(e[`--app-shell-footer-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-footer-height`]=S(i.base),a&&(e[`--app-shell-footer-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-footer-height`]=S(i[e]),a&&(t[e][`--app-shell-footer-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-footer-transform`]=`translateY(var(--app-shell-footer-height))`,r===`fixed`&&(e[`--app-shell-footer-offset`]=`0px !important`))}function Ka({baseStyles:e,minMediaStyles:t,header:n,mode:r}){let i=n?.height,a=r===`static`?!0:n?.offset??!0;if(r===`static`&&n&&(e[`--app-shell-header-position`]=`sticky`,e[`--app-shell-header-grid-column`]=`1 / -1`,e[`--app-shell-header-grid-row`]=`1`),Ha(i)){let t=S(Va(i));e[`--app-shell-header-height`]=t,a&&(e[`--app-shell-header-offset`]=t)}Ua(i)&&(i.base!==void 0&&(e[`--app-shell-header-height`]=S(i.base),a&&(e[`--app-shell-header-offset`]=S(i.base))),me(i).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-header-height`]=S(i[e]),a&&(t[e][`--app-shell-header-offset`]=S(i[e])))})),n?.collapsed&&(e[`--app-shell-header-transform`]=`translateY(calc(var(--app-shell-header-height) * -1))`,r===`fixed`&&(e[`--app-shell-header-offset`]=`0px !important`))}function qa({baseStyles:e,minMediaStyles:t,maxMediaStyles:n,navbar:r,theme:i,mode:a}){let o=r?.width,s=`translateX(calc(var(--app-shell-navbar-width) * -1))`,c=`translateX(var(--app-shell-navbar-width))`;if(r?.breakpoint!==void 0&&!r?.collapsed?.mobile&&(n[r?.breakpoint]=n[r?.breakpoint]||{},n[r?.breakpoint][`--app-shell-navbar-offset`]=`0px`,n[r?.breakpoint][`--app-shell-navbar-width`]=`100%`,a===`static`&&(n[r?.breakpoint][`--app-shell-navbar-grid-width`]=`0px`)),Ha(o)){let t=S(Va(o));e[`--app-shell-navbar-width`]=t,e[`--app-shell-navbar-offset`]=t,a===`static`&&(e[`--app-shell-navbar-grid-width`]=t)}if(Ua(o)&&(o.base!==void 0&&(e[`--app-shell-navbar-width`]=S(o.base),e[`--app-shell-navbar-offset`]=S(o.base),a===`static`&&(e[`--app-shell-navbar-grid-width`]=S(o.base))),me(o).forEach(e=>{e!==`base`&&(t[e]=t[e]||{},t[e][`--app-shell-navbar-width`]=S(o[e]),t[e][`--app-shell-navbar-offset`]=S(o[e]),a===`static`&&(t[e][`--app-shell-navbar-grid-width`]=S(o[e])))})),r?.breakpoint!==void 0&&a===`static`&&(t[r.breakpoint]=t[r.breakpoint]||{},t[r.breakpoint][`--app-shell-navbar-position`]=`sticky`,t[r.breakpoint][`--app-shell-navbar-grid-row`]=`2`,t[r.breakpoint][`--app-shell-navbar-grid-column`]=`1`,t[r.breakpoint][`--app-shell-main-column-start`]=`2`),r?.collapsed?.desktop){let e=r.breakpoint;t[e]=t[e]||{},t[e][`--app-shell-navbar-transform`]=s,t[e][`--app-shell-navbar-transform-rtl`]=c,a===`fixed`?t[e][`--app-shell-navbar-offset`]=`0px !important`:(t[e][`--app-shell-navbar-width`]=`0px`,t[e][`--app-shell-navbar-display`]=`none`,t[e][`--app-shell-main-column-start`]=`1`)}if(r?.collapsed?.mobile){let e=Ge(r.breakpoint,i.breakpoints)-.1;n[e]=n[e]||{},n[e][`--app-shell-navbar-width`]=`100%`,n[e][`--app-shell-navbar-offset`]=`0px`,a===`static`&&(n[e][`--app-shell-navbar-grid-width`]=`0px`),n[e][`--app-shell-navbar-transform`]=s,n[e][`--app-shell-navbar-transform-rtl`]=c}}function Ja(e){return Number(e)===0?`0px`:ne(e)}function Ya({padding:e,baseStyles:t,minMediaStyles:n}){Ha(e)&&(t[`--app-shell-padding`]=Ja(Va(e))),Ua(e)&&(e.base&&(t[`--app-shell-padding`]=Ja(e.base)),me(e).forEach(t=>{t!==`base`&&(n[t]=n[t]||{},n[t][`--app-shell-padding`]=Ja(e[t]))}))}function Xa({navbar:e,header:t,footer:n,aside:r,padding:i,theme:a,mode:o}){let s={},c={},l={};o===`static`&&(l[`--app-shell-main-grid-column`]=`1 / -1`,l[`--app-shell-main-grid-row`]=`2`),qa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,navbar:e,theme:a,mode:o}),Wa({baseStyles:l,minMediaStyles:s,maxMediaStyles:c,aside:r,theme:a,mode:o}),Ka({baseStyles:l,minMediaStyles:s,header:t,mode:o}),Ga({baseStyles:l,minMediaStyles:s,footer:n,mode:o}),Ya({baseStyles:l,minMediaStyles:s,padding:i});let u=gt(me(s),a.breakpoints).map(e=>({query:`(min-width: ${be(e.px)})`,styles:s[e.value]})),d=gt(me(c),a.breakpoints).map(e=>({query:`(max-width: ${be(e.px)})`,styles:c[e.value]}));return{baseStyles:l,media:[...u,...d]}}function Za({navbar:e,header:t,aside:n,footer:r,padding:i,mode:o,selector:s}){let c=u(),l=a(),{media:f,baseStyles:p}=Xa({navbar:e,header:t,footer:r,aside:n,padding:i,theme:c,mode:o});return(0,T.jsx)(d,{media:f,styles:p,selector:s||l.cssVariablesSelector})}function Qa({transitionDuration:e,disabled:t}){let[n,r]=(0,w.useState)(!0),i=(0,w.useRef)(-1),a=(0,w.useRef)(-1);return Zt(`resize`,()=>{r(!0),clearTimeout(i.current),i.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),200)}),pe(()=>{r(!0),clearTimeout(a.current),a.current=window.setTimeout(()=>(0,w.startTransition)(()=>{r(!1)}),e||0)},[t,e]),n}var $a={withBorder:!0,padding:0,transitionDuration:200,transitionTimingFunction:`ease`,zIndex:zt(`app`),mode:`fixed`},eo=_((e,{transitionDuration:t,transitionTimingFunction:n})=>({root:{"--app-shell-transition-duration":`${t}ms`,"--app-shell-transition-timing-function":n}})),to=t(e=>{let t=ue(`AppShell`,$a,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,navbar:c,withBorder:l,padding:u,transitionDuration:d,transitionTimingFunction:f,header:p,zIndex:m,layout:h,disabled:g,aside:_,footer:v,offsetScrollbars:y=!0,mode:b,mod:x,attributes:ee,id:te,...ne}=t,re=de({name:`AppShell`,classes:Pa,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:ee,vars:s,varsResolver:eo}),S=Qa({disabled:g,transitionDuration:d}),ae=ie(te);return(0,T.jsxs)(Ma,{value:{getStyles:re,withBorder:l,zIndex:m,disabled:g,offsetScrollbars:y,mode:b},children:[(0,T.jsx)(Za,{navbar:c,header:p,aside:_,footer:v,padding:u,mode:b,selector:b===`static`?`#${ae}`:void 0}),(0,T.jsx)(xe,{...re(`root`),id:ae,mod:[{resizing:S,layout:h,disabled:g,mode:b},x],...ne})]})});to.classes=Pa,to.varsResolver=eo,to.displayName=`@mantine/core/AppShell`,to.Navbar=za,to.Header=La,to.Main=Ra,to.Aside=Fa,to.Footer=Ia,to.Section=Ba;var no={group:`m_11def92b`,root:`m_f85678b6`,image:`m_11f8ac07`,placeholder:`m_104cd71f`},ro=(0,w.createContext)({withinGroup:!1}),io=_((e,{spacing:t})=>({group:{"--ag-spacing":ne(t)}})),ao=t(e=>{let t=ue(`AvatarGroup`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,spacing:c,attributes:l,...u}=t,d=de({name:`AvatarGroup`,classes:no,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:l,vars:s,varsResolver:io,rootSelector:`group`});return(0,T.jsx)(ro,{value:{withinGroup:!0},children:(0,T.jsx)(xe,{...d(`group`),...u})})});ao.classes=no,ao.varsResolver=io,ao.displayName=`@mantine/core/AvatarGroup`;function oo(e){return(0,T.jsx)(`svg`,{...e,"data-avatar-placeholder-icon":!0,viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,children:(0,T.jsx)(`path`,{d:`M0.877014 7.49988C0.877014 3.84219 3.84216 0.877045 7.49985 0.877045C11.1575 0.877045 14.1227 3.84219 14.1227 7.49988C14.1227 11.1575 11.1575 14.1227 7.49985 14.1227C3.84216 14.1227 0.877014 11.1575 0.877014 7.49988ZM7.49985 1.82704C4.36683 1.82704 1.82701 4.36686 1.82701 7.49988C1.82701 8.97196 2.38774 10.3131 3.30727 11.3213C4.19074 9.94119 5.73818 9.02499 7.50023 9.02499C9.26206 9.02499 10.8093 9.94097 11.6929 11.3208C12.6121 10.3127 13.1727 8.97172 13.1727 7.49988C13.1727 4.36686 10.6328 1.82704 7.49985 1.82704ZM10.9818 11.9787C10.2839 10.7795 8.9857 9.97499 7.50023 9.97499C6.01458 9.97499 4.71624 10.7797 4.01845 11.9791C4.97952 12.7272 6.18765 13.1727 7.49985 13.1727C8.81227 13.1727 10.0206 12.727 10.9818 11.9787ZM5.14999 6.50487C5.14999 5.207 6.20212 4.15487 7.49999 4.15487C8.79786 4.15487 9.84999 5.207 9.84999 6.50487C9.84999 7.80274 8.79786 8.85487 7.49999 8.85487C6.20212 8.85487 5.14999 7.80274 5.14999 6.50487ZM7.49999 5.10487C6.72679 5.10487 6.09999 5.73167 6.09999 6.50487C6.09999 7.27807 6.72679 7.90487 7.49999 7.90487C8.27319 7.90487 8.89999 7.27807 8.89999 6.50487C8.89999 5.73167 8.27319 5.10487 7.49999 5.10487Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}function so(e){let t=0;for(let n=0;ne[0]).slice(0,t).join(``).toUpperCase()}var fo=_((e,{size:t,radius:n,variant:r,gradient:i,color:a,autoContrast:o,name:s,allowedInitialsColors:c})=>{let l=a===`initials`&&typeof s==`string`?lo(s,c):a,u=e.variantColorResolver({color:l||`gray`,theme:e,gradient:i,variant:r||`light`,autoContrast:o});return{root:{"--avatar-size":_e(t,`avatar-size`),"--avatar-radius":n===void 0?void 0:ee(n),"--avatar-bg":l||r?u.background:void 0,"--avatar-color":l||r?u.color:void 0,"--avatar-bd":l||r?u.border:void 0}}}),po=p(e=>{let t=ue(`Avatar`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,src:c,alt:l,radius:u,color:d,gradient:f,imageProps:p,children:m,autoContrast:h,mod:g,name:_,allowedInitialsColors:v,attributes:y,...b}=t,x=(0,w.use)(ro),[ee,te]=(0,w.useState)(!c),ne=de({name:`Avatar`,props:t,classes:no,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:y,vars:s,varsResolver:fo});return(0,w.useEffect)(()=>te(!c),[c]),(0,T.jsx)(xe,{...ne(`root`),mod:[{"within-group":x.withinGroup},g],...b,children:ee||!c?(0,T.jsx)(`span`,{...ne(`placeholder`),title:l,children:m||typeof _==`string`&&uo(_)||(0,T.jsx)(oo,{})}):(0,T.jsx)(`img`,{...p,...ne(`image`),src:c,alt:l,onError:e=>{te(!0),p?.onError?.(e)}})})});po.classes=no,po.varsResolver=fo,po.displayName=`@mantine/core/Avatar`,po.Group=ao;var mo={root:`m_fea6bf1a`,burger:`m_d4fb9cad`},ho=_((e,{color:t,size:n,lineSize:r,transitionDuration:i,transitionTimingFunction:a})=>({root:{"--burger-color":t?s(t,e):void 0,"--burger-size":_e(n,`burger-size`),"--burger-line-size":r?S(r):void 0,"--burger-transition-duration":i===void 0?void 0:`${i}ms`,"--burger-transition-timing-function":a}})),go=t(e=>{let t=ue(`Burger`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,opened:c,children:l,transitionDuration:u,transitionTimingFunction:d,lineSize:f,attributes:p,...m}=t,h=de({name:`Burger`,classes:mo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:p,vars:s,varsResolver:ho});return(0,T.jsxs)(te,{...h(`root`),...m,children:[(0,T.jsx)(xe,{mod:[`reduce-motion`,{opened:c}],...h(`burger`)}),l]})});go.classes=mo,go.varsResolver=ho,go.displayName=`@mantine/core/Burger`;var[_o,vo]=Ut(`Drawer component was not found in tree`),yo={root:`m_f11b401e`,header:`m_5a7c2c9`,content:`m_b8a05bbd`,inner:`m_31cd769a`},bo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerBody`,null,e);return(0,T.jsx)(Qt,{...vo().getStyles(`body`,{classNames:t,style:r,styles:i,className:n}),...o})});bo.classes=yo,bo.displayName=`@mantine/core/DrawerBody`;var xo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerCloseButton`,null,e);return(0,T.jsx)(Xt,{...vo().getStyles(`close`,{classNames:t,style:r,styles:i,className:n}),...o})});xo.classes=yo,xo.displayName=`@mantine/core/DrawerCloseButton`;var So=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,children:o,radius:s,__hidden:c,...l}=ue(`DrawerContent`,null,e),u=vo(),d=u.scrollAreaComponent||Kt;return(0,T.jsx)(rn,{...u.getStyles(`content`,{className:n,style:r,styles:i,classNames:t}),innerProps:u.getStyles(`inner`,{className:n,style:r,styles:i,classNames:t}),...l,radius:s||u.radius||0,"data-hidden":c||void 0,children:(0,T.jsx)(d,{style:{height:`calc(100vh - var(--drawer-offset) * 2)`},children:o})})});So.classes=yo,So.displayName=`@mantine/core/DrawerContent`;var Co=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerHeader`,null,e);return(0,T.jsx)(tn,{...vo().getStyles(`header`,{classNames:t,style:r,styles:i,className:n}),...o})});Co.classes=yo,Co.displayName=`@mantine/core/DrawerHeader`;var wo=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerOverlay`,null,e);return(0,T.jsx)(en,{...vo().getStyles(`overlay`,{classNames:t,style:r,styles:i,className:n}),...o})});wo.classes=yo,wo.displayName=`@mantine/core/DrawerOverlay`;function To(e){switch(e){case`top`:return`flex-start`;case`bottom`:return`flex-end`;default:return}}function Eo(e){if(e===`top`||e===`bottom`)return`0 0 calc(100% - var(--drawer-offset, 0rem) * 2)`}var D={top:`slide-down`,bottom:`slide-up`,left:`slide-right`,right:`slide-left`},Do={top:`slide-down`,bottom:`slide-up`,right:`slide-right`,left:`slide-left`},Oo={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:zt(`modal`),position:`left`},ko=_((e,{position:t,size:n,offset:r})=>({root:{"--drawer-size":_e(n,`drawer-size`),"--drawer-flex":Eo(t),"--drawer-height":t===`left`||t===`right`?void 0:`var(--drawer-size)`,"--drawer-align":To(t),"--drawer-justify":t===`right`?`flex-end`:void 0,"--drawer-offset":S(r)}})),Ao=t(e=>{let t=ue(`DrawerRoot`,Oo,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,scrollAreaComponent:c,position:l,transitionProps:u,radius:d,attributes:f,...p}=t,{dir:m}=Bt(),h=de({name:`Drawer`,classes:yo,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:f,vars:s,varsResolver:ko}),g=(m===`rtl`?Do:D)[l];return(0,T.jsx)(_o,{value:{scrollAreaComponent:c,getStyles:h,radius:d},children:(0,T.jsx)($t,{...h(`root`),transitionProps:{transition:g,...u},"data-offset-scrollbars":c===Vt.Autosize||void 0,unstyled:o,...p})})});Ao.classes=yo,Ao.varsResolver=ko,Ao.displayName=`@mantine/core/DrawerRoot`;var jo=(0,w.createContext)(null);function Mo({children:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)(zt(`modal`));return(0,T.jsx)(jo,{value:{stack:t,addModal:(e,t)=>{n(t=>[...new Set([...t,e])]),i(e=>typeof t==`number`&&typeof e==`number`?Math.max(e,t):e)},removeModal:e=>n(t=>t.filter(t=>t!==e)),getZIndex:e=>`calc(${r} + ${t.indexOf(e)} + 1)`,currentId:t[t.length-1],maxZIndex:r},children:e})}Mo.displayName=`@mantine/core/DrawerStack`;var No=t(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=ue(`DrawerTitle`,null,e);return(0,T.jsx)(gn,{...vo().getStyles(`title`,{classNames:t,style:r,styles:i,className:n}),...o})});No.classes=yo,No.displayName=`@mantine/core/DrawerTitle`;var Po={closeOnClickOutside:!0,withinPortal:!0,lockScroll:!0,trapFocus:!0,returnFocus:!0,closeOnEscape:!0,keepMounted:!1,zIndex:zt(`modal`),withOverlay:!0,withCloseButton:!0},Fo=t(e=>{let{title:t,withOverlay:n,overlayProps:r,withCloseButton:i,closeButtonProps:a,children:o,opened:s,stackId:c,zIndex:l,...u}=ue(`Drawer`,Po,e),d=(0,w.use)(jo),f=!!t||i,p=d&&c?{closeOnEscape:d.currentId===c,trapFocus:d.currentId===c,zIndex:d.getZIndex(c)}:{},m=n===!1?!1:c&&d?d.currentId===c:s;return(0,w.useEffect)(()=>{d&&c&&(s?d.addModal(c,l||zt(`modal`)):d.removeModal(c))},[s,c,l]),(0,T.jsxs)(Ao,{opened:s,zIndex:d&&c?d.getZIndex(c):l,...u,...p,children:[n&&(0,T.jsx)(wo,{visible:m,transitionProps:d&&c?{duration:0}:void 0,...r}),(0,T.jsxs)(So,{__hidden:d&&c&&s?c!==d.currentId:!1,children:[f&&(0,T.jsxs)(Co,{children:[t&&(0,T.jsx)(No,{children:t}),i&&(0,T.jsx)(xo,{...a})]}),(0,T.jsx)(bo,{children:o})]})]})});Fo.classes=yo,Fo.displayName=`@mantine/core/Drawer`,Fo.Root=Ao,Fo.Overlay=wo,Fo.Content=So,Fo.Body=bo,Fo.Header=Co,Fo.Title=No,Fo.CloseButton=xo,Fo.Stack=Mo;var Io={root:`m_dc6f14e2`},Lo=_((e,{size:t})=>({root:{"--kbd-fz":_e(t,`kbd-fz`)}})),Ro=t(e=>{let t=ue(`Kbd`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,attributes:c,...l}=t;return(0,T.jsx)(xe,{component:`kbd`,...de({name:`Kbd`,classes:Io,props:t,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:c,vars:s,varsResolver:Lo})(`root`),...l})});Ro.classes=Io,Ro.varsResolver=Lo,Ro.displayName=`@mantine/core/Kbd`;var zo=[];for(let e=0;e<256;++e)zo.push((e+256).toString(16).slice(1));function Bo(e,t=0){return(zo[e[t+0]]+zo[e[t+1]]+zo[e[t+2]]+zo[e[t+3]]+`-`+zo[e[t+4]]+zo[e[t+5]]+`-`+zo[e[t+6]]+zo[e[t+7]]+`-`+zo[e[t+8]]+zo[e[t+9]]+`-`+zo[e[t+10]]+zo[e[t+11]]+zo[e[t+12]]+zo[e[t+13]]+zo[e[t+14]]+zo[e[t+15]]).toLowerCase()}var Vo,Ho=new Uint8Array(16);function Uo(){if(!Vo){if(typeof crypto>`u`||!crypto.getRandomValues)throw Error(`crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported`);Vo=crypto.getRandomValues.bind(crypto)}return Vo(Ho)}var Wo={randomUUID:typeof crypto<`u`&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Go(e,t,n){if(Wo.randomUUID&&!t&&!e)return Wo.randomUUID();e||={};let r=e.random??e.rng?.()??Uo();if(r.length<16)throw Error(`Random bytes length must be >= 16`);if(r[6]=r[6]&15|64,r[8]=r[8]&63|128,t){if(n||=0,n<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return Bo(r)}var O;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(O||={});var Ko;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Ko||={});var k=O.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),qo=e=>{switch(typeof e){case`undefined`:return k.undefined;case`string`:return k.string;case`number`:return Number.isNaN(e)?k.nan:k.number;case`boolean`:return k.boolean;case`function`:return k.function;case`bigint`:return k.bigint;case`symbol`:return k.symbol;case`object`:return Array.isArray(e)?k.array:e===null?k.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?k.promise:typeof Map<`u`&&e instanceof Map?k.map:typeof Set<`u`&&e instanceof Set?k.set:typeof Date<`u`&&e instanceof Date?k.date:k.object;default:return k.unknown}},A=O.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Jo=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Jo.create=e=>new Jo(e);var Yo=(e,t)=>{let n;switch(e.code){case A.invalid_type:n=e.received===k.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case A.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,O.jsonStringifyReplacer)}`;break;case A.unrecognized_keys:n=`Unrecognized key(s) in object: ${O.joinValues(e.keys,`, `)}`;break;case A.invalid_union:n=`Invalid input`;break;case A.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${O.joinValues(e.options)}`;break;case A.invalid_enum_value:n=`Invalid enum value. Expected ${O.joinValues(e.options)}, received '${e.received}'`;break;case A.invalid_arguments:n=`Invalid function arguments`;break;case A.invalid_return_type:n=`Invalid function return type`;break;case A.invalid_date:n=`Invalid date`;break;case A.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:O.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case A.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case A.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case A.custom:n=`Invalid input`;break;case A.invalid_intersection_types:n=`Intersection results could not be merged`;break;case A.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case A.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,O.assertNever(e)}return{message:n}},Xo=Yo;function Zo(){return Xo}var Qo=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function j(e,t){let n=Zo(),r=Qo({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===Yo?void 0:Yo].filter(e=>!!e)});e.common.issues.push(r)}var $o=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return M;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return M;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},M=Object.freeze({status:`aborted`}),es=e=>({status:`dirty`,value:e}),ts=e=>({status:`valid`,value:e}),ns=e=>e.status===`aborted`,rs=e=>e.status===`dirty`,is=e=>e.status===`valid`,as=e=>typeof Promise<`u`&&e instanceof Promise,N;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(N||={});var os=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ss=(e,t)=>{if(is(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Jo(e.common.issues);return this._error=t,this._error}}};function P(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var cs=class{get description(){return this._def.description}_getType(e){return qo(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new $o,ctx:{common:e.parent.common,data:e.data,parsedType:qo(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(as(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};return ss(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return is(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>is(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:qo(e)},r=this._parse({data:e,path:n.path,parent:n});return ss(n,await(as(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:A.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new dc({schema:this,typeName:F.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return fc.create(this,this._def)}nullable(){return pc.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Ks.create(this)}promise(){return uc.create(this,this._def)}or(e){return Ys.create([this,e],this._def)}and(e){return $s.create(this,e,this._def)}transform(e){return new dc({...P(this._def),schema:this,typeName:F.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new mc({...P(this._def),innerType:this,defaultValue:t,typeName:F.ZodDefault})}brand(){return new _c({typeName:F.ZodBranded,type:this,...P(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new hc({...P(this._def),innerType:this,catchValue:t,typeName:F.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return vc.create(this,e)}readonly(){return yc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},ls=/^c[^\s-]{8,}$/i,us=/^[0-9a-z]+$/,ds=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fs=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,ps=/^[a-z0-9_-]{21}$/i,ms=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,hs=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,gs=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,_s=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,vs,ys=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bs=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xs=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ss=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Cs=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,ws=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ts=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,Es=RegExp(`^${Ts}$`);function Ds(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Os(e){return RegExp(`^${Ds(e)}$`)}function ks(e){let t=`${Ts}T${Ds(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function As(e,t){return!((t!==`v4`&&t||!ys.test(e))&&(t!==`v6`&&t||!xs.test(e)))}function js(e,t){if(!ms.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ms(e,t){return!((t!==`v4`&&t||!bs.test(e))&&(t!==`v6`&&t||!Ss.test(e)))}var Ns=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==k.string){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.string,received:t.parsedType}),M}let t=new $o,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:A.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:A.invalid_string,...N.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...N.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...N.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...N.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...N.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...N.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...N.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...N.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...N.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...N.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...N.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...N.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...N.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...N.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...N.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...N.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...N.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...N.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...N.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...N.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...N.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...N.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...N.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...N.errToObj(t)})}nonempty(e){return this.min(1,N.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ns({checks:[],typeName:F.ZodString,coerce:e?.coerce??!1,...P(e)});function Ps(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Fs=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==k.number){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.number,received:t.parsedType}),M}let t,n=new $o;for(let r of this._def.checks)r.kind===`int`?O.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),j(t,{code:A.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Ps(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_finite,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,N.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,N.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,N.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,N.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:N.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:N.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:N.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:N.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:N.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:N.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&O.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Fs({checks:[],typeName:F.ZodNumber,coerce:e?.coerce||!1,...P(e)});var Is=class e extends cs{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==k.bigint)return this._getInvalidInput(e);let t,n=new $o;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),j(t,{code:A.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):O.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.bigint,received:t.parsedType}),M}gte(e,t){return this.setLimit(`min`,e,!0,N.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,N.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,N.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,N.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:N.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:N.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:N.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:N.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:N.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:N.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Is({checks:[],typeName:F.ZodBigInt,coerce:e?.coerce??!1,...P(e)});var Ls=class extends cs{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==k.boolean){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.boolean,received:t.parsedType}),M}return ts(e.data)}};Ls.create=e=>new Ls({typeName:F.ZodBoolean,coerce:e?.coerce||!1,...P(e)});var Rs=class e extends cs{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==k.date){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.date,received:t.parsedType}),M}if(Number.isNaN(e.data.getTime()))return j(this._getOrReturnCtx(e),{code:A.invalid_date}),M;let t=new $o,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),j(n,{code:A.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):O.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:N.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:N.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Rs({checks:[],coerce:e?.coerce||!1,typeName:F.ZodDate,...P(e)});var zs=class extends cs{_parse(e){if(this._getType(e)!==k.symbol){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.symbol,received:t.parsedType}),M}return ts(e.data)}};zs.create=e=>new zs({typeName:F.ZodSymbol,...P(e)});var Bs=class extends cs{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.undefined,received:t.parsedType}),M}return ts(e.data)}};Bs.create=e=>new Bs({typeName:F.ZodUndefined,...P(e)});var Vs=class extends cs{_parse(e){if(this._getType(e)!==k.null){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.null,received:t.parsedType}),M}return ts(e.data)}};Vs.create=e=>new Vs({typeName:F.ZodNull,...P(e)});var Hs=class extends cs{constructor(){super(...arguments),this._any=!0}_parse(e){return ts(e.data)}};Hs.create=e=>new Hs({typeName:F.ZodAny,...P(e)});var Us=class extends cs{constructor(){super(...arguments),this._unknown=!0}_parse(e){return ts(e.data)}};Us.create=e=>new Us({typeName:F.ZodUnknown,...P(e)});var Ws=class extends cs{_parse(e){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.never,received:t.parsedType}),M}};Ws.create=e=>new Ws({typeName:F.ZodNever,...P(e)});var Gs=class extends cs{_parse(e){if(this._getType(e)!==k.undefined){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.void,received:t.parsedType}),M}return ts(e.data)}};Gs.create=e=>new Gs({typeName:F.ZodVoid,...P(e)});var Ks=class e extends cs{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==k.array)return j(t,{code:A.invalid_type,expected:k.array,received:t.parsedType}),M;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(j(t,{code:A.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new os(t,e,t.path,n)))).then(e=>$o.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new os(t,e,t.path,n)));return $o.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:N.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:N.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:N.toString(n)}})}nonempty(e){return this.min(1,e)}};Ks.create=(e,t)=>new Ks({type:e,minLength:null,maxLength:null,exactLength:null,typeName:F.ZodArray,...P(t)});function qs(e){if(e instanceof Js){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=fc.create(qs(r))}return new Js({...e._def,shape:()=>t})}return e instanceof Ks?new Ks({...e._def,type:qs(e.element)}):e instanceof fc?fc.create(qs(e.unwrap())):e instanceof pc?pc.create(qs(e.unwrap())):e instanceof ec?ec.create(e.items.map(e=>qs(e))):e}var Js=class e extends cs{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=O.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==k.object){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),M}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Ws&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new os(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Ws){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(j(n,{code:A.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new os(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>$o.mergeObjectSync(t,e)):$o.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return N.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:N.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:F.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of O.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of O.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return qs(this)}partial(t){let n={};for(let e of O.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of O.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof fc;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return sc(O.objectKeys(this.shape))}};Js.create=(e,t)=>new Js({shape:()=>e,unknownKeys:`strip`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)}),Js.strictCreate=(e,t)=>new Js({shape:()=>e,unknownKeys:`strict`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)}),Js.lazycreate=(e,t)=>new Js({shape:e,unknownKeys:`strip`,catchall:Ws.create(),typeName:F.ZodObject,...P(t)});var Ys=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Jo(e.ctx.common.issues));return j(t,{code:A.invalid_union,unionErrors:n}),M}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Jo(e));return j(t,{code:A.invalid_union,unionErrors:i}),M}}get options(){return this._def.options}};Ys.create=(e,t)=>new Ys({options:e,typeName:F.ZodUnion,...P(t)});var Xs=e=>e instanceof ac?Xs(e.schema):e instanceof dc?Xs(e.innerType()):e instanceof oc?[e.value]:e instanceof cc?e.options:e instanceof lc?O.objectValues(e.enum):e instanceof mc?Xs(e._def.innerType):e instanceof Bs?[void 0]:e instanceof Vs?[null]:e instanceof fc?[void 0,...Xs(e.unwrap())]:e instanceof pc?[null,...Xs(e.unwrap())]:e instanceof _c||e instanceof yc?Xs(e.unwrap()):e instanceof hc?Xs(e._def.innerType):[],Zs=class e extends cs{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.object)return j(t,{code:A.invalid_type,expected:k.object,received:t.parsedType}),M;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(j(t,{code:A.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),M)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Xs(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:F.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...P(r)})}};function Qs(e,t){let n=qo(e),r=qo(t);if(e===t)return{valid:!0,data:e};if(n===k.object&&r===k.object){let n=O.objectKeys(t),r=O.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Qs(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===k.array&&r===k.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(ns(e)||ns(r))return M;let i=Qs(e.value,r.value);return i.valid?((rs(e)||rs(r))&&t.dirty(),{status:t.value,value:i.data}):(j(n,{code:A.invalid_intersection_types}),M)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};$s.create=(e,t,n)=>new $s({left:e,right:t,typeName:F.ZodIntersection,...P(n)});var ec=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.array)return j(n,{code:A.invalid_type,expected:k.array,received:n.parsedType}),M;if(n.data.lengththis._def.items.length&&(j(n,{code:A.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new os(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>$o.mergeArray(t,e)):$o.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};ec.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new ec({items:e,typeName:F.ZodTuple,rest:null,...P(t)})};var tc=class e extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.object)return j(n,{code:A.invalid_type,expected:k.object,received:n.parsedType}),M;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new os(n,e,n.path,e)),value:a._parse(new os(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?$o.mergeObjectAsync(t,r):$o.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof cs?new e({keyType:t,valueType:n,typeName:F.ZodRecord,...P(r)}):new e({keyType:Ns.create(),valueType:t,typeName:F.ZodRecord,...P(n)})}},nc=class extends cs{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.map)return j(n,{code:A.invalid_type,expected:k.map,received:n.parsedType}),M;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new os(n,e,n.path,[a,`key`])),value:i._parse(new os(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return M;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return M;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};nc.create=(e,t,n)=>new nc({valueType:t,keyType:e,typeName:F.ZodMap,...P(n)});var rc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==k.set)return j(n,{code:A.invalid_type,expected:k.set,received:n.parsedType}),M;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(j(n,{code:A.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return M;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new os(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:N.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:N.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};rc.create=(e,t)=>new rc({valueType:e,minSize:null,maxSize:null,typeName:F.ZodSet,...P(t)});var ic=class e extends cs{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==k.function)return j(t,{code:A.invalid_type,expected:k.function,received:t.parsedType}),M;function n(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:A.invalid_arguments,argumentsError:n}})}function r(e,n){return Qo({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Zo(),Yo].filter(e=>!!e),issueData:{code:A.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof uc){let e=this;return ts(async function(...t){let o=new Jo([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return ts(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Jo([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Jo([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:ec.create(t).rest(Us.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||ec.create([]).rest(Us.create()),returns:n||Us.create(),typeName:F.ZodFunction,...P(r)})}},ac=class extends cs{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};ac.create=(e,t)=>new ac({getter:e,typeName:F.ZodLazy,...P(t)});var oc=class extends cs{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return j(t,{received:t.data,code:A.invalid_literal,expected:this._def.value}),M}return{status:`valid`,value:e.data}}get value(){return this._def.value}};oc.create=(e,t)=>new oc({value:e,typeName:F.ZodLiteral,...P(t)});function sc(e,t){return new cc({values:e,typeName:F.ZodEnum,...P(t)})}var cc=class e extends cs{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return j(t,{expected:O.joinValues(n),received:t.parsedType,code:A.invalid_type}),M}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return j(t,{received:t.data,code:A.invalid_enum_value,options:n}),M}return ts(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};cc.create=sc;var lc=class extends cs{_parse(e){let t=O.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==k.string&&n.parsedType!==k.number){let e=O.objectValues(t);return j(n,{expected:O.joinValues(e),received:n.parsedType,code:A.invalid_type}),M}if(this._cache||=new Set(O.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=O.objectValues(t);return j(n,{received:n.data,code:A.invalid_enum_value,options:e}),M}return ts(e.data)}get enum(){return this._def.values}};lc.create=(e,t)=>new lc({values:e,typeName:F.ZodNativeEnum,...P(t)});var uc=class extends cs{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==k.promise&&t.common.async===!1?(j(t,{code:A.invalid_type,expected:k.promise,received:t.parsedType}),M):ts((t.parsedType===k.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};uc.create=(e,t)=>new uc({type:e,typeName:F.ZodPromise,...P(t)});var dc=class extends cs{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===F.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{j(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return M;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?M:r.status===`dirty`||t.value===`dirty`?es(r.value):r});{if(t.value===`aborted`)return M;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?M:r.status===`dirty`||t.value===`dirty`?es(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?M:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?M:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!is(e))return M;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>is(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):M)}O.assertNever(r)}};dc.create=(e,t,n)=>new dc({schema:e,typeName:F.ZodEffects,effect:t,...P(n)}),dc.createWithPreprocess=(e,t,n)=>new dc({schema:t,effect:{type:`preprocess`,transform:e},typeName:F.ZodEffects,...P(n)});var fc=class extends cs{_parse(e){return this._getType(e)===k.undefined?ts(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};fc.create=(e,t)=>new fc({innerType:e,typeName:F.ZodOptional,...P(t)});var pc=class extends cs{_parse(e){return this._getType(e)===k.null?ts(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};pc.create=(e,t)=>new pc({innerType:e,typeName:F.ZodNullable,...P(t)});var mc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===k.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};mc.create=(e,t)=>new mc({innerType:e,typeName:F.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...P(t)});var hc=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return as(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Jo(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};hc.create=(e,t)=>new hc({innerType:e,typeName:F.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...P(t)});var gc=class extends cs{_parse(e){if(this._getType(e)!==k.nan){let t=this._getOrReturnCtx(e);return j(t,{code:A.invalid_type,expected:k.nan,received:t.parsedType}),M}return{status:`valid`,value:e.data}}};gc.create=e=>new gc({typeName:F.ZodNaN,...P(e)});var _c=class extends cs{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},vc=class e extends cs{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?M:e.status===`dirty`?(t.dirty(),es(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?M:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:F.ZodPipeline})}},yc=class extends cs{_parse(e){let t=this._def.innerType._parse(e),n=e=>(is(e)&&(e.value=Object.freeze(e.value)),e);return as(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};yc.create=(e,t)=>new yc({innerType:e,typeName:F.ZodReadonly,...P(t)}),Js.lazycreate;var F;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})(F||={});var I=Ns.create,bc=Fs.create;gc.create,Is.create;var xc=Ls.create;Rs.create,zs.create,Bs.create,Vs.create;var Sc=Hs.create,Cc=Us.create;Ws.create,Gs.create;var wc=Ks.create,L=Js.create;Js.strictCreate;var Tc=Ys.create,Ec=Zs.create;$s.create,ec.create;var Dc=tc.create;nc.create,rc.create,ic.create,ac.create;var R=oc.create,Oc=cc.create,kc=lc.create;uc.create,dc.create,fc.create,pc.create,dc.createWithPreprocess,vc.create;var Ac=Rn(),jc=Dc(Sc()).optional();function Mc(e,t){return t===void 0?e:e===void 0?{...t}:{...e,...t}}var Nc=L({name:I(),arguments:I()}),Pc=L({id:I(),type:R(`function`),function:Nc,encryptedValue:I().optional(),metadata:jc}),Fc=L({id:I(),role:I(),content:I().optional(),name:I().optional(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc}),Ic=L({type:R(`text`),text:I()}),Lc=Ec(`type`,[L({type:R(`data`),value:I(),mimeType:I()}),L({type:R(`url`),value:I(),mimeType:I().optional()})]),Rc=L({type:R(`image`),source:Lc,metadata:Cc().optional()}),zc=L({type:R(`audio`),source:Lc,metadata:Cc().optional()}),Bc=L({type:R(`video`),source:Lc,metadata:Cc().optional()}),Vc=L({type:R(`document`),source:Lc,metadata:Cc().optional()}),Hc=L({type:R(`binary`),mimeType:I(),id:I().optional(),url:I().optional(),data:I().optional(),filename:I().optional()}),Uc=(e,t)=>{!e.id&&!e.url&&!e.data&&t.addIssue({code:A.custom,message:`BinaryInputContent requires at least one of id, url, or data.`,path:[`id`]})};Hc.superRefine((e,t)=>{Uc(e,t)});var Wc=Ec(`type`,[Ic,Rc,zc,Bc,Vc,Hc]).superRefine((e,t)=>{e.type===`binary`&&Uc(e,t)}),Gc=Ec(`role`,[Fc.extend({role:R(`developer`),content:I()}),Fc.extend({role:R(`system`),content:I()}),Fc.extend({role:R(`assistant`),content:I().optional(),toolCalls:wc(Pc).optional()}),Fc.extend({role:R(`user`),content:Tc([I(),wc(Wc)])}),L({id:I(),content:I(),role:R(`tool`),toolCallId:I(),error:I().optional(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc}),L({id:I(),role:R(`activity`),activityType:I(),content:Dc(Sc()),subagentRunId:I().optional(),metadata:jc}),L({id:I(),role:R(`reasoning`),content:I(),encryptedValue:I().optional(),subagentRunId:I().optional(),metadata:jc})]);Tc([R(`developer`),R(`system`),R(`assistant`),R(`user`),R(`tool`),R(`activity`),R(`reasoning`)]);var Kc=L({description:I(),value:I()}),qc=L({name:I(),description:I(),parameters:Sc(),metadata:Dc(Sc()).optional()}),Jc=L({id:I(),reason:I(),message:I().optional(),toolCallId:I().optional(),responseSchema:Dc(Sc()).optional(),expiresAt:I().optional(),metadata:Dc(Sc()).optional(),subagentRunId:I().optional()}),Yc=L({interruptId:I(),status:Oc([`resolved`,`cancelled`]),payload:Sc().optional(),metadata:jc}),Xc=L({threadId:I(),runId:I(),parentRunId:I().optional(),state:Sc().transform(e=>e??void 0),messages:wc(Gc),tools:wc(qc),context:wc(Kc),forwardedProps:Sc(),resume:wc(Yc).optional()}),Zc=Sc(),z=class extends Error{constructor(e){super(e)}},Qc=class extends z{constructor(){super(`Connect not implemented. This method is not supported by the current agent.`)}},$c=L({name:I(),description:I().optional()}),el=L({name:I().optional(),type:I().optional(),description:I().optional(),version:I().optional(),provider:I().optional(),documentationUrl:I().optional(),metadata:Dc(Cc()).optional()}),tl=L({streaming:xc().optional(),websocket:xc().optional(),httpBinary:xc().optional(),pushNotifications:xc().optional(),resumable:xc().optional()}),nl=L({supported:xc().optional(),items:wc(qc).optional(),parallelCalls:xc().optional(),clientProvided:xc().optional()}),rl=L({structuredOutput:xc().optional(),supportedMimeTypes:wc(I()).optional()}),il=L({snapshots:xc().optional(),deltas:xc().optional(),memory:xc().optional(),persistentState:xc().optional()}),al=L({supported:xc().optional(),delegation:xc().optional(),handoffs:xc().optional(),subAgents:wc($c).optional()}),ol=L({supported:xc().optional(),streaming:xc().optional(),encrypted:xc().optional()}),sl=L({image:xc().optional(),audio:xc().optional(),video:xc().optional(),pdf:xc().optional(),file:xc().optional()}),cl=L({image:xc().optional(),audio:xc().optional()}),ll=L({input:sl.optional(),output:cl.optional()}),ul=L({codeExecution:xc().optional(),sandboxed:xc().optional(),maxIterations:bc().optional(),maxExecutionTime:bc().optional()}),dl=L({supported:xc().optional(),approvals:xc().optional(),interventions:xc().optional(),feedback:xc().optional(),interrupts:xc().optional(),approveWithEdits:xc().optional()});L({identity:el.optional(),transport:tl.optional(),tools:nl.optional(),output:rl.optional(),state:il.optional(),multiAgent:al.optional(),reasoning:ol.optional(),multimodal:ll.optional(),execution:ul.optional(),humanInTheLoop:dl.optional(),custom:Dc(Cc()).optional()});var fl=Tc([R(`developer`),R(`system`),R(`assistant`),R(`user`)]),B=function(e){return e.TEXT_MESSAGE_START=`TEXT_MESSAGE_START`,e.TEXT_MESSAGE_CONTENT=`TEXT_MESSAGE_CONTENT`,e.TEXT_MESSAGE_END=`TEXT_MESSAGE_END`,e.TEXT_MESSAGE_CHUNK=`TEXT_MESSAGE_CHUNK`,e.TOOL_CALL_START=`TOOL_CALL_START`,e.TOOL_CALL_ARGS=`TOOL_CALL_ARGS`,e.TOOL_CALL_END=`TOOL_CALL_END`,e.TOOL_CALL_CHUNK=`TOOL_CALL_CHUNK`,e.TOOL_CALL_RESULT=`TOOL_CALL_RESULT`,e.THINKING_START=`THINKING_START`,e.THINKING_END=`THINKING_END`,e.THINKING_TEXT_MESSAGE_START=`THINKING_TEXT_MESSAGE_START`,e.THINKING_TEXT_MESSAGE_CONTENT=`THINKING_TEXT_MESSAGE_CONTENT`,e.THINKING_TEXT_MESSAGE_END=`THINKING_TEXT_MESSAGE_END`,e.STATE_SNAPSHOT=`STATE_SNAPSHOT`,e.STATE_DELTA=`STATE_DELTA`,e.MESSAGES_SNAPSHOT=`MESSAGES_SNAPSHOT`,e.ACTIVITY_SNAPSHOT=`ACTIVITY_SNAPSHOT`,e.ACTIVITY_DELTA=`ACTIVITY_DELTA`,e.RAW=`RAW`,e.CUSTOM=`CUSTOM`,e.RUN_STARTED=`RUN_STARTED`,e.RUN_FINISHED=`RUN_FINISHED`,e.RUN_ERROR=`RUN_ERROR`,e.STEP_STARTED=`STEP_STARTED`,e.STEP_FINISHED=`STEP_FINISHED`,e.REASONING_START=`REASONING_START`,e.REASONING_MESSAGE_START=`REASONING_MESSAGE_START`,e.REASONING_MESSAGE_CONTENT=`REASONING_MESSAGE_CONTENT`,e.REASONING_MESSAGE_END=`REASONING_MESSAGE_END`,e.REASONING_MESSAGE_CHUNK=`REASONING_MESSAGE_CHUNK`,e.REASONING_END=`REASONING_END`,e.REASONING_ENCRYPTED_VALUE=`REASONING_ENCRYPTED_VALUE`,e.SUBAGENT_STARTED=`SUBAGENT_STARTED`,e.SUBAGENT_FINISHED=`SUBAGENT_FINISHED`,e.SUBAGENT_ERROR=`SUBAGENT_ERROR`,e}({}),V=L({type:kc(B),timestamp:bc().optional(),rawEvent:Sc().optional(),metadata:jc}).passthrough(),pl=V.extend({type:R(B.TEXT_MESSAGE_START),messageId:I(),role:fl.default(`assistant`),name:I().optional(),subagentRunId:I().optional()}),ml=V.extend({type:R(B.TEXT_MESSAGE_CONTENT),messageId:I(),delta:I(),subagentRunId:I().optional()}),hl=V.extend({type:R(B.TEXT_MESSAGE_END),messageId:I(),subagentRunId:I().optional()}),gl=V.extend({type:R(B.TEXT_MESSAGE_CHUNK),messageId:I().optional(),role:fl.optional(),delta:I().optional(),name:I().optional(),subagentRunId:I().optional()}),_l=V.extend({type:R(B.THINKING_TEXT_MESSAGE_START)}),vl=ml.omit({messageId:!0,type:!0,subagentRunId:!0}).extend({type:R(B.THINKING_TEXT_MESSAGE_CONTENT)}),yl=V.extend({type:R(B.THINKING_TEXT_MESSAGE_END)}),bl=V.extend({type:R(B.TOOL_CALL_START),toolCallId:I(),toolCallName:I(),parentMessageId:I().nullable().optional().transform(e=>e??void 0),subagentRunId:I().optional()}),xl=V.extend({type:R(B.TOOL_CALL_ARGS),toolCallId:I(),delta:I(),subagentRunId:I().optional()}),Sl=V.extend({type:R(B.TOOL_CALL_END),toolCallId:I(),subagentRunId:I().optional()}),Cl=V.extend({messageId:I(),type:R(B.TOOL_CALL_RESULT),toolCallId:I(),content:I(),role:R(`tool`).optional(),subagentRunId:I().optional()}),wl=V.extend({type:R(B.TOOL_CALL_CHUNK),toolCallId:I().optional(),toolCallName:I().optional(),parentMessageId:I().nullable().optional().transform(e=>e??void 0),delta:I().optional(),subagentRunId:I().optional()}),Tl=V.extend({type:R(B.THINKING_START),title:I().optional()}),El=V.extend({type:R(B.THINKING_END)}),Dl=V.extend({type:R(B.STATE_SNAPSHOT),snapshot:Zc,subagentRunId:I().optional()}),Ol=V.extend({type:R(B.STATE_DELTA),delta:wc(Sc()),subagentRunId:I().optional()}),kl=V.extend({type:R(B.MESSAGES_SNAPSHOT),messages:wc(Gc)}),Al=V.extend({type:R(B.ACTIVITY_SNAPSHOT),messageId:I(),activityType:I(),content:Dc(Sc()),replace:xc().optional().default(!0),subagentRunId:I().optional()}),jl=V.extend({type:R(B.ACTIVITY_DELTA),messageId:I(),activityType:I(),patch:wc(Sc()),subagentRunId:I().optional()}),Ml=V.extend({type:R(B.RAW),event:Sc(),source:I().optional(),subagentRunId:I().optional()}),Nl=V.extend({type:R(B.CUSTOM),name:I(),value:Sc(),subagentRunId:I().optional()}),Pl=V.extend({type:R(B.RUN_STARTED),threadId:I(),runId:I(),parentRunId:I().optional(),input:Xc.optional()}),Fl=Ec(`type`,[L({type:R(`success`)}).strict(),L({type:R(`interrupt`),interrupts:wc(Jc).min(1)}).strict()]),Il=L({provider:I().optional(),model:I().optional(),inputTokens:bc().int().nonnegative().optional(),outputTokens:bc().int().nonnegative().optional(),totalTokens:bc().int().nonnegative().optional(),reasoningTokens:bc().int().nonnegative().optional(),cachedInputTokens:bc().int().nonnegative().optional()}),Ll=V.extend({type:R(B.RUN_FINISHED),threadId:I(),runId:I(),result:Sc().optional(),outcome:Fl.nullable().optional().transform(e=>e??void 0),usage:wc(Il).optional()}),Rl=V.extend({type:R(B.RUN_ERROR),message:I(),code:I().optional(),usage:wc(Il).optional()}),zl=V.extend({type:R(B.STEP_STARTED),stepName:I(),subagentRunId:I().optional()}),Bl=V.extend({type:R(B.STEP_FINISHED),stepName:I(),subagentRunId:I().optional()}),Vl=Tc([R(`tool-call`),R(`message`)]),Hl=V.extend({type:R(B.REASONING_START),messageId:I(),subagentRunId:I().optional()}),Ul=V.extend({type:R(B.REASONING_MESSAGE_START),messageId:I(),role:R(`reasoning`),subagentRunId:I().optional()}),Wl=V.extend({type:R(B.REASONING_MESSAGE_CONTENT),messageId:I(),delta:I(),subagentRunId:I().optional()}),Gl=V.extend({type:R(B.REASONING_MESSAGE_END),messageId:I(),subagentRunId:I().optional()}),Kl=V.extend({type:R(B.REASONING_MESSAGE_CHUNK),messageId:I().optional(),delta:I().optional(),subagentRunId:I().optional()}),ql=V.extend({type:R(B.REASONING_END),messageId:I(),subagentRunId:I().optional()}),Jl=V.extend({type:R(B.REASONING_ENCRYPTED_VALUE),subtype:Vl,entityId:I(),encryptedValue:I(),subagentRunId:I().optional()}),Yl=V.extend({type:R(B.SUBAGENT_STARTED),subagentRunId:I(),name:I(),description:I().optional(),parentSubagentRunId:I().optional(),parentToolCallId:I().optional(),parentMessageId:I().optional()}),Xl=Ec(`type`,[L({type:R(`success`)}).strict(),L({type:R(`suspended`),interruptIds:wc(I()).optional()}).strict()]),Zl=Ec(`type`,[pl,ml,hl,gl,Tl,El,_l,vl,yl,bl,xl,Sl,wl,Cl,Dl,Ol,kl,Al,jl,Ml,Nl,Pl,Ll,Rl,zl,Bl,Hl,Ul,Wl,Gl,Kl,ql,Jl,Yl,V.extend({type:R(B.SUBAGENT_FINISHED),subagentRunId:I(),result:Sc().optional(),outcome:Xl.optional()}),V.extend({type:R(B.SUBAGENT_ERROR),subagentRunId:I(),message:I(),code:I().optional()})]),Ql=(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})(),$l=Object.prototype.hasOwnProperty;function eu(e,t){return $l.call(e,t)}function tu(e){if(Array.isArray(e)){for(var t=Array(e.length),n=0;n=48&&r<=57){t++;continue}return!1}return!0}function iu(e){return e.indexOf(`/`)===-1&&e.indexOf(`~`)===-1?e:e.replace(/~/g,`~0`).replace(/\//g,`~1`)}function au(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function ou(e){if(e===void 0)return!0;if(e){if(Array.isArray(e)){for(var t=0,n=e.length;tuu,_areEquals:()=>bu,applyOperation:()=>hu,applyPatch:()=>gu,applyReducer:()=>_u,deepClone:()=>du,getValueByPointer:()=>mu,validate:()=>yu,validator:()=>vu}),uu=cu,du=nu,fu={add:function(e,t,n){return e[t]=this.value,{newDocument:n}},remove:function(e,t,n){var r=e[t];return delete e[t],{newDocument:n,removed:r}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:function(e,t,n){var r=mu(n,this.path);r&&=nu(r);var i=hu(n,{op:`remove`,path:this.from}).removed;return hu(n,{op:`add`,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(e,t,n){var r=mu(n,this.from);return hu(n,{op:`add`,path:this.path,value:nu(r)}),{newDocument:n}},test:function(e,t,n){return{newDocument:n,test:bu(e[t],this.value)}},_get:function(e,t,n){return this.value=e[t],{newDocument:n}}},pu={add:function(e,t,n){return ru(t)?e.splice(t,0,this.value):e[t]=this.value,{newDocument:n,index:t}},remove:function(e,t,n){return{newDocument:n,removed:e.splice(t,1)[0]}},replace:function(e,t,n){var r=e[t];return e[t]=this.value,{newDocument:n,removed:r}},move:fu.move,copy:fu.copy,test:fu.test,_get:fu._get};function mu(e,t){if(t==``)return e;var n={op:`_get`,path:t};return hu(e,n),n.value}function hu(e,t,n,r,i,a){if(n===void 0&&(n=!1),r===void 0&&(r=!0),i===void 0&&(i=!0),a===void 0&&(a=0),n&&(typeof n==`function`?n(t,0,e,t.path):vu(t,0)),t.path===``){var o={newDocument:e};if(t.op===`add`)return o.newDocument=t.value,o;if(t.op===`replace`)return o.newDocument=t.value,o.removed=e,o;if(t.op===`move`||t.op===`copy`)return o.newDocument=mu(e,t.from),t.op===`move`&&(o.removed=e),o;if(t.op===`test`){if(o.test=bu(e,t.value),o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o.newDocument=e,o}if(t.op===`remove`)return o.removed=e,o.newDocument=null,o;if(t.op===`_get`)return t.value=e,o;if(n)throw new uu("Operation `op` property is not one of operations defined in RFC-6902",`OPERATION_OP_INVALID`,a,t,e);return o}r||(e=nu(e));var s=(t.path||``).split(`/`),c=e,l=1,u=s.length,d=void 0,f=void 0,p=void 0;for(p=typeof n==`function`?n:vu;;){if(f=s[l],f&&f.indexOf(`~`)!=-1&&(f=au(f)),i&&(f==`__proto__`||f==`prototype`&&l>0&&s[l-1]==`constructor`))throw TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");if(n&&d===void 0&&(c[f]===void 0?d=s.slice(0,l).join(`/`):l==u-1&&(d=t.path),d!==void 0&&p(t,0,e,d)),l++,Array.isArray(c)){if(f===`-`)f=c.length;else if(n&&!ru(f))throw new uu(`Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index`,`OPERATION_PATH_ILLEGAL_ARRAY_INDEX`,a,t,e);else ru(f)&&(f=~~f);if(l>=u){if(n&&t.op===`add`&&f>c.length)throw new uu(`The specified index MUST NOT be greater than the number of elements in the array`,`OPERATION_VALUE_OUT_OF_BOUNDS`,a,t,e);var o=pu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}}else if(l>=u){var o=fu[t.op].call(t,c,f,e);if(o.test===!1)throw new uu(`Test operation failed`,`TEST_OPERATION_FAILED`,a,t,e);return o}if(c=c[f],n&&l0)throw new uu('Operation `path` property must start with "/"',`OPERATION_PATH_INVALID`,t,e,n);if((e.op===`move`||e.op===`copy`)&&typeof e.from!=`string`)throw new uu("Operation `from` property is not present (applicable in `move` and `copy` operations)",`OPERATION_FROM_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&e.value===void 0)throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_REQUIRED`,t,e,n);if((e.op===`add`||e.op===`replace`||e.op===`test`)&&ou(e.value))throw new uu("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)",`OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED`,t,e,n);if(n){if(e.op==`add`){var i=e.path.split(`/`).length,a=r.split(`/`).length;if(i!==a+1&&i!==a)throw new uu("Cannot perform an `add` operation at the desired path",`OPERATION_PATH_CANNOT_ADD`,t,e,n)}else if(e.op===`replace`||e.op===`remove`||e.op===`_get`){if(e.path!==r)throw new uu(`Cannot perform the operation at a path that does not exist`,`OPERATION_PATH_UNRESOLVABLE`,t,e,n)}else if(e.op===`move`||e.op===`copy`){var o=yu([{op:`_get`,path:e.from,value:void 0}],n);if(o&&o.name===`OPERATION_PATH_UNRESOLVABLE`)throw new uu(`Cannot perform the operation from a path that does not exist`,`OPERATION_FROM_UNRESOLVABLE`,t,e,n)}}}function yu(e,t,n){try{if(!Array.isArray(e))throw new uu(`Patch sequence must be an array`,`SEQUENCE_NOT_AN_ARRAY`);if(t)gu(nu(t),nu(e),n||!0);else{n||=vu;for(var r=0;rMu,generate:()=>Au,observe:()=>ku,unobserve:()=>Ou}),Su=new WeakMap,Cu=function(){function e(e){this.observers=new Map,this.obj=e}return e}(),wu=function(){function e(e,t){this.callback=e,this.observer=t}return e}();function Tu(e){return Su.get(e)}function Eu(e,t){return e.observers.get(t)}function Du(e,t){e.observers.delete(t.callback)}function Ou(e,t){t.unobserve()}function ku(e,t){var n=[],r,i=Tu(e);if(!i)i=new Cu(e),Su.set(e,i);else{var a=Eu(i,t);r=a&&a.observer}if(r)return r;if(r={},i.value=nu(e),t){r.callback=t,r.next=null;var o=function(){Au(r)},s=function(){clearTimeout(r.next),r.next=setTimeout(o)};typeof window<`u`&&(window.addEventListener(`mouseup`,s),window.addEventListener(`keyup`,s),window.addEventListener(`mousedown`,s),window.addEventListener(`keydown`,s),window.addEventListener(`change`,s))}return r.patches=n,r.object=e,r.unobserve=function(){Au(r),clearTimeout(r.next),Du(i,r),typeof window<`u`&&(window.removeEventListener(`mouseup`,s),window.removeEventListener(`keyup`,s),window.removeEventListener(`mousedown`,s),window.removeEventListener(`keydown`,s),window.removeEventListener(`change`,s))},i.observers.set(t,new wu(t,r)),r}function Au(e,t){t===void 0&&(t=!1);var n=Su.get(e.object);ju(n.value,e.object,e.patches,``,t),e.patches.length&&gu(n.value,e.patches);var r=e.patches;return r.length>0&&(e.patches=[],e.callback&&e.callback(r)),r}function ju(e,t,n,r,i){if(t!==e){typeof t.toJSON==`function`&&(t=t.toJSON());for(var a=tu(t),o=tu(e),s=!1,c=o.length-1;c>=0;c--){var l=o[c],u=e[l];if(eu(t,l)&&(t[l]!==void 0||u===void 0||Array.isArray(t)!==!1)){var d=t[l];typeof u==`object`&&u&&typeof d==`object`&&d&&Array.isArray(u)===Array.isArray(d)?ju(u,d,n,r+`/`+iu(l),i):u!==d&&(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`replace`,path:r+`/`+iu(l),value:nu(d)}))}else Array.isArray(e)===Array.isArray(t)?(i&&n.push({op:`test`,path:r+`/`+iu(l),value:nu(u)}),n.push({op:`remove`,path:r+`/`+iu(l)}),s=!0):(i&&n.push({op:`test`,path:r,value:e}),n.push({op:`replace`,path:r,value:t}))}if(s||a.length!=o.length)for(var c=0;c0&&a[a.length-1])&&(s[0]===6||s[0]===2)){n=0;continue}if(s[0]===3&&(!a||s[1]>a[0]&&s[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw TypeError(t?`Object is not iterable.`:`Symbol.iterator is not defined.`)}function zu(e,t){var n=typeof Symbol==`function`&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),i,a=[],o;try{for(;(t===void 0||t-->0)&&!(i=r.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(o)throw o.error}}return a}function Bu(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r1||c(e,t)})},t&&(i[e]=t(i[e])))}function c(e,t){try{l(r[e](t))}catch(e){f(a[0][3],e)}}function l(e){e.value instanceof Vu?Promise.resolve(e.value.v).then(u,d):f(a[0][2],e)}function u(e){c(`next`,e)}function d(e){c(`throw`,e)}function f(e,t){e(t),a.shift(),a.length&&c(a[0][0],a[0][1])}}function Uu(e){if(!Symbol.asyncIterator)throw TypeError(`Symbol.asyncIterator is not defined.`);var t=e[Symbol.asyncIterator],n;return t?t.call(e):(e=typeof Ru==`function`?Ru(e):e[Symbol.iterator](),n={},r(`next`),r(`throw`),r(`return`),n[Symbol.asyncIterator]=function(){return this},n);function r(t){n[t]=e[t]&&function(n){return new Promise(function(r,a){n=e[t](n),i(r,a,n.done,n.value)})}}function i(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)}}function Wu(e){return typeof e==`function`}function Gu(e){var t=e(function(e){Error.call(e),e.stack=Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var Ku=Gu(function(e){return function(t){e(this),this.message=t?t.length+` errors occurred during unsubscription: +`+t.map(function(e,t){return t+1+`) `+e.toString()}).join(` + `):``,this.name=`UnsubscriptionError`,this.errors=t}});function qu(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var Ju=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var e,t,n,r,i;if(!this.closed){this.closed=!0;var a=this._parentage;if(a){if(this._parentage=null,Array.isArray(a))try{for(var o=Ru(a),s=o.next();!s.done;s=o.next())s.value.remove(this)}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}else a.remove(this)}var c=this.initialTeardown;if(Wu(c))try{c()}catch(e){i=e instanceof Ku?e.errors:[e]}var l=this._finalizers;if(l){this._finalizers=null;try{for(var u=Ru(l),d=u.next();!d.done;d=u.next()){var f=d.value;try{Zu(f)}catch(e){i??=[],e instanceof Ku?i=Bu(Bu([],zu(i)),zu(e.errors)):i.push(e)}}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=u.return)&&r.call(u)}finally{if(n)throw n.error}}}if(i)throw new Ku(i)}},e.prototype.add=function(t){if(t&&t!==this){if(this.closed)Zu(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=this._finalizers??[]).push(t)}}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&qu(t,e)},e.prototype.remove=function(t){var n=this._finalizers;n&&qu(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e}(),Yu=Ju.EMPTY;function Xu(e){return e instanceof Ju||e&&`closed`in e&&Wu(e.remove)&&Wu(e.add)&&Wu(e.unsubscribe)}function Zu(e){Wu(e)?e():e.unsubscribe()}var Qu={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1},$u={setTimeout:function(e,t){var n=[...arguments].slice(2),r=$u.delegate;return r?.setTimeout?r.setTimeout.apply(r,Bu([e,t],zu(n))):setTimeout.apply(void 0,Bu([e,t],zu(n)))},clearTimeout:function(e){return($u.delegate?.clearTimeout||clearTimeout)(e)},delegate:void 0};function ed(e){$u.setTimeout(function(){var t=Qu.onUnhandledError;if(t)t(e);else throw e})}function td(){}var nd=(function(){return ad(`C`,void 0,void 0)})();function rd(e){return ad(`E`,void 0,e)}function id(e){return ad(`N`,e,void 0)}function ad(e,t,n){return{kind:e,value:t,error:n}}var od=null;function sd(e){if(Qu.useDeprecatedSynchronousErrorHandling){var t=!od;if(t&&(od={errorThrown:!1,error:null}),e(),t){var n=od,r=n.errorThrown,i=n.error;if(od=null,r)throw i}}else e()}function cd(e){Qu.useDeprecatedSynchronousErrorHandling&&od&&(od.errorThrown=!0,od.error=e)}var ld=function(e){Fu(t,e);function t(t){var n=e.call(this)||this;return n.isStopped=!1,t?(n.destination=t,Xu(t)&&t.add(n)):n.destination=_d,n}return t.create=function(e,t,n){return new pd(e,t,n)},t.prototype.next=function(e){this.isStopped?gd(id(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?gd(rd(e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?gd(nd,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(Ju),ud=Function.prototype.bind;function dd(e,t){return ud.call(e,t)}var fd=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){md(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){md(e)}else md(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){md(e)}},e}(),pd=function(e){Fu(t,e);function t(t,n,r){var i=e.call(this)||this,a;if(Wu(t)||!t)a={next:t??void 0,error:n??void 0,complete:r??void 0};else{var o;i&&Qu.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=function(){return i.unsubscribe()},a={next:t.next&&dd(t.next,o),error:t.error&&dd(t.error,o),complete:t.complete&&dd(t.complete,o)}):a=t}return i.destination=new fd(a),i}return t}(ld);function md(e){Qu.useDeprecatedSynchronousErrorHandling?cd(e):ed(e)}function hd(e){throw e}function gd(e,t){var n=Qu.onStoppedNotification;n&&$u.setTimeout(function(){return n(e,t)})}var _d={closed:!0,next:td,error:hd,complete:td},vd=(function(){return typeof Symbol==`function`&&Symbol.observable||`@@observable`})();function yd(e){return e}function bd(){return xd([...arguments])}function xd(e){return e.length===0?yd:e.length===1?e[0]:function(t){return e.reduce(function(e,t){return t(e)},t)}}var Sd=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,n){var r=this,i=Td(e)?e:new pd(e,t,n);return sd(function(){var e=r,t=e.operator,n=e.source;i.add(t?t.call(i,n):n?r._subscribe(i):r._trySubscribe(i))}),i},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var n=this;return t=Cd(t),new t(function(t,r){var i=new pd({next:function(t){try{e(t)}catch(e){r(e),i.unsubscribe()}},error:r,complete:t});n.subscribe(i)})},e.prototype._subscribe=function(e){return this.source?.subscribe(e)},e.prototype[vd]=function(){return this},e.prototype.pipe=function(){return xd([...arguments])(this)},e.prototype.toPromise=function(e){var t=this;return e=Cd(e),new e(function(e,n){var r;t.subscribe(function(e){return r=e},function(e){return n(e)},function(){return e(r)})})},e.create=function(t){return new e(t)},e}();function Cd(e){return e??Qu.Promise??Promise}function wd(e){return e&&Wu(e.next)&&Wu(e.error)&&Wu(e.complete)}function Td(e){return e&&e instanceof ld||wd(e)&&Xu(e)}function Ed(e){return Wu(e?.lift)}function Dd(e){return function(t){if(Ed(t))return t.lift(function(t){try{return e(t,this)}catch(e){this.error(e)}});throw TypeError(`Unable to lift unknown Observable type`)}}function Od(e,t,n,r,i){return new kd(e,t,n,r,i)}var kd=function(e){Fu(t,e);function t(t,n,r,i,a,o){var s=e.call(this,t)||this;return s.onFinalize=a,s.shouldUnsubscribe=o,s._next=n?function(e){try{n(e)}catch(e){t.error(e)}}:e.prototype._next,s._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,s._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,s}return t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;e.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)==null||t.call(this))}},t}(ld),Ad=Gu(function(e){return function(){e(this),this.name=`ObjectUnsubscribedError`,this.message=`object unsubscribed`}}),jd=function(e){Fu(t,e);function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return t.prototype.lift=function(e){var t=new Md(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new Ad},t.prototype.next=function(e){var t=this;sd(function(){var n,r;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||=Array.from(t.observers);try{for(var i=Ru(t.currentObservers),a=i.next();!a.done;a=i.next())a.value.next(e)}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}}})},t.prototype.error=function(e){var t=this;sd(function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var n=t.observers;n.length;)n.shift().error(e)}})},t.prototype.complete=function(){var e=this;sd(function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){return this.observers?.length>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,n=this,r=n.hasError,i=n.isStopped,a=n.observers;return r||i?Yu:(this.currentObservers=null,a.push(e),new Ju(function(){t.currentObservers=null,qu(a,e)}))},t.prototype._checkFinalizedStatuses=function(e){var t=this,n=t.hasError,r=t.thrownError,i=t.isStopped;n?e.error(r):i&&e.complete()},t.prototype.asObservable=function(){var e=new Sd;return e.source=this,e},t.create=function(e,t){return new Md(e,t)},t}(Sd),Md=function(e){Fu(t,e);function t(t,n){var r=e.call(this)||this;return r.destination=t,r.source=n,r}return t.prototype.next=function(e){var t,n;(n=(t=this.destination)?.next)==null||n.call(t,e)},t.prototype.error=function(e){var t,n;(n=(t=this.destination)?.error)==null||n.call(t,e)},t.prototype.complete=function(){var e,t;(t=(e=this.destination)?.complete)==null||t.call(e)},t.prototype._subscribe=function(e){return this.source?.subscribe(e)??Yu},t}(jd),Nd={now:function(){return(Nd.delegate||Date).now()},delegate:void 0},Pd=function(e){Fu(t,e);function t(t,n,r){t===void 0&&(t=1/0),n===void 0&&(n=1/0),r===void 0&&(r=Nd);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=n,i._timestampProvider=r,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=n===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,n),i}return t.prototype.next=function(t){var n=this,r=n.isStopped,i=n._buffer,a=n._infiniteTimeWindow,o=n._timestampProvider,s=n._windowTime;r||(i.push(t),!a&&i.push(o.now()+s)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),n=this,r=n._infiniteTimeWindow,i=n._buffer.slice(),a=0;a=0}function Mf(e){for(var t=[`topLevel`],n=0,r,i,a,o=function(e){return t.push(e)},s=function(e){return t[t.length-1]=e},c=function(e){r??(r=n,i=t.length,a=e)},l=function(e){e===a&&(r=void 0,i=void 0,a=void 0)},u=function(){return t.pop()},d=function(){return n--},f=function(e){if(`0`<=e&&e<=`9`){o(`number`);return}switch(e){case`"`:o(`string`);return;case`-`:o(`numberNeedsDigit`);return;case`t`:o(`true`);return;case`f`:o(`false`);return;case`n`:o(`null`);return;case`[`:o(`arrayNeedsValue`);return;case`{`:o(`objectNeedsKey`);return}},p=e.length;n`9`)&&(d(),u());break;case`numberNeedsDigit`:s(`number`);break;case`numberNeedsExponent`:s(m===`+`||m===`-`?`numberNeedsDigit`:`number`);break;case`true`:case`false`:case`null`:(m<`a`||m>`z`)&&(d(),u());break;case`arrayNeedsValue`:m===`]`?u():jf(m)||(l(`collectionItem`),s(`arrayNeedsComma`),f(m));break;case`arrayNeedsComma`:m===`]`?u():m===`,`&&(c(`collectionItem`),s(`arrayNeedsValue`));break;case`objectNeedsKey`:m===`}`?u():m===`"`&&(c(`collectionItem`),s(`objectNeedsColon`),o(`string`));break;case`objectNeedsColon`:m===`:`&&s(`objectNeedsValue`);break;case`objectNeedsValue`:jf(m)||(l(`collectionItem`),s(`objectNeedsComma`),f(m));break;case`objectNeedsComma`:m===`}`?u():m===`,`&&(c(`collectionItem`),s(`objectNeedsKey`))}}i!=null&&(t.length=i);for(var h=[r==null?e:e.slice(0,r)],g=function(t){return h.push(t.slice(e.length-e.lastIndexOf(t[0])))},_=t.length-1;_>=0;_--)switch(t[_]){case`string`:h.push(`"`);break;case`numberNeedsDigit`:case`numberNeedsExponent`:h.push(`0`);break;case`true`:g(`true`);break;case`false`:g(`false`);break;case`null`:g(`null`);break;case`arrayNeedsValue`:case`arrayNeedsComma`:h.push(`]`);break;case`objectNeedsKey`:case`objectNeedsColon`:case`objectNeedsValue`:case`objectNeedsComma`:h.push(`}`)}return h.join(``)}function Nf(){let e=this.buf,t=this.pos,n=0,r=0;for(let i=0;i<28;i+=7){let a=e[t++];if(n|=(a&127)<>4,!(i&128)){this.pos=t,this.assertBounds(),this.varint64Lo=n,this.varint64Hi=r;return}for(let i=3;i<=31;i+=7){let a=e[t++];if(r|=(a&127)<=Pf&&(i+=r/Pf|0,r%=Pf)}return a(-24,-18),a(-18,-12),a(-12,-6),a(-6),t?Bf(r,i):zf(r,i)}function If(e,t){let n=zf(e,t),r=n.hi&2147483648;r&&(n=Bf(n.lo,n.hi));let i=Lf(n.lo,n.hi);return r?`-`+i:i}function Lf(e,t){if({lo:e,hi:t}=Rf(e,t),t<=2097151)return String(Pf*t+e);let n=e&16777215,r=(e>>>24|t<<8)&16777215,i=t>>16&65535,a=n+r*6777216+i*6710656,o=r+i*8147497,s=i*2,c=1e7;return a>=c&&(o+=Math.floor(a/c),a%=c),o>=c&&(s+=Math.floor(o/c),o%=c),s.toString()+Vf(o)+Vf(a)}function Rf(e,t){return{lo:e>>>0,hi:t>>>0}}function zf(e,t){return{lo:e|0,hi:t|0}}function Bf(e,t){return t=~t,e?e=~e+1:t+=1,zf(e,t)}var Vf=e=>{let t=String(e);return`0000000`.slice(t.length)+t};function Hf(){let e=this.buf[this.pos++];if(!(e&128))return this.assertBounds(),e;let t=e&127;if(e=this.buf[this.pos++],t|=(e&127)<<7,!(e&128)||(e=this.buf[this.pos++],t|=(e&127)<<14,!(e&128))||(e=this.buf[this.pos++],t|=(e&127)<<21,!(e&128)))return this.assertBounds(),t;e=this.buf[this.pos++],t|=(e&15)<<28;for(let t=5;e&128&&t<10;t++)e=this.buf[this.pos++];if(e&128)throw Error(`invalid varint`);return this.assertBounds(),t>>>0}var Uf=Wf();function Wf(){let e=new DataView(new ArrayBuffer(8));if(typeof BigInt==`function`&&typeof e.getBigInt64==`function`&&typeof e.getBigUint64==`function`&&typeof e.setBigInt64==`function`&&typeof e.setBigUint64==`function`&&(globalThis.Deno||globalThis.Bun||typeof process!=`object`||{}.BUF_BIGINT_DISABLE!==`1`)){let t=BigInt(`-9223372036854775808`),n=BigInt(`9223372036854775807`),r=BigInt(`0`),i=BigInt(`18446744073709551615`);return{zero:BigInt(0),supported:!0,parse(e){let r=typeof e==`bigint`?e:BigInt(e);if(r>n||ri||ta.call(e)),Jf(i)}return qf}function Xf(e){return(t,n)=>{let r=e(t);return n.set(r),{written:r.byteLength}}}var Zf;(function(e){e[e.Varint=0]=`Varint`,e[e.Bit64=1]=`Bit64`,e[e.LengthDelimited=2]=`LengthDelimited`,e[e.StartGroup=3]=`StartGroup`,e[e.EndGroup=4]=`EndGroup`,e[e.Bit32=5]=`Bit32`})(Zf||={});var U=class{constructor(e){this.stackPos=[],this.encodeUtf8Into=e?Xf(e):Yf().encodeUtf8Into,this.buffer=ep,this.viewCache=tp,this.pos=0}ensureCapacity(e){let t=this.pos+e;if(t>this.buffer.length){let e=this.buffer.length||Qf;for(;e0&&n.set(this.buffer),this.buffer=n}}view(){let e=this.buffer,t=this.viewCache;if(t.byteLength===e.byteLength)return t;let n=new DataView(e.buffer);return this.viewCache=n,n}finish(){let e=this.buffer.slice(0,this.pos);return this.pos=0,this.stackPos=[],e}fork(){return this.stackPos.push(this.pos),this.ensureCapacity($f),this.buffer[this.pos++]=0,this}join(){let e=this.stackPos.pop();if(e===void 0)throw Error(`invalid state, fork stack empty`);let t=this.pos-e-$f,n=rp(t);return n>$f&&(this.ensureCapacity(n-$f),this.buffer.copyWithin(e+n,e+$f,this.pos)),this.pos=e,this.uint32(t),this.pos+=t,this}tag(e,t){return this.uint32((e<<3|t)>>>0)}raw(e){return this.ensureCapacity(e.length),this.buffer.set(e,this.pos),this.pos+=e.length,this}uint32(e){if(ap(e),this.ensureCapacity(5),e<128)return this.buffer[this.pos++]=e,this;for(;e>127;)this.buffer[this.pos++]=e&127|128,e>>>=7;return this.buffer[this.pos++]=e,this}int32(e){if(ip(e),e>=0)return this.uint32(e);this.ensureCapacity(10);for(let t=0;t<9;t++)this.buffer[this.pos++]=e&127|128,e>>=7;return this.buffer[this.pos++]=1,this}bool(e){return this.ensureCapacity(1),this.buffer[this.pos++]=+!!e,this}bytes(e){return this.uint32(e.byteLength),this.raw(e)}string(e){typeof e!=`string`&&(e=String(e));let t=e.length;if(t<=np){this.ensureCapacity(t+1);let n=this.buffer,r=this.pos;n[r++]=t;let i=0;for(;i127)break;n[r++]=t}if(i==t)return this.pos=r,this}this.ensureCapacity(t*3+5);let n=rp(t),r=this.buffer,i=this.pos,{written:a}=this.encodeUtf8Into(e,r.subarray(i+n)),o=rp(a);return o!=n&&r.copyWithin(i+o,i+n,i+n+a),this.uint32(a),this.pos+=a,this}float(e){return op(e),this.ensureCapacity(4),this.view().setFloat32(this.pos,e,!0),this.pos+=4,this}double(e){return this.ensureCapacity(8),this.view().setFloat64(this.pos,e,!0),this.pos+=8,this}fixed32(e){return ap(e),this.ensureCapacity(4),this.view().setUint32(this.pos,e,!0),this.pos+=4,this}sfixed32(e){return ip(e),this.ensureCapacity(4),this.view().setInt32(this.pos,e,!0),this.pos+=4,this}sint32(e){return ip(e),this.uint32((e<<1^e>>31)>>>0)}sfixed64(e){let t=Uf.enc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}fixed64(e){let t=Uf.uEnc(e);this.ensureCapacity(8);let n=this.view();return n.setInt32(this.pos,t.lo,!0),n.setInt32(this.pos+4,t.hi,!0),this.pos+=8,this}int64(e){let t=Uf.enc(e);return this.writeVarint64(t.lo,t.hi)}sint64(e){let t=Uf.enc(e),n=t.hi>>31,r=t.lo<<1^n,i=(t.hi<<1|t.lo>>>31)^n;return this.writeVarint64(r,i)}uint64(e){let t=Uf.uEnc(e);return this.writeVarint64(t.lo,t.hi)}writeVarint64(e,t){this.ensureCapacity(10);let n=this.buffer,r=this.pos;for(let i=0;i<28;i+=7){let a=e>>>i,o=!(!(a>>>7)&&t==0);if(n[r++]=(o?a|128:a)&255,!o)return this.pos=r,this}let i=e>>>28&15|(t&7)<<4,a=!!(t>>3);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this;for(let e=3;e<31;e+=7){let i=t>>>e,a=!!(i>>>7);if(n[r++]=(a?i|128:i)&255,!a)return this.pos=r,this}return n[r++]=t>>>31&1,this.pos=r,this}},Qf=128,$f=1,ep=new Uint8Array,tp=new DataView(ep.buffer),np=32;function rp(e){return e<128?1:e<16384?2:e<2097152?3:e<268435456?4:5}var W=class{constructor(e,t=Yf().decodeUtf8){this.decodeUtf8=t,this.varint64Lo=0,this.varint64Hi=0,this.varint64=Nf,this.uint32=Hf,this.buf=e,this.len=e.length,this.pos=0,this.view=new DataView(e.buffer,e.byteOffset,e.byteLength)}tag(){let e=this.pos,t=this.uint32(),n=this.pos-e;if(n>5||n==5&&this.buf[this.pos-1]>15)throw Error(`illegal tag: varint overflows uint32`);let r=t>>>3,i=t&7;if(r<=0||i>5)throw Error(`illegal tag: field no `+r+` wire type `+i);return[r,i]}skip(e,t,n=100){let r=this.pos;switch(e){case Zf.Varint:for(;this.buf[this.pos++]&128;);break;case Zf.Bit64:this.pos+=4;case Zf.Bit32:this.pos+=4;break;case Zf.LengthDelimited:let r=this.uint32();this.pos+=r;break;case Zf.StartGroup:if(n<=0)throw Error(`maximum recursion depth reached`);for(;;){let[e,r]=this.tag();if(r===Zf.EndGroup){if(t!==void 0&&e!==t)throw Error(`invalid end group tag`);break}this.skip(r,e,n-1)}break;default:throw Error(`cant skip wire type `+e)}return this.assertBounds(),this.buf.subarray(r,this.pos)}assertBounds(){if(this.pos>this.len)throw RangeError(`premature EOF`)}int32(){return this.uint32()|0}sint32(){let e=this.uint32();return e>>>1^-(e&1)}int64(){return this.varint64(),Uf.dec(this.varint64Lo,this.varint64Hi)}uint64(){return this.varint64(),Uf.uDec(this.varint64Lo,this.varint64Hi)}sint64(){this.varint64();let e=this.varint64Lo,t=this.varint64Hi,n=-(e&1);return e=(e>>>1|(t&1)<<31)^n,t=t>>>1^n,Uf.dec(e,t)}bool(){let e=this.buf[this.pos];return e<128?(this.pos++,e!==0):(this.varint64(),this.varint64Lo!==0||this.varint64Hi!==0)}fixed32(){return this.view.getUint32((this.pos+=4)-4,!0)}sfixed32(){return this.view.getInt32((this.pos+=4)-4,!0)}fixed64(){return Uf.uDec(this.sfixed32(),this.sfixed32())}sfixed64(){return Uf.dec(this.sfixed32(),this.sfixed32())}float(){return this.view.getFloat32((this.pos+=4)-4,!0)}double(){return this.view.getFloat64((this.pos+=8)-8,!0)}bytes(){let e=this.uint32(),t=this.pos;return this.pos+=e,this.assertBounds(),this.buf.subarray(t,t+e)}string(e){let t=this.bytes(),n=t.length;if(n<=np){let r=Array(n);for(let i=0;i127)return this.decodeUtf8(t,e);r[i]=n}return String.fromCharCode.apply(String,r)}return this.decodeUtf8(t,e)}};function ip(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid int32: `+typeof e);if(!Number.isInteger(e)||e>2147483647||e<-2147483648)throw Error(`invalid int32: `+e)}function ap(e){if(typeof e==`string`)e=Number(e);else if(typeof e!=`number`)throw Error(`invalid uint32: `+typeof e);if(!Number.isInteger(e)||e>4294967295||e<0)throw Error(`invalid uint32: `+e)}function op(e){if(typeof e==`string`){let t=e;if(e=Number(e),Number.isNaN(e)&&t!==`NaN`)throw Error(`invalid float32: `+t)}else if(typeof e!=`number`)throw Error(`invalid float32: `+typeof e);if(Number.isFinite(e)&&(e>34028234663852886e22||e<-34028234663852886e22))throw Error(`invalid float32: `+e)}var sp=function(e){return e[e.NULL_VALUE=0]=`NULL_VALUE`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function cp(){return{fields:{}}}var lp={encode(e,t=new U){return Object.entries(e.fields).forEach(([e,n])=>{n!==void 0&&dp.encode({key:e,value:n},t.uint32(10).fork()).join()}),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=cp();for(;n.pos>>3){case 1:{if(e!==10)break;let t=dp.decode(n,n.uint32());t.value!==void 0&&(i.fields[t.key]=t.value);continue}}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return lp.fromPartial(e??{})},fromPartial(e){let t=cp();return t.fields=Object.entries(e.fields??{}).reduce((e,[t,n])=>(n!==void 0&&(e[t]=n),e),{}),t},wrap(e){let t=cp();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function up(){return{key:``,value:void 0}}var dp={encode(e,t=new U){return e.key!==``&&t.uint32(10).string(e.key),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=up();for(;n.pos>>3){case 1:if(e!==10)break;i.key=n.string();continue;case 2:if(e!==18)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return dp.fromPartial(e??{})},fromPartial(e){let t=up();return t.key=e.key??``,t.value=e.value??void 0,t}};function fp(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var G={encode(e,t=new U){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&lp.encode(lp.wrap(e.structValue),t.uint32(42).fork()).join(),e.listValue!==void 0&&mp.encode(mp.wrap(e.listValue),t.uint32(50).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=fp();for(;n.pos>>3){case 1:if(e!==8)break;i.nullValue=n.int32();continue;case 2:if(e!==17)break;i.numberValue=n.double();continue;case 3:if(e!==26)break;i.stringValue=n.string();continue;case 4:if(e!==32)break;i.boolValue=n.bool();continue;case 5:if(e!==42)break;i.structValue=lp.unwrap(lp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.listValue=mp.unwrap(mp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return G.fromPartial(e??{})},fromPartial(e){let t=fp();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=fp();if(e===null)t.nullValue=sp.NULL_VALUE;else if(typeof e==`boolean`)t.boolValue=e;else if(typeof e==`number`)t.numberValue=e;else if(typeof e==`string`)t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e==`object`)t.structValue=e;else if(e!==void 0)throw new globalThis.Error(`Unsupported any value type: `+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function pp(){return{values:[]}}var mp={encode(e,t=new U){for(let n of e.values)G.encode(G.wrap(n),t.uint32(10).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=pp();for(;n.pos>>3){case 1:if(e!==10)break;i.values.push(G.unwrap(G.decode(n,n.uint32())));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return mp.fromPartial(e??{})},fromPartial(e){let t=pp();return t.values=e.values?.map(e=>e)||[],t},wrap(e){let t=pp();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty(`values`)&&globalThis.Array.isArray(e.values)?e.values:e}},hp=function(e){return e[e.ADD=0]=`ADD`,e[e.REMOVE=1]=`REMOVE`,e[e.REPLACE=2]=`REPLACE`,e[e.MOVE=3]=`MOVE`,e[e.COPY=4]=`COPY`,e[e.TEST=5]=`TEST`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function gp(){return{op:0,path:``,from:void 0,value:void 0}}var _p={encode(e,t=new U){return e.op!==0&&t.uint32(8).int32(e.op),e.path!==``&&t.uint32(18).string(e.path),e.from!==void 0&&t.uint32(26).string(e.from),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=gp();for(;n.pos>>3){case 1:if(e!==8)break;i.op=n.int32();continue;case 2:if(e!==18)break;i.path=n.string();continue;case 3:if(e!==26)break;i.from=n.string();continue;case 4:if(e!==34)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return _p.fromPartial(e??{})},fromPartial(e){let t=gp();return t.op=e.op??0,t.path=e.path??``,t.from=e.from??void 0,t.value=e.value??void 0,t}};function vp(){return{id:``,type:``,function:void 0,metadata:void 0}}var yp={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.type!==``&&t.uint32(18).string(e.type),e.function!==void 0&&xp.encode(e.function,t.uint32(26).fork()).join(),e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=vp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.type=n.string();continue;case 3:if(e!==26)break;i.function=xp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return yp.fromPartial(e??{})},fromPartial(e){let t=vp();return t.id=e.id??``,t.type=e.type??``,t.function=e.function!==void 0&&e.function!==null?xp.fromPartial(e.function):void 0,t.metadata=e.metadata??void 0,t}};function bp(){return{name:``,arguments:``}}var xp={encode(e,t=new U){return e.name!==``&&t.uint32(10).string(e.name),e.arguments!==``&&t.uint32(18).string(e.arguments),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=bp();for(;n.pos>>3){case 1:if(e!==10)break;i.name=n.string();continue;case 2:if(e!==18)break;i.arguments=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return xp.fromPartial(e??{})},fromPartial(e){let t=bp();return t.name=e.name??``,t.arguments=e.arguments??``,t}};function Sp(){return{value:``,mimeType:``}}var Cp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==``&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Sp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Cp.fromPartial(e??{})},fromPartial(e){let t=Sp();return t.value=e.value??``,t.mimeType=e.mimeType??``,t}};function wp(){return{value:``,mimeType:void 0}}var Tp={encode(e,t=new U){return e.value!==``&&t.uint32(10).string(e.value),e.mimeType!==void 0&&t.uint32(18).string(e.mimeType),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=wp();for(;n.pos>>3){case 1:if(e!==10)break;i.value=n.string();continue;case 2:if(e!==18)break;i.mimeType=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Tp.fromPartial(e??{})},fromPartial(e){let t=wp();return t.value=e.value??``,t.mimeType=e.mimeType??void 0,t}};function Ep(){return{data:void 0,url:void 0}}var Dp={encode(e,t=new U){return e.data!==void 0&&Cp.encode(e.data,t.uint32(10).fork()).join(),e.url!==void 0&&Tp.encode(e.url,t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ep();for(;n.pos>>3){case 1:if(e!==10)break;i.data=Cp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.url=Tp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Dp.fromPartial(e??{})},fromPartial(e){let t=Ep();return t.data=e.data!==void 0&&e.data!==null?Cp.fromPartial(e.data):void 0,t.url=e.url!==void 0&&e.url!==null?Tp.fromPartial(e.url):void 0,t}};function Op(){return{text:``}}var kp={encode(e,t=new U){return e.text!==``&&t.uint32(10).string(e.text),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Op();for(;n.pos>>3){case 1:if(e!==10)break;i.text=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return kp.fromPartial(e??{})},fromPartial(e){let t=Op();return t.text=e.text??``,t}};function Ap(){return{source:void 0,metadata:void 0}}var jp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ap();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return jp.fromPartial(e??{})},fromPartial(e){let t=Ap();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Mp(){return{source:void 0,metadata:void 0}}var Np={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Mp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Np.fromPartial(e??{})},fromPartial(e){let t=Mp();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Pp(){return{source:void 0,metadata:void 0}}var Fp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Pp();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Fp.fromPartial(e??{})},fromPartial(e){let t=Pp();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Ip(){return{source:void 0,metadata:void 0}}var Lp={encode(e,t=new U){return e.source!==void 0&&Dp.encode(e.source,t.uint32(10).fork()).join(),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(18).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Ip();for(;n.pos>>3){case 1:if(e!==10)break;i.source=Dp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Lp.fromPartial(e??{})},fromPartial(e){let t=Ip();return t.source=e.source!==void 0&&e.source!==null?Dp.fromPartial(e.source):void 0,t.metadata=e.metadata??void 0,t}};function Rp(){return{text:void 0,image:void 0,audio:void 0,video:void 0,document:void 0}}var zp={encode(e,t=new U){return e.text!==void 0&&kp.encode(e.text,t.uint32(10).fork()).join(),e.image!==void 0&&jp.encode(e.image,t.uint32(18).fork()).join(),e.audio!==void 0&&Np.encode(e.audio,t.uint32(26).fork()).join(),e.video!==void 0&&Fp.encode(e.video,t.uint32(34).fork()).join(),e.document!==void 0&&Lp.encode(e.document,t.uint32(42).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Rp();for(;n.pos>>3){case 1:if(e!==10)break;i.text=kp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.image=jp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.audio=Np.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.video=Fp.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.document=Lp.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return zp.fromPartial(e??{})},fromPartial(e){let t=Rp();return t.text=e.text!==void 0&&e.text!==null?kp.fromPartial(e.text):void 0,t.image=e.image!==void 0&&e.image!==null?jp.fromPartial(e.image):void 0,t.audio=e.audio!==void 0&&e.audio!==null?Np.fromPartial(e.audio):void 0,t.video=e.video!==void 0&&e.video!==null?Fp.fromPartial(e.video):void 0,t.document=e.document!==void 0&&e.document!==null?Lp.fromPartial(e.document):void 0,t}};function Bp(){return{id:``,role:``,content:void 0,name:void 0,toolCalls:[],toolCallId:void 0,error:void 0,contentParts:[],metadata:void 0,subagentRunId:void 0}}var Vp={encode(e,t=new U){e.id!==``&&t.uint32(10).string(e.id),e.role!==``&&t.uint32(18).string(e.role),e.content!==void 0&&t.uint32(26).string(e.content),e.name!==void 0&&t.uint32(34).string(e.name);for(let n of e.toolCalls)yp.encode(n,t.uint32(42).fork()).join();e.toolCallId!==void 0&&t.uint32(50).string(e.toolCallId),e.error!==void 0&&t.uint32(58).string(e.error);for(let n of e.contentParts)zp.encode(n,t.uint32(66).fork()).join();return e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(74).fork()).join(),e.subagentRunId!==void 0&&t.uint32(82).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Bp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.role=n.string();continue;case 3:if(e!==26)break;i.content=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.toolCalls.push(yp.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.toolCallId=n.string();continue;case 7:if(e!==58)break;i.error=n.string();continue;case 8:if(e!==66)break;i.contentParts.push(zp.decode(n,n.uint32()));continue;case 9:if(e!==74)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue;case 10:if(e!==82)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Vp.fromPartial(e??{})},fromPartial(e){let t=Bp();return t.id=e.id??``,t.role=e.role??``,t.content=e.content??void 0,t.name=e.name??void 0,t.toolCalls=e.toolCalls?.map(e=>yp.fromPartial(e))||[],t.toolCallId=e.toolCallId??void 0,t.error=e.error??void 0,t.contentParts=e.contentParts?.map(e=>zp.fromPartial(e))||[],t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Hp(){return{id:``,reason:``,message:void 0,toolCallId:void 0,responseSchema:void 0,expiresAt:void 0,metadata:void 0,subagentRunId:void 0}}var Up={encode(e,t=new U){return e.id!==``&&t.uint32(10).string(e.id),e.reason!==``&&t.uint32(18).string(e.reason),e.message!==void 0&&t.uint32(26).string(e.message),e.toolCallId!==void 0&&t.uint32(34).string(e.toolCallId),e.responseSchema!==void 0&&G.encode(G.wrap(e.responseSchema),t.uint32(42).fork()).join(),e.expiresAt!==void 0&&t.uint32(50).string(e.expiresAt),e.metadata!==void 0&&G.encode(G.wrap(e.metadata),t.uint32(58).fork()).join(),e.subagentRunId!==void 0&&t.uint32(66).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Hp();for(;n.pos>>3){case 1:if(e!==10)break;i.id=n.string();continue;case 2:if(e!==18)break;i.reason=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.toolCallId=n.string();continue;case 5:if(e!==42)break;i.responseSchema=G.unwrap(G.decode(n,n.uint32()));continue;case 6:if(e!==50)break;i.expiresAt=n.string();continue;case 7:if(e!==58)break;i.metadata=G.unwrap(G.decode(n,n.uint32()));continue;case 8:if(e!==66)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Up.fromPartial(e??{})},fromPartial(e){let t=Hp();return t.id=e.id??``,t.reason=e.reason??``,t.message=e.message??void 0,t.toolCallId=e.toolCallId??void 0,t.responseSchema=e.responseSchema??void 0,t.expiresAt=e.expiresAt??void 0,t.metadata=e.metadata??void 0,t.subagentRunId=e.subagentRunId??void 0,t}},Wp=function(e){return e[e.TEXT_MESSAGE_START=0]=`TEXT_MESSAGE_START`,e[e.TEXT_MESSAGE_CONTENT=1]=`TEXT_MESSAGE_CONTENT`,e[e.TEXT_MESSAGE_END=2]=`TEXT_MESSAGE_END`,e[e.TOOL_CALL_START=3]=`TOOL_CALL_START`,e[e.TOOL_CALL_ARGS=4]=`TOOL_CALL_ARGS`,e[e.TOOL_CALL_END=5]=`TOOL_CALL_END`,e[e.STATE_SNAPSHOT=6]=`STATE_SNAPSHOT`,e[e.STATE_DELTA=7]=`STATE_DELTA`,e[e.MESSAGES_SNAPSHOT=8]=`MESSAGES_SNAPSHOT`,e[e.RAW=9]=`RAW`,e[e.CUSTOM=10]=`CUSTOM`,e[e.RUN_STARTED=11]=`RUN_STARTED`,e[e.RUN_FINISHED=12]=`RUN_FINISHED`,e[e.RUN_ERROR=13]=`RUN_ERROR`,e[e.STEP_STARTED=14]=`STEP_STARTED`,e[e.STEP_FINISHED=15]=`STEP_FINISHED`,e[e.SUBAGENT_STARTED=16]=`SUBAGENT_STARTED`,e[e.SUBAGENT_FINISHED=17]=`SUBAGENT_FINISHED`,e[e.SUBAGENT_ERROR=18]=`SUBAGENT_ERROR`,e[e.UNRECOGNIZED=-1]=`UNRECOGNIZED`,e}({});function Gp(){return{type:0,timestamp:void 0,rawEvent:void 0,metadata:void 0}}var K={encode(e,t=new U){return e.type!==0&&t.uint32(8).int32(e.type),e.timestamp!==void 0&&t.uint32(16).int64(e.timestamp),e.rawEvent!==void 0&&G.encode(G.wrap(e.rawEvent),t.uint32(26).fork()).join(),e.metadata!==void 0&&lp.encode(lp.wrap(e.metadata),t.uint32(34).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Gp();for(;n.pos>>3){case 1:if(e!==8)break;i.type=n.int32();continue;case 2:if(e!==16)break;i.timestamp=Rm(n.int64());continue;case 3:if(e!==26)break;i.rawEvent=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.metadata=lp.unwrap(lp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return K.fromPartial(e??{})},fromPartial(e){let t=Gp();return t.type=e.type??0,t.timestamp=e.timestamp??void 0,t.rawEvent=e.rawEvent??void 0,t.metadata=e.metadata??void 0,t}};function Kp(){return{baseEvent:void 0,messageId:``,role:void 0,name:void 0,subagentRunId:void 0}}var qp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.name!==void 0&&t.uint32(34).string(e.name),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Kp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.name=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return qp.fromPartial(e??{})},fromPartial(e){let t=Kp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.role=e.role??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Jp(){return{baseEvent:void 0,messageId:``,delta:``,subagentRunId:void 0}}var Yp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Jp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Yp.fromPartial(e??{})},fromPartial(e){let t=Jp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Xp(){return{baseEvent:void 0,messageId:``,subagentRunId:void 0}}var Zp={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==``&&t.uint32(18).string(e.messageId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Xp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Zp.fromPartial(e??{})},fromPartial(e){let t=Xp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Qp(){return{baseEvent:void 0,toolCallId:``,toolCallName:``,parentMessageId:void 0,subagentRunId:void 0}}var $p={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.toolCallName!==``&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.subagentRunId!==void 0&&t.uint32(42).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Qp();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return $p.fromPartial(e??{})},fromPartial(e){let t=Qp();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.toolCallName=e.toolCallName??``,t.parentMessageId=e.parentMessageId??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function em(){return{baseEvent:void 0,toolCallId:``,delta:``,subagentRunId:void 0}}var tm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.delta!==``&&t.uint32(26).string(e.delta),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=em();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.delta=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return tm.fromPartial(e??{})},fromPartial(e){let t=em();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.delta=e.delta??``,t.subagentRunId=e.subagentRunId??void 0,t}};function nm(){return{baseEvent:void 0,toolCallId:``,subagentRunId:void 0}}var rm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==``&&t.uint32(18).string(e.toolCallId),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=nm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return rm.fromPartial(e??{})},fromPartial(e){let t=nm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??``,t.subagentRunId=e.subagentRunId??void 0,t}};function im(){return{baseEvent:void 0,snapshot:void 0,subagentRunId:void 0}}var am={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.snapshot!==void 0&&G.encode(G.wrap(e.snapshot),t.uint32(18).fork()).join(),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=im();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.snapshot=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return am.fromPartial(e??{})},fromPartial(e){let t=im();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.snapshot=e.snapshot??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function om(){return{baseEvent:void 0,delta:[],subagentRunId:void 0}}var sm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.delta)_p.encode(n,t.uint32(18).fork()).join();return e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=om();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.delta.push(_p.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return sm.fromPartial(e??{})},fromPartial(e){let t=om();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.delta=e.delta?.map(e=>_p.fromPartial(e))||[],t.subagentRunId=e.subagentRunId??void 0,t}};function cm(){return{baseEvent:void 0,messages:[]}}var lm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join();for(let n of e.messages)Vp.encode(n,t.uint32(18).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=cm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messages.push(Vp.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return lm.fromPartial(e??{})},fromPartial(e){let t=cm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messages=e.messages?.map(e=>Vp.fromPartial(e))||[],t}};function um(){return{baseEvent:void 0,event:void 0,source:void 0,subagentRunId:void 0}}var dm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.event!==void 0&&G.encode(G.wrap(e.event),t.uint32(18).fork()).join(),e.source!==void 0&&t.uint32(26).string(e.source),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=um();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.event=G.unwrap(G.decode(n,n.uint32()));continue;case 3:if(e!==26)break;i.source=n.string();continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return dm.fromPartial(e??{})},fromPartial(e){let t=um();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.event=e.event??void 0,t.source=e.source??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function fm(){return{baseEvent:void 0,name:``,value:void 0,subagentRunId:void 0}}var pm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.name!==``&&t.uint32(18).string(e.name),e.value!==void 0&&G.encode(G.wrap(e.value),t.uint32(26).fork()).join(),e.subagentRunId!==void 0&&t.uint32(34).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=fm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.name=n.string();continue;case 3:if(e!==26)break;i.value=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return pm.fromPartial(e??{})},fromPartial(e){let t=fm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.name=e.name??``,t.value=e.value??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function mm(){return{baseEvent:void 0,threadId:``,runId:``}}var hm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=mm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return hm.fromPartial(e??{})},fromPartial(e){let t=mm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t}};function gm(){return{provider:void 0,model:void 0,inputTokens:void 0,outputTokens:void 0,totalTokens:void 0,reasoningTokens:void 0,cachedInputTokens:void 0}}var _m={encode(e,t=new U){return e.provider!==void 0&&t.uint32(10).string(e.provider),e.model!==void 0&&t.uint32(18).string(e.model),e.inputTokens!==void 0&&t.uint32(24).int64(e.inputTokens),e.outputTokens!==void 0&&t.uint32(32).int64(e.outputTokens),e.totalTokens!==void 0&&t.uint32(40).int64(e.totalTokens),e.reasoningTokens!==void 0&&t.uint32(48).int64(e.reasoningTokens),e.cachedInputTokens!==void 0&&t.uint32(56).int64(e.cachedInputTokens),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=gm();for(;n.pos>>3){case 1:if(e!==10)break;i.provider=n.string();continue;case 2:if(e!==18)break;i.model=n.string();continue;case 3:if(e!==24)break;i.inputTokens=Rm(n.int64());continue;case 4:if(e!==32)break;i.outputTokens=Rm(n.int64());continue;case 5:if(e!==40)break;i.totalTokens=Rm(n.int64());continue;case 6:if(e!==48)break;i.reasoningTokens=Rm(n.int64());continue;case 7:if(e!==56)break;i.cachedInputTokens=Rm(n.int64());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return _m.fromPartial(e??{})},fromPartial(e){let t=gm();return t.provider=e.provider??void 0,t.model=e.model??void 0,t.inputTokens=e.inputTokens??void 0,t.outputTokens=e.outputTokens??void 0,t.totalTokens=e.totalTokens??void 0,t.reasoningTokens=e.reasoningTokens??void 0,t.cachedInputTokens=e.cachedInputTokens??void 0,t}};function vm(){return{baseEvent:void 0,threadId:``,runId:``,result:void 0,outcome:``,interrupts:[],usage:[]}}var ym={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.threadId!==``&&t.uint32(18).string(e.threadId),e.runId!==``&&t.uint32(26).string(e.runId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(34).fork()).join(),e.outcome!==``&&t.uint32(42).string(e.outcome);for(let n of e.interrupts)Up.encode(n,t.uint32(50).fork()).join();for(let n of e.usage)_m.encode(n,t.uint32(58).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=vm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.threadId=n.string();continue;case 3:if(e!==26)break;i.runId=n.string();continue;case 4:if(e!==34)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 5:if(e!==42)break;i.outcome=n.string();continue;case 6:if(e!==50)break;i.interrupts.push(Up.decode(n,n.uint32()));continue;case 7:if(e!==58)break;i.usage.push(_m.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return ym.fromPartial(e??{})},fromPartial(e){let t=vm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.threadId=e.threadId??``,t.runId=e.runId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interrupts=e.interrupts?.map(e=>Up.fromPartial(e))||[],t.usage=e.usage?.map(e=>_m.fromPartial(e))||[],t}};function bm(){return{baseEvent:void 0,code:void 0,message:``,usage:[]}}var xm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.code!==void 0&&t.uint32(18).string(e.code),e.message!==``&&t.uint32(26).string(e.message);for(let n of e.usage)_m.encode(n,t.uint32(34).fork()).join();return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=bm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.code=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.usage.push(_m.decode(n,n.uint32()));continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return xm.fromPartial(e??{})},fromPartial(e){let t=bm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.code=e.code??void 0,t.message=e.message??``,t.usage=e.usage?.map(e=>_m.fromPartial(e))||[],t}};function Sm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Cm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Sm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Cm.fromPartial(e??{})},fromPartial(e){let t=Sm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function wm(){return{baseEvent:void 0,stepName:``,subagentRunId:void 0}}var Tm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.stepName!==``&&t.uint32(18).string(e.stepName),e.subagentRunId!==void 0&&t.uint32(26).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=wm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.stepName=n.string();continue;case 3:if(e!==26)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Tm.fromPartial(e??{})},fromPartial(e){let t=wm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.stepName=e.stepName??``,t.subagentRunId=e.subagentRunId??void 0,t}};function Em(){return{baseEvent:void 0,messageId:void 0,role:void 0,delta:void 0,name:void 0,subagentRunId:void 0}}var Dm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.messageId!==void 0&&t.uint32(18).string(e.messageId),e.role!==void 0&&t.uint32(26).string(e.role),e.delta!==void 0&&t.uint32(34).string(e.delta),e.name!==void 0&&t.uint32(42).string(e.name),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Em();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.messageId=n.string();continue;case 3:if(e!==26)break;i.role=n.string();continue;case 4:if(e!==34)break;i.delta=n.string();continue;case 5:if(e!==42)break;i.name=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Dm.fromPartial(e??{})},fromPartial(e){let t=Em();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.messageId=e.messageId??void 0,t.role=e.role??void 0,t.delta=e.delta??void 0,t.name=e.name??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Om(){return{baseEvent:void 0,toolCallId:void 0,toolCallName:void 0,parentMessageId:void 0,delta:void 0,subagentRunId:void 0}}var km={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.toolCallId!==void 0&&t.uint32(18).string(e.toolCallId),e.toolCallName!==void 0&&t.uint32(26).string(e.toolCallName),e.parentMessageId!==void 0&&t.uint32(34).string(e.parentMessageId),e.delta!==void 0&&t.uint32(42).string(e.delta),e.subagentRunId!==void 0&&t.uint32(50).string(e.subagentRunId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Om();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.toolCallId=n.string();continue;case 3:if(e!==26)break;i.toolCallName=n.string();continue;case 4:if(e!==34)break;i.parentMessageId=n.string();continue;case 5:if(e!==42)break;i.delta=n.string();continue;case 6:if(e!==50)break;i.subagentRunId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return km.fromPartial(e??{})},fromPartial(e){let t=Om();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.toolCallId=e.toolCallId??void 0,t.toolCallName=e.toolCallName??void 0,t.parentMessageId=e.parentMessageId??void 0,t.delta=e.delta??void 0,t.subagentRunId=e.subagentRunId??void 0,t}};function Am(){return{baseEvent:void 0,subagentRunId:``,name:``,description:void 0,parentSubagentRunId:void 0,parentToolCallId:void 0,parentMessageId:void 0}}var jm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.name!==``&&t.uint32(26).string(e.name),e.description!==void 0&&t.uint32(34).string(e.description),e.parentSubagentRunId!==void 0&&t.uint32(42).string(e.parentSubagentRunId),e.parentToolCallId!==void 0&&t.uint32(50).string(e.parentToolCallId),e.parentMessageId!==void 0&&t.uint32(58).string(e.parentMessageId),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Am();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.name=n.string();continue;case 4:if(e!==34)break;i.description=n.string();continue;case 5:if(e!==42)break;i.parentSubagentRunId=n.string();continue;case 6:if(e!==50)break;i.parentToolCallId=n.string();continue;case 7:if(e!==58)break;i.parentMessageId=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return jm.fromPartial(e??{})},fromPartial(e){let t=Am();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.name=e.name??``,t.description=e.description??void 0,t.parentSubagentRunId=e.parentSubagentRunId??void 0,t.parentToolCallId=e.parentToolCallId??void 0,t.parentMessageId=e.parentMessageId??void 0,t}};function Mm(){return{baseEvent:void 0,subagentRunId:``,result:void 0,outcome:``,interruptIds:[]}}var Nm={encode(e,t=new U){e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.result!==void 0&&G.encode(G.wrap(e.result),t.uint32(26).fork()).join(),e.outcome!==``&&t.uint32(34).string(e.outcome);for(let n of e.interruptIds)t.uint32(42).string(n);return t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Mm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.result=G.unwrap(G.decode(n,n.uint32()));continue;case 4:if(e!==34)break;i.outcome=n.string();continue;case 5:if(e!==42)break;i.interruptIds.push(n.string());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Nm.fromPartial(e??{})},fromPartial(e){let t=Mm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.result=e.result??void 0,t.outcome=e.outcome??``,t.interruptIds=e.interruptIds?.map(e=>e)||[],t}};function Pm(){return{baseEvent:void 0,subagentRunId:``,message:``,code:void 0}}var Fm={encode(e,t=new U){return e.baseEvent!==void 0&&K.encode(e.baseEvent,t.uint32(10).fork()).join(),e.subagentRunId!==``&&t.uint32(18).string(e.subagentRunId),e.message!==``&&t.uint32(26).string(e.message),e.code!==void 0&&t.uint32(34).string(e.code),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Pm();for(;n.pos>>3){case 1:if(e!==10)break;i.baseEvent=K.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.subagentRunId=n.string();continue;case 3:if(e!==26)break;i.message=n.string();continue;case 4:if(e!==34)break;i.code=n.string();continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Fm.fromPartial(e??{})},fromPartial(e){let t=Pm();return t.baseEvent=e.baseEvent!==void 0&&e.baseEvent!==null?K.fromPartial(e.baseEvent):void 0,t.subagentRunId=e.subagentRunId??``,t.message=e.message??``,t.code=e.code??void 0,t}};function Im(){return{textMessageStart:void 0,textMessageContent:void 0,textMessageEnd:void 0,toolCallStart:void 0,toolCallArgs:void 0,toolCallEnd:void 0,stateSnapshot:void 0,stateDelta:void 0,messagesSnapshot:void 0,raw:void 0,custom:void 0,runStarted:void 0,runFinished:void 0,runError:void 0,stepStarted:void 0,stepFinished:void 0,textMessageChunk:void 0,toolCallChunk:void 0,subagentStarted:void 0,subagentFinished:void 0,subagentError:void 0}}var Lm={encode(e,t=new U){return e.textMessageStart!==void 0&&qp.encode(e.textMessageStart,t.uint32(10).fork()).join(),e.textMessageContent!==void 0&&Yp.encode(e.textMessageContent,t.uint32(18).fork()).join(),e.textMessageEnd!==void 0&&Zp.encode(e.textMessageEnd,t.uint32(26).fork()).join(),e.toolCallStart!==void 0&&$p.encode(e.toolCallStart,t.uint32(34).fork()).join(),e.toolCallArgs!==void 0&&tm.encode(e.toolCallArgs,t.uint32(42).fork()).join(),e.toolCallEnd!==void 0&&rm.encode(e.toolCallEnd,t.uint32(50).fork()).join(),e.stateSnapshot!==void 0&&am.encode(e.stateSnapshot,t.uint32(58).fork()).join(),e.stateDelta!==void 0&&sm.encode(e.stateDelta,t.uint32(66).fork()).join(),e.messagesSnapshot!==void 0&&lm.encode(e.messagesSnapshot,t.uint32(74).fork()).join(),e.raw!==void 0&&dm.encode(e.raw,t.uint32(82).fork()).join(),e.custom!==void 0&&pm.encode(e.custom,t.uint32(90).fork()).join(),e.runStarted!==void 0&&hm.encode(e.runStarted,t.uint32(98).fork()).join(),e.runFinished!==void 0&&ym.encode(e.runFinished,t.uint32(106).fork()).join(),e.runError!==void 0&&xm.encode(e.runError,t.uint32(114).fork()).join(),e.stepStarted!==void 0&&Cm.encode(e.stepStarted,t.uint32(122).fork()).join(),e.stepFinished!==void 0&&Tm.encode(e.stepFinished,t.uint32(130).fork()).join(),e.textMessageChunk!==void 0&&Dm.encode(e.textMessageChunk,t.uint32(138).fork()).join(),e.toolCallChunk!==void 0&&km.encode(e.toolCallChunk,t.uint32(146).fork()).join(),e.subagentStarted!==void 0&&jm.encode(e.subagentStarted,t.uint32(154).fork()).join(),e.subagentFinished!==void 0&&Nm.encode(e.subagentFinished,t.uint32(162).fork()).join(),e.subagentError!==void 0&&Fm.encode(e.subagentError,t.uint32(170).fork()).join(),t},decode(e,t){let n=e instanceof W?e:new W(e),r=t===void 0?n.len:n.pos+t,i=Im();for(;n.pos>>3){case 1:if(e!==10)break;i.textMessageStart=qp.decode(n,n.uint32());continue;case 2:if(e!==18)break;i.textMessageContent=Yp.decode(n,n.uint32());continue;case 3:if(e!==26)break;i.textMessageEnd=Zp.decode(n,n.uint32());continue;case 4:if(e!==34)break;i.toolCallStart=$p.decode(n,n.uint32());continue;case 5:if(e!==42)break;i.toolCallArgs=tm.decode(n,n.uint32());continue;case 6:if(e!==50)break;i.toolCallEnd=rm.decode(n,n.uint32());continue;case 7:if(e!==58)break;i.stateSnapshot=am.decode(n,n.uint32());continue;case 8:if(e!==66)break;i.stateDelta=sm.decode(n,n.uint32());continue;case 9:if(e!==74)break;i.messagesSnapshot=lm.decode(n,n.uint32());continue;case 10:if(e!==82)break;i.raw=dm.decode(n,n.uint32());continue;case 11:if(e!==90)break;i.custom=pm.decode(n,n.uint32());continue;case 12:if(e!==98)break;i.runStarted=hm.decode(n,n.uint32());continue;case 13:if(e!==106)break;i.runFinished=ym.decode(n,n.uint32());continue;case 14:if(e!==114)break;i.runError=xm.decode(n,n.uint32());continue;case 15:if(e!==122)break;i.stepStarted=Cm.decode(n,n.uint32());continue;case 16:if(e!==130)break;i.stepFinished=Tm.decode(n,n.uint32());continue;case 17:if(e!==138)break;i.textMessageChunk=Dm.decode(n,n.uint32());continue;case 18:if(e!==146)break;i.toolCallChunk=km.decode(n,n.uint32());continue;case 19:if(e!==154)break;i.subagentStarted=jm.decode(n,n.uint32());continue;case 20:if(e!==162)break;i.subagentFinished=Nm.decode(n,n.uint32());continue;case 21:if(e!==170)break;i.subagentError=Fm.decode(n,n.uint32());continue}if((e&7)==4||e===0)break;n.skip(e&7)}return i},create(e){return Lm.fromPartial(e??{})},fromPartial(e){let t=Im();return t.textMessageStart=e.textMessageStart!==void 0&&e.textMessageStart!==null?qp.fromPartial(e.textMessageStart):void 0,t.textMessageContent=e.textMessageContent!==void 0&&e.textMessageContent!==null?Yp.fromPartial(e.textMessageContent):void 0,t.textMessageEnd=e.textMessageEnd!==void 0&&e.textMessageEnd!==null?Zp.fromPartial(e.textMessageEnd):void 0,t.toolCallStart=e.toolCallStart!==void 0&&e.toolCallStart!==null?$p.fromPartial(e.toolCallStart):void 0,t.toolCallArgs=e.toolCallArgs!==void 0&&e.toolCallArgs!==null?tm.fromPartial(e.toolCallArgs):void 0,t.toolCallEnd=e.toolCallEnd!==void 0&&e.toolCallEnd!==null?rm.fromPartial(e.toolCallEnd):void 0,t.stateSnapshot=e.stateSnapshot!==void 0&&e.stateSnapshot!==null?am.fromPartial(e.stateSnapshot):void 0,t.stateDelta=e.stateDelta!==void 0&&e.stateDelta!==null?sm.fromPartial(e.stateDelta):void 0,t.messagesSnapshot=e.messagesSnapshot!==void 0&&e.messagesSnapshot!==null?lm.fromPartial(e.messagesSnapshot):void 0,t.raw=e.raw!==void 0&&e.raw!==null?dm.fromPartial(e.raw):void 0,t.custom=e.custom!==void 0&&e.custom!==null?pm.fromPartial(e.custom):void 0,t.runStarted=e.runStarted!==void 0&&e.runStarted!==null?hm.fromPartial(e.runStarted):void 0,t.runFinished=e.runFinished!==void 0&&e.runFinished!==null?ym.fromPartial(e.runFinished):void 0,t.runError=e.runError!==void 0&&e.runError!==null?xm.fromPartial(e.runError):void 0,t.stepStarted=e.stepStarted!==void 0&&e.stepStarted!==null?Cm.fromPartial(e.stepStarted):void 0,t.stepFinished=e.stepFinished!==void 0&&e.stepFinished!==null?Tm.fromPartial(e.stepFinished):void 0,t.textMessageChunk=e.textMessageChunk!==void 0&&e.textMessageChunk!==null?Dm.fromPartial(e.textMessageChunk):void 0,t.toolCallChunk=e.toolCallChunk!==void 0&&e.toolCallChunk!==null?km.fromPartial(e.toolCallChunk):void 0,t.subagentStarted=e.subagentStarted!==void 0&&e.subagentStarted!==null?jm.fromPartial(e.subagentStarted):void 0,t.subagentFinished=e.subagentFinished!==void 0&&e.subagentFinished!==null?Nm.fromPartial(e.subagentFinished):void 0,t.subagentError=e.subagentError!==void 0&&e.subagentError!==null?Fm.fromPartial(e.subagentError):void 0,t}};function Rm(e){let t=globalThis.Number(e.toString());if(t>globalThis.Number.MAX_SAFE_INTEGER)throw new globalThis.Error(`Value is larger than Number.MAX_SAFE_INTEGER`);if(te&&typeof e==`object`?e:void 0,Bm=e=>{let t=zm(e);if(t){if(t.data){let e=t.data;return{type:`data`,value:e.value,mimeType:e.mimeType}}if(t.url){let e=t.url;return{type:`url`,value:e.value,mimeType:e.mimeType}}}},Vm=e=>{let t=zm(e);if(t){if(t.text)return{type:`text`,text:t.text.text};if(t.image){let e=t.image;return{type:`image`,source:Bm(e.source),metadata:e.metadata}}if(t.audio){let e=t.audio;return{type:`audio`,source:Bm(e.source),metadata:e.metadata}}if(t.video){let e=t.video;return{type:`video`,source:Bm(e.source),metadata:e.metadata}}if(t.document){let e=t.document;return{type:`document`,source:Bm(e.source),metadata:e.metadata}}}};function Hm(e){let t=Lm.decode(e),n=Object.values(t).find(e=>e!==void 0);if(!n)throw Error(`Invalid event`);if(n.type=Wp[n.baseEvent.type],n.timestamp=n.baseEvent.timestamp,n.rawEvent=n.baseEvent.rawEvent,n.baseEvent.metadata!==void 0&&(n.metadata=n.baseEvent.metadata),delete n.baseEvent,n.type===B.MESSAGES_SNAPSHOT)for(let e of n.messages){let t=e;if(t.role===`user`&&Array.isArray(t.contentParts)){let e=t.contentParts.map(e=>Vm(e)).filter(e=>e!==void 0);e.length>0&&(t.content=e)}Array.isArray(t.contentParts)&&t.contentParts.length===0&&(t.contentParts=void 0),t.toolCalls?.length===0&&(t.toolCalls=void 0)}if(n.type===B.RUN_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interrupts)?e.interrupts:[];delete e.interrupts,t===`interrupt`?e.outcome={type:`interrupt`,interrupts:r}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if(n.type===B.SUBAGENT_FINISHED){let e=n,t=typeof e.outcome==`string`&&e.outcome!==``?e.outcome:void 0,r=Array.isArray(e.interruptIds)?e.interruptIds:[];delete e.interruptIds,t===`suspended`?e.outcome={type:`suspended`,...r.length>0&&{interruptIds:r}}:t===`success`?e.outcome={type:`success`}:delete e.outcome}if((n.type===B.RUN_FINISHED||n.type===B.RUN_ERROR)&&Array.isArray(n.usage)&&n.usage.length===0&&delete n.usage,n.type===B.STATE_DELTA)for(let e of n.delta)e.op=hp[e.op].toLowerCase(),Object.keys(e).forEach(t=>{e[t]===void 0&&delete e[t]});return Object.keys(n).forEach(e=>{n[e]===void 0&&delete n[e]}),Zl.parse(n)}var Um;(function(e){e.assertEqual=e=>{};function t(e){}e.assertIs=t;function n(e){throw Error()}e.assertNever=n,e.arrayToEnum=e=>{let t={};for(let n of e)t[n]=n;return t},e.getValidEnumValues=t=>{let n=e.objectKeys(t).filter(e=>typeof t[t[e]]!=`number`),r={};for(let e of n)r[e]=t[e];return e.objectValues(r)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys=typeof Object.keys==`function`?e=>Object.keys(e):e=>{let t=[];for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.push(n);return t},e.find=(e,t)=>{for(let n of e)if(t(n))return n},e.isInteger=typeof Number.isInteger==`function`?e=>Number.isInteger(e):e=>typeof e==`number`&&Number.isFinite(e)&&Math.floor(e)===e;function r(e,t=` | `){return e.map(e=>typeof e==`string`?`'${e}'`:e).join(t)}e.joinValues=r,e.jsonStringifyReplacer=(e,t)=>typeof t==`bigint`?t.toString():t})(Um||={});var Wm;(function(e){e.mergeShapes=(e,t)=>({...e,...t})})(Wm||={});var q=Um.arrayToEnum([`string`,`nan`,`number`,`integer`,`float`,`boolean`,`date`,`bigint`,`symbol`,`function`,`undefined`,`null`,`array`,`object`,`unknown`,`promise`,`void`,`never`,`map`,`set`]),Gm=e=>{switch(typeof e){case`undefined`:return q.undefined;case`string`:return q.string;case`number`:return Number.isNaN(e)?q.nan:q.number;case`boolean`:return q.boolean;case`function`:return q.function;case`bigint`:return q.bigint;case`symbol`:return q.symbol;case`object`:return Array.isArray(e)?q.array:e===null?q.null:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?q.promise:typeof Map<`u`&&e instanceof Map?q.map:typeof Set<`u`&&e instanceof Set?q.set:typeof Date<`u`&&e instanceof Date?q.date:q.object;default:return q.unknown}},J=Um.arrayToEnum([`invalid_type`,`invalid_literal`,`custom`,`invalid_union`,`invalid_union_discriminator`,`invalid_enum_value`,`unrecognized_keys`,`invalid_arguments`,`invalid_return_type`,`invalid_date`,`invalid_string`,`too_small`,`too_big`,`invalid_intersection_types`,`not_multiple_of`,`not_finite`]),Km=class e extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};let t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name=`ZodError`,this.issues=e}format(e){let t=e||function(e){return e.message},n={_errors:[]},r=e=>{for(let i of e.issues)if(i.code===`invalid_union`)i.unionErrors.map(r);else if(i.code===`invalid_return_type`)r(i.returnTypeError);else if(i.code===`invalid_arguments`)r(i.argumentsError);else if(i.path.length===0)n._errors.push(t(i));else{let e=n,r=0;for(;re.message){let t={},n=[];for(let r of this.issues)if(r.path.length>0){let n=r.path[0];t[n]=t[n]||[],t[n].push(e(r))}else n.push(e(r));return{formErrors:n,fieldErrors:t}}get formErrors(){return this.flatten()}};Km.create=e=>new Km(e);var qm=(e,t)=>{let n;switch(e.code){case J.invalid_type:n=e.received===q.undefined?`Required`:`Expected ${e.expected}, received ${e.received}`;break;case J.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(e.expected,Um.jsonStringifyReplacer)}`;break;case J.unrecognized_keys:n=`Unrecognized key(s) in object: ${Um.joinValues(e.keys,`, `)}`;break;case J.invalid_union:n=`Invalid input`;break;case J.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${Um.joinValues(e.options)}`;break;case J.invalid_enum_value:n=`Invalid enum value. Expected ${Um.joinValues(e.options)}, received '${e.received}'`;break;case J.invalid_arguments:n=`Invalid function arguments`;break;case J.invalid_return_type:n=`Invalid function return type`;break;case J.invalid_date:n=`Invalid date`;break;case J.invalid_string:typeof e.validation==`object`?`includes`in e.validation?(n=`Invalid input: must include "${e.validation.includes}"`,typeof e.validation.position==`number`&&(n=`${n} at one or more positions greater than or equal to ${e.validation.position}`)):`startsWith`in e.validation?n=`Invalid input: must start with "${e.validation.startsWith}"`:`endsWith`in e.validation?n=`Invalid input: must end with "${e.validation.endsWith}"`:Um.assertNever(e.validation):n=e.validation===`regex`?`Invalid`:`Invalid ${e.validation}`;break;case J.too_small:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at least`:`more than`} ${e.minimum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at least`:`over`} ${e.minimum} character(s)`:e.type===`number`||e.type===`bigint`?`Number must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${e.minimum}`:e.type===`date`?`Date must be ${e.exact?`exactly equal to `:e.inclusive?`greater than or equal to `:`greater than `}${new Date(Number(e.minimum))}`:`Invalid input`;break;case J.too_big:n=e.type===`array`?`Array must contain ${e.exact?`exactly`:e.inclusive?`at most`:`less than`} ${e.maximum} element(s)`:e.type===`string`?`String must contain ${e.exact?`exactly`:e.inclusive?`at most`:`under`} ${e.maximum} character(s)`:e.type===`number`?`Number must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`bigint`?`BigInt must be ${e.exact?`exactly`:e.inclusive?`less than or equal to`:`less than`} ${e.maximum}`:e.type===`date`?`Date must be ${e.exact?`exactly`:e.inclusive?`smaller than or equal to`:`smaller than`} ${new Date(Number(e.maximum))}`:`Invalid input`;break;case J.custom:n=`Invalid input`;break;case J.invalid_intersection_types:n=`Intersection results could not be merged`;break;case J.not_multiple_of:n=`Number must be a multiple of ${e.multipleOf}`;break;case J.not_finite:n=`Number must be finite`;break;default:n=t.defaultError,Um.assertNever(e)}return{message:n}},Jm=qm;function Ym(){return Jm}var Xm=e=>{let{data:t,path:n,errorMaps:r,issueData:i}=e,a=[...n,...i.path||[]],o={...i,path:a};if(i.message!==void 0)return{...i,path:a,message:i.message};let s=``,c=r.filter(e=>!!e).slice().reverse();for(let e of c)s=e(o,{data:t,defaultError:s}).message;return{...i,path:a,message:s}};function Y(e,t){let n=Ym(),r=Xm({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,n,n===qm?void 0:qm].filter(e=>!!e)});e.common.issues.push(r)}var Zm=class e{constructor(){this.value=`valid`}dirty(){this.value===`valid`&&(this.value=`dirty`)}abort(){this.value!==`aborted`&&(this.value=`aborted`)}static mergeArray(e,t){let n=[];for(let r of t){if(r.status===`aborted`)return X;r.status===`dirty`&&e.dirty(),n.push(r.value)}return{status:e.value,value:n}}static async mergeObjectAsync(t,n){let r=[];for(let e of n){let t=await e.key,n=await e.value;r.push({key:t,value:n})}return e.mergeObjectSync(t,r)}static mergeObjectSync(e,t){let n={};for(let r of t){let{key:t,value:i}=r;if(t.status===`aborted`||i.status===`aborted`)return X;t.status===`dirty`&&e.dirty(),i.status===`dirty`&&e.dirty(),t.value!==`__proto__`&&(i.value!==void 0||r.alwaysSet)&&(n[t.value]=i.value)}return{status:e.value,value:n}}},X=Object.freeze({status:`aborted`}),Qm=e=>({status:`dirty`,value:e}),$m=e=>({status:`valid`,value:e}),eh=e=>e.status===`aborted`,th=e=>e.status===`dirty`,nh=e=>e.status===`valid`,rh=e=>typeof Promise<`u`&&e instanceof Promise,Z;(function(e){e.errToObj=e=>typeof e==`string`?{message:e}:e||{},e.toString=e=>typeof e==`string`?e:e?.message})(Z||={});var ih=class{constructor(e,t,n,r){this._cachedPath=[],this.parent=e,this.data=t,this._path=n,this._key=r}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},ah=(e,t)=>{if(nh(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw Error(`Validation failed but no issues detected.`);return{success:!1,get error(){if(this._error)return this._error;let t=new Km(e.common.issues);return this._error=t,this._error}}};function Q(e){if(!e)return{};let{errorMap:t,invalid_type_error:n,required_error:r,description:i}=e;if(t&&(n||r))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return t?{errorMap:t,description:i}:{errorMap:(t,i)=>{let{message:a}=e;return t.code===`invalid_enum_value`?{message:a??i.defaultError}:i.data===void 0?{message:a??r??i.defaultError}:t.code===`invalid_type`?{message:a??n??i.defaultError}:{message:i.defaultError}},description:i}}var oh=class{get description(){return this._def.description}_getType(e){return Gm(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Gm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new Zm,ctx:{common:e.parent.common,data:e.data,parsedType:Gm(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let t=this._parse(e);if(rh(t))throw Error(`Synchronous parse encountered promise.`);return t}_parseAsync(e){let t=this._parse(e);return Promise.resolve(t)}parse(e,t){let n=this.safeParse(e,t);if(n.success)return n.data;throw n.error}safeParse(e,t){let n={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)};return ah(n,this._parseSync({data:e,path:n.path,parent:n}))}"~validate"(e){let t={common:{issues:[],async:!!this[`~standard`].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)};if(!this[`~standard`].async)try{let n=this._parseSync({data:e,path:[],parent:t});return nh(n)?{value:n.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes(`encountered`)&&(this[`~standard`].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>nh(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){let n=await this.safeParseAsync(e,t);if(n.success)return n.data;throw n.error}async safeParseAsync(e,t){let n={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Gm(e)},r=this._parse({data:e,path:n.path,parent:n});return ah(n,await(rh(r)?r:Promise.resolve(r)))}refine(e,t){let n=e=>typeof t==`string`||t===void 0?{message:t}:typeof t==`function`?t(e):t;return this._refinement((t,r)=>{let i=e(t),a=()=>r.addIssue({code:J.custom,...n(t)});return typeof Promise<`u`&&i instanceof Promise?i.then(e=>e?!0:(a(),!1)):i?!0:(a(),!1)})}refinement(e,t){return this._refinement((n,r)=>e(n)?!0:(r.addIssue(typeof t==`function`?t(n,r):t),!1))}_refinement(e){return new lg({schema:this,typeName:$.ZodEffects,effect:{type:`refinement`,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[`~standard`]={version:1,vendor:`zod`,validate:e=>this[`~validate`](e)}}optional(){return ug.create(this,this._def)}nullable(){return dg.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return Wh.create(this)}promise(){return cg.create(this,this._def)}or(e){return qh.create([this,e],this._def)}and(e){return Zh.create(this,e,this._def)}transform(e){return new lg({...Q(this._def),schema:this,typeName:$.ZodEffects,effect:{type:`transform`,transform:e}})}default(e){let t=typeof e==`function`?e:()=>e;return new fg({...Q(this._def),innerType:this,defaultValue:t,typeName:$.ZodDefault})}brand(){return new hg({typeName:$.ZodBranded,type:this,...Q(this._def)})}catch(e){let t=typeof e==`function`?e:()=>e;return new pg({...Q(this._def),innerType:this,catchValue:t,typeName:$.ZodCatch})}describe(e){let t=this.constructor;return new t({...this._def,description:e})}pipe(e){return gg.create(this,e)}readonly(){return _g.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},sh=/^c[^\s-]{8,}$/i,ch=/^[0-9a-z]+$/,lh=/^[0-9A-HJKMNP-TV-Z]{26}$/i,uh=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,dh=/^[a-z0-9_-]{21}$/i,fh=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,ph=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,mh=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,hh=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`,gh,_h=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,vh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,yh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,bh=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,xh=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Sh=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ch=`((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))`,wh=RegExp(`^${Ch}$`);function Th(e){let t=`[0-5]\\d`;e.precision?t=`${t}\\.\\d{${e.precision}}`:e.precision??(t=`${t}(\\.\\d+)?`);let n=e.precision?`+`:`?`;return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${n}`}function Eh(e){return RegExp(`^${Th(e)}$`)}function Dh(e){let t=`${Ch}T${Th(e)}`,n=[];return n.push(e.local?`Z?`:`Z`),e.offset&&n.push(`([+-]\\d{2}:?\\d{2})`),t=`${t}(${n.join(`|`)})`,RegExp(`^${t}$`)}function Oh(e,t){return!((t!==`v4`&&t||!_h.test(e))&&(t!==`v6`&&t||!yh.test(e)))}function kh(e,t){if(!fh.test(e))return!1;try{let[n]=e.split(`.`);if(!n)return!1;let r=n.replace(/-/g,`+`).replace(/_/g,`/`).padEnd(n.length+(4-n.length%4)%4,`=`),i=JSON.parse(atob(r));return!(typeof i!=`object`||!i||`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&i.alg!==t)}catch{return!1}}function Ah(e,t){return!((t!==`v4`&&t||!vh.test(e))&&(t!==`v6`&&t||!bh.test(e)))}var jh=class e extends oh{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==q.string){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.string,received:t.parsedType}),X}let t=new Zm,n;for(let r of this._def.checks)if(r.kind===`min`)e.data.lengthr.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,maximum:r.value,type:`string`,inclusive:!0,exact:!1,message:r.message}),t.dirty());else if(r.kind===`length`){let i=e.data.length>r.value,a=e.data.lengthe.test(t),{validation:t,code:J.invalid_string,...Z.errToObj(n)})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}email(e){return this._addCheck({kind:`email`,...Z.errToObj(e)})}url(e){return this._addCheck({kind:`url`,...Z.errToObj(e)})}emoji(e){return this._addCheck({kind:`emoji`,...Z.errToObj(e)})}uuid(e){return this._addCheck({kind:`uuid`,...Z.errToObj(e)})}nanoid(e){return this._addCheck({kind:`nanoid`,...Z.errToObj(e)})}cuid(e){return this._addCheck({kind:`cuid`,...Z.errToObj(e)})}cuid2(e){return this._addCheck({kind:`cuid2`,...Z.errToObj(e)})}ulid(e){return this._addCheck({kind:`ulid`,...Z.errToObj(e)})}base64(e){return this._addCheck({kind:`base64`,...Z.errToObj(e)})}base64url(e){return this._addCheck({kind:`base64url`,...Z.errToObj(e)})}jwt(e){return this._addCheck({kind:`jwt`,...Z.errToObj(e)})}ip(e){return this._addCheck({kind:`ip`,...Z.errToObj(e)})}cidr(e){return this._addCheck({kind:`cidr`,...Z.errToObj(e)})}datetime(e){return typeof e==`string`?this._addCheck({kind:`datetime`,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:`datetime`,precision:e?.precision===void 0?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...Z.errToObj(e?.message)})}date(e){return this._addCheck({kind:`date`,message:e})}time(e){return typeof e==`string`?this._addCheck({kind:`time`,precision:null,message:e}):this._addCheck({kind:`time`,precision:e?.precision===void 0?null:e?.precision,...Z.errToObj(e?.message)})}duration(e){return this._addCheck({kind:`duration`,...Z.errToObj(e)})}regex(e,t){return this._addCheck({kind:`regex`,regex:e,...Z.errToObj(t)})}includes(e,t){return this._addCheck({kind:`includes`,value:e,position:t?.position,...Z.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:`startsWith`,value:e,...Z.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:`endsWith`,value:e,...Z.errToObj(t)})}min(e,t){return this._addCheck({kind:`min`,value:e,...Z.errToObj(t)})}max(e,t){return this._addCheck({kind:`max`,value:e,...Z.errToObj(t)})}length(e,t){return this._addCheck({kind:`length`,value:e,...Z.errToObj(t)})}nonempty(e){return this.min(1,Z.errToObj(e))}trim(){return new e({...this._def,checks:[...this._def.checks,{kind:`trim`}]})}toLowerCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toLowerCase`}]})}toUpperCase(){return new e({...this._def,checks:[...this._def.checks,{kind:`toUpperCase`}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind===`datetime`)}get isDate(){return!!this._def.checks.find(e=>e.kind===`date`)}get isTime(){return!!this._def.checks.find(e=>e.kind===`time`)}get isDuration(){return!!this._def.checks.find(e=>e.kind===`duration`)}get isEmail(){return!!this._def.checks.find(e=>e.kind===`email`)}get isURL(){return!!this._def.checks.find(e=>e.kind===`url`)}get isEmoji(){return!!this._def.checks.find(e=>e.kind===`emoji`)}get isUUID(){return!!this._def.checks.find(e=>e.kind===`uuid`)}get isNANOID(){return!!this._def.checks.find(e=>e.kind===`nanoid`)}get isCUID(){return!!this._def.checks.find(e=>e.kind===`cuid`)}get isCUID2(){return!!this._def.checks.find(e=>e.kind===`cuid2`)}get isULID(){return!!this._def.checks.find(e=>e.kind===`ulid`)}get isIP(){return!!this._def.checks.find(e=>e.kind===`ip`)}get isCIDR(){return!!this._def.checks.find(e=>e.kind===`cidr`)}get isBase64(){return!!this._def.checks.find(e=>e.kind===`base64`)}get isBase64url(){return!!this._def.checks.find(e=>e.kind===`base64url`)}get minLength(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew jh({checks:[],typeName:$.ZodString,coerce:e?.coerce??!1,...Q(e)});function Mh(e,t){let n=(e.toString().split(`.`)[1]||``).length,r=(t.toString().split(`.`)[1]||``).length,i=n>r?n:r;return Number.parseInt(e.toFixed(i).replace(`.`,``))%Number.parseInt(t.toFixed(i).replace(`.`,``))/10**i}var Nh=class e extends oh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==q.number){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.number,received:t.parsedType}),X}let t,n=new Zm;for(let r of this._def.checks)r.kind===`int`?Um.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.invalid_type,expected:`integer`,received:`float`,message:r.message}),n.dirty()):r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,maximum:r.value,type:`number`,inclusive:r.inclusive,exact:!1,message:r.message}),n.dirty()):r.kind===`multipleOf`?Mh(e.data,r.value)!==0&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):r.kind===`finite`?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_finite,message:r.message}),n.dirty()):Um.assertNever(r);return{status:n.value,value:e.data}}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}int(e){return this._addCheck({kind:`int`,message:Z.toString(e)})}positive(e){return this._addCheck({kind:`min`,value:0,inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:0,inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:0,inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:0,inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}finite(e){return this._addCheck({kind:`finite`,message:Z.toString(e)})}safe(e){return this._addCheck({kind:`min`,inclusive:!0,value:-(2**53-1),message:Z.toString(e)})._addCheck({kind:`max`,inclusive:!0,value:2**53-1,message:Z.toString(e)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuee.kind===`int`||e.kind===`multipleOf`&&Um.isInteger(e.value))}get isFinite(){let e=null,t=null;for(let n of this._def.checks)if(n.kind===`finite`||n.kind===`int`||n.kind===`multipleOf`)return!0;else n.kind===`min`?(t===null||n.value>t)&&(t=n.value):n.kind===`max`&&(e===null||n.valuenew Nh({checks:[],typeName:$.ZodNumber,coerce:e?.coerce||!1,...Q(e)});var Ph=class e extends oh{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==q.bigint)return this._getInvalidInput(e);let t,n=new Zm;for(let r of this._def.checks)r.kind===`min`?(r.inclusive?e.datar.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.too_big,type:`bigint`,maximum:r.value,inclusive:r.inclusive,message:r.message}),n.dirty()):r.kind===`multipleOf`?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),Y(t,{code:J.not_multiple_of,multipleOf:r.value,message:r.message}),n.dirty()):Um.assertNever(r);return{status:n.value,value:e.data}}_getInvalidInput(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.bigint,received:t.parsedType}),X}gte(e,t){return this.setLimit(`min`,e,!0,Z.toString(t))}gt(e,t){return this.setLimit(`min`,e,!1,Z.toString(t))}lte(e,t){return this.setLimit(`max`,e,!0,Z.toString(t))}lt(e,t){return this.setLimit(`max`,e,!1,Z.toString(t))}setLimit(t,n,r,i){return new e({...this._def,checks:[...this._def.checks,{kind:t,value:n,inclusive:r,message:Z.toString(i)}]})}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}positive(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}negative(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!1,message:Z.toString(e)})}nonpositive(e){return this._addCheck({kind:`max`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}nonnegative(e){return this._addCheck({kind:`min`,value:BigInt(0),inclusive:!0,message:Z.toString(e)})}multipleOf(e,t){return this._addCheck({kind:`multipleOf`,value:e,message:Z.toString(t)})}get minValue(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ph({checks:[],typeName:$.ZodBigInt,coerce:e?.coerce??!1,...Q(e)});var Fh=class extends oh{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==q.boolean){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.boolean,received:t.parsedType}),X}return $m(e.data)}};Fh.create=e=>new Fh({typeName:$.ZodBoolean,coerce:e?.coerce||!1,...Q(e)});var Ih=class e extends oh{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==q.date){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.date,received:t.parsedType}),X}if(Number.isNaN(e.data.getTime()))return Y(this._getOrReturnCtx(e),{code:J.invalid_date}),X;let t=new Zm,n;for(let r of this._def.checks)r.kind===`min`?e.data.getTime()r.value&&(n=this._getOrReturnCtx(e,n),Y(n,{code:J.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:`date`}),t.dirty()):Um.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(t){return new e({...this._def,checks:[...this._def.checks,t]})}min(e,t){return this._addCheck({kind:`min`,value:e.getTime(),message:Z.toString(t)})}max(e,t){return this._addCheck({kind:`max`,value:e.getTime(),message:Z.toString(t)})}get minDate(){let e=null;for(let t of this._def.checks)t.kind===`min`&&(e===null||t.value>e)&&(e=t.value);return e==null?null:new Date(e)}get maxDate(){let e=null;for(let t of this._def.checks)t.kind===`max`&&(e===null||t.valuenew Ih({checks:[],coerce:e?.coerce||!1,typeName:$.ZodDate,...Q(e)});var Lh=class extends oh{_parse(e){if(this._getType(e)!==q.symbol){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.symbol,received:t.parsedType}),X}return $m(e.data)}};Lh.create=e=>new Lh({typeName:$.ZodSymbol,...Q(e)});var Rh=class extends oh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.undefined,received:t.parsedType}),X}return $m(e.data)}};Rh.create=e=>new Rh({typeName:$.ZodUndefined,...Q(e)});var zh=class extends oh{_parse(e){if(this._getType(e)!==q.null){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.null,received:t.parsedType}),X}return $m(e.data)}};zh.create=e=>new zh({typeName:$.ZodNull,...Q(e)});var Bh=class extends oh{constructor(){super(...arguments),this._any=!0}_parse(e){return $m(e.data)}};Bh.create=e=>new Bh({typeName:$.ZodAny,...Q(e)});var Vh=class extends oh{constructor(){super(...arguments),this._unknown=!0}_parse(e){return $m(e.data)}};Vh.create=e=>new Vh({typeName:$.ZodUnknown,...Q(e)});var Hh=class extends oh{_parse(e){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.never,received:t.parsedType}),X}};Hh.create=e=>new Hh({typeName:$.ZodNever,...Q(e)});var Uh=class extends oh{_parse(e){if(this._getType(e)!==q.undefined){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.void,received:t.parsedType}),X}return $m(e.data)}};Uh.create=e=>new Uh({typeName:$.ZodVoid,...Q(e)});var Wh=class e extends oh{_parse(e){let{ctx:t,status:n}=this._processInputParams(e),r=this._def;if(t.parsedType!==q.array)return Y(t,{code:J.invalid_type,expected:q.array,received:t.parsedType}),X;if(r.exactLength!==null){let e=t.data.length>r.exactLength.value,i=t.data.lengthr.maxLength.value&&(Y(t,{code:J.too_big,maximum:r.maxLength.value,type:`array`,inclusive:!0,exact:!1,message:r.maxLength.message}),n.dirty()),t.common.async)return Promise.all([...t.data].map((e,n)=>r.type._parseAsync(new ih(t,e,t.path,n)))).then(e=>Zm.mergeArray(n,e));let i=[...t.data].map((e,n)=>r.type._parseSync(new ih(t,e,t.path,n)));return Zm.mergeArray(n,i)}get element(){return this._def.type}min(t,n){return new e({...this._def,minLength:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxLength:{value:t,message:Z.toString(n)}})}length(t,n){return new e({...this._def,exactLength:{value:t,message:Z.toString(n)}})}nonempty(e){return this.min(1,e)}};Wh.create=(e,t)=>new Wh({type:e,minLength:null,maxLength:null,exactLength:null,typeName:$.ZodArray,...Q(t)});function Gh(e){if(e instanceof Kh){let t={};for(let n in e.shape){let r=e.shape[n];t[n]=ug.create(Gh(r))}return new Kh({...e._def,shape:()=>t})}return e instanceof Wh?new Wh({...e._def,type:Gh(e.element)}):e instanceof ug?ug.create(Gh(e.unwrap())):e instanceof dg?dg.create(Gh(e.unwrap())):e instanceof Qh?Qh.create(e.items.map(e=>Gh(e))):e}var Kh=class e extends oh{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),t=Um.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==q.object){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X}let{status:t,ctx:n}=this._processInputParams(e),{shape:r,keys:i}=this._getCached(),a=[];if(!(this._def.catchall instanceof Hh&&this._def.unknownKeys===`strip`))for(let e in n.data)i.includes(e)||a.push(e);let o=[];for(let e of i){let t=r[e],i=n.data[e];o.push({key:{status:`valid`,value:e},value:t._parse(new ih(n,i,n.path,e)),alwaysSet:e in n.data})}if(this._def.catchall instanceof Hh){let e=this._def.unknownKeys;if(e===`passthrough`)for(let e of a)o.push({key:{status:`valid`,value:e},value:{status:`valid`,value:n.data[e]}});else if(e===`strict`)a.length>0&&(Y(n,{code:J.unrecognized_keys,keys:a}),t.dirty());else if(e!==`strip`)throw Error(`Internal ZodObject error: invalid unknownKeys value.`)}else{let e=this._def.catchall;for(let t of a){let r=n.data[t];o.push({key:{status:`valid`,value:t},value:e._parse(new ih(n,r,n.path,t)),alwaysSet:t in n.data})}}return n.common.async?Promise.resolve().then(async()=>{let e=[];for(let t of o){let n=await t.key,r=await t.value;e.push({key:n,value:r,alwaysSet:t.alwaysSet})}return e}).then(e=>Zm.mergeObjectSync(t,e)):Zm.mergeObjectSync(t,o)}get shape(){return this._def.shape()}strict(t){return Z.errToObj,new e({...this._def,unknownKeys:`strict`,...t===void 0?{}:{errorMap:(e,n)=>{let r=this._def.errorMap?.(e,n).message??n.defaultError;return e.code===`unrecognized_keys`?{message:Z.errToObj(t).message??r}:{message:r}}}})}strip(){return new e({...this._def,unknownKeys:`strip`})}passthrough(){return new e({...this._def,unknownKeys:`passthrough`})}extend(t){return new e({...this._def,shape:()=>({...this._def.shape(),...t})})}merge(t){return new e({unknownKeys:t._def.unknownKeys,catchall:t._def.catchall,shape:()=>({...this._def.shape(),...t._def.shape()}),typeName:$.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(t){return new e({...this._def,catchall:t})}pick(t){let n={};for(let e of Um.objectKeys(t))t[e]&&this.shape[e]&&(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}omit(t){let n={};for(let e of Um.objectKeys(this.shape))t[e]||(n[e]=this.shape[e]);return new e({...this._def,shape:()=>n})}deepPartial(){return Gh(this)}partial(t){let n={};for(let e of Um.objectKeys(this.shape)){let r=this.shape[e];n[e]=t&&!t[e]?r:r.optional()}return new e({...this._def,shape:()=>n})}required(t){let n={};for(let e of Um.objectKeys(this.shape))if(t&&!t[e])n[e]=this.shape[e];else{let t=this.shape[e];for(;t instanceof ug;)t=t._def.innerType;n[e]=t}return new e({...this._def,shape:()=>n})}keyof(){return ag(Um.objectKeys(this.shape))}};Kh.create=(e,t)=>new Kh({shape:()=>e,unknownKeys:`strip`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)}),Kh.strictCreate=(e,t)=>new Kh({shape:()=>e,unknownKeys:`strict`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)}),Kh.lazycreate=(e,t)=>new Kh({shape:e,unknownKeys:`strip`,catchall:Hh.create(),typeName:$.ZodObject,...Q(t)});var qh=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=this._def.options;function r(e){for(let t of e)if(t.result.status===`valid`)return t.result;for(let n of e)if(n.result.status===`dirty`)return t.common.issues.push(...n.ctx.common.issues),n.result;let n=e.map(e=>new Km(e.ctx.common.issues));return Y(t,{code:J.invalid_union,unionErrors:n}),X}if(t.common.async)return Promise.all(n.map(async e=>{let n={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:n}),ctx:n}})).then(r);{let e,r=[];for(let i of n){let n={...t,common:{...t.common,issues:[]},parent:null},a=i._parseSync({data:t.data,path:t.path,parent:n});if(a.status===`valid`)return a;a.status===`dirty`&&!e&&(e={result:a,ctx:n}),n.common.issues.length&&r.push(n.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;let i=r.map(e=>new Km(e));return Y(t,{code:J.invalid_union,unionErrors:i}),X}}get options(){return this._def.options}};qh.create=(e,t)=>new qh({options:e,typeName:$.ZodUnion,...Q(t)});var Jh=e=>e instanceof rg?Jh(e.schema):e instanceof lg?Jh(e.innerType()):e instanceof ig?[e.value]:e instanceof og?e.options:e instanceof sg?Um.objectValues(e.enum):e instanceof fg?Jh(e._def.innerType):e instanceof Rh?[void 0]:e instanceof zh?[null]:e instanceof ug?[void 0,...Jh(e.unwrap())]:e instanceof dg?[null,...Jh(e.unwrap())]:e instanceof hg||e instanceof _g?Jh(e.unwrap()):e instanceof pg?Jh(e._def.innerType):[],Yh=class e extends oh{_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.object)return Y(t,{code:J.invalid_type,expected:q.object,received:t.parsedType}),X;let n=this.discriminator,r=t.data[n],i=this.optionsMap.get(r);return i?t.common.async?i._parseAsync({data:t.data,path:t.path,parent:t}):i._parseSync({data:t.data,path:t.path,parent:t}):(Y(t,{code:J.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[n]}),X)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(t,n,r){let i=new Map;for(let e of n){let n=Jh(e.shape[t]);if(!n.length)throw Error(`A discriminator value for key \`${t}\` could not be extracted from all schema options`);for(let r of n){if(i.has(r))throw Error(`Discriminator property ${String(t)} has duplicate value ${String(r)}`);i.set(r,e)}}return new e({typeName:$.ZodDiscriminatedUnion,discriminator:t,options:n,optionsMap:i,...Q(r)})}};function Xh(e,t){let n=Gm(e),r=Gm(t);if(e===t)return{valid:!0,data:e};if(n===q.object&&r===q.object){let n=Um.objectKeys(t),r=Um.objectKeys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};for(let n of r){let r=Xh(e[n],t[n]);if(!r.valid)return{valid:!1};i[n]=r.data}return{valid:!0,data:i}}if(n===q.array&&r===q.array){if(e.length!==t.length)return{valid:!1};let n=[];for(let r=0;r{if(eh(e)||eh(r))return X;let i=Xh(e.value,r.value);return i.valid?((th(e)||th(r))&&t.dirty(),{status:t.value,value:i.data}):(Y(n,{code:J.invalid_intersection_types}),X)};return n.common.async?Promise.all([this._def.left._parseAsync({data:n.data,path:n.path,parent:n}),this._def.right._parseAsync({data:n.data,path:n.path,parent:n})]).then(([e,t])=>r(e,t)):r(this._def.left._parseSync({data:n.data,path:n.path,parent:n}),this._def.right._parseSync({data:n.data,path:n.path,parent:n}))}};Zh.create=(e,t,n)=>new Zh({left:e,right:t,typeName:$.ZodIntersection,...Q(n)});var Qh=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.array)return Y(n,{code:J.invalid_type,expected:q.array,received:n.parsedType}),X;if(n.data.lengththis._def.items.length&&(Y(n,{code:J.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:`array`}),t.dirty());let r=[...n.data].map((e,t)=>{let r=this._def.items[t]||this._def.rest;return r?r._parse(new ih(n,e,n.path,t)):null}).filter(e=>!!e);return n.common.async?Promise.all(r).then(e=>Zm.mergeArray(t,e)):Zm.mergeArray(t,r)}get items(){return this._def.items}rest(t){return new e({...this._def,rest:t})}};Qh.create=(e,t)=>{if(!Array.isArray(e))throw Error(`You must pass an array of schemas to z.tuple([ ... ])`);return new Qh({items:e,typeName:$.ZodTuple,rest:null,...Q(t)})};var $h=class e extends oh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.object)return Y(n,{code:J.invalid_type,expected:q.object,received:n.parsedType}),X;let r=[],i=this._def.keyType,a=this._def.valueType;for(let e in n.data)r.push({key:i._parse(new ih(n,e,n.path,e)),value:a._parse(new ih(n,n.data[e],n.path,e)),alwaysSet:e in n.data});return n.common.async?Zm.mergeObjectAsync(t,r):Zm.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(t,n,r){return n instanceof oh?new e({keyType:t,valueType:n,typeName:$.ZodRecord,...Q(r)}):new e({keyType:jh.create(),valueType:t,typeName:$.ZodRecord,...Q(n)})}},eg=class extends oh{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.map)return Y(n,{code:J.invalid_type,expected:q.map,received:n.parsedType}),X;let r=this._def.keyType,i=this._def.valueType,a=[...n.data.entries()].map(([e,t],a)=>({key:r._parse(new ih(n,e,n.path,[a,`key`])),value:i._parse(new ih(n,t,n.path,[a,`value`]))}));if(n.common.async){let e=new Map;return Promise.resolve().then(async()=>{for(let n of a){let r=await n.key,i=await n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}})}{let e=new Map;for(let n of a){let r=n.key,i=n.value;if(r.status===`aborted`||i.status===`aborted`)return X;(r.status===`dirty`||i.status===`dirty`)&&t.dirty(),e.set(r.value,i.value)}return{status:t.value,value:e}}}};eg.create=(e,t,n)=>new eg({valueType:t,keyType:e,typeName:$.ZodMap,...Q(n)});var tg=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.parsedType!==q.set)return Y(n,{code:J.invalid_type,expected:q.set,received:n.parsedType}),X;let r=this._def;r.minSize!==null&&n.data.sizer.maxSize.value&&(Y(n,{code:J.too_big,maximum:r.maxSize.value,type:`set`,inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());let i=this._def.valueType;function a(e){let n=new Set;for(let r of e){if(r.status===`aborted`)return X;r.status===`dirty`&&t.dirty(),n.add(r.value)}return{status:t.value,value:n}}let o=[...n.data.values()].map((e,t)=>i._parse(new ih(n,e,n.path,t)));return n.common.async?Promise.all(o).then(e=>a(e)):a(o)}min(t,n){return new e({...this._def,minSize:{value:t,message:Z.toString(n)}})}max(t,n){return new e({...this._def,maxSize:{value:t,message:Z.toString(n)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}};tg.create=(e,t)=>new tg({valueType:e,minSize:null,maxSize:null,typeName:$.ZodSet,...Q(t)});var ng=class e extends oh{constructor(){super(...arguments),this.validate=this.implement}_parse(e){let{ctx:t}=this._processInputParams(e);if(t.parsedType!==q.function)return Y(t,{code:J.invalid_type,expected:q.function,received:t.parsedType}),X;function n(e,n){return Xm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ym(),qm].filter(e=>!!e),issueData:{code:J.invalid_arguments,argumentsError:n}})}function r(e,n){return Xm({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,Ym(),qm].filter(e=>!!e),issueData:{code:J.invalid_return_type,returnTypeError:n}})}let i={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof cg){let e=this;return $m(async function(...t){let o=new Km([]),s=await e._def.args.parseAsync(t,i).catch(e=>{throw o.addIssue(n(t,e)),o}),c=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(c,i).catch(e=>{throw o.addIssue(r(c,e)),o})})}{let e=this;return $m(function(...t){let o=e._def.args.safeParse(t,i);if(!o.success)throw new Km([n(t,o.error)]);let s=Reflect.apply(a,this,o.data),c=e._def.returns.safeParse(s,i);if(!c.success)throw new Km([r(s,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...t){return new e({...this._def,args:Qh.create(t).rest(Vh.create())})}returns(t){return new e({...this._def,returns:t})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(t,n,r){return new e({args:t||Qh.create([]).rest(Vh.create()),returns:n||Vh.create(),typeName:$.ZodFunction,...Q(r)})}},rg=class extends oh{get schema(){return this._def.getter()}_parse(e){let{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}};rg.create=(e,t)=>new rg({getter:e,typeName:$.ZodLazy,...Q(t)});var ig=class extends oh{_parse(e){if(e.data!==this._def.value){let t=this._getOrReturnCtx(e);return Y(t,{received:t.data,code:J.invalid_literal,expected:this._def.value}),X}return{status:`valid`,value:e.data}}get value(){return this._def.value}};ig.create=(e,t)=>new ig({value:e,typeName:$.ZodLiteral,...Q(t)});function ag(e,t){return new og({values:e,typeName:$.ZodEnum,...Q(t)})}var og=class e extends oh{_parse(e){if(typeof e.data!=`string`){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{expected:Um.joinValues(n),received:t.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(this._def.values),!this._cache.has(e.data)){let t=this._getOrReturnCtx(e),n=this._def.values;return Y(t,{received:t.data,code:J.invalid_enum_value,options:n}),X}return $m(e.data)}get options(){return this._def.values}get enum(){let e={};for(let t of this._def.values)e[t]=t;return e}get Values(){let e={};for(let t of this._def.values)e[t]=t;return e}get Enum(){let e={};for(let t of this._def.values)e[t]=t;return e}extract(t,n=this._def){return e.create(t,{...this._def,...n})}exclude(t,n=this._def){return e.create(this.options.filter(e=>!t.includes(e)),{...this._def,...n})}};og.create=ag;var sg=class extends oh{_parse(e){let t=Um.getValidEnumValues(this._def.values),n=this._getOrReturnCtx(e);if(n.parsedType!==q.string&&n.parsedType!==q.number){let e=Um.objectValues(t);return Y(n,{expected:Um.joinValues(e),received:n.parsedType,code:J.invalid_type}),X}if(this._cache||=new Set(Um.getValidEnumValues(this._def.values)),!this._cache.has(e.data)){let e=Um.objectValues(t);return Y(n,{received:n.data,code:J.invalid_enum_value,options:e}),X}return $m(e.data)}get enum(){return this._def.values}};sg.create=(e,t)=>new sg({values:e,typeName:$.ZodNativeEnum,...Q(t)});var cg=class extends oh{unwrap(){return this._def.type}_parse(e){let{ctx:t}=this._processInputParams(e);return t.parsedType!==q.promise&&t.common.async===!1?(Y(t,{code:J.invalid_type,expected:q.promise,received:t.parsedType}),X):$m((t.parsedType===q.promise?t.data:Promise.resolve(t.data)).then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}};cg.create=(e,t)=>new cg({type:e,typeName:$.ZodPromise,...Q(t)});var lg=class extends oh{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:t,ctx:n}=this._processInputParams(e),r=this._def.effect||null,i={addIssue:e=>{Y(n,e),e.fatal?t.abort():t.dirty()},get path(){return n.path}};if(i.addIssue=i.addIssue.bind(i),r.type===`preprocess`){let e=r.transform(n.data,i);if(n.common.async)return Promise.resolve(e).then(async e=>{if(t.value===`aborted`)return X;let r=await this._def.schema._parseAsync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Qm(r.value):r});{if(t.value===`aborted`)return X;let r=this._def.schema._parseSync({data:e,path:n.path,parent:n});return r.status===`aborted`?X:r.status===`dirty`||t.value===`dirty`?Qm(r.value):r}}if(r.type===`refinement`){let e=e=>{let t=r.refinement(e,i);if(n.common.async)return Promise.resolve(t);if(t instanceof Promise)throw Error(`Async refinement encountered during synchronous parse operation. Use .parseAsync instead.`);return e};if(n.common.async===!1){let r=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});return r.status===`aborted`?X:(r.status===`dirty`&&t.dirty(),e(r.value),{status:t.value,value:r.value})}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(n=>n.status===`aborted`?X:(n.status===`dirty`&&t.dirty(),e(n.value).then(()=>({status:t.value,value:n.value}))))}if(r.type===`transform`){if(n.common.async===!1){let e=this._def.schema._parseSync({data:n.data,path:n.path,parent:n});if(!nh(e))return X;let a=r.transform(e.value,i);if(a instanceof Promise)throw Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);return{status:t.value,value:a}}return this._def.schema._parseAsync({data:n.data,path:n.path,parent:n}).then(e=>nh(e)?Promise.resolve(r.transform(e.value,i)).then(e=>({status:t.value,value:e})):X)}Um.assertNever(r)}};lg.create=(e,t,n)=>new lg({schema:e,typeName:$.ZodEffects,effect:t,...Q(n)}),lg.createWithPreprocess=(e,t,n)=>new lg({schema:t,effect:{type:`preprocess`,transform:e},typeName:$.ZodEffects,...Q(n)});var ug=class extends oh{_parse(e){return this._getType(e)===q.undefined?$m(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};ug.create=(e,t)=>new ug({innerType:e,typeName:$.ZodOptional,...Q(t)});var dg=class extends oh{_parse(e){return this._getType(e)===q.null?$m(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};dg.create=(e,t)=>new dg({innerType:e,typeName:$.ZodNullable,...Q(t)});var fg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return t.parsedType===q.undefined&&(n=this._def.defaultValue()),this._def.innerType._parse({data:n,path:t.path,parent:t})}removeDefault(){return this._def.innerType}};fg.create=(e,t)=>new fg({innerType:e,typeName:$.ZodDefault,defaultValue:typeof t.default==`function`?t.default:()=>t.default,...Q(t)});var pg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:n.data,path:n.path,parent:{...n}});return rh(r)?r.then(e=>({status:`valid`,value:e.status===`valid`?e.value:this._def.catchValue({get error(){return new Km(n.common.issues)},input:n.data})})):{status:`valid`,value:r.status===`valid`?r.value:this._def.catchValue({get error(){return new Km(n.common.issues)},input:n.data})}}removeCatch(){return this._def.innerType}};pg.create=(e,t)=>new pg({innerType:e,typeName:$.ZodCatch,catchValue:typeof t.catch==`function`?t.catch:()=>t.catch,...Q(t)});var mg=class extends oh{_parse(e){if(this._getType(e)!==q.nan){let t=this._getOrReturnCtx(e);return Y(t,{code:J.invalid_type,expected:q.nan,received:t.parsedType}),X}return{status:`valid`,value:e.data}}};mg.create=e=>new mg({typeName:$.ZodNaN,...Q(e)});var hg=class extends oh{_parse(e){let{ctx:t}=this._processInputParams(e),n=t.data;return this._def.type._parse({data:n,path:t.path,parent:t})}unwrap(){return this._def.type}},gg=class e extends oh{_parse(e){let{status:t,ctx:n}=this._processInputParams(e);if(n.common.async)return(async()=>{let e=await this._def.in._parseAsync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),Qm(e.value)):this._def.out._parseAsync({data:e.value,path:n.path,parent:n})})();{let e=this._def.in._parseSync({data:n.data,path:n.path,parent:n});return e.status===`aborted`?X:e.status===`dirty`?(t.dirty(),{status:`dirty`,value:e.value}):this._def.out._parseSync({data:e.value,path:n.path,parent:n})}}static create(t,n){return new e({in:t,out:n,typeName:$.ZodPipeline})}},_g=class extends oh{_parse(e){let t=this._def.innerType._parse(e),n=e=>(nh(e)&&(e.value=Object.freeze(e.value)),e);return rh(t)?t.then(e=>n(e)):n(t)}unwrap(){return this._def.innerType}};_g.create=(e,t)=>new _g({innerType:e,typeName:$.ZodReadonly,...Q(t)}),Kh.lazycreate;var $;(function(e){e.ZodString=`ZodString`,e.ZodNumber=`ZodNumber`,e.ZodNaN=`ZodNaN`,e.ZodBigInt=`ZodBigInt`,e.ZodBoolean=`ZodBoolean`,e.ZodDate=`ZodDate`,e.ZodSymbol=`ZodSymbol`,e.ZodUndefined=`ZodUndefined`,e.ZodNull=`ZodNull`,e.ZodAny=`ZodAny`,e.ZodUnknown=`ZodUnknown`,e.ZodNever=`ZodNever`,e.ZodVoid=`ZodVoid`,e.ZodArray=`ZodArray`,e.ZodObject=`ZodObject`,e.ZodUnion=`ZodUnion`,e.ZodDiscriminatedUnion=`ZodDiscriminatedUnion`,e.ZodIntersection=`ZodIntersection`,e.ZodTuple=`ZodTuple`,e.ZodRecord=`ZodRecord`,e.ZodMap=`ZodMap`,e.ZodSet=`ZodSet`,e.ZodFunction=`ZodFunction`,e.ZodLazy=`ZodLazy`,e.ZodLiteral=`ZodLiteral`,e.ZodEnum=`ZodEnum`,e.ZodEffects=`ZodEffects`,e.ZodNativeEnum=`ZodNativeEnum`,e.ZodOptional=`ZodOptional`,e.ZodNullable=`ZodNullable`,e.ZodDefault=`ZodDefault`,e.ZodCatch=`ZodCatch`,e.ZodPromise=`ZodPromise`,e.ZodBranded=`ZodBranded`,e.ZodPipeline=`ZodPipeline`,e.ZodReadonly=`ZodReadonly`})($||={});var vg=jh.create;Nh.create,mg.create,Ph.create;var yg=Fh.create;Ih.create,Lh.create,Rh.create,zh.create;var bg=Bh.create;Vh.create,Hh.create,Uh.create,Wh.create;var xg=Kh.create;Kh.strictCreate,qh.create;var Sg=Yh.create;Zh.create,Qh.create,$h.create,eg.create,tg.create,ng.create,rg.create;var Cg=ig.create,wg=og.create;sg.create,cg.create,lg.create,ug.create,dg.create,lg.createWithPreprocess,gg.create;var Tg=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Eg=e=>{if(typeof e!=`string`)throw TypeError(`Invalid argument expected string`);let t=e.match(Tg);if(!t)throw Error(`Invalid argument not valid semver ('${e}' received)`);return t.shift(),t},Dg=e=>e===`*`||e===`x`||e===`X`,Og=e=>{let t=parseInt(e,10);return isNaN(t)?e:t},kg=(e,t)=>typeof e==typeof t?[e,t]:[String(e),String(t)],Ag=(e,t)=>{if(Dg(e)||Dg(t))return 0;let[n,r]=kg(Og(e),Og(t));return n>r?1:n{for(let n=0;n{let n=Eg(e),r=Eg(t),i=n.pop(),a=r.pop(),o=jg(n,r);return o===0?i&&a?jg(i.split(`.`),a.split(`.`)):i||a?i?-1:1:0:o},Ng=e=>{if(typeof structuredClone==`function`)return structuredClone(e);try{return JSON.parse(JSON.stringify(e))}catch{return Array.isArray(e)?[...e]:{...e}}};function Pg(){return Go()}function Fg(e){if(Object.freeze(e),typeof e==`object`&&e)for(let t of Object.values(e))typeof t==`object`&&t&&!Object.isFrozen(t)&&Fg(t);return e}var Ig=524288;function Lg(e,t,n){let r=0,i=[e,t],a=new WeakSet;for(;i.length>0;){let e=i.pop();if(typeof e==`string`){if(r+=e.length,r>n)return!0}else if(typeof e==`object`&&e){if(a.has(e))continue;if(a.add(e),Array.isArray(e))for(let t=0;tn)return!0;i.push(e[o])}}}}return!1}async function Rg(e,t,n,r){let i=typeof process<`u`&&!0,a=i&&!!{}.VITEST_WORKER_ID,o=i&&!!{}.VITEST_WORKER_ID,s=o&&!Lg(t,n,Ig),c=s?Ng(t):t,l=s?Ng(n):n,u=!1,d=!1,f;for(let t of e)try{s&&(Fg(c),Fg(l));let e=await r(t,c,l);if(e===void 0)continue;let n=!1;if(e.messages!==void 0&&e.messages!==c&&(c=Ng(e.messages),u=!0,n=!0),e.state!==void 0&&e.state!==l&&(l=Ng(e.state),d=!0,n=!0),s&&n&&Lg(c,l,Ig)&&(s=!1),f=e.stopPropagation,f===!0)break}catch(e){if(o&&e instanceof TypeError){if(a)throw e;console.error(`AG-UI: Subscriber attempted to mutate frozen inputs in-place. Return mutations via AgentStateMutation instead of mutating directly.`,e)}else a||console.error(`Subscriber error:`,e);continue}return{...u?{messages:Object.isFrozen(c)?Ng(c):c}:{},...d?{state:Object.isFrozen(l)?Ng(l):l}:{},...f===void 0?{}:{stopPropagation:f}}}function zg(e){if(!e)return{enabled:!1,events:!1,lifecycle:!1,verbose:!1};if(e===!0)return{enabled:!0,events:!0,lifecycle:!0,verbose:!0};let t=e.events??!0,n=e.lifecycle??!0,r=e.verbose??!1;return{enabled:t||n,events:t,lifecycle:n,verbose:r}}function Bg(e){if(e instanceof Vg)return e;if(e===!0)return new Vg(zg(!0))}var Vg=class{constructor(e){this.config=e}event(e,t,n,r){this.config.events&&(this.config.verbose?console.debug(`[${e}] ${t}`,typeof n==`string`?n:JSON.stringify(n)):console.debug(`[${e}] ${t}`,r??n))}lifecycle(e,t,n){this.config.lifecycle&&(n?console.debug(`[${e}] ${t}`,n):console.debug(`[${e}] ${t}`))}get eventsEnabled(){return this.config.events}get lifecycleEnabled(){return this.config.lifecycle}get enabled(){return this.config.enabled}};function Hg(e){return e.enabled?new Vg(e):void 0}function Ug(e,t,n){if(t){let r=e.find(e=>e.id===t);if(r?.role===`assistant`)return r;r&&console.warn(`TOOL_CALL_START: parentMessageId '${t}' matches a '${r.role}' message, not assistant — falling back to toolCallId`);let i={id:r?n:t,role:`assistant`,toolCalls:[]};return e.push(i),i}let r={id:n,role:`assistant`,toolCalls:[]};return e.push(r),r}function Wg(e,t){return!e||t.metadata===void 0?!1:(e.metadata=Mc(e.metadata,Ng(t.metadata)),!0)}var Gg=(e,t,n,r,i)=>{let a=Bg(i),o=Ng(n.messages),s=Ng(e.state),c={},l=e=>{e.messages!==void 0&&(o=e.messages,c.messages=e.messages),e.state!==void 0&&(s=e.state,c.state=e.state)},u=()=>{let e=Ng(c);return c={},e.messages!==void 0||e.state!==void 0?hf(e):Fd};return t.pipe(Tf(async t=>{let i=await Rg(r,o,s,(r,i,a)=>r.onEvent?.({event:t,agent:n,input:e,messages:i,state:a}));if(l(i),i.stopPropagation===!0?a?.event(`APPLY`,`Event dropped:`,t,{type:t.type,reason:`stopPropagation by subscriber`}):a?.event(`APPLY`,`Event applied:`,t,{type:t.type,subscribers:r.length}),i.stopPropagation===!0)return u();switch(t.type){case B.TEXT_MESSAGE_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onTextMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,role:n=`assistant`,name:r,subagentRunId:i}=t,a=o.find(t=>t.id===e);if(a?.role===`activity`)return console.warn(`TEXT_MESSAGE_START: Message '${e}' is an activity message — message ids must be unique across activity and text messages`),u();let s=a;if(!s){let t={id:e,role:n,content:``,...r!==void 0&&{name:r},...i!=null&&{subagentRunId:i}};o.push(t),s=t}let c=Wg(s,t);(!a||c)&&l({messages:o})}return u()}case B.TEXT_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`TEXT_MESSAGE_CONTENT: No message found with ID '${i}'`),u();if(c.role===`activity`)return console.warn(`TEXT_MESSAGE_CONTENT: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let d=await Rg(r,o,s,(r,i,a)=>r.onTextMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,textMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Wg(c,t),l({messages:o})),u()}case B.TEXT_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`TEXT_MESSAGE_END: No message found with ID '${i}'`),u();if(a.role===`activity`)return console.warn(`TEXT_MESSAGE_END: Message '${i}' is an activity message — message ids must be unique across activity and text messages`),u();let c=await Rg(r,o,s,(r,i,o)=>r.onTextMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,textMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Wg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case B.TOOL_CALL_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onToolCallStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{toolCallId:e,toolCallName:n,parentMessageId:r,subagentRunId:i}=t,a=o.find(t=>t.toolCalls?.some(t=>t.id===e))?.toolCalls?.find(t=>t.id===e);if(a){let r=a.function.name!==n;return r&&(console.warn(`TOOL_CALL_START: tool call '${e}' already exists with name '${a.function.name}' — updating it to '${n}'`),a.function.name=n),(Wg(a,t)||r)&&l({messages:o}),u()}let s=new Set(o.map(e=>e.id)),c=Ug(o,r,e);!s.has(c.id)&&i!=null&&c.subagentRunId===void 0&&(c.subagentRunId=i),c.toolCalls??=[];let d={id:e,type:`function`,function:{name:n,arguments:``}};c.toolCalls.push(d),Wg(d,t),l({messages:o})}return u()}case B.TOOL_CALL_ARGS:{let{toolCallId:i,delta:a}=t,c=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!c)return console.warn(`TOOL_CALL_ARGS: No message found containing tool call with ID '${i}'`),u();let d=c.toolCalls?.find(e=>e.id===i);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${i}'`),u();let f=await Rg(r,o,s,(r,i,a)=>{let o=d.function.arguments,s=d.function.name,c={};try{c=Mf(o)}catch{}return r.onToolCallArgsEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallBuffer:o,toolCallName:s,partialToolCallArgs:c})});return l(f),f.stopPropagation!==!0&&(d.function.arguments+=a,Wg(d,t),l({messages:o})),u()}case B.TOOL_CALL_END:{let{toolCallId:i}=t,a=o.find(e=>e.toolCalls?.some(e=>e.id===i));if(!a)return console.warn(`TOOL_CALL_END: No message found containing tool call with ID '${i}'`),u();let c=a.toolCalls?.find(e=>e.id===i);if(!c)return console.warn(`TOOL_CALL_END: No tool call found with ID '${i}'`),u();let d=await Rg(r,o,s,(r,i,a)=>{let o=c.function.arguments,s=c.function.name,l={};try{l=JSON.parse(o)}catch{}return r.onToolCallEndEvent?.({event:t,messages:i,state:a,agent:n,input:e,toolCallName:s,toolCallArgs:l})});return l(d),d.stopPropagation!==!0&&Wg(c,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewToolCall?.({toolCall:c,messages:o,state:s,agent:n,input:e})})),u()}case B.TOOL_CALL_RESULT:{let i=await Rg(r,o,s,(r,i,a)=>r.onToolCallResultEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:i,toolCallId:a,content:c,role:u,subagentRunId:d}=t,f={id:i,toolCallId:a,role:u||`tool`,content:c,...d!=null&&{subagentRunId:d}};Wg(f,t);let p=o.findIndex(e=>e.role===`assistant`&&e.toolCalls?.some(e=>e.id===a));if(p===-1)o.push(f);else{let e=p+1;for(;e{t.onNewMessage?.({message:f,messages:o,state:s,agent:n,input:e})})),l({messages:o})}return u()}case B.STATE_SNAPSHOT:{let i=await Rg(r,o,s,(r,i,a)=>r.onStateSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{snapshot:e}=t;s=e,l({state:s})}return u()}case B.STATE_DELTA:{let i=await Rg(r,o,s,(r,i,a)=>r.onStateDeltaEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{delta:e}=t;try{s=Nu.applyPatch(s,e,!0,!1).newDocument,l({state:s})}catch(t){let n=t instanceof Error?t.message:String(t);console.warn(`Failed to apply state patch:\nCurrent state: ${JSON.stringify(s,null,2)}\nPatch operations: ${JSON.stringify(e,null,2)}\nError: ${n}`)}}return u()}case B.MESSAGES_SNAPSHOT:{let i=await Rg(r,o,s,(r,i,a)=>r.onMessagesSnapshotEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messages:e}=t,n=e.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}),r=new Map(n.map(e=>[e.id,e])),i=n.some(e=>e.role===`activity`),a=n.some(e=>e.role===`reasoning`),s=e=>e.role===`activity`&&!i||e.role===`reasoning`&&!a;o=o.filter(e=>s(e)||r.has(e.id)).map(e=>s(e)?e:r.get(e.id));let c=new Set(o.map(e=>e.id));for(let e of n)c.has(e.id)||o.push(e);l({messages:o})}return u()}case B.ACTIVITY_SNAPSHOT:{let i=t,a=o.findIndex(e=>e.id===i.messageId),c=a>=0?o[a]:void 0,d=c?.role===`activity`?c:void 0,f=i.replace??!0,p=await Rg(r,o,s,(t,r,a)=>t.onActivitySnapshotEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d,existingMessage:c}));if(l(p),p.stopPropagation!==!0){let t={id:i.messageId,role:`activity`,activityType:i.activityType,content:Ng(i.content),...i.subagentRunId!=null&&{subagentRunId:i.subagentRunId}},c,u;a===-1?(o.push(t),c=t,u=t):d?(f&&(o[a]={...d,activityType:i.activityType,content:Ng(i.content),subagentRunId:i.subagentRunId},i.subagentRunId??delete o[a].subagentRunId),u=o[a]):f&&(o[a]=t,c=t,u=t),Wg(u,i),l({messages:o}),c&&await Promise.all(r.map(t=>t.onNewMessage?.({message:c,messages:o,state:s,agent:n,input:e})))}return u()}case B.ACTIVITY_DELTA:{let i=t,a=o.findIndex(e=>e.id===i.messageId);if(a===-1)return u();let c=o[a];if(c.role!==`activity`)return console.warn(`ACTIVITY_DELTA: Message '${i.messageId}' is not an activity message`),u();let d=c,f=await Rg(r,o,s,(t,r,a)=>t.onActivityDeltaEvent?.({event:i,messages:r,state:a,agent:n,input:e,activityMessage:d}));if(l(f),f.stopPropagation!==!0)try{Wg(d,i)&&l({messages:o});let e=Ng(d.content??{}),t=Nu.applyPatch(e,i.patch??[],!0,!1).newDocument;o[a]={...d,content:Ng(t),activityType:i.activityType},l({messages:o})}catch(e){let t=e instanceof Error?e.message:String(e);console.warn(`Failed to apply activity patch for '${i.messageId}': ${t}`)}return u()}case B.RAW:return l(await Rg(r,o,s,(r,i,a)=>r.onRawEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.CUSTOM:return l(await Rg(r,o,s,(r,i,a)=>r.onCustomEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.RUN_STARTED:{let i=await Rg(r,o,s,(r,i,a)=>r.onRunStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let e=t;if(e.input?.messages){for(let t of e.input.messages){let e=t;if(t.subagentRunId===null){let n={...t};delete n.subagentRunId,e=n}o.find(t=>t.id===e.id)||o.push(e)}l({messages:o})}}return u()}case B.RUN_FINISHED:{let i=t,a=i.outcome?.type===`interrupt`?{event:i,outcome:`interrupt`,interrupts:i.outcome.interrupts}:{event:i,outcome:`success`,result:i.result},c=await Rg(r,o,s,(t,r,i)=>t.onRunFinishedEvent?.({...a,messages:r,state:i,agent:n,input:e}));return l(c),c.stopPropagation!==!0&&(n.pendingInterrupts=a.outcome===`interrupt`?a.interrupts.map(e=>{if(e.subagentRunId!==null)return e;let t={...e};return delete t.subagentRunId,t}):[]),u()}case B.RUN_ERROR:return l(await Rg(r,o,s,(r,i,a)=>r.onRunErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.STEP_STARTED:return l(await Rg(r,o,s,(r,i,a)=>r.onStepStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.STEP_FINISHED:return l(await Rg(r,o,s,(r,i,a)=>r.onStepFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.TEXT_MESSAGE_CHUNK:throw Error(`TEXT_MESSAGE_CHUNK must be transformed before being applied`);case B.TOOL_CALL_CHUNK:throw Error(`TOOL_CALL_CHUNK must be transformed before being applied`);case B.THINKING_START:return u();case B.THINKING_END:return u();case B.THINKING_TEXT_MESSAGE_START:return u();case B.THINKING_TEXT_MESSAGE_CONTENT:return u();case B.THINKING_TEXT_MESSAGE_END:return u();case B.REASONING_START:return l(await Rg(r,o,s,(r,i,a)=>r.onReasoningStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.REASONING_MESSAGE_START:{let i=await Rg(r,o,s,(r,i,a)=>r.onReasoningMessageStartEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(i),i.stopPropagation!==!0){let{messageId:e,subagentRunId:n}=t,r=o.find(t=>t.id===e),i=r;if(!i){let t={id:e,role:`reasoning`,content:``,...n!=null&&{subagentRunId:n}};o.push(t),i=t}let a=Wg(i,t);(!r||a)&&l({messages:o})}return u()}case B.REASONING_MESSAGE_CONTENT:{let{messageId:i,delta:a}=t,c=o.find(e=>e.id===i);if(!c)return console.warn(`REASONING_MESSAGE_CONTENT: No message found with ID '${i}'`),u();let d=await Rg(r,o,s,(r,i,a)=>r.onReasoningMessageContentEvent?.({event:t,messages:i,state:a,agent:n,input:e,reasoningMessageBuffer:typeof c.content==`string`?c.content:``}));return l(d),d.stopPropagation!==!0&&(c.content=`${typeof c.content==`string`?c.content:``}${a}`,Wg(c,t),l({messages:o})),u()}case B.REASONING_MESSAGE_END:{let{messageId:i}=t,a=o.find(e=>e.id===i);if(!a)return console.warn(`REASONING_MESSAGE_END: No message found with ID '${i}'`),u();let c=await Rg(r,o,s,(r,i,o)=>r.onReasoningMessageEndEvent?.({event:t,messages:i,state:o,agent:n,input:e,reasoningMessageBuffer:typeof a.content==`string`?a.content:``}));return l(c),c.stopPropagation!==!0&&Wg(a,t)&&l({messages:o}),await Promise.all(r.map(t=>{t.onNewMessage?.({message:a,messages:o,state:s,agent:n,input:e})})),u()}case B.REASONING_MESSAGE_CHUNK:throw Error(`REASONING_MESSAGE_CHUNK must be transformed before being applied`);case B.REASONING_END:return l(await Rg(r,o,s,(r,i,a)=>r.onReasoningEndEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.REASONING_ENCRYPTED_VALUE:{let{subtype:i,entityId:a,encryptedValue:d}=t,f=await Rg(r,o,s,(r,i,a)=>r.onReasoningEncryptedValueEvent?.({event:t,messages:i,state:a,agent:n,input:e}));if(l(f),f.stopPropagation!==!0){let e=!1;if(i===`tool-call`){for(let t of o)if(t.role===`assistant`&&t.toolCalls){let n=t.toolCalls.find(e=>e.id===a);if(n){n.encryptedValue=d,e=!0;break}}}else{let t=o.find(e=>e.id===a);t?.role!==`activity`&&t&&(t.encryptedValue=d,e=!0)}e&&(c.messages=o)}return u()}case B.SUBAGENT_STARTED:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentStartedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.SUBAGENT_FINISHED:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentFinishedEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u();case B.SUBAGENT_ERROR:return l(await Rg(r,o,s,(r,i,a)=>r.onSubagentErrorEvent?.({event:t,messages:i,state:a,agent:n,input:e}))),u()}return t.type,u()}),xf(),r.length>0?Ef({}):e=>e)},Kg=e=>t=>{let n=Bg(e),r=new Set,i=new Set,a=new Set,o={message:new Map,toolCall:new Map,activity:new Map,reasoning:new Map},s=!1,c=!1,l=!1,u=new Map,d=e=>{let t=u.get(e);return t||(t=new Map,u.set(e,t)),t},f=()=>{for(let e of u.values())if(e.size>0)return!0;return!1},p=new Map,m=new Set,h=!1,g=!1,_=!1,v=()=>{r.clear(),i.clear(),a.clear(),o.message.clear(),o.toolCall.clear(),o.activity.clear(),o.reasoning.clear(),u.clear(),p.clear(),m.clear(),h=!1,g=!1,s=!1,c=!1,_=!0},y=(e,t)=>{let n=e??[];if(Array.isArray(n))for(let e of n){if(!e||typeof e.id!=`string`)continue;if(e.subagentRunId===null)return new z(`Cannot send a message (id '${e.id}') with 'subagentRunId: null'. The field is optional — omit it entirely.`);let n=e.role===`reasoning`?o.reasoning:e.role===`activity`?o.activity:o.message;(t||!n.has(e.id))&&n.set(e.id,{subagentRunId:e.subagentRunId});for(let n of e.toolCalls??[])n&&typeof n.id==`string`&&(t||!o.toolCall.has(n.id))&&o.toolCall.set(n.id,{subagentRunId:e.subagentRunId??void 0})}},b=(e,t,n,r,i)=>{if(t!==void 0&&n&&n.subagentRunId!==t)return new z(`Cannot send '${e}': subagentRunId '${t}' does not match the ${r} '${i}' opener's subagent '${n.subagentRunId??`(the parent agent)`}'.`)};return t.pipe(bf(e=>{let t=e.type;if(n?.event(`VERIFY`,`Event:`,e,{type:e.type}),c&&t!==B.RUN_STARTED)return H(()=>new z(`Cannot send event type '${t}': The run has already errored with 'RUN_ERROR'. No further events can be sent.`));if(s&&t!==B.RUN_ERROR&&t!==B.RUN_STARTED)return H(()=>new z(`Cannot send event type '${t}': The run has already finished with 'RUN_FINISHED'. Start a new run with 'RUN_STARTED'.`));if(!l){if(l=!0,t!==B.RUN_STARTED&&t!==B.RUN_ERROR)return H(()=>new z(`First event must be 'RUN_STARTED'`))}else if(t===B.RUN_STARTED){if(_&&!s&&!c)return H(()=>new z(`Cannot send 'RUN_STARTED' while a run is still active. The previous run must be finished with 'RUN_FINISHED' before starting a new run.`));(s||c)&&v()}if(e.subagentRunId===null)return H(()=>new z(`Cannot send '${t}' with 'subagentRunId: null'. The field is optional — omit it entirely.`));if(t===B.SUBAGENT_STARTED||t===B.SUBAGENT_FINISHED||t===B.SUBAGENT_ERROR){let n=t===B.SUBAGENT_STARTED?[`description`,`parentSubagentRunId`,`parentToolCallId`,`parentMessageId`]:t===B.SUBAGENT_FINISHED?[`outcome`]:[`code`];for(let r of n)if(e[r]===null)return H(()=>new z(`Cannot send '${t}' with '${r}: null'. The field is optional — omit it entirely.`));let r=e.outcome;if(r!=null&&r.type!==`success`&&r.type!==`suspended`)return H(()=>new z(`Cannot send '${t}' with outcome type '${String(r.type)}'. The outcome is either { type: "success" } or { type: "suspended" }.`));if(r&&r.interruptIds===null)return H(()=>new z(`Cannot send '${t}' with 'outcome.interruptIds: null'. The field is optional — omit it entirely.`));if(r&&Array.isArray(r.interruptIds)&&r.interruptIds.some(e=>typeof e!=`string`))return H(()=>new z(`Cannot send '${t}' with a non-string entry in 'outcome.interruptIds'. Interrupt ids are strings.`))}if(t===B.RUN_FINISHED){let t=e.outcome;if(t?.type===`interrupt`&&Array.isArray(t.interrupts)){for(let e of t.interrupts)if(e&&e.subagentRunId===null)return H(()=>new z(`Cannot send 'RUN_FINISHED' with an interrupt (id '${e.id}') carrying 'subagentRunId: null'. The field is optional — omit it entirely.`))}}switch(t){case B.TEXT_MESSAGE_START:{let n=e.messageId;if(r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_START' event: A text message with ID '${n}' is already in progress. Complete it with 'TEXT_MESSAGE_END' first.`));let i=o.message.get(n);if(i){let r=b(t,e.subagentRunId,i,`message`,n);if(r)return H(()=>r)}return r.add(n),i||o.message.set(n,{subagentRunId:e.subagentRunId}),hf(e)}case B.TEXT_MESSAGE_CONTENT:{let n=e.messageId;if(!r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_CONTENT' event: No active text message found with ID '${n}'. Start a text message with 'TEXT_MESSAGE_START' first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):hf(e)}case B.TEXT_MESSAGE_END:{let n=e.messageId;if(!r.has(n))return H(()=>new z(`Cannot send 'TEXT_MESSAGE_END' event: No active text message found with ID '${n}'. A 'TEXT_MESSAGE_START' event must be sent first.`));let i=b(t,e.subagentRunId,o.message.get(n),`message`,n);return i?H(()=>i):(r.delete(n),hf(e))}case B.TOOL_CALL_START:{let n=e.toolCallId;if(i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_START' event: A tool call with ID '${n}' is already in progress. Complete it with 'TOOL_CALL_END' first.`));let r=e.parentMessageId,a=e.subagentRunId,s;if(r!==void 0){let e=o.message.get(r);if(e){if(a!==void 0&&a!==e.subagentRunId)return H(()=>new z(`Cannot send 'TOOL_CALL_START': subagentRunId '${a}' does not match its parent message '${r}' owner '${e.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`));s=e}}let c=o.toolCall.get(n);if(c){let e=b(t,a,c,`tool call`,n);if(e)return H(()=>e);if(a===void 0&&s&&s.subagentRunId!==c.subagentRunId)return H(()=>new z(`Cannot send 'TOOL_CALL_START': tool call '${n}' is owned by '${c.subagentRunId??`(the parent agent)`}' but its parent message '${r}' is owned by '${s.subagentRunId??`(the parent agent)`}'. A tool call belongs to the message that carries it.`))}return i.add(n),c||o.toolCall.set(n,a===void 0?s??{subagentRunId:void 0}:{subagentRunId:a}),hf(e)}case B.TOOL_CALL_ARGS:{let n=e.toolCallId;if(!i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_ARGS' event: No active tool call found with ID '${n}'. Start a tool call with 'TOOL_CALL_START' first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):hf(e)}case B.TOOL_CALL_END:{let n=e.toolCallId;if(!i.has(n))return H(()=>new z(`Cannot send 'TOOL_CALL_END' event: No active tool call found with ID '${n}'. A 'TOOL_CALL_START' event must be sent first.`));let r=b(t,e.subagentRunId,o.toolCall.get(n),`tool call`,n);return r?H(()=>r):(i.delete(n),hf(e))}case B.STEP_STARTED:{let t=e.stepName,n=e.subagentRunId;return d(n).has(t)?H(()=>new z(`Step "${t}" is already active for 'STEP_STARTED'${n===void 0?``:` in subagent '${n}'`}`)):(d(n).set(t,!0),hf(e))}case B.STEP_FINISHED:{let t=e.stepName,n=e.subagentRunId;if(!d(n).has(t)){let e,r=!1;for(let[i,a]of u)if(i!==n&&a.has(t)){e=i,r=!0;break}return H(r?()=>new z(`Cannot send 'STEP_FINISHED' for step "${t}" attributed to ${n===void 0?`the parent agent`:`subagent '${n}'`}: that step is open under ${e===void 0?`the parent agent`:`subagent '${e}'`}. A step must be finished by whoever started it.`):()=>new z(`Cannot send 'STEP_FINISHED' for step "${t}" that was not started`))}return d(n).delete(t),hf(e)}case B.ACTIVITY_SNAPSHOT:{let t=e.messageId;return(!o.activity.has(t)||e.replace!==!1)&&o.activity.set(t,{subagentRunId:e.subagentRunId}),hf(e)}case B.TOOL_CALL_RESULT:{let t=e.messageId;return typeof t==`string`&&o.message.set(t,{subagentRunId:e.subagentRunId}),hf(e)}case B.REASONING_START:case B.REASONING_MESSAGE_START:{let n=e.messageId,r=o.reasoning.get(n);if(r){let i=b(t,e.subagentRunId,r,`reasoning message`,n);if(i)return H(()=>i)}return a.add(n),r||o.reasoning.set(n,{subagentRunId:e.subagentRunId}),hf(e)}case B.REASONING_MESSAGE_CONTENT:case B.REASONING_MESSAGE_END:case B.REASONING_END:{let n=e.messageId,r=b(t,e.subagentRunId,o.reasoning.get(n),`reasoning message`,n);return r?H(()=>r):(t===B.REASONING_END&&a.delete(n),hf(e))}case B.REASONING_ENCRYPTED_VALUE:{let n=e.entityId,r=e.subtype,i=r===`tool-call`?o.toolCall.get(n):r===`message`?o.message.get(n)??o.reasoning.get(n):o.reasoning.get(n),a=r===`tool-call`?`tool call`:r===`message`?`message`:`reasoning message`,s=b(t,e.subagentRunId,i,a,n);return s?H(()=>s):hf(e)}case B.ACTIVITY_DELTA:{let n=e.messageId,r=b(t,e.subagentRunId,o.activity.get(n),`activity`,n);return r?H(()=>r):hf(e)}case B.SUBAGENT_STARTED:{if(typeof e.subagentRunId!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_STARTED' without a 'subagentRunId'.`));if(typeof e.name!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_STARTED' without a 'name'.`));let t=e.subagentRunId,n=e.parentSubagentRunId;return p.has(t)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' is already active. Finish it with 'SUBAGENT_FINISHED' first.`)):m.has(t)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': subagent '${t}' has already finished in this run. Subagent IDs are per-invocation and cannot be reused.`)):n!==void 0&&!p.has(n)&&!m.has(n)?H(()=>new z(`Cannot send 'SUBAGENT_STARTED': parentSubagentRunId '${n}' has not been started in this run.`)):(p.set(t,!0),hf(e))}case B.SUBAGENT_FINISHED:case B.SUBAGENT_ERROR:{if(typeof e.subagentRunId!=`string`)return H(()=>new z(`Cannot send '${t}' without a 'subagentRunId'.`));if(t===B.SUBAGENT_ERROR&&typeof e.message!=`string`)return H(()=>new z(`Cannot send 'SUBAGENT_ERROR' without a 'message'.`));let n=e.subagentRunId;return p.has(n)?(p.delete(n),m.add(n),hf(e)):H(()=>new z(`Cannot send '${t}': no active subagent found with ID '${n}'. A 'SUBAGENT_STARTED' event must be sent first.`))}case B.MESSAGES_SNAPSHOT:{let t=y(e.messages,!0);if(t)return H(()=>t)}return hf(e);case B.RUN_STARTED:_=!0;{let t=y((e.input??{}).messages,!1);if(t)return H(()=>t)}return hf(e);case B.RUN_FINISHED:if(f()){let e=[];for(let[t,n]of u)for(let r of n.keys())e.push(t===void 0?r:`${r} (subagent '${t}')`);let t=e.join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while steps are still active: ${t}`))}if(r.size>0){let e=Array.from(r.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while text messages are still active: ${e}`))}if(i.size>0){let e=Array.from(i.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while tool calls are still active: ${e}`))}if(p.size>0){let e=Array.from(p.keys()).join(`, `);return H(()=>new z(`Cannot send 'RUN_FINISHED' while subagents are still active: ${e}`))}return s=!0,hf(e);case B.RUN_ERROR:return c=!0,hf(e);case B.CUSTOM:return hf(e);case B.THINKING_TEXT_MESSAGE_START:return h?g?H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking message is already in progress. Complete it with 'THINKING_TEXT_MESSAGE_END' first.`)):(g=!0,hf(e)):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_START' event: A thinking step is not in progress. Create one with 'THINKING_START' first.`));case B.THINKING_TEXT_MESSAGE_CONTENT:return g?hf(e):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_CONTENT' event: No active thinking message found. Start a message with 'THINKING_TEXT_MESSAGE_START' first.`));case B.THINKING_TEXT_MESSAGE_END:return g?(g=!1,hf(e)):H(()=>new z(`Cannot send 'THINKING_TEXT_MESSAGE_END' event: No active thinking message found. A 'THINKING_TEXT_MESSAGE_START' event must be sent first.`));case B.THINKING_START:return h?H(()=>new z(`Cannot send 'THINKING_START' event: A thinking step is already in progress. End it with 'THINKING_END' first.`)):(h=!0,hf(e));case B.THINKING_END:return h?(h=!1,hf(e)):H(()=>new z(`Cannot send 'THINKING_END' event: No active thinking step found. A 'THINKING_START' event must be sent first.`));default:return hf(e)}}))},qg=function(e){return e.HEADERS=`headers`,e.DATA=`data`,e}({}),Jg=e=>Sf(()=>mf(e())).pipe(Of(e=>{if(!e.ok){let t=e.headers.get(`content-type`)||``;return mf(e.text()).pipe(bf(n=>{let r=n;if(t.includes(`application/json`))try{r=JSON.parse(n)}catch{}let i=Error(`HTTP ${e.status}: ${typeof r==`string`?r:JSON.stringify(r)}`);return i.status=e.status,i.payload=r,H(()=>i)}))}let t={type:qg.HEADERS,status:e.status,headers:e.headers},n=e.body?.getReader();return n?new Sd(e=>(e.next(t),(async()=>{try{for(;;){let{done:t,value:r}=await n.read();if(t)break;let i={type:qg.DATA,data:r};e.next(i)}e.complete()}catch(t){e.error(t)}})(),()=>{n.cancel().catch(e=>{if(e?.name!==`AbortError`)throw e})})):H(()=>Error(`Failed to getReader() from response`))})),Yg=(e,t)=>{let n=Bg(t),r=new jd,i=new TextDecoder(`utf-8`,{fatal:!1}),a=``;e.subscribe({next:e=>{if(e.type!==qg.HEADERS&&e.type===qg.DATA&&e.data){let t=i.decode(e.data,{stream:!0});a+=t;let n=a.split(/\n\n/);a=n.pop()||``;for(let e of n)o(e)}},error:e=>r.error(e),complete:()=>{a&&(a+=i.decode(),o(a)),r.complete()}});function o(e){let t=e.split(` +`),i=[];for(let e of t)e.startsWith(`data:`)&&i.push(e.slice(5).replace(/^ /,``));if(i.length>0)try{let e=i.join(` +`),t=JSON.parse(e);n?.event(`SSE`,`Event received:`,t,{type:t.type}),r.next(t)}catch(e){r.error(e)}}return r.asObservable()},Xg=e=>{let t=new jd,n=new Uint8Array;e.subscribe({next:e=>{if(e.type!==qg.HEADERS&&e.type===qg.DATA&&e.data){let t=new Uint8Array(n.length+e.data.length);t.set(n,0),t.set(e.data,n.length),n=t,r()}},error:e=>t.error(e),complete:()=>{if(n.length>0)try{r()}catch{console.warn(`Incomplete or invalid protocol buffer data at stream end`)}t.complete()}});function r(){for(;n.length>=4;){let e=4+new DataView(n.buffer,n.byteOffset,4).getUint32(0,!1);if(n.length{let n=Bg(t),r=new jd,i=new Pd,a=!1;return e.subscribe({next:e=>{if(i.next(e),e.type===qg.HEADERS&&!a){a=!0;let t=e.headers.get(`content-type`);n?.lifecycle(`HTTP`,`Stream format detected:`,{contentType:t,parser:t===`application/vnd.ag-ui.event+proto`?`protobuf`:`sse`}),t===`application/vnd.ag-ui.event+proto`?Xg(i).subscribe({next:e=>r.next(e),error:e=>r.error(e),complete:()=>r.complete()}):Yg(i,n).subscribe({next:e=>{try{let t=Zl.parse(e);n?.event(`HTTP`,`Event validated:`,t,{type:t.type,valid:!0}),r.next(t)}catch(t){n?.event(`HTTP`,`Event invalid:`,{json:e,error:String(t)}),r.error(t)}},error:e=>{if(e?.name===`AbortError`){r.next({type:B.RUN_ERROR,message:e.message||`Request aborted`,code:`abort`,rawEvent:e}),r.complete();return}return r.error(e)},complete:()=>r.complete()})}else a||r.error(Error(`No headers event received before data events`))},error:e=>{i.error(e),r.error(e)},complete:()=>{i.complete()}}),r.asObservable()},Qg=wg([`TextMessageStart`,`TextMessageContent`,`TextMessageEnd`,`ActionExecutionStart`,`ActionExecutionArgs`,`ActionExecutionEnd`,`ActionExecutionResult`,`AgentStateMessage`,`MetaEvent`,`RunStarted`,`RunFinished`,`RunError`,`NodeStarted`,`NodeFinished`]),$g=wg([`LangGraphInterruptEvent`,`PredictState`,`Exit`]);Sg(`type`,[xg({type:Cg(Qg.enum.TextMessageStart),messageId:vg(),parentMessageId:vg().optional(),role:vg().optional()}),xg({type:Cg(Qg.enum.TextMessageContent),messageId:vg(),content:vg()}),xg({type:Cg(Qg.enum.TextMessageEnd),messageId:vg()}),xg({type:Cg(Qg.enum.ActionExecutionStart),actionExecutionId:vg(),actionName:vg(),parentMessageId:vg().optional()}),xg({type:Cg(Qg.enum.ActionExecutionArgs),actionExecutionId:vg(),args:vg()}),xg({type:Cg(Qg.enum.ActionExecutionEnd),actionExecutionId:vg()}),xg({type:Cg(Qg.enum.ActionExecutionResult),actionName:vg(),actionExecutionId:vg(),result:vg()}),xg({type:Cg(Qg.enum.AgentStateMessage),threadId:vg(),agentName:vg(),nodeName:vg(),runId:vg(),active:yg(),role:vg(),state:vg(),running:yg()}),xg({type:Cg(Qg.enum.MetaEvent),name:$g,value:bg()}),xg({type:Cg(Qg.enum.RunError),message:vg(),code:vg().optional()})]),xg({id:vg(),role:vg(),content:vg(),parentMessageId:vg().optional()}),xg({id:vg(),name:vg(),arguments:bg(),parentMessageId:vg().optional()}),xg({id:vg(),result:bg(),actionExecutionId:vg(),actionName:vg()});var e_=e=>{if(typeof e==`string`)return e;if(!Array.isArray(e))return;let t=e.filter(e=>e.type===`text`).map(e=>e.text).filter(e=>e.length>0);if(t.length!==0)return t.join(` +`)},t_=(e,t,n)=>r=>{let i={},a=!0,o=!0,s=``,c=null,l=null,u=[],d={},f=e=>{typeof e==`object`&&e&&(`messages`in e&&delete e.messages,i=e)};return r.pipe(bf(r=>{switch(r.type){case B.TEXT_MESSAGE_START:{let e=r;return[{type:Qg.enum.TextMessageStart,messageId:e.messageId,role:e.role}]}case B.TEXT_MESSAGE_CONTENT:{let e=r;return[{type:Qg.enum.TextMessageContent,messageId:e.messageId,content:e.delta}]}case B.TEXT_MESSAGE_END:{let e=r;return[{type:Qg.enum.TextMessageEnd,messageId:e.messageId}]}case B.TOOL_CALL_START:{let e=r;return u.push({id:e.toolCallId,type:`function`,function:{name:e.toolCallName,arguments:``}}),o=!0,d[e.toolCallId]=e.toolCallName,[{type:Qg.enum.ActionExecutionStart,actionExecutionId:e.toolCallId,actionName:e.toolCallName,parentMessageId:e.parentMessageId}]}case B.TOOL_CALL_ARGS:{let c=r,d=u.find(e=>e.id===c.toolCallId);if(!d)return console.warn(`TOOL_CALL_ARGS: No tool call found with ID '${c.toolCallId}'`),[];d.function.arguments+=c.delta;let p=!1;if(l){let e=l.find(e=>e.tool==d.function.name);if(e)try{let t=JSON.parse(Mf(d.function.arguments));e.tool_argument&&e.tool_argument in t?(f({...i,[e.state_key]:t[e.tool_argument]}),p=!0):e.tool_argument||(f({...i,[e.state_key]:t}),p=!0)}catch{}}return[{type:Qg.enum.ActionExecutionArgs,actionExecutionId:c.toolCallId,args:c.delta},...p?[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]:[]]}case B.TOOL_CALL_END:{let e=r;return[{type:Qg.enum.ActionExecutionEnd,actionExecutionId:e.toolCallId}]}case B.TOOL_CALL_RESULT:{let e=r;return[{type:Qg.enum.ActionExecutionResult,actionExecutionId:e.toolCallId,result:e.content,actionName:d[e.toolCallId]||`unknown`}]}case B.RAW:return[];case B.CUSTOM:{let e=r;switch(e.name){case`Exit`:a=!1;break;case`PredictState`:l=e.value}return[{type:Qg.enum.MetaEvent,name:e.name,value:e.value}]}case B.STATE_SNAPSHOT:return f(r.snapshot),[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}];case B.STATE_DELTA:{let c=r,l=Nu.applyPatch(i,c.delta,!0,!1);return l?(f(l.newDocument),[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:o}]):[]}case B.MESSAGES_SNAPSHOT:return c=r.messages,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:c}:{}}),active:!0}];case B.RUN_STARTED:return[];case B.RUN_FINISHED:return c&&(i.messages=c),Object.keys(i).length===0?[]:[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify({...i,...c?{messages:n_(c)}:{}}),active:!1}];case B.RUN_ERROR:{let e=r;return[{type:Qg.enum.RunError,message:e.message,code:e.code}]}case B.STEP_STARTED:return s=r.stepName,u=[],l=null,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!0}];case B.STEP_FINISHED:return u=[],l=null,[{type:Qg.enum.AgentStateMessage,threadId:e,agentName:n,nodeName:s,runId:t,running:a,role:`assistant`,state:JSON.stringify(i),active:!1}];default:return[]}}))};function n_(e){let t=[];for(let n of e)if(n.role===`assistant`||n.role===`user`||n.role===`system`){let e=e_(n.content);if(e){let r={id:n.id,role:n.role,content:e};t.push(r)}if(n.role===`assistant`&&n.toolCalls&&n.toolCalls.length>0)for(let e of n.toolCalls){let r={id:e.id,name:e.function.name,arguments:JSON.parse(e.function.arguments),parentMessageId:n.id};t.push(r)}}else if(n.role===`tool`){let r=`unknown`;for(let t of e)if(t.role===`assistant`&&t.toolCalls?.length){for(let e of t.toolCalls)if(e.id===n.toolCallId){r=e.function.name;break}}let i={id:n.id,result:n.content,actionExecutionId:n.toolCallId,actionName:r};t.push(i)}return t}var r_=e=>e.kind===`tool`?e.fields.toolCallId:e.fields.messageId,i_=e=>e===`tool`?`toolCallId`:`messageId`,a_=(e,t)=>t.metadata===void 0?e:{...e,metadata:t.metadata},o_=e=>t=>{let n=Bg(e),r=new Map,i=e=>{let t=r.get(e);if(!t)return[];switch(r.delete(e),t.kind){case`text`:{let e={type:B.TEXT_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TEXT_MESSAGE_END`,e,{messageId:e.messageId}),[e]}case`tool`:{let e={type:B.TOOL_CALL_END,toolCallId:t.fields.toolCallId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`TOOL_CALL_END`,e,{toolCallId:e.toolCallId}),[e]}case`reasoning`:{let e={type:B.REASONING_MESSAGE_END,messageId:t.fields.messageId,...t.fields.subagentRunId!=null&&{subagentRunId:t.fields.subagentRunId}};return n?.event(`TRANSFORM`,`REASONING_MESSAGE_END`,e,{messageId:e.messageId}),[e]}}},a=()=>[...r.keys()].flatMap(e=>i(e)),o=(e,t)=>{for(let[n,i]of r)if(i.kind===e&&r_(i)===t)return{owner:n}},s=(e,t,n,i,a)=>{if(t!==void 0){let r=o(e,t);if(r){if(n!==void 0&&n!==r.owner)throw Error(`Cannot continue ${a} '${t}': chunk subagentRunId '${n}' does not match the open stream's subagent '${r.owner??`(the parent agent)`}'.`);return r.owner}return n}if(n!==void 0)return n;if(r.get(void 0)?.kind===e)return;let s=[...r.entries()].filter(([,t])=>t.kind===e);if(s.length===1)return s[0][0];if(s.length>1)throw Error(`Ambiguous ${i}: it carries neither a ${i_(e)} nor a subagentRunId, but ${s.length} lanes have an open ${a}. Attribute the chunk to the subagent it belongs to.`)};return t.pipe(bf(e=>{switch(e.type){case B.TEXT_MESSAGE_START:case B.TEXT_MESSAGE_CONTENT:case B.TEXT_MESSAGE_END:case B.TOOL_CALL_START:case B.TOOL_CALL_ARGS:case B.TOOL_CALL_END:case B.TOOL_CALL_RESULT:case B.STATE_SNAPSHOT:case B.STATE_DELTA:case B.CUSTOM:case B.STEP_STARTED:case B.STEP_FINISHED:case B.THINKING_START:case B.THINKING_END:case B.THINKING_TEXT_MESSAGE_START:case B.THINKING_TEXT_MESSAGE_CONTENT:case B.THINKING_TEXT_MESSAGE_END:case B.REASONING_START:case B.REASONING_MESSAGE_START:case B.REASONING_MESSAGE_CONTENT:case B.REASONING_MESSAGE_END:case B.REASONING_END:return[...i(e.subagentRunId??void 0),e];case B.RUN_STARTED:case B.RUN_FINISHED:case B.RUN_ERROR:case B.MESSAGES_SNAPSHOT:return[...a(),e];case B.RAW:case B.ACTIVITY_SNAPSHOT:case B.ACTIVITY_DELTA:case B.REASONING_ENCRYPTED_VALUE:case B.SUBAGENT_STARTED:return[e];case B.SUBAGENT_FINISHED:case B.SUBAGENT_ERROR:{let t=e.subagentRunId;return t==null?[e]:[...i(t),e]}case B.TEXT_MESSAGE_CHUNK:{let t=e,a=s(`text`,t.messageId,t.subagentRunId??void 0,`TEXT_MESSAGE_CHUNK`,`text message`),o=r.get(a),c=[],l;if(o?.kind===`text`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First TEXT_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,name:t.name,subagentRunId:t.subagentRunId},r.set(a,{kind:`text`,fields:l});let e=a_({type:B.TEXT_MESSAGE_START,messageId:t.messageId,role:t.role||`assistant`,...t.name!==void 0&&{name:t.name},...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TEXT_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TEXT_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.TEXT_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case B.TOOL_CALL_CHUNK:{let t=e,a=s(`tool`,t.toolCallId,t.subagentRunId??void 0,`TOOL_CALL_CHUNK`,`tool call`),o=r.get(a),c=[],l;if(o?.kind===`tool`&&(t.toolCallId===void 0||t.toolCallId===o.fields.toolCallId))l=o.fields;else{if(c.push(...i(a)),t.toolCallId===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallId`);if(t.toolCallName===void 0)throw Error(`First TOOL_CALL_CHUNK must have a toolCallName`);l={toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`tool`,fields:l});let e=a_({type:B.TOOL_CALL_START,toolCallId:t.toolCallId,toolCallName:t.toolCallName,parentMessageId:t.parentMessageId,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`TOOL_CALL_START`,e,{toolCallId:t.toolCallId,toolCallName:t.toolCallName})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`TOOL_CALL_ARGS`,r,{toolCallId:l.toolCallId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.TOOL_CALL_ARGS,toolCallId:l.toolCallId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}case B.REASONING_MESSAGE_CHUNK:{let t=e,a=s(`reasoning`,t.messageId,t.subagentRunId??void 0,`REASONING_MESSAGE_CHUNK`,`reasoning message`),o=r.get(a),c=[],l;if(o?.kind===`reasoning`&&(t.messageId===void 0||t.messageId===o.fields.messageId))l=o.fields;else{if(c.push(...i(a)),t.messageId===void 0)throw Error(`First REASONING_MESSAGE_CHUNK must have a messageId`);l={messageId:t.messageId,subagentRunId:t.subagentRunId},r.set(a,{kind:`reasoning`,fields:l});let e=a_({type:B.REASONING_MESSAGE_START,messageId:t.messageId,role:`reasoning`,...t.subagentRunId!=null&&{subagentRunId:t.subagentRunId}},t);c.push(e),n?.event(`TRANSFORM`,`REASONING_MESSAGE_START`,e,{messageId:t.messageId})}if(t.delta!==void 0){let e=t.subagentRunId??l.subagentRunId,r=a_({type:B.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:t.delta,...e!=null&&{subagentRunId:e}},t);c.push(r),n?.event(`TRANSFORM`,`REASONING_MESSAGE_CONTENT`,r,{messageId:l.messageId})}if(c.length===0&&t.metadata!==void 0){let e=t.subagentRunId??l.subagentRunId;c.push({type:B.REASONING_MESSAGE_CONTENT,messageId:l.messageId,delta:``,metadata:t.metadata,...e!=null&&{subagentRunId:e}})}return c}}return e.type,[]}),Df(()=>{a()}))};function s_(e,t=new Date){return e.expiresAt!==void 0&&new Date(e.expiresAt)<=t}var c_=class{runNext(e,t){return t.run(e).pipe(o_(!1))}runNextWithState(e,t){let n=Ng(e.messages||[]),r=Ng(e.state||{}),i=new Pd;return Gg(e,i,t,[]).subscribe(e=>{e.messages!==void 0&&(n=e.messages),e.state!==void 0&&(r=e.state)}),this.runNext(e,t).pipe(Tf(async e=>(i.next(e),await new Promise(e=>setTimeout(e,0)),{event:e,messages:Ng(n),state:Ng(r)})))}},l_=class extends c_{constructor(e){super(),this.fn=e}run(e,t){return this.fn(e,t)}};function u_(e){let t=e.content;if(Array.isArray(t)){let n=t.filter(e=>typeof e==`object`&&!!e&&`type`in e&&e.type===`text`&&typeof e.text==`string`).map(e=>e.text).join(``);return{...e,content:n}}return typeof t==`string`?e:{...e,content:``}}var d_=class extends c_{run(e,t){let{parentRunId:n,...r}=e,i={...r,messages:r.messages.map(u_)};return this.runNext(i,t)}},f_=`THINKING_START`,p_=`THINKING_END`,m_=`THINKING_TEXT_MESSAGE_START`,h_=`THINKING_TEXT_MESSAGE_CONTENT`,g_=`THINKING_TEXT_MESSAGE_END`,__=class extends c_{constructor(...e){super(...e),this.currentReasoningId=null,this.currentMessageId=null}warnAboutTransformation(e,t){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is converting ${e} to ${t}. To remove this warning, upgrade your AG-UI integration package (e.g. @ag-ui/langgraph). To surpress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){return this.currentReasoningId=null,this.currentMessageId=null,this.runNext(e,t).pipe(vf(e=>this.transformEvent(e)))}transformEvent(e){switch(e.type){case f_:{this.currentReasoningId=Pg();let{title:t,...n}=e;return this.warnAboutTransformation(f_,B.REASONING_START),{...n,type:B.REASONING_START,messageId:this.currentReasoningId}}case m_:return this.currentMessageId=Pg(),this.warnAboutTransformation(m_,B.REASONING_MESSAGE_START),{...e,type:B.REASONING_MESSAGE_START,messageId:this.currentMessageId,role:`assistant`};case h_:{let{delta:t,...n}=e;return this.warnAboutTransformation(h_,B.REASONING_MESSAGE_CONTENT),{...n,type:B.REASONING_MESSAGE_CONTENT,messageId:this.currentMessageId??Pg(),delta:t}}case g_:{let t=this.currentMessageId??Pg();return this.warnAboutTransformation(g_,B.REASONING_MESSAGE_END),{...e,type:B.REASONING_MESSAGE_END,messageId:t}}case p_:{let t=this.currentReasoningId??Pg();return this.warnAboutTransformation(p_,B.REASONING_END),{...e,type:B.REASONING_END,messageId:t}}default:return e}}};function v_(e){return e.startsWith(`image/`)?`image`:e.startsWith(`audio/`)?`audio`:e.startsWith(`video/`)?`video`:`document`}function y_(e){return typeof e==`object`&&!!e&&`type`in e&&e.type===`binary`&&`mimeType`in e&&typeof e.mimeType==`string`}function b_(e){let t=v_(e.mimeType);return e.data?{type:t,source:{type:`data`,value:e.data,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e.url?{type:t,source:{type:`url`,value:e.url,mimeType:e.mimeType},...e.filename?{metadata:{filename:e.filename}}:{}}:e}function x_(e){let t=e.content;if(!Array.isArray(t))return e;let n=t.map(e=>y_(e)?b_(e):e);return{...e,content:n}}var S_=class extends c_{run(e,t){let n={...e,messages:e.messages.map(x_)};return this.runNext(n,t)}},C_=`SUBAGENT_STARTED`,w_=`SUBAGENT_FINISHED`,T_=`SUBAGENT_ERROR`;function E_(e){if(e&&typeof e==`object`&&`subagentRunId`in e){let{subagentRunId:t,...n}=e;return n}return e}function D_(e){return e.map(e=>E_(e))}var O_=class extends c_{warnDroppedLifecycleEvent(e){typeof process<`u`&&{}.SUPPRESS_TRANSFORMATION_WARNINGS||console.warn(`AG-UI is dropping ${e} because the target agent predates subagent support. To remove this warning, upgrade your AG-UI integration package. To suppress it, set SUPPRESS_TRANSFORMATION_WARNINGS=true in your .env file.`)}run(e,t){let n={...e,messages:(e.messages??[]).map(e=>E_(e))};return this.runNext(n,t).pipe(Af(e=>{let t=e.type;(t===C_||t===w_||t===T_)&&this.warnDroppedLifecycleEvent(t)}),Cf(e=>{let t=e.type;return t!==C_&&t!==w_&&t!==T_}),vf(e=>{let t=E_(e);if(t.type===B.MESSAGES_SNAPSHOT){let e=t;if(Array.isArray(e.messages))return{...e,messages:D_(e.messages)}}if(t.type===B.RUN_FINISHED){let e=t;if(e.outcome&&Array.isArray(e.outcome.interrupts))return{...e,outcome:{...e.outcome,interrupts:e.outcome.interrupts.map(e=>E_(e))}}}if(t.type===B.RUN_STARTED){let e=t;if(e.input&&Array.isArray(e.input.messages))return{...e,input:{...e.input,messages:D_(e.input.messages)}}}return t}))}},k_=`0.0.59`,A_=class{get maxVersion(){return k_}get debug(){return this._debug}set debug(e){this._debug=zg(e),this._debugLogger=Hg(this._debug)}get debugLogger(){return this._debugLogger}set debugLogger(e){this._debugLogger=typeof e==`boolean`?e?Hg(zg(!0)):void 0:e}constructor({agentId:e,description:t,threadId:n,initialMessages:r,initialState:i,debug:a}={}){this.subscribers=[],this.isRunning=!1,this.pendingInterrupts=[],this.middlewares=[],this.agentId=e,this.description=t??``,this.threadId=n??Go(),this.messages=Ng(r??[]),this.state=Ng(i??{}),this._debug=zg(a),this._debugLogger=Hg(this._debug),Mg(this.maxVersion,`0.0.39`)<=0&&this.middlewares.unshift(new d_),Mg(this.maxVersion,`0.0.45`)<=0&&this.middlewares.unshift(new __),Mg(this.maxVersion,`0.0.47`)<=0&&this.middlewares.unshift(new S_),Mg(this.maxVersion,`0.0.57`)<=0&&this.middlewares.unshift(new O_)}subscribe(e){return this.subscribers.push(e),{unsubscribe:()=>{this.subscribers=this.subscribers.filter(t=>t!==e)}}}use(...e){let t=e.map(e=>typeof e==`function`?new l_(e):e);return this.middlewares.push(...t),this}async runAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e);this.debugLogger?.lifecycle(`LIFECYCLE`,`Run started:`,{agentId:this.agentId,threadId:this.threadId});let r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new jd;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await _f(bd(()=>this.middlewares.length===0?this.run(n):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(n),o_(this.debugLogger),Kg(this.debugLogger),e=>e.pipe(kf(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),wf(e=>(this.debugLogger?.lifecycle(`LIFECYCLE`,`Run errored:`,{agentId:this.agentId,error:e instanceof Error?e.message:String(e)}),this.isRunning=!1,this.onError(n,e,a))),Df(()=>{this.debugLogger?.lifecycle(`LIFECYCLE`,`Run finished:`,{agentId:this.agentId,threadId:this.threadId}),this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(hf(null)));let s=Ng(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}connect(e){throw new Qc}async connectAgent(e,t){try{this.isRunning=!0,this.agentId=this.agentId??Go();let n=this.prepareRunAgentInput(e),r,i=new Set(this.messages.map(e=>e.id)),a=[{onRunFinishedEvent:e=>{e.outcome===`success`&&(r=e.result)}},...this.subscribers,t??{}];await this.onInitialize(n,a),this.activeRunDetach$=new jd;let o;this.activeRunCompletionPromise=new Promise(e=>{o=e}),await _f(bd(()=>Sf(()=>this.connect(n)),o_(this.debugLogger),Kg(this.debugLogger),e=>e.pipe(kf(this.activeRunDetach$)),e=>this.apply(n,e,a),e=>this.processApplyEvents(n,e,a),wf(e=>(this.isRunning=!1,e instanceof Qc?Fd:this.onError(n,e,a))),Df(()=>{this.isRunning=!1,this.onFinalize(n,a),o?.(),o=void 0,this.activeRunCompletionPromise=void 0,this.activeRunDetach$=void 0}))(hf(null)),{defaultValue:void 0});let s=Ng(this.messages).filter(e=>!i.has(e.id));return{result:r,newMessages:s}}finally{this.isRunning=!1}}abortRun(){}async detachActiveRun(){if(!this.activeRunDetach$)return;let e=this.activeRunCompletionPromise??Promise.resolve();this.activeRunDetach$.next(),this.activeRunDetach$?.complete(),await e}apply(e,t,n){return Gg(e,t,this,n,this.debugLogger)}processApplyEvents(e,t,n){return t.pipe(Af(t=>{t.messages&&(this.messages=t.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),t.state&&(this.state=t.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}))}prepareRunAgentInput(e){let t=Ng(this.messages);for(let e of t)e.subagentRunId===null&&delete e.subagentRunId;let n=t.filter(e=>e.role!==`activity`);return{threadId:this.threadId,runId:e?.runId||Go(),tools:Ng(e?.tools??[]),context:Ng(e?.context??[]),forwardedProps:Ng(e?.forwardedProps??{}),state:Ng(this.state),messages:n,...e?.resume===void 0?{}:{resume:Ng(e.resume)}}}async onInitialize(e,t){if(this.pendingInterrupts.length>0){let t=new Set((e.resume??[]).map(e=>e.interruptId)),n=this.pendingInterrupts.map(e=>e.id).filter(e=>!t.has(e));if(n.length>0)throw new z(`Thread has ${n.length} pending interrupt(s) not addressed by resume: ${n.join(`, `)}`);for(let e of this.pendingInterrupts)if(s_(e))throw new z(`Interrupt ${e.id} expired at ${e.expiresAt}`)}let n=await Rg(t,this.messages,this.state,(t,n,r)=>t.onRunInitialized?.({messages:n,state:r,agent:this,input:e}));if(n.messages!==void 0||n.state!==void 0){if(n.messages){this.messages=n.messages;for(let e of n.messages)e.subagentRunId===null&&delete e.subagentRunId;e.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})}n.state&&(this.state=n.state,e.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))}}onError(e,t,n){return mf(Rg(n,this.messages,this.state,(n,r,i)=>n.onRunFailed?.({error:t,messages:r,state:i,agent:this,input:e}))).pipe(vf(r=>{let i=r;if((i.messages!==void 0||i.state!==void 0)&&(i.messages!==void 0&&(this.messages=i.messages,n.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),i.state!==void 0&&(this.state=i.state,n.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})}))),i.stopPropagation!==!0){let e=String(t);if(t.name!==`AbortError`&&t.message!==`Fetch is aborted`&&t.message!==`signal is aborted without reason`&&t.message!==`component unmounted`&&e!==`component unmounted`)throw console.error(`Agent execution failed:`,t),t}return{}}))}async onFinalize(e,t){let n=await Rg(t,this.messages,this.state,(t,n,r)=>t.onRunFinalized?.({messages:n,state:r,agent:this,input:e}));(n.messages!==void 0||n.state!==void 0)&&(n.messages!==void 0&&(this.messages=n.messages,t.forEach(t=>{t.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this,input:e})})),n.state!==void 0&&(this.state=n.state,t.forEach(t=>{t.onStateChanged?.({state:this.state,messages:this.messages,agent:this,input:e})})))}clone(){let e=Object.create(Object.getPrototypeOf(this));return e.agentId=this.agentId,e.description=this.description,e.threadId=this.threadId,e.messages=Ng(this.messages),e.state=Ng(this.state),e._debug=this._debug,e._debugLogger=this._debugLogger,e.isRunning=this.isRunning,e.subscribers=[...this.subscribers],e.middlewares=[...this.middlewares],e.pendingInterrupts=Ng(this.pendingInterrupts),e}addMessage(e){this.messages.push(e),(async()=>{for(let t of this.subscribers)await t.onNewMessage?.({message:e,messages:this.messages,state:this.state,agent:this});if(e.role===`assistant`&&e.toolCalls)for(let t of e.toolCalls)for(let e of this.subscribers)await e.onNewToolCall?.({toolCall:t,messages:this.messages,state:this.state,agent:this});for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}addMessages(e){this.messages.push(...e),(async()=>{for(let t of e){for(let e of this.subscribers)await e.onNewMessage?.({message:t,messages:this.messages,state:this.state,agent:this});if(t.role===`assistant`&&t.toolCalls)for(let e of t.toolCalls)for(let t of this.subscribers)await t.onNewToolCall?.({toolCall:e,messages:this.messages,state:this.state,agent:this})}for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setMessages(e){this.messages=Ng(e),(async()=>{for(let e of this.subscribers)await e.onMessagesChanged?.({messages:this.messages,state:this.state,agent:this})})()}setState(e){this.state=Ng(e),(async()=>{for(let e of this.subscribers)await e.onStateChanged?.({messages:this.messages,state:this.state,agent:this})})()}legacy_to_be_removed_runAgentBridged(e){this.agentId=this.agentId??Go();let t=this.prepareRunAgentInput(e);return(this.middlewares.length===0?this.run(t):this.middlewares.reduceRight((e,t)=>({run:n=>t.run(n,e),get messages(){return e.messages},get state(){return e.state}}),this).run(t)).pipe(o_(this.debugLogger),Kg(this.debugLogger),t_(this.threadId,t.runId,this.agentId),e=>e.pipe(vf(e=>(this.debugLogger?.event(`LEGACY`,`Event:`,e,{type:e.type}),e))))}};function j_(e){if(!Array.isArray(e.messages))return e;let t=!1,n=e.messages.map(e=>{if(e.subagentRunId===null){t=!0;let n={...e};return delete n.subagentRunId,n}return e});return t?{...e,messages:n}:e}var M_=class extends A_{requestInit(e){return{method:`POST`,headers:{...this.headers,"Content-Type":`application/json`,Accept:`text/event-stream`},body:JSON.stringify(j_(e)),signal:this.abortController.signal}}runAgent(e,t){return this.abortController=e?.abortController??new AbortController,super.runAgent(e,t)}abortRun(){this.abortController.abort(),super.abortRun()}constructor(e){super(e),this.abortController=new AbortController,this.url=e.url,this.headers=Ng(e.headers??{}),this.fetch=e.fetch??((e,t)=>fetch(e,t))}run(e){return Zg(Jg(()=>this.fetch(this.url,this.requestInit(e))),this.debugLogger)}clone(){let e=super.clone();e.url=this.url,e.headers=Ng(this.headers??{}),e.fetch=this.fetch;let t=new AbortController,n=this.abortController.signal;return n.aborted&&t.abort(n.reason),e.abortController=t,e}},N_=class extends un{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,r=super.createResult(e,t),{isFetching:i,isRefetching:a,isError:o,isRefetchError:s}=r,c=n.fetchMeta?.fetchMore?.direction,l=o&&c===`forward`,u=i&&c===`forward`,d=o&&c===`backward`,f=i&&c===`backward`;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:Tn(t,n.data),hasPreviousPage:dn(t,n.data),isFetchNextPageError:l,isFetchingNextPage:u,isFetchPreviousPageError:d,isFetchingPreviousPage:f,isRefetchError:s&&!l&&!d,isRefetching:a&&!u&&!f}}},P_=class extends mn{#e;#t;#n;constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}build(e,t,n){let r=new xn({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(r),r}add(e){this.#e.add(e);let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:`added`,mutation:e})}remove(e){if(this.#e.delete(e)){let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t);if(n){if(n.length>1){let t=n.indexOf(e);t!==-1&&n.splice(t,1)}else n[0]===e&&this.#t.delete(t)}}}this.notify({type:`removed`,mutation:e})}canRun(e){let t=F_(e);if(typeof t==`string`){let n=this.#t.get(t)?.find(e=>e.state.status===`pending`);return!n||n===e}return!0}runNext(e){let t=F_(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Sn.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>On(t,e))}findAll(e={}){return this.getAll().filter(t=>On(e,t))}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Sn.batch(()=>Promise.all(e.map(e=>e.continue().catch(Dn))))}};function F_(e){return e.options.scope?.id}var I_=class extends mn{#e;constructor(e={}){super(),this.config=e,this.#e=new Map}build(e,t,n){let r=t.queryKey,i=t.queryHash??En(r,t),a=this.get(i);return a||(a=new vn({client:e,queryKey:r,queryHash:i,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(r)}),this.add(a)),a}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:`added`,query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Sn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>ln(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>ln(e,t)):t}notify(e){Sn.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Sn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},L_=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new I_,this.#t=e.mutationCache||new P_,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=yn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=fn.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#a--,this.#a===0&&(this.#o?.(),this.#o=void 0,this.#s?.(),this.#s=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:`fetching`}).length}isMutating(e){return this.#t.findAll({...e,status:`pending`}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),n=this.#e.build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(qt(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,n){let r=this.defaultQueryOptions({queryKey:e}),i=this.#e.get(r.queryHash)?.state.data,a=pn(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Sn.batch(()=>this.#e.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,n)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){let t=this.#e;Sn.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Sn.batch(()=>{let r=n.findAll(e),i=new Set(r);return r.forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,predicate:e=>i.has(e)},t)})}cancelQueries(e,t={}){let n={revert:!0,...t},r=Sn.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(Dn).catch(Dn)}invalidateQueries(e,t={}){return Sn.batch(()=>(this.#e.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType===`none`?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??`active`},t)))}refetchQueries(e,t={}){let n={...t,cancelRefetch:t.cancelRefetch??!0},r=Sn.batch(()=>this.#e.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,n);return n.throwOnError||(t=t.catch(Dn)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(Dn)}async query(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t),r=n.isStaleByTime(qt(t.staleTime,n))?await n.fetch(t):n.state.data,i=t.select;return i?i(r):r}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(qt(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Dn).catch(Dn)}infiniteQuery(e){return e._type=`infinite`,this.query(e)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Dn).catch(Dn)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return fn.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#r.set(sn(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{on(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(sn(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{on(e,t.mutationKey)&&Object.assign(n,t.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||=En(t.queryKey,t),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!==`always`),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode=`offlineFirst`),t.queryFn===Yt&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};function R_(e,t){return cn(e,N_,t)}var z_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,44H160a43.86,43.86,0,0,0-32,13.85A43.86,43.86,0,0,0,96,44H24A12,12,0,0,0,12,56V200a12,12,0,0,0,12,12H96a20,20,0,0,1,20,20,12,12,0,0,0,24,0,20,20,0,0,1,20-20h72a12,12,0,0,0,12-12V56A12,12,0,0,0,232,44ZM96,188H36V68H96a20,20,0,0,1,20,20V192.81A43.79,43.79,0,0,0,96,188Zm124,0H160a43.71,43.71,0,0,0-20,4.83V88a20,20,0,0,1,20-20h60Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,56V200H160a32,32,0,0,0-32,32,32,32,0,0,0-32-32H24V56H96a32,32,0,0,1,32,32,32,32,0,0,1,32-32Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240,56V200a8,8,0,0,1-8,8H160a24,24,0,0,0-24,23.94,7.9,7.9,0,0,1-5.12,7.55A8,8,0,0,1,120,232a24,24,0,0,0-24-24H24a8,8,0,0,1-8-8V56a8,8,0,0,1,8-8H88a32,32,0,0,1,32,32v87.73a8.17,8.17,0,0,0,7.47,8.25,8,8,0,0,0,8.53-8V80a32,32,0,0,1,32-32h64A8,8,0,0,1,240,56Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,50H160a38,38,0,0,0-32,17.55A38,38,0,0,0,96,50H24a6,6,0,0,0-6,6V200a6,6,0,0,0,6,6H96a26,26,0,0,1,26,26,6,6,0,0,0,12,0,26,26,0,0,1,26-26h72a6,6,0,0,0,6-6V56A6,6,0,0,0,232,50ZM96,194H30V62H96a26,26,0,0,1,26,26V204.31A37.86,37.86,0,0,0,96,194Zm130,0H160a37.87,37.87,0,0,0-26,10.32V88a26,26,0,0,1,26-26h66Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,48H160a40,40,0,0,0-32,16A40,40,0,0,0,96,48H24a8,8,0,0,0-8,8V200a8,8,0,0,0,8,8H96a24,24,0,0,1,24,24,8,8,0,0,0,16,0,24,24,0,0,1,24-24h72a8,8,0,0,0,8-8V56A8,8,0,0,0,232,48ZM96,192H32V64H96a24,24,0,0,1,24,24V200A39.81,39.81,0,0,0,96,192Zm128,0H160a39.81,39.81,0,0,0-24,8V88a24,24,0,0,1,24-24h64Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232,52H160a36,36,0,0,0-32,19.54A36,36,0,0,0,96,52H24a4,4,0,0,0-4,4V200a4,4,0,0,0,4,4H96a28,28,0,0,1,28,28,4,4,0,0,0,8,0,28,28,0,0,1,28-28h72a4,4,0,0,0,4-4V56A4,4,0,0,0,232,52ZM96,196H28V60H96a28,28,0,0,1,28,28V209.4A35.93,35.93,0,0,0,96,196Zm132,0H160a35.94,35.94,0,0,0-28,13.41V88a28,28,0,0,1,28-28h68Z`}))]]),B_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.49,215.51,185,168a92.12,92.12,0,1,0-17,17l47.53,47.54a12,12,0,0,0,17-17ZM44,112a68,68,0,1,1,68,68A68.07,68.07,0,0,1,44,112Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M192,112a80,80,0,1,1-80-80A80,80,0,0,1,192,112Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M229.66,218.34,179.6,168.28a88.21,88.21,0,1,0-11.32,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M168,112a56,56,0,1,1-56-56A56,56,0,0,1,168,112Zm61.66,117.66a8,8,0,0,1-11.32,0l-50.06-50.07a88,88,0,1,1,11.32-11.31l50.06,50.06A8,8,0,0,1,229.66,229.66ZM112,184a72,72,0,1,0-72-72A72.08,72.08,0,0,0,112,184Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M228.24,219.76l-51.38-51.38a86.15,86.15,0,1,0-8.48,8.48l51.38,51.38a6,6,0,0,0,8.48-8.48ZM38,112a74,74,0,1,1,74,74A74.09,74.09,0,0,1,38,112Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M226.83,221.17l-52.7-52.7a84.1,84.1,0,1,0-5.66,5.66l52.7,52.7a4,4,0,0,0,5.66-5.66ZM36,112a76,76,0,1,1,76,76A76.08,76.08,0,0,1,36,112Z`}))]]),V_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.37,139.4a12,12,0,0,0-12-3A84.07,84.07,0,0,1,119.6,31.59a12,12,0,0,0-15-15A108.86,108.86,0,0,0,49.69,55.07,108,108,0,0,0,136,228a107.09,107.09,0,0,0,64.93-21.69,108.86,108.86,0,0,0,38.44-54.94A12,12,0,0,0,236.37,139.4Zm-49.88,47.74A84,84,0,0,1,68.86,69.51,84.93,84.93,0,0,1,92.27,48.29Q92,52.13,92,56A108.12,108.12,0,0,0,200,164q3.87,0,7.71-.27A84.79,84.79,0,0,1,186.49,187.14Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.89,147.89A96,96,0,1,1,108.11,28.11,96.09,96.09,0,0,0,227.89,147.89Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M235.54,150.21a104.84,104.84,0,0,1-37,52.91A104,104,0,0,1,32,120,103.09,103.09,0,0,1,52.88,57.48a104.84,104.84,0,0,1,52.91-37,8,8,0,0,1,10,10,88.08,88.08,0,0,0,109.8,109.8,8,8,0,0,1,10,10Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M232.13,143.64a6,6,0,0,0-6-1.49A90.07,90.07,0,0,1,113.86,29.85a6,6,0,0,0-7.49-7.48A102.88,102.88,0,0,0,54.48,58.68,102,102,0,0,0,197.32,201.52a102.88,102.88,0,0,0,36.31-51.89A6,6,0,0,0,232.13,143.64Zm-42,48.29a90,90,0,0,1-126-126A90.9,90.9,0,0,1,99.65,37.66,102.06,102.06,0,0,0,218.34,156.35,90.9,90.9,0,0,1,190.1,191.93Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M233.54,142.23a8,8,0,0,0-8-2,88.08,88.08,0,0,1-109.8-109.8,8,8,0,0,0-10-10,104.84,104.84,0,0,0-52.91,37A104,104,0,0,0,136,224a103.09,103.09,0,0,0,62.52-20.88,104.84,104.84,0,0,0,37-52.91A8,8,0,0,0,233.54,142.23ZM188.9,190.34A88,88,0,0,1,65.66,67.11a89,89,0,0,1,31.4-26A106,106,0,0,0,96,56,104.11,104.11,0,0,0,200,160a106,106,0,0,0,14.92-1.06A89,89,0,0,1,188.9,190.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.72,145.06a4,4,0,0,0-4-1A92.08,92.08,0,0,1,111.94,29.27a4,4,0,0,0-5-5A100.78,100.78,0,0,0,56.08,59.88a100,100,0,0,0,140,140,100.78,100.78,0,0,0,35.59-50.87A4,4,0,0,0,230.72,145.06ZM191.3,193.53A92,92,0,0,1,62.47,64.7a93,93,0,0,1,39.88-30.35,100.09,100.09,0,0,0,119.3,119.3A93,93,0,0,1,191.3,193.53Z`}))]]),H_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z`}))]]),U_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M240.49,15.51a12,12,0,0,0-17,0L173.94,65.09l-2.54-2.55a36.05,36.05,0,0,0-50.91,0L100,83l-3.51-3.52a12,12,0,0,0-17,17L83,100,62.54,120.49a36,36,0,0,0,0,50.91l2.55,2.54L15.51,223.51a12,12,0,0,0,17,17l49.57-49.58,2.54,2.55a36.06,36.06,0,0,0,50.91,0L156,173l3.51,3.52a12,12,0,0,0,17-17L173,156l20.49-20.49a36,36,0,0,0,0-50.91l-2.55-2.54,49.58-49.57A12,12,0,0,0,240.49,15.51Zm-121.95,161a12,12,0,0,1-17,0L79.51,154.43a12,12,0,0,1,0-17L100,117l39,39Zm58-57.95h0L156,139l-39-39,20.49-20.49a12,12,0,0,1,17,0l22.06,22.06a12,12,0,0,1,0,17ZM85.27,33.37a12,12,0,0,1,21.46-10.74l8,16A12,12,0,1,1,93.27,49.37Zm-68,57.26a12,12,0,0,1,16.1-5.36l16,8a12,12,0,1,1-10.74,21.46l-16-8A12,12,0,0,1,17.27,90.63Zm221.46,74.74a12,12,0,0,1-16.1,5.36l-16-8a12,12,0,0,1,10.74-21.46l16,8A12,12,0,0,1,238.73,165.37Zm-68,57.26a12,12,0,1,1-21.46,10.74l-8-16a12,12,0,0,1,21.46-10.74Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M185,127,127,185a24,24,0,0,1-33.94,0L71,162.91A24,24,0,0,1,71,129L129,71a24,24,0,0,1,33.94,0L185,93.09A24,24,0,0,1,185,127Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32.06,32.06,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94h0L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22a16,16,0,0,1,0,22.63ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM29,103.43l20,8A8,8,0,1,0,55,96.57l-20-8A8,8,0,0,0,29,103.43ZM227,152.57l-20-8A8,8,0,1,0,201,159.43l20,8A8,8,0,0,0,227,152.57ZM159.43,201A8,8,0,0,0,144.57,207l8,20A8,8,0,1,0,167.43,221ZM237.91,18.52a8,8,0,0,0-11.5-.18L174,70.75l-5.38-5.38a32,32,0,0,0-45.28,0L106.14,82.54a4,4,0,0,0,0,5.66l61.7,61.66a4,4,0,0,0,5.66,0l16.74-16.74a32.76,32.76,0,0,0,9.81-22.52,31.82,31.82,0,0,0-9.37-23.17l-5.38-5.37,52.2-52.17A8.22,8.22,0,0,0,237.91,18.52ZM85.64,90.34a8,8,0,0,0-11.49.18,8.22,8.22,0,0,0,.41,11.37L80.67,108,65.34,123.31A31.82,31.82,0,0,0,56,146.47,32.75,32.75,0,0,0,65.77,169l5,4.94L18.49,226.13a8.21,8.21,0,0,0-.61,11.1,8,8,0,0,0,11.72.43L82,185.25l5.37,5.38a32.1,32.1,0,0,0,45.29,0L148,175.31l6.34,6.35a8,8,0,0,0,11.32-11.32Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M236.24,19.76a6,6,0,0,0-8.48,0L173.94,73.57l-6.79-6.78a30,30,0,0,0-42.42,0L100,91.51l-7.76-7.75a6,6,0,0,0-8.48,8.48L91.51,100,66.79,124.73a30,30,0,0,0,0,42.42l6.78,6.79L19.76,227.76a6,6,0,1,0,8.48,8.48l53.82-53.81,6.79,6.78a30,30,0,0,0,42.42,0L156,164.49l7.76,7.75a6,6,0,0,0,8.48-8.48L164.49,156l24.72-24.73a30,30,0,0,0,0-42.42l-6.78-6.79,53.81-53.82A6,6,0,0,0,236.24,19.76Zm-113.45,161a18,18,0,0,1-25.46,0L75.27,158.67a18,18,0,0,1,0-25.46L100,108.49,147.51,156Zm57.94-57.94L156,147.51,108.49,100l24.72-24.73a18,18,0,0,1,25.46,0l22.06,22.06a18,18,0,0,1,0,25.46ZM90.43,34.23a6,6,0,0,1,11.14-4.46l8,20a6,6,0,1,1-11.14,4.46Zm-64,59.54a6,6,0,0,1,7.8-3.34l20,8a6,6,0,1,1-4.46,11.14l-20-8A6,6,0,0,1,26.43,93.77Zm203.14,68.46a6,6,0,0,1-7.8,3.34l-20-8a6,6,0,0,1,4.46-11.14l20,8A6,6,0,0,1,229.57,162.23Zm-64,59.54a6,6,0,1,1-11.14,4.46l-8-20a6,6,0,0,1,11.14-4.46Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M237.66,18.34a8,8,0,0,0-11.32,0l-52.4,52.41-5.37-5.38a32.05,32.05,0,0,0-45.26,0L100,88.69l-6.34-6.35A8,8,0,0,0,82.34,93.66L88.69,100,65.37,123.31a32,32,0,0,0,0,45.26l5.38,5.37-52.41,52.4a8,8,0,0,0,11.32,11.32l52.4-52.41,5.37,5.38a32,32,0,0,0,45.26,0L156,167.31l6.34,6.35a8,8,0,0,0,11.32-11.32L167.31,156l23.32-23.31a32,32,0,0,0,0-45.26l-5.38-5.37,52.41-52.4A8,8,0,0,0,237.66,18.34Zm-116.29,161a16,16,0,0,1-22.62,0L76.69,157.25a16,16,0,0,1,0-22.62L100,111.31,144.69,156Zm57.94-57.94L156,144.69,111.31,100l23.32-23.31a16,16,0,0,1,22.62,0l22.06,22A16,16,0,0,1,179.31,121.37ZM88.57,35A8,8,0,0,1,103.43,29l8,20A8,8,0,0,1,96.57,55ZM24.57,93A8,8,0,0,1,35,88.57l20,8A8,8,0,0,1,49,111.43l-20-8A8,8,0,0,1,24.57,93ZM231.43,163a8,8,0,0,1-10.4,4.46l-20-8A8,8,0,1,1,207,144.57l20,8A8,8,0,0,1,231.43,163Zm-64,58.06A8,8,0,0,1,152.57,227l-8-20A8,8,0,0,1,159.43,201Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M234.83,21.17a4,4,0,0,0-5.66,0L173.94,76.4l-8.2-8.2a28,28,0,0,0-39.6,0L100,94.34l-9.17-9.17a4,4,0,0,0-5.66,5.66L94.34,100,68.2,126.14a28,28,0,0,0,0,39.6l8.2,8.2L21.17,229.17a4,4,0,0,0,5.66,5.66L82.06,179.6l8.2,8.2a28,28,0,0,0,39.6,0L156,161.66l9.17,9.17a4,4,0,0,0,5.66-5.66L161.66,156l26.14-26.14a28,28,0,0,0,0-39.6l-8.2-8.2,55.23-55.23A4,4,0,0,0,234.83,21.17Zm-110.63,161a20,20,0,0,1-28.28,0L73.86,160.08a20,20,0,0,1,0-28.28L100,105.66,150.34,156Zm57.94-57.94L156,150.34,105.66,100,131.8,73.86a20,20,0,0,1,28.28,0l22.06,22.06A20,20,0,0,1,182.14,124.2ZM92.29,33.49a4,4,0,1,1,7.42-3l8,20a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,104,56a4,4,0,0,1-3.71-2.51Zm-64,61a4,4,0,0,1,5.2-2.22l20,8A4,4,0,0,1,52,108a3.91,3.91,0,0,1-1.49-.29l-20-8A4,4,0,0,1,28.29,94.51Zm199.42,67A4,4,0,0,1,224,164a3.91,3.91,0,0,1-1.49-.29l-20-8a4,4,0,1,1,3-7.42l20,8A4,4,0,0,1,227.71,161.49Zm-64,61a4,4,0,0,1-2.22,5.2A3.91,3.91,0,0,1,160,228a4,4,0,0,1-3.71-2.51l-8-20a4,4,0,0,1,7.42-3Z`}))]]),W_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,216a12,12,0,0,1-12,12H48a12,12,0,0,1-12-12V40A12,12,0,0,1,48,28h64a12,12,0,0,1,0,24H60V204h52A12,12,0,0,1,124,216Zm108.49-96.49-40-40a12,12,0,0,0-17,17L195,116H112a12,12,0,0,0,0,24h83l-19.52,19.51a12,12,0,0,0,17,17l40-40A12,12,0,0,0,232.49,119.51Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M224,56V200a16,16,0,0,1-16,16H48V40H208A16,16,0,0,1,224,56Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40A8,8,0,0,0,176,88v32H112a8,8,0,0,0,0,16h64v32a8,8,0,0,0,13.66,5.66l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M118,216a6,6,0,0,1-6,6H48a6,6,0,0,1-6-6V40a6,6,0,0,1,6-6h64a6,6,0,0,1,0,12H54V210h58A6,6,0,0,1,118,216Zm110.24-92.24-40-40a6,6,0,0,0-8.48,8.48L209.51,122H112a6,6,0,0,0,0,12h97.51l-29.75,29.76a6,6,0,1,0,8.48,8.48l40-40A6,6,0,0,0,228.24,123.76Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,216a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V40a8,8,0,0,1,8-8h64a8,8,0,0,1,0,16H56V208h56A8,8,0,0,1,120,216Zm109.66-93.66-40-40a8,8,0,0,0-11.32,11.32L204.69,120H112a8,8,0,0,0,0,16h92.69l-26.35,26.34a8,8,0,0,0,11.32,11.32l40-40A8,8,0,0,0,229.66,122.34Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,216a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V40a4,4,0,0,1,4-4h64a4,4,0,0,1,0,8H52V212h60A4,4,0,0,1,116,216Zm110.83-90.83-40-40a4,4,0,0,0-5.66,5.66L214.34,124H112a4,4,0,0,0,0,8H214.34l-33.17,33.17a4,4,0,0,0,5.66,5.66l40-40A4,4,0,0,0,226.83,125.17Z`}))]]),G_=new Map([[`bold`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M116,36V20a12,12,0,0,1,24,0V36a12,12,0,0,1-24,0Zm80,92a68,68,0,1,1-68-68A68.07,68.07,0,0,1,196,128Zm-24,0a44,44,0,1,0-44,44A44.05,44.05,0,0,0,172,128ZM51.51,68.49a12,12,0,1,0,17-17l-12-12a12,12,0,0,0-17,17Zm0,119-12,12a12,12,0,0,0,17,17l12-12a12,12,0,1,0-17-17ZM196,72a12,12,0,0,0,8.49-3.51l12-12a12,12,0,0,0-17-17l-12,12A12,12,0,0,0,196,72Zm8.49,115.51a12,12,0,0,0-17,17l12,12a12,12,0,0,0,17-17ZM48,128a12,12,0,0,0-12-12H20a12,12,0,0,0,0,24H36A12,12,0,0,0,48,128Zm80,80a12,12,0,0,0-12,12v16a12,12,0,0,0,24,0V220A12,12,0,0,0,128,208Zm108-92H220a12,12,0,0,0,0,24h16a12,12,0,0,0,0-24Z`}))],[`duotone`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M184,128a56,56,0,1,1-56-56A56,56,0,0,1,184,128Z`,opacity:`0.2`}),w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`fill`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm8,24a64,64,0,1,0,64,64A64.07,64.07,0,0,0,128,64ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`light`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M122,40V16a6,6,0,0,1,12,0V40a6,6,0,0,1-12,0Zm68,88a62,62,0,1,1-62-62A62.07,62.07,0,0,1,190,128Zm-12,0a50,50,0,1,0-50,50A50.06,50.06,0,0,0,178,128ZM59.76,68.24a6,6,0,1,0,8.48-8.48l-16-16a6,6,0,0,0-8.48,8.48Zm0,119.52-16,16a6,6,0,1,0,8.48,8.48l16-16a6,6,0,1,0-8.48-8.48ZM192,70a6,6,0,0,0,4.24-1.76l16-16a6,6,0,0,0-8.48-8.48l-16,16A6,6,0,0,0,192,70Zm4.24,117.76a6,6,0,0,0-8.48,8.48l16,16a6,6,0,0,0,8.48-8.48ZM46,128a6,6,0,0,0-6-6H16a6,6,0,0,0,0,12H40A6,6,0,0,0,46,128Zm82,82a6,6,0,0,0-6,6v24a6,6,0,0,0,12,0V216A6,6,0,0,0,128,210Zm112-88H216a6,6,0,0,0,0,12h24a6,6,0,0,0,0-12Z`}))],[`regular`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M120,40V16a8,8,0,0,1,16,0V40a8,8,0,0,1-16,0Zm72,88a64,64,0,1,1-64-64A64.07,64.07,0,0,1,192,128Zm-16,0a48,48,0,1,0-48,48A48.05,48.05,0,0,0,176,128ZM58.34,69.66A8,8,0,0,0,69.66,58.34l-16-16A8,8,0,0,0,42.34,53.66Zm0,116.68-16,16a8,8,0,0,0,11.32,11.32l16-16a8,8,0,0,0-11.32-11.32ZM192,72a8,8,0,0,0,5.66-2.34l16-16a8,8,0,0,0-11.32-11.32l-16,16A8,8,0,0,0,192,72Zm5.66,114.34a8,8,0,0,0-11.32,11.32l16,16a8,8,0,0,0,11.32-11.32ZM48,128a8,8,0,0,0-8-8H16a8,8,0,0,0,0,16H40A8,8,0,0,0,48,128Zm80,80a8,8,0,0,0-8,8v24a8,8,0,0,0,16,0V216A8,8,0,0,0,128,208Zm112-88H216a8,8,0,0,0,0,16h24a8,8,0,0,0,0-16Z`}))],[`thin`,w.createElement(w.Fragment,null,w.createElement(`path`,{d:`M124,40V16a4,4,0,0,1,8,0V40a4,4,0,0,1-8,0Zm64,88a60,60,0,1,1-60-60A60.07,60.07,0,0,1,188,128Zm-8,0a52,52,0,1,0-52,52A52.06,52.06,0,0,0,180,128ZM61.17,66.83a4,4,0,0,0,5.66-5.66l-16-16a4,4,0,0,0-5.66,5.66Zm0,122.34-16,16a4,4,0,0,0,5.66,5.66l16-16a4,4,0,0,0-5.66-5.66ZM192,68a4,4,0,0,0,2.83-1.17l16-16a4,4,0,1,0-5.66-5.66l-16,16A4,4,0,0,0,192,68Zm2.83,121.17a4,4,0,0,0-5.66,5.66l16,16a4,4,0,0,0,5.66-5.66ZM40,124H16a4,4,0,0,0,0,8H40a4,4,0,0,0,0-8Zm88,88a4,4,0,0,0-4,4v24a4,4,0,0,0,8,0V216A4,4,0,0,0,128,212Zm112-88H216a4,4,0,0,0,0,8h24a4,4,0,0,0,0-8Z`}))]]),K_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:z_}));K_.displayName=`BookOpenIcon`;var q_=K_,J_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:B_}));J_.displayName=`MagnifyingGlassIcon`;var Y_=J_,X_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:V_}));X_.displayName=`MoonIcon`;var Z_=X_,Q_=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:H_}));Q_.displayName=`PencilSimpleIcon`;var $_=Q_,ev=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:U_}));ev.displayName=`PlugsConnectedIcon`;var tv=ev,nv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:W_}));nv.displayName=`SignOutIcon`;var rv=nv,iv=w.forwardRef((e,t)=>w.createElement(x,{ref:t,...e,weights:G_}));iv.displayName=`SunIcon`;var av=iv,ov={home:`https://fanout.run/start/what-fanout-is`,ingest:`https://fanout.run/start/send-telemetry`};async function sv(e,t){let n=new URLSearchParams({limit:`30`});e&&n.set(`q`,e),t&&n.set(`cursor`,t);let r=await De(`/api/agent/threads?${n}`);if(!r.ok)throw Error(`Unable to load chats (${r.status})`);return r.json()}function cv({agentAvailable:e,activeThreadID:t,activeDashboardID:n,autoFocusSearch:r=!1,onNewChat:i,onSelectThread:a,onDeletedThread:o,onSelectDashboard:s,onCreateDashboard:c,onInvestigateService:l,ref:u}){let d=nn(),[f,p]=(0,w.useState)(``),[m]=fa(f.trim(),250),[h,g]=(0,w.useState)(null),[_,v]=(0,w.useState)(null),[b,x]=(0,w.useState)(``),[ee,ne]=(0,w.useState)(``),[S,ie]=(0,w.useState)(!1),oe=(0,w.useRef)(null);(0,w.useImperativeHandle)(u,()=>({focusSearch:()=>oe.current?.focus()}),[]),(0,w.useEffect)(()=>{r&&requestAnimationFrame(()=>oe.current?.focus())},[r]);let se=R_({queryKey:[...Cn,m],queryFn:({pageParam:e})=>sv(m,e),initialPageParam:``,getNextPageParam:e=>e.nextCursor||void 0,enabled:e}),le=hn({queryKey:wn,queryFn:()=>bn(`/api/dashboards`),refetchInterval:3e4,staleTime:bt}),ue=(0,w.useMemo)(()=>se.data?.pages.flatMap(e=>e.threads)??[],[se.data]),de=(0,w.useMemo)(()=>mv(ue),[ue]),fe=pt(`overview`,it({window:`1h`,namespace:``}),!!m&&!!l),pe=(0,w.useMemo)(()=>{if(!m)return[];let e=m.toLowerCase();return(fe.data?.data.services??[]).map(e=>e.service).filter(t=>t.toLowerCase().includes(e)).slice(0,6)},[fe.data,m]),me=(0,w.useMemo)(()=>{let e=le.data?.dashboards??[],t=m.toLowerCase();return t?e.filter(e=>e.name.toLowerCase().includes(t)):e},[le.data,m]);function he(e){ne(``),x(e.title),g(e)}async function _e(){if(h&&b.trim()){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(h.threadId)}`,{method:`PATCH`,headers:{"Content-Type":`application/json`},body:JSON.stringify({title:b.trim()})});if(!e.ok)throw Error(`Unable to rename chat (${e.status})`);await d.invalidateQueries({queryKey:Cn}),g(null)}catch(e){ne(e instanceof Error?e.message:`Unable to rename this chat.`)}finally{ie(!1)}}}async function ve(){if(_){ie(!0),ne(``);try{let e=await De(`/api/agent/threads/${encodeURIComponent(_.threadId)}`,{method:`DELETE`});if(!e.ok)throw Error(`Unable to delete chat (${e.status})`);let t=_.threadId;v(null),await d.invalidateQueries({queryKey:Cn}),o(t)}catch(e){ne(e instanceof Error?e.message:`Unable to delete this chat.`)}finally{ie(!1)}}}return(0,T.jsxs)(ge,{gap:`sm`,h:`100%`,component:`nav`,"aria-label":`Navigation`,children:[e&&(0,T.jsx)(ye,{leftSection:(0,T.jsx)(Xe,{size:16,weight:`bold`}),onClick:i,children:`New chat`}),(0,T.jsx)(Vt,{type:`auto`,offsetScrollbars:!0,flex:1,mx:-4,px:4,children:(0,T.jsxs)(ge,{gap:`lg`,pb:`sm`,children:[e&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Chats`}),se.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),se.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Chats could not be loaded.`}),!se.isLoading&&!se.isError&&ue.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:m?`No matching chats`:`No chats yet`}),de.map(e=>(0,T.jsxs)(ge,{gap:2,children:[de.length>1&&(0,T.jsx)(re,{c:`dimmed`,size:`xs`,px:`sm`,pt:4,children:e.label}),e.threads.map(e=>(0,T.jsx)(uv,{thread:e,active:e.threadId===t,onSelect:()=>a(e.threadId),onRename:()=>he(e),onDelete:()=>{ne(``),v(e)}},e.threadId))]},e.label)),se.hasNextPage&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,loading:se.isFetchingNextPage,onClick:()=>void se.fetchNextPage(),children:`See all`})]}),pe.length>0&&l&&(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Services`}),pe.map(e=>(0,T.jsx)(te,{className:`rail-row`,p:`sm`,onClick:()=>l(e),children:(0,T.jsx)(re,{size:`sm`,fw:500,truncate:!0,children:e})},e))]}),(0,T.jsxs)(ge,{gap:4,children:[(0,T.jsx)(lv,{children:`Dashboards`}),le.isLoading&&(0,T.jsx)(C,{py:`md`,children:(0,T.jsx)(y,{size:`xs`})}),le.isError&&(0,T.jsx)(ae,{color:`bad`,radius:`md`,p:`xs`,children:`Dashboards could not be loaded.`}),!le.isLoading&&!le.isError&&m&&me.length===0&&(0,T.jsx)(re,{c:`dimmed`,size:`sm`,px:`sm`,py:`xs`,children:`No matching dashboards`}),me.map(e=>{let t=e.id===n;return(0,T.jsx)(te,{className:`rail-row`,"data-active":t||void 0,"aria-current":t?`page`:void 0,p:`sm`,onClick:()=>s(e.id),children:(0,T.jsxs)(ce,{justify:`space-between`,gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.name}),e.is_default&&(0,T.jsx)(Ze,{size:`xs`,variant:`light`,color:`gray`,children:`Default`})]})},e.id)}),e&&(0,T.jsx)(ye,{variant:`subtle`,color:`gray`,size:`compact-sm`,justify:`flex-start`,leftSection:(0,T.jsx)(It,{size:14,weight:`fill`}),onClick:c,children:`Create with AI`})]})]})}),(0,T.jsx)(Ae,{ref:oe,value:f,onChange:e=>p(e.currentTarget.value),leftSection:(0,T.jsx)(Y_,{size:15}),rightSection:(0,T.jsx)(Ro,{size:`xs`,children:`⌘K`}),rightSectionWidth:44,placeholder:`Search`,"aria-label":`Search chats, dashboards and services`,size:`sm`}),(0,T.jsx)(_n,{opened:h!==null,onClose:()=>!S&&g(null),title:`Rename chat`,centered:!0,children:(0,T.jsx)(`form`,{onSubmit:e=>{e.preventDefault(),_e()},children:(0,T.jsxs)(ge,{children:[(0,T.jsx)(Ae,{label:`Name`,value:b,onChange:e=>x(e.currentTarget.value),maxLength:120,autoFocus:!0}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>g(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{type:`submit`,loading:S,disabled:!b.trim(),children:`Save`})]})]})})}),(0,T.jsx)(_n,{opened:_!==null,onClose:()=>!S&&v(null),title:`Delete chat?`,centered:!0,children:(0,T.jsxs)(ge,{children:[(0,T.jsxs)(re,{size:`sm`,children:[`This permanently removes `,(0,T.jsx)(re,{span:!0,fw:650,children:_?.title}),` and its saved messages.`]}),ee&&(0,T.jsx)(ae,{color:`bad`,children:ee}),(0,T.jsxs)(ce,{justify:`flex-end`,children:[(0,T.jsx)(ye,{variant:`default`,onClick:()=>v(null),disabled:S,children:`Cancel`}),(0,T.jsx)(ye,{color:`bad`,loading:S,onClick:()=>void ve(),children:`Delete`})]})]})})]})}function lv({children:e}){return(0,T.jsx)(re,{c:`dimmed`,size:`xs`,fw:700,tt:`uppercase`,lts:`0.08em`,px:`sm`,children:e})}function uv({thread:e,active:t,onSelect:n,onRename:r,onDelete:i}){return(0,T.jsx)(xe,{"data-active":t||void 0,className:`rail-row`,children:(0,T.jsxs)(ce,{gap:2,wrap:`nowrap`,children:[(0,T.jsx)(te,{onClick:n,"aria-current":t?`page`:void 0,p:`sm`,flex:1,style:{minWidth:0},children:(0,T.jsxs)(ge,{gap:0,children:[(0,T.jsx)(re,{size:`sm`,fw:t?600:500,truncate:!0,children:e.title}),(0,T.jsx)(re,{c:`dimmed`,size:`xs`,children:hv(e.updatedAt)})]})}),(0,T.jsxs)(Ft,{position:`bottom-end`,withinPortal:!0,children:[(0,T.jsx)(Ft.Target,{children:(0,T.jsx)(Mn,{className:`rail-row-actions`,variant:`subtle`,color:`gray`,size:`sm`,mr:4,"aria-label":`Actions for ${e.title}`,children:(0,T.jsx)(Le,{size:18,weight:`bold`})})}),(0,T.jsxs)(Ft.Dropdown,{children:[(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)($_,{size:15}),onClick:r,children:`Rename`}),(0,T.jsx)(Ft.Item,{color:`bad`,leftSection:(0,T.jsx)(st,{size:15}),onClick:i,children:`Delete`})]})]})]})})}function dv(e){return e.includes(`T`)?new Date(e):new Date(`${e.replace(` `,`T`)}Z`)}function fv(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}var pv=[`Today`,`Yesterday`,`Previous 7 days`,`Older`];function mv(e){let t=fv(new Date),n=new Map;for(let r of e){let e=Math.floor((t-fv(dv(r.updatedAt)))/864e5),i=e<=0?`Today`:e===1?`Yesterday`:e<=7?`Previous 7 days`:`Older`,a=n.get(i)??[];a.push(r),n.set(i,a)}return pv.filter(e=>n.has(e)).map(e=>({label:e,threads:n.get(e)}))}function hv(e){let t=dv(e),n=fv(new Date);return Math.floor((n-fv(t))/864e5)<=1?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`}).format(t):new Intl.DateTimeFormat(void 0,{month:`short`,day:`numeric`}).format(t)}function gv({children:e}){let{agentAvailable:t,threadID:n,threadMissing:r,newThread:i,selectThread:a,openChat:o}=kn(),s=Ne(),c=da({select:e=>e.location.pathname}),{dashboardId:l}=We({strict:!1}),u=c===`/chat`||c.startsWith(`/chat/`),[d,f]=pa(!1),[p,m]=(0,w.useState)(!1),[h,g]=(0,w.useState)(``),_=(0,w.useRef)(null),v=he(`(max-width: 62em)`),y=(0,w.useRef)(v);y.current=v,(0,w.useEffect)(()=>{f.close()},[c]),(0,w.useEffect)(()=>{let e=e=>{(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y.current?(m(!0),f.open()):_.current?.focusSearch())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]);let b={agentAvailable:t,activeThreadID:u&&!r&&c!==`/chat`?n:void 0,activeDashboardID:l,onNewChat:i,onSelectThread:a,onDeletedThread:e=>{e===n&&i()},onSelectDashboard:e=>void s({to:`/dashboards/$dashboardId`,params:{dashboardId:e}}),onCreateDashboard:()=>o(An),onInvestigateService:e=>o(`Investigate the ${e} service. Explain its errors and latency.`)};return(0,T.jsxs)(to,{header:{height:52},navbar:{width:256,breakpoint:`md`,collapsed:{mobile:!0}},padding:0,children:[(0,T.jsx)(to.Header,{children:(0,T.jsxs)(ce,{h:`100%`,px:{base:`sm`,sm:`md`},justify:`space-between`,wrap:`nowrap`,children:[(0,T.jsxs)(ce,{gap:`sm`,wrap:`nowrap`,children:[(0,T.jsx)(go,{hiddenFrom:`md`,opened:d,onClick:()=>{m(!1),f.toggle()},size:`sm`,"aria-label":d?`Close navigation`:`Open navigation`}),(0,T.jsx)(ve,{size:`small`})]}),(0,T.jsxs)(ce,{gap:`xs`,wrap:`nowrap`,children:[(0,T.jsx)(Ht,{label:`Documentation`,children:(0,T.jsx)(Mn,{component:`a`,href:ov.home,target:`_blank`,rel:`noopener noreferrer`,variant:`subtle`,color:`gray`,"aria-label":`Documentation`,children:(0,T.jsx)(q_,{size:17,weight:`bold`})})}),(0,T.jsx)(_v,{}),(0,T.jsx)(vv,{onError:g})]})]})}),(0,T.jsx)(to.Navbar,{p:`sm`,children:(0,T.jsx)(cv,{ref:_,...b})}),(0,T.jsx)(Fo,{opened:d,onClose:f.close,hiddenFrom:`md`,size:288,padding:`sm`,title:(0,T.jsx)(ve,{size:`small`}),overlayProps:{backgroundOpacity:.24,blur:1},children:(0,T.jsx)(cv,{...b,autoFocusSearch:d&&p})}),(0,T.jsxs)(to.Main,{children:[h&&(0,T.jsx)(ae,{color:`bad`,m:`md`,withCloseButton:!0,onClose:()=>g(``),children:h}),e]})]})}function _v(){let{setColorScheme:e}=Wt(),t=Gt(`light`,{getInitialValueInEffect:!0}),n=t===`dark`?`light`:`dark`,[r,i]=(0,w.useState)(!1);return(0,T.jsx)(Ht,{label:`Switch to ${n} theme`,opened:r,children:(0,T.jsx)(Mn,{variant:`subtle`,color:`gray`,"aria-label":`Switch to ${n} theme`,onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),onFocus:()=>i(!0),onBlur:()=>i(!1),onClick:()=>{i(!1),e(n)},children:t===`dark`?(0,T.jsx)(av,{size:17,weight:`bold`}):(0,T.jsx)(Z_,{size:17,weight:`bold`})})})}function vv({onError:e}){let t=Ne(),n=je(),r=(n.name.trim()||n.email.trim()||`?`).charAt(0).toUpperCase();return(0,T.jsxs)(Ft,{position:`bottom-end`,withinPortal:!0,shadow:`md`,children:[(0,T.jsx)(Ft.Target,{children:(0,T.jsx)(Mn,{variant:`subtle`,color:`gray`,size:`lg`,radius:`xl`,"aria-label":`Account menu`,children:(0,T.jsx)(po,{size:26,radius:`xl`,color:`brand`,children:r})})}),(0,T.jsxs)(Ft.Dropdown,{children:[(0,T.jsx)(Ft.Label,{children:n.email||`Signed in`}),(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)(tv,{size:15}),onClick:()=>void t({to:`/settings`}),children:`Connect telemetry`}),(0,T.jsx)(Ft.Divider,{}),(0,T.jsx)(Ft.Item,{leftSection:(0,T.jsx)(rv,{size:15}),onClick:()=>void Ce().catch(t=>e(t instanceof Error?t.message:`Sign-out failed — your session is still active.`)),children:`Sign out`})]})]})}function yv(){let{agent_available:e}=ke(),t=Ne(),n=nn(),{threadId:r}=We({strict:!1}),[i,a]=(0,w.useState)(Lt),o=(0,w.useRef)(new Set),s=r??i,[c,l]=(0,w.useState)([]),[u,d]=(0,w.useState)({}),[f,p]=(0,w.useState)(``),[m,h]=(0,w.useState)(!1),[g,_]=(0,w.useState)(!1),[v,y]=(0,w.useState)(``),[b,x]=(0,w.useState)(``),[ee,te]=(0,w.useState)(``),[ne,re]=(0,w.useState)(0),S=(0,w.useRef)(``),ie=(0,w.useRef)(null),ae=(0,w.useRef)(0),oe=(0,w.useMemo)(()=>new M_({url:`/api/agent`,threadId:s,fetch:(e,t)=>De(e,t)}),[s]),se=!e||f===s;function ce(){ae.current=0,y(``)}(0,w.useEffect)(()=>{let t=!0;if(l([]),d({}),p(``),h(!1),_(!1),ce(),te(``),!e){p(s);return}!r||o.current.has(s)?(oe.setMessages([]),p(s)):De(`/api/agent/threads/${encodeURIComponent(s)}`).then(async e=>{if(e.status===404)return null;if(!e.ok)throw Error(`Unable to load thread (${e.status})`);return e.json()}).then(e=>{if(t){if(e===null){h(!0),p(s);return}oe.setMessages(e.messages??[]),l([...e.messages??[]]),p(s)}}).catch(()=>{t&&(S.current=``,te(`This chat could not be restored. Start a new chat or try again.`))});let i=oe.subscribe({onEvent:({messages:e})=>l([...e]),onRunInitialized:()=>{_(!0),te(``)},onToolCallStartEvent:({event:e})=>{ae.current+=1,y(Nn(e.toolCallName))},onToolCallEndEvent:()=>{ae.current=Math.max(0,ae.current-1),ae.current===0&&y(``)},onRunFinalized:({messages:e})=>{let t=[...e];l(t),d(e=>{let n={...e};for(let e of t)e.role===`assistant`&&!n[e.id]&&(n[e.id]=Date.now());return n}),_(!1),ce(),o.current.delete(s),n.invalidateQueries({queryKey:Cn})},onRunFailed:e=>{console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),ce(),o.current.delete(s),n.invalidateQueries({queryKey:Cn})}});return()=>{t=!1,i.unsubscribe(),oe.abortRun()}},[oe,e,n,ne,s]),(0,w.useEffect)(()=>{if(!e)return;let n=e=>{let n=e.target,i=n?.matches(`input, textarea, [contenteditable='true']`);e.key===`/`&&!i&&(e.preventDefault(),r?requestAnimationFrame(()=>ie.current?.focus()):t({to:`/chat`}).then(()=>requestAnimationFrame(()=>ie.current?.focus()))),e.key===`Escape`&&n===ie.current&&(x(``),ie.current?.blur())};return window.addEventListener(`keydown`,n),()=>window.removeEventListener(`keydown`,n)},[e,t,r]);async function le(){_(!0),te(``);try{await oe.runAgent()}catch(e){console.error(`Agent run failed`,e),te(`Fanout could not complete this analysis.`),_(!1),ce(),o.current.delete(s)}}async function ue(n){let i=n.trim();if(!e||!i||g||!se||m)return;r||(o.current.add(s),t({to:`/chat/$threadId`,params:{threadId:s},replace:!0}));let a={id:Lt(),role:`user`,content:i};oe.addMessage(a),l([...oe.messages]),d(e=>({...e,[a.id]:Date.now()})),x(``),await le()}(0,w.useEffect)(()=>{let e=S.current;se&&r&&e&&(S.current=``,ue(e))},[se,r,s]);function de(e){e.preventDefault(),ue(b)}function C(){oe.abortRun(),_(!1),ce(),o.current.delete(s)}function fe(){!g&&oe.messages.some(e=>e.role===`user`)&&le()}function pe(n){if(!e)return;let r=Lt();o.current.add(r),S.current=n??``,t({to:`/chat/$threadId`,params:{threadId:r}})}function me(){oe.abortRun(),S.current=``,a(Lt()),t({to:`/chat`})}function he(e){t({to:`/chat/$threadId`,params:{threadId:e}})}function ge(){re(e=>e+1)}return(0,T.jsx)(jn.Provider,{value:{agentAvailable:e,threadID:s,threadMissing:m,messages:c,messageTimes:u,ready:se,running:g,activity:v,input:b,setInput:x,error:ee,inputRef:ie,send:ue,submit:de,stop:C,retry:fe,reloadThread:ge,openChat:pe,newThread:me,selectThread:he},children:(0,T.jsx)(gv,{children:(0,T.jsx)(ta,{})})})}function bv(){let e=(0,w.useMemo)(()=>new L_,[]);return(0,T.jsx)(Jt,{client:e,children:(0,T.jsx)(Me,{children:(0,T.jsx)(yv,{})})})}var xv=Ve({component:bv,notFoundComponent:()=>(0,T.jsx)(Oe,{to:`/`,replace:!0})}),Sv=Re(`/`)({component:qe(()=>Pn(()=>import(`./routes-D1xQhcK4.js`),__vite__mapDeps([0,1,2])),`component`)}),Cv=Re(`/settings`)({component:qe(()=>Pn(()=>import(`./settings-D20O7uBo.js`),__vite__mapDeps([3,1,2,4,5,6])),`component`)}),wv=Re(`/chat/`)({component:qe(()=>Pn(()=>import(`./chat.index-B6mb73V8.js`),__vite__mapDeps([7,8,1,4,9,10])),`component`)}),Tv=Re(`/chat/$threadId`)({component:qe(()=>Pn(()=>import(`./chat._threadId-B6mb73V8.js`),__vite__mapDeps([11,8,1,4,9,10])),`component`)}),Ev=Re(`/dashboards/`)({component:qe(()=>Pn(()=>import(`./dashboards.index-Bm8hpWIl.js`),__vite__mapDeps([12,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:lt}),Dv=Re(`/dashboards/$dashboardId`)({component:qe(()=>Pn(()=>import(`./dashboards._dashboardId-CMjPkGKO.js`),__vite__mapDeps([16,1,2,13,14,4,15,5,9,10,6])),`component`),validateSearch:lt}),Ov=Sv.update({id:`/`,path:`/`,getParentRoute:()=>xv}),kv=Cv.update({id:`/settings`,path:`/settings`,getParentRoute:()=>xv}),Av=wv.update({id:`/chat/`,path:`/chat/`,getParentRoute:()=>xv}),jv=Tv.update({id:`/chat/$threadId`,path:`/chat/$threadId`,getParentRoute:()=>xv}),Mv=Ev.update({id:`/dashboards/`,path:`/dashboards/`,getParentRoute:()=>xv}),Nv={IndexRoute:Ov,SettingsRoute:kv,ChatThreadIdRoute:jv,DashboardsDashboardIdRoute:Dv.update({id:`/dashboards/$dashboardId`,path:`/dashboards/$dashboardId`,getParentRoute:()=>xv}),ChatIndexRoute:Av,DashboardsIndexRoute:Mv},Pv=sa({routeTree:xv._addFileChildren(Nv)._addFileTypes(),defaultPreload:`intent`,scrollRestoration:!0}),Fv={brand:Dt,ok:kt,warn:Nt,bad:xt,info:Ct},Iv={light:7,dark:5};function Lv(e){let t=e.replace(`#`,``),n=t.length===3?[...t].map(e=>e+e).join(``):t,r=e=>{let t=parseInt(n.slice(e,e+2),16)/255;return t<=.03928?t/12.92:((t+.055)/1.055)**2.4};return .2126*r(0)+.7152*r(2)+.0722*r(4)}function Rv(e){let t=Lv(e),n=1.05/(t+.05);return(t+.05)/.05>n?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function zv(e){return Object.fromEntries(Object.entries(Fv).map(([t,n])=>[`--fanout-color-${t}-contrast`,Rv(n[Iv[e]])]))}function Bv(e){return t=>{let n=t.color??Uv.primaryColor,r=e({...t,color:n}),i=t.variant===`filled`||t.variant===void 0;return t.autoContrast===!1||!i||!Object.hasOwn(Fv,n)?r:{...r,color:`var(--fanout-color-${n}-contrast)`}}}var Vv=.25,Hv={xs:9,sm:10,md:11,lg:13,xl:16},Uv={primaryColor:`brand`,primaryShade:Iv,autoContrast:!0,luminanceThreshold:Vv,colors:{dark:jt,brand:Dt,ok:kt,warn:Nt,bad:xt,info:Ct},defaultRadius:`md`,fontFamily:at.body,fontFamilyMonospace:at.display,headings:{fontFamily:at.body,fontWeight:`600`},cursorType:`pointer`,components:{Tabs:{styles:(e,t)=>({tab:Kv(t.color,`--tabs-text-color`)})},Pagination:{styles:(e,t)=>({control:Kv(t.color,`--pagination-active-color`)})},Badge:{vars:(e,t)=>({root:Gv(t.size)})}}},Wv=()=>({variables:{"--mantine-color-error":`var(--mantine-color-bad-filled)`},light:{"--mantine-color-dimmed":mt.light.muted,...zv(`light`)},dark:zv(`dark`)});function Gv(e){let t=Hv[e??`md`];return t===void 0||t>=vt.micro?{}:{"--badge-fz":`${vt.micro/16}rem`}}function Kv(e,t){return!e||e===Uv.primaryColor?{[t]:`var(--fanout-color-${Uv.primaryColor}-contrast)`}:{}}var qv=Bv(h),Jv=ja({...Uv,variantColorResolver:qv});(0,Ac.createRoot)(document.getElementById(`root`)).render((0,T.jsx)(w.StrictMode,{children:(0,T.jsx)(Aa,{theme:Jv,defaultColorScheme:`auto`,cssVariablesResolver:Wv,children:(0,T.jsx)(ua,{router:Pv})})}));export{Ev as n,ov as r,Dv as t}; \ No newline at end of file diff --git a/internal/ui/dist/assets/settings-D_2lRZJm.js b/internal/ui/dist/assets/settings-D20O7uBo.js similarity index 99% rename from internal/ui/dist/assets/settings-D_2lRZJm.js rename to internal/ui/dist/assets/settings-D20O7uBo.js index 4a361bf86..6068f047c 100644 --- a/internal/ui/dist/assets/settings-D_2lRZJm.js +++ b/internal/ui/dist/assets/settings-D20O7uBo.js @@ -1,4 +1,4 @@ -import{S as e,St as t,Y as n,_ as r,a as i,d as a,f as o,gt as s,h as c,i as l,j as u,mt as d,o as f,r as p,s as m,u as h,x as g,y as _}from"./brand-MzZ03bSa.js";import{i as v,r as y,s as b}from"./auth-BeUORN-q.js";import{t as x}from"./Tooltip-BJiO7C_G.js";import{O as S,i as C,k as w,n as T}from"./api-Be5Lq4YA.js";import{n as E,t as D}from"./WarningCircle.es-DDq2AFnK.js";import{r as O}from"./index-BLac8tJW.js";var k=t(s(),1);function A(e={}){let t=e.timeout??2e3,[n,r]=(0,k.useState)(null),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(null);(0,k.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var j={root:`m_849cf0da`},M=d(),N={underline:`hover`},P=e(e=>{let{underline:t,className:r,unstyled:i,mod:o,...s}=u(`Anchor`,N,e);return(0,M.jsx)(a,{component:`a`,className:n({[j.root]:!i},r),...s,mod:[{underline:t},o],__staticSelector:`Anchor`,unstyled:i})});P.classes=j,P.displayName=`@mantine/core/Anchor`;var F={timeout:1e3};function I(e){let{children:t,timeout:n,value:r,...i}=u(`CopyButton`,F,e),a=A({timeout:n});return(0,M.jsx)(M.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}I.displayName=`@mantine/core/CopyButton`;var L=new Map([[`bold`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),R=k.forwardRef((e,t)=>k.createElement(i,{ref:t,...e,weights:L}));R.displayName=`ArrowsClockwiseIcon`;var z=R,B=[`settings`,`ingest`];function V(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function H(e,t,n){return`exporters: +import{S as e,St as t,Y as n,_ as r,a as i,d as a,f as o,gt as s,h as c,i as l,j as u,mt as d,o as f,r as p,s as m,u as h,x as g,y as _}from"./brand-MzZ03bSa.js";import{i as v,r as y,s as b}from"./auth-BeUORN-q.js";import{t as x}from"./Tooltip-BJiO7C_G.js";import{O as S,i as C,k as w,n as T}from"./api-Be5Lq4YA.js";import{n as E,t as D}from"./WarningCircle.es-DDq2AFnK.js";import{r as O}from"./index-C8q_YUYV.js";var k=t(s(),1);function A(e={}){let t=e.timeout??2e3,[n,r]=(0,k.useState)(null),[i,a]=(0,k.useState)(!1),o=(0,k.useRef)(null);(0,k.useEffect)(()=>()=>{window.clearTimeout(o.current)},[]);let s=e=>{window.clearTimeout(o.current),o.current=window.setTimeout(()=>a(!1),t),a(e)};return{copy:e=>{`clipboard`in navigator?navigator.clipboard.writeText(e).then(()=>{r(null),s(!0)}).catch(e=>r(e)):r(Error(`useClipboard: navigator.clipboard is not supported`))},reset:()=>{a(!1),r(null),window.clearTimeout(o.current)},error:n,copied:i}}var j={root:`m_849cf0da`},M=d(),N={underline:`hover`},P=e(e=>{let{underline:t,className:r,unstyled:i,mod:o,...s}=u(`Anchor`,N,e);return(0,M.jsx)(a,{component:`a`,className:n({[j.root]:!i},r),...s,mod:[{underline:t},o],__staticSelector:`Anchor`,unstyled:i})});P.classes=j,P.displayName=`@mantine/core/Anchor`;var F={timeout:1e3};function I(e){let{children:t,timeout:n,value:r,...i}=u(`CopyButton`,F,e),a=A({timeout:n});return(0,M.jsx)(M.Fragment,{children:t({copy:()=>a.copy(r),copied:a.copied,...i})})}I.displayName=`@mantine/core/CopyButton`;var L=new Map([[`bold`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M228,48V96a12,12,0,0,1-12,12H168a12,12,0,0,1,0-24h19l-7.8-7.8a75.55,75.55,0,0,0-53.32-22.26h-.43A75.49,75.49,0,0,0,72.39,75.57,12,12,0,1,1,55.61,58.41a99.38,99.38,0,0,1,69.87-28.47H126A99.42,99.42,0,0,1,196.2,59.23L204,67V48a12,12,0,0,1,24,0ZM183.61,180.43a75.49,75.49,0,0,1-53.09,21.63h-.43A75.55,75.55,0,0,1,76.77,179.8L69,172H88a12,12,0,0,0,0-24H40a12,12,0,0,0-12,12v48a12,12,0,0,0,24,0V189l7.8,7.8A99.42,99.42,0,0,0,130,226.06h.56a99.38,99.38,0,0,0,69.87-28.47,12,12,0,0,0-16.78-17.16Z`}))],[`duotone`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z`,opacity:`0.2`}),k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`fill`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1-5.66-13.66L180.65,72a79.48,79.48,0,0,0-54.72-22.09h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27,96,96,0,0,1,192,60.7l18.36-18.36A8,8,0,0,1,224,48ZM186.41,183.29A80,80,0,0,1,75.35,184l18.31-18.31A8,8,0,0,0,88,152H40a8,8,0,0,0-8,8v48a8,8,0,0,0,13.66,5.66L64,195.3a95.42,95.42,0,0,0,66,26.76h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`light`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M222,48V96a6,6,0,0,1-6,6H168a6,6,0,0,1,0-12h33.52L183.47,72a81.51,81.51,0,0,0-57.53-24h-.46A81.5,81.5,0,0,0,68.19,71.28a6,6,0,1,1-8.38-8.58,93.38,93.38,0,0,1,65.67-26.76H126a93.45,93.45,0,0,1,66,27.53l18,18V48a6,6,0,0,1,12,0ZM187.81,184.72a81.5,81.5,0,0,1-57.29,23.34h-.46a81.51,81.51,0,0,1-57.53-24L54.48,166H88a6,6,0,0,0,0-12H40a6,6,0,0,0-6,6v48a6,6,0,0,0,12,0V174.48l18,18.05a93.45,93.45,0,0,0,66,27.53h.52a93.38,93.38,0,0,0,65.67-26.76,6,6,0,1,0-8.38-8.58Z`}))],[`regular`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M224,48V96a8,8,0,0,1-8,8H168a8,8,0,0,1,0-16h28.69L182.06,73.37a79.56,79.56,0,0,0-56.13-23.43h-.45A79.52,79.52,0,0,0,69.59,72.71,8,8,0,0,1,58.41,61.27a96,96,0,0,1,135,.79L208,76.69V48a8,8,0,0,1,16,0ZM186.41,183.29a80,80,0,0,1-112.47-.66L59.31,168H88a8,8,0,0,0,0-16H40a8,8,0,0,0-8,8v48a8,8,0,0,0,16,0V179.31l14.63,14.63A95.43,95.43,0,0,0,130,222.06h.53a95.36,95.36,0,0,0,67.07-27.33,8,8,0,0,0-11.18-11.44Z`}))],[`thin`,k.createElement(k.Fragment,null,k.createElement(`path`,{d:`M220,48V96a4,4,0,0,1-4,4H168a4,4,0,0,1,0-8h38.34L184.89,70.54A84,84,0,0,0,66.8,69.85a4,4,0,1,1-5.6-5.72,92,92,0,0,1,129.34.76L212,86.34V48a4,4,0,0,1,8,0ZM189.2,186.15a83.44,83.44,0,0,1-58.68,23.91h-.47a83.52,83.52,0,0,1-58.94-24.6L49.66,164H88a4,4,0,0,0,0-8H40a4,4,0,0,0-4,4v48a4,4,0,0,0,8,0V169.66l21.46,21.45A91.43,91.43,0,0,0,130,218.06h.51a91.45,91.45,0,0,0,64.28-26.19,4,4,0,1,0-5.6-5.72Z`}))]]),R=k.forwardRef((e,t)=>k.createElement(i,{ref:t,...e,weights:L}));R.displayName=`ArrowsClockwiseIcon`;var z=R,B=[`settings`,`ingest`];function V(e,t){let n=e.trim();return t||/^https:\/\//i.test(n)||/:443$/.test(n)}function H(e,t,n){return`exporters: otlp/fanout: endpoint: "${e}" headers: diff --git a/internal/ui/dist/assets/tokens-CvbGYJRX.js b/internal/ui/dist/assets/tokens-DNprTSRA.js similarity index 96% rename from internal/ui/dist/assets/tokens-CvbGYJRX.js rename to internal/ui/dist/assets/tokens-DNprTSRA.js index 8dac177b4..a99d4eef4 100644 --- a/internal/ui/dist/assets/tokens-CvbGYJRX.js +++ b/internal/ui/dist/assets/tokens-DNprTSRA.js @@ -1 +1 @@ -import{$ as e,A as t,C as n,G as r,J as i,K as a,N as o,S as s,St as c,X as l,Y as u,_t as d,a as f,at as p,b as m,dt as h,et as g,gt as _,j as v,k as y,m as b,mt as x,nt as S,ot as C,q as w,st as T,tt as E,v as D,x as O,z as k}from"./brand-MzZ03bSa.js";import{c as A,d as ee,h as te,m as j,p as ne,u as re}from"./auth-BeUORN-q.js";import{C as ie,S as ae,T as oe,_ as se,a as ce,b as M,c as N,d as le,f as P,g as F,h as ue,i as de,l as I,m as L,n as R,p as z,r as fe,s as pe,u as B,v as V,w as me,x as H,y as he}from"./Tooltip-BJiO7C_G.js";import{r as ge}from"./use-computed-color-scheme-6JIsge00.js";import{B as _e,O as ve,U as ye,i as be,n as xe,z as Se}from"./api-Be5Lq4YA.js";function Ce(e){return e[e.length-1]}function we(e,t){return typeof e==`function`?e(t):e}var Te=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function U(e){for(let t in e)if(Te.call(e,t))return!0;return!1}var De=()=>Object.create(null),Oe=(e,t)=>ke(e,t,De);function ke(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Ne(e)&&Ne(i);if(!a&&!(je(e)&&je(i)))return i;let o=a?e:Ae(e);if(!o)return i;let s=a?i:Ae(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;ti||!Pe(e[o],t[o],n)))return!1;return i===a}return!1}function Fe(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ie=/[\x00-\x1f\x7f"<>`{}]/g;function Le(e){return e.replace(Ie,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Re(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Le(t)}var ze=[`http:`,`https:`,`mailto:`,`tel:`];function Be(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ve(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=Re(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=Re(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function He(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ue(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var W=4,Ke=5;function qe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=Ze(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Xe(r);e.kind=Ke,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Xe(r);e.kind=W,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Je(e,t,r,c,i,a,o,s)}function Ye(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Xe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ze(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Qe(e,t){let n=Xe(`/`),r=new Uint16Array(6),i=[];for(let t of e)Je(!1,r,t,1,n,0,i);for(let e of i)e.sort(Ye);t.masksTree=n,t.flatCache=Ge(1e3)}function $e(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=it(e,t.masksTree);return t.flatCache.set(e,r),r}function et(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Xe(`/`),Je(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),it(r,o,n)}function tt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=it(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=ot(a.route)),t.matchCache.set(r,a),a}function nt(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function rt(e,t=!1,n){let r=Xe(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Je(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&We(),o[e.id]=e,c!==0&&e.path){let t=nt(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(Ye);return{processedTree:{segmentTree:r,singleCache:Ge(1e3),matchCache:Ge(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function it(e,t,n=!1){let r=e.split(`/`),i=ct(e,r,t,n);if(!i)return null;let[a]=at(e,r,i);return{route:i.node.route,rawParams:a}}function at(e,t,n){let r=st(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===W)>(e.node.kind===W)||t.node.kind===W==(e.node.kind===W)&&t.node.depth>e.node.depth)))}function pt(e){return mt(e.filter(e=>e!==void 0).join(`/`))}function mt(e){return e.replace(/\/{2,}/g,`/`)}function ht(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function gt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function _t(e){return gt(ht(e))}function vt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function yt(e,t,n){return vt(e,n)===vt(t,n)}function bt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=mt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=mt(e)),o=e.split(`/`);o.length>1&&Ce(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(Ce(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?mt(s):s)||`/`;return a&&r&&r.set(a,c),c}function xt(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function St(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>wt(e,n)).join(`/`):wt(r,n):r}function Ct({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Tt:this.parentRoute||We();let r=n?Tt:t?.path;r&&r!==`/`&&(r=ht(r));let i=t?.id||r,a=n?Tt:pt([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=pt([`/`,a]));let o=a===`__root__`?`/`:pt([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=gt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Et({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},At=class extends kt{constructor(e){super(e)}},G=c(_(),1),K=x();function jt({children:e,fallback:t=null}){return(0,K.jsx)(G.Fragment,{children:Mt()?e:t})}function Mt(){return G.useSyncExternalStore(Nt,()=>!0,()=>!1)}function Nt(){return()=>{}}var Pt=G.createContext(void 0),Ft=G.createContext(void 0),It=d((e=>{var t=_();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Lt=d(((e,t)=>{t.exports=It()})),Rt=d((e=>{var t=_(),n=Lt();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),zt=d(((e,t)=>{t.exports=Rt()}))();function Bt(e,t){return e===t}function Vt(e,t,n=Bt){let r=(0,G.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,G.useCallback)(()=>e?.get(),[e]);return(0,zt.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Ht={};function Ut(e,t){let n=G.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ke(n.current,i):i}}function q(e){let t=ee(),n=G.useContext(e.from?Ft:Pt),r=e.from??n,i=t.stores.getMatchStore(r),a=Ut(e,t),o=Vt(i,e=>e?a(e):Ht);if(o!==Ht)return o;(e.shouldThrow??!0)&&We()}function Wt(e){return q({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gt(e){let{select:t,...n}=e;return q({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Kt(e){return q({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function qt(e){return q({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Jt(e){return q({...e,select:t=>e.select?e.select(t.context):t.context})}function Yt(e){let t=G.useRef(e);return Pe(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Xt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Zt(e,t,n){if(e?.external)return Be(e.href,n)?void 0:e.href;if(!ln(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),Be(t,n)?void 0:t}catch{}}function Qt(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!yt(e.pathname,t.pathname,r))return!1}else{let n=vt(e.pathname,r),i=vt(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!Pe(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function $t(e,t){let n=ee(),r=j(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:O,search:k,hash:A,state:ne,mask:re,reloadDocument:ie,unsafeRelative:ae,from:oe,_fromLocation:se,...ce}=e,M=Mt(),N=Yt(e.search),le=Yt(e.params),P=Yt(o),F=G.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,N,le,e.state,e.mask,e.unsafeRelative]),ue=G.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...F}),r=cn(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,v),i=Zt(r,s,n.protocolAllowlist);return[r?.href,i,Qt(e,t,P,n.basepath,M,i!==void 0)]},[P,v,M,F,n,s]),[de,I,L]=Vt(n.stores.location,ue,Xt),R=L?we(i,{})??tn:en,z=L?en:we(a,{})??en,fe=[b,R.className,z.className].filter(Boolean).join(` `),pe=(y||R.style||z.style)&&{...y,...R.style,...z.style},B=G.useRef(!1),V=e.reloadDocument||I||v?!1:c??n.options.defaultPreload,me=l??n.options.defaultPreloadDelay??0,H=G.useCallback(()=>{n.preloadRoute(F).catch(e=>{console.warn(e),console.warn(Ot)})},[n,F]),he=G.useCallback(e=>{if(!e){on(r);return}if(!(e.isIntersecting??V===`intent`)){e.isIntersecting===!1&&on(r);return}if(!me){H();return}an.has(r)||an.set(r,setTimeout(()=>{an.delete(r),H()},me))},[H,r,V,me]);te(r,he,V!==`viewport`),G.useEffect(()=>{B.current||V===`render`&&(H(),B.current=!0)},[H,V]);let ge=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!v&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...F,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))};if(I)return{...ce,ref:r,href:I,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let _e=()=>{V===`intent`&&H()},ve=()=>{V===`intent`&&on(r)};return{...ce,...R,...z,href:de,ref:r,onClick:sn([x,ge]),onBlur:sn([S,ve]),onFocus:sn([C,he]),onMouseEnter:sn([w,he]),onMouseLeave:sn([T,ve]),onTouchStart:sn([E,_e]),disabled:!!v,target:_,...pe&&{style:pe},...fe&&{className:fe},...v&&nn,...L&&rn}}var en={},tn={className:`active`},nn={role:`link`,"aria-disabled":!0},rn={"data-status":`active`,"aria-current":`page`},an=new WeakMap,on=e=>{clearTimeout(an.get(e)),an.delete(e)},sn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function cn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ln(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var un=G.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=$t(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return G.createElement(`a`,t,o)}return G.createElement(n,a,o)}),dn=class extends kt{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function fn(e){return new dn(e)}var pn=class extends At{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function mn(e){return new pn(e)}function hn(e){return e=>{let t=fn(e);return t.isRoot=!1,t}}function gn(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Fe(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(ne)ne(a());else throw a()}return G.createElement(r,e)};return o.preload=a,o}function _n(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function vn(e){let t=_n(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function yn(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function bn(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function xn(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(yn(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>Sn(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=xn(l,c,r),d=bn(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[xn(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[bn(c.length,c,!1)]?.focus()}}}function wn(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ge:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function J(e,t){return n=>{e?.(n),t?.(n)}}function Tn(e,t){return e in t?vn(t[e]):vn(e)}function En(e,t){let n=e.map(e=>({value:e,px:Tn(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function Dn(e,t,n){return n?Array.from(yn(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}var On=[`mousedown`,`touchstart`];function kn(e,t,n,r=!0){let i=(0,G.useRef)(null),a=t||On,o=(0,G.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let a=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!a.includes(e))&&e(t):i.current&&!a.includes(i.current)&&e(t)}),s=a.join(`,`);return(0,G.useEffect)(()=>{if(!r)return;let e=s.split(`,`);return e.forEach(e=>document.addEventListener(e,o)),()=>{e.forEach(e=>document.removeEventListener(e,o))}},[s,r]),i}var An=[`mouse`,`touch`],jn=10;function Mn(e,t={}){let{threshold:n=400,events:r=An,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,G.useRef)(!1),l=(0,G.useRef)(!1),u=(0,G.useRef)(-1),d=(0,G.useRef)(null);return(0,G.useEffect)(()=>()=>window.clearTimeout(u.current),[]),(0,G.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?jn:i===!1?0:i,p=t=>{(Fn(t)||Pn(t))&&(a&&a(t),d.current=Nn(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(Fn(e)||Pn(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=Nn(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,r.join(`,`)])}function Nn(e){if(Pn(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Pn(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function Fn(e){return e.nativeEvent instanceof MouseEvent}function In({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&w({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Ln(e,t,n){return In({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Rn(e,t){let n=e.colors[e.primaryColor];return r(n)?e.autoContrast?Ln(n,e,t):`var(--mantine-color-white)`:In({color:n[i(e,t)],theme:e,autoContrast:null})}function zn({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,G.useRef)(-1),a=(0,G.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,G.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var[Bn,Vn]=me(`Popover component was not found in the tree`);function Hn({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,G.useRef)(!1),s=(0,G.useRef)(!1),c=(0,G.useRef)(null),l=(0,G.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=J(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=J(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=Mn(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:J(e.onTouchStart,p.onTouchStart),onTouchEnd:J(e.onTouchEnd,p.onTouchEnd),onTouchCancel:J(e.onTouchCancel,p.onTouchCancel),onTouchMove:J(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function Un(e){let{children:t,disabled:n,longPressDelay:r}=v(`PopoverContextMenu`,null,e),i=H(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}}))}Un.displayName=`@mantine/core/PopoverContextMenu`;var Wn={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},Gn=n(t=>{let n=v(`PopoverDropdown`,null,t),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,ref:d,...f}=n,p=Vn(),{dir:m}=M(),g=p.arrowPosition===`merge`&&p.withArrow?ce({position:p.placement,dir:m}):void 0,_=ye({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:`dialog`,tabIndex:-1}:{},b=e(d,p.floating);return p.disabled?null:(0,K.jsx)(R,{...p.portalProps,withinPortal:p.withinPortal,children:(0,K.jsx)(D,{mounted:p.opened,...p.transitionProps,transition:p.transitionProps?.transition||`fade`,duration:p.transitionProps?.duration??150,keepMounted:p.keepMounted,keepMountedMode:p.keepMountedMode,exitDuration:typeof p.transitionProps?.exitDuration==`number`?p.transitionProps.exitDuration:p.transitionProps?.duration,children:e=>(0,K.jsx)(Se,{active:p.trapFocus&&p.opened,innerRef:b,children:(0,K.jsxs)(O,{...y,...f,variant:c,onKeyDownCapture:wn(()=>{p.onClose?.(),p.onDismiss?.()},{active:p.closeOnEscape,onTrigger:_,onKeyDown:s}),"data-position":p.placement,"data-fixed":p.floatingStrategy===`fixed`||void 0,...p.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,...g,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width===`target`?void 0:h(p.width),...p.referenceHidden?{display:`none`}:null},p.resolvedStyles?.dropdown,u?.dropdown,i]}),children:[o,(0,K.jsx)(de,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});Gn.classes=Wn,Gn.displayName=`@mantine/core/PopoverDropdown`;var Kn={refProp:`ref`,popupType:`dialog`},qn=n(t=>{let{children:n,refProp:r,popupType:i,ref:a,...o}=v(`PopoverTarget`,Kn,t),s=H(n);if(!s)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let c=o,l=Vn(),d=e(l.reference,ae(s),a),f=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.opened?l.getDropdownId():void 0,id:l.getTargetId()}:{},p=s.props;return(0,G.cloneElement)(s,{...c,...f,...l.targetProps,className:u(l.targetProps.className,c.className,p.className),[r]:d,...l.controlled?null:{onClick:e=>{l.onToggle(),p.onClick?.(e)}}})});qn.displayName=`@mantine/core/PopoverTarget`;function Jn(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Yn(e,t,n,r){let i=Jn(e.middlewares),a=[F(e.offset),z()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(P(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(se(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:ue(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?L():L(i.inline)),a.push(le({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(V({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Xn(e){let[t,n]=A({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,G.useRef)(t),[i,a]=(0,G.useState)(null),o=e.preventPositionChangeWhenVisible!==!1,s=(0,G.useRef)(t);t!==s.current&&(s.current=t,t&&i!==null&&a(null));let c=(0,G.useCallback)(()=>a(null),[]),l=()=>{t&&!e.disabled&&n(!1)},u=()=>{e.disabled||n(!t)},d=N({open:t,strategy:e.strategy,placement:o?i??e.position:e.position,middleware:Yn(e,()=>d,o&&i!==null,o),whileElementsMounted:e.keepMounted?void 0:he});(0,G.useEffect)(()=>{if(!e.keepMounted)return;let n=d.refs.reference.current,r=d.refs.floating.current;if(t&&n&&r)return he(n,r,d.update)},[e.keepMounted,t,d.update,d.elements.reference,d.elements.floating]);let f=(0,G.useRef)(!1);S(()=>{if(!t){f.current=!1;return}if(!o||i!==null)return;let e=d.refs.floating.current;if(e&&e.offsetHeight!==0&&e.offsetWidth!==0){if(!f.current){f.current=!0,d.update();return}d.isPositioned&&a(d.placement)}},[o,t,d.isPositioned,d.placement,i,d.update]);let p=(0,G.useRef)(d.placement);return S(()=>{p.current!==d.placement&&(p.current=d.placement,e.onPositionChange?.(d.placement))},[d.placement]),E(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:d,controlled:typeof e.opened==`boolean`,opened:t,onClose:l,onToggle:u,resetLockedPlacement:c}}var Zn={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:ie(`popover`),__staticSelector:`Popover`,width:`max-content`},Qn=l((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:p(t),"--popover-shadow":C(n)}}));function Y(e){let n=v(`Popover`,Zn,e),{children:r,position:i,offset:a,onPositionChange:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,unstyled:x,classNames:S,styles:C,closeOnClickOutside:w,withinPortal:T,portalProps:E,closeOnEscape:O,clickOutsideEvents:A,trapFocus:ee,onClose:te,onDismiss:j,onOpen:ne,onChange:re,zIndex:ie,radius:ae,shadow:oe,id:se,defaultOpened:ce,__staticSelector:N,withRoles:le,disabled:P,returnFocus:F,variant:ue,keepMounted:de,keepMountedMode:I,vars:L,floatingStrategy:z,withOverlay:pe,overlayProps:B,hideDetached:V,attributes:me,preventPositionChangeWhenVisible:H,...he}=n,ge=y({name:N,props:n,classes:Wn,classNames:S,styles:C,unstyled:x,attributes:me,rootSelector:`dropdown`,vars:L,varsResolver:Qn}),{resolvedStyles:ve}=t({classNames:S,styles:C,props:n}),ye=(0,G.useRef)(null),[be,xe]=(0,G.useState)(null),[Se,Ce]=(0,G.useState)(null),{dir:we}=M(),Te=k(),Ee=g(se),U=Xn({middlewares:f,width:d,position:fe(we,i),offset:typeof a==`number`?a+(p?m/2:0):a,arrowRef:ye,arrowOffset:h,onPositionChange:o,opened:s,defaultOpened:ce,onChange:re,onOpen:ne,onClose:te,onDismiss:j,strategy:z,disabled:P,preventPositionChangeWhenVisible:H,keepMounted:de});kn(()=>{w&&(U.onClose(),j?.())},A,[be,Se]);let De=(0,G.useCallback)(e=>{xe(e),U.floating.refs.setReference(e)},[U.floating.refs.setReference]),Oe=(0,G.useCallback)(e=>{Ce(e),U.floating.refs.setFloating(e)},[U.floating.refs.setFloating]),ke=(0,G.useCallback)(()=>{c?.onExited?.(),l?.(),U.resetLockedPlacement()},[c?.onExited,l,U.resetLockedPlacement]),Ae=(0,G.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,K.jsxs)(Bn,{value:{returnFocus:F,disabled:P,controlled:U.controlled,reference:De,floating:Oe,x:U.floating.x,y:U.floating.y,arrowX:U.floating?.middlewareData?.arrow?.x,arrowY:U.floating?.middlewareData?.arrow?.y,opened:U.opened,arrowRef:ye,transitionProps:{...c,onExited:ke,onEntered:Ae},width:d,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,placement:U.floating.placement,trapFocus:ee,withinPortal:T,portalProps:E,zIndex:ie,radius:ae,shadow:oe,closeOnEscape:O,onDismiss:j,onClose:U.onClose,onToggle:U.onToggle,getTargetId:()=>Ee,getDropdownId:()=>`${Ee}-dropdown`,withRoles:le,targetProps:he,__staticSelector:N,classNames:S,styles:C,unstyled:x,variant:ue,keepMounted:de,keepMountedMode:I,getStyles:ge,resolvedStyles:ve,floatingStrategy:z,referenceHidden:V&&Te!==`test`?U.floating.middlewareData.hide?.referenceHidden:!1},children:[r,pe&&(0,K.jsx)(D,{transition:`fade`,mounted:U.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,K.jsx)(R,{withinPortal:T,children:(0,K.jsx)(_e,{...B,...ge(`overlay`,{className:B?.className,style:[e,B?.style]})})})})]})}Y.Target=qn,Y.Dropdown=Gn,Y.ContextMenu=Un,Y.varsResolver=Qn,Y.displayName=`@mantine/core/Popover`,Y.extend=e=>e,Y.withProps=e=>{let t=t=>(0,K.jsx)(Y,{...e,...t});return t.extend=Y.extend,t.displayName=`WithProps(${Y.displayName})`,t};function $n({style:e,size:t=16,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:h(t),height:h(t),display:`block`},...n,children:(0,K.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}$n.displayName=`@mantine/core/AccordionChevron`;function er({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var tr={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},nr=l((e,{radius:t,color:n,gradient:r,variant:i,size:o,autoContrast:s,circle:c})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--badge-height":T(o,`badge-height`),"--badge-padding-x":T(o,`badge-padding-x`),"--badge-fz":T(o,`badge-fz`),"--badge-radius":c||t===void 0?void 0:p(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?a(n,e):void 0}}}),rr=s(e=>{let t=v(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:b,attributes:x,...S}=t,C=y({name:`Badge`,props:t,classes:tr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:nr});return(0,K.jsxs)(O,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},b],...C(`root`,{variant:m}),...S,children:[d&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`left`,children:d}),(0,K.jsx)(`span`,{...C(`label`),children:p}),f&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`right`,children:f})]})});rr.classes=tr,rr.varsResolver=nr,rr.displayName=`@mantine/core/Badge`;var[ir,X]=me(`Menu component was not found in the tree`),ar=(0,G.createContext)(null);function or(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuCheckboxGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,K.jsx)(ar,{value:{values:a,onChange:(0,G.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}or.displayName=`@mantine/core/MenuCheckboxGroup`;var sr=(0,G.createContext)(null);function cr({role:t,checked:n,indicator:r,onSelect:i,color:a,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,dataDisabled:d,className:f,style:p,styles:h,classNames:g,buttonRef:_,others:v}){let y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=J(v.onClick,()=>{d||(i(),s&&y.closeDropdownImmediately())}),E=J(v.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=J(v.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())}),O=a?x.variantColorResolver({color:a,theme:x,variant:`light`}):void 0,k=a?w({color:a,theme:x}):null,A=y.alignItemsLabels!==`none`||n;return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:f,style:p,styles:h,classNames:g}),ref:e(C,_),role:t,"aria-checked":n,disabled:u,"data-menu-item":!0,"data-checked":n||void 0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:D}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[A&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:h,classNames:g}),"data-checked":n||void 0,children:n?r:null}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:h,classNames:g}),"data-menu-item-label":!0,children:l}),c&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:h,classNames:g}),"data-position":`right`,children:c})]})}var Z={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},lr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...y}=v(`MenuCheckboxItem`,null,e),b=X(),x=(0,G.use)(ar),S=x&&f!==void 0?x.values.includes(f):void 0,[C,w]=A({value:p??S,defaultValue:m,finalValue:!1,onChange:h});return(0,K.jsx)(cr,{role:`menuitemcheckbox`,checked:C,indicator:g??b.checkIcon??(0,K.jsx)(er,{size:10}),onSelect:()=>{h?w(!C):x&&f!==void 0?x.onChange(f):w(!C)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:y,children:l})});lr.classes=Z,lr.displayName=`@mantine/core/MenuCheckboxItem`;function ur(e){let{children:t,disabled:n,longPressDelay:r}=v(`MenuContextMenu`,null,e),i=H(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}ur.displayName=`@mantine/core/MenuContextMenu`;var dr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuDivider`,null,e);return(0,K.jsx)(O,{...X().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});dr.classes=Z,dr.displayName=`@mantine/core/MenuDivider`;var fr=500;function pr(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function mr(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function hr({enabled:e,opened:t,getDropdown:n}){let r=(0,G.useRef)({buffer:``,timeoutId:null});return(0,G.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,G.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},fr);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||mr(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,ref:d,...f}=v(`MenuDropdown`,null,t),p=(0,G.useRef)(null),m=X(),h=hr({enabled:!m.hasSearch,opened:m.opened,getDropdown:()=>p.current}),g=J(l,e=>{h(e),!(e.defaultPrevented||m.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),p.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),_=J(s,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.openDropdown()),y=J(c,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.closeDropdown());return(0,K.jsxs)(Y.Dropdown,{...f,onMouseEnter:_,onMouseLeave:y,role:`menu`,"aria-orientation":`vertical`,ref:e(d,p),...m.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:g,children:[m.withInitialFocusPlaceholder&&!m.hasSearch&&(0,K.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});gr.classes=Z,gr.displayName=`@mantine/core/MenuDropdown`;var _r=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:f,disabled:p,"data-disabled":h,ref:g,..._}=v(`MenuItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=J(T.onClick,()=>{h||(typeof l==`boolean`?l&&y.closeDropdownImmediately():y.closeOnItemClick&&y.closeDropdownImmediately())}),D=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),O=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,k=c?w({color:c,theme:x}):null,A=J(T.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g),role:`menuitem`,disabled:p,"data-menu-item":!0,"data-disabled":p||h||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:D,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:A}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),u&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:u}),f&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:f}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:d})]})});_r.classes=Z,_r.displayName=`@mantine/core/MenuItem`;var vr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuLabel`,null,e);return(0,K.jsx)(O,{...X().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});vr.classes=Z,vr.displayName=`@mantine/core/MenuLabel`;var yr=(0,G.createContext)(null);function br(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuRadioGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,K.jsx)(yr,{value:{value:a,onChange:e=>o(e)},children:i})}br.displayName=`@mantine/core/MenuRadioGroup`;function xr({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Sr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=v(`MenuRadioItem`,null,e),y=X(),b=(0,G.use)(yr),x=p??(b?b.value===f:!1);return(0,K.jsx)(cr,{role:`menuitemradio`,checked:x,indicator:h??y.checkIcon??(0,K.jsx)(xr,{size:5}),onSelect:()=>{x||(m?m(f):b&&b.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Sr.classes=Z,Sr.displayName=`@mantine/core/MenuRadioItem`;var Cr=`[data-menu-item]:not([data-disabled])`,wr=`[data-menu-active]`;function Tr(e){return e?.closest(`[data-menu-dropdown]`)}function Er(e){return e?Array.from(e.querySelectorAll(Cr)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Dr(e){e&&e.querySelectorAll(wr).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Or(e,t){Dr(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function kr(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Ar={clearSearchOnClose:!0},jr=n(t=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,size:o,clearSearchOnClose:s,ref:c,...l}=v(`MenuSearch`,Ar,t),u=X(),d=(0,G.useRef)(null),f=e(c,d),p=(0,G.useRef)(a);p.current=a,(0,G.useEffect)(()=>u.registerSearch(),[u.registerSearch]),(0,G.useEffect)(()=>{s?u.searchExitClearRef.current=()=>{p.current?.({currentTarget:{value:``}})}:u.searchExitClearRef.current=null},[s,u.searchExitClearRef]),(0,G.useEffect)(()=>{u.opened||Dr(Tr(d.current))},[u.opened]);let m=J(a,e=>{Dr(Tr(e.currentTarget))}),h=J(i,e=>{if(e.defaultPrevented)return;let t=Tr(e.currentTarget),n=Er(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r>=n.length-1?u.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r<=0?r===-1||u.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Or(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Or(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[kr(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),g=u.getStyles(`search`);return(0,K.jsx)(b,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:o,...l,ref:f,classNames:[{input:g.className},n],styles:[{input:g.style},r],onKeyDown:h,onChange:m,__staticSelector:`Menu`})});jr.classes=Z,jr.displayName=`@mantine/core/MenuSearch`;var Mr=n(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u,onKeyDown:d,children:f,ref:p,...m}=v(`MenuSubDropdown`,null,t),h=(0,G.useRef)(null),g=X(),_=(0,G.use)(sr),y=hr({enabled:!g.hasSearch,opened:_?.opened??!1,getDropdown:()=>h.current}),b=J(d,e=>{y(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),x=_?.getFloatingProps({onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u});return(0,K.jsx)(Y.Dropdown,{...m,...x,role:`menu`,"aria-orientation":`vertical`,ref:e(p,h,_?.setFloating),...g.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:f})});Mr.classes=Z,Mr.displayName=`@mantine/core/MenuSubDropdown`;var Nr=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":p,closeMenuOnClick:h,ref:g,..._}=v(`MenuSubItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,D=c?w({color:c,theme:x}):null,O=J(T.onKeyDown,e=>{e.key===`ArrowRight`&&(b?.open(),b?.focusFirstItem()),e.key===`ArrowLeft`&&b?.parentContext&&(b.parentContext.close(),b.parentContext.focusParentItem())}),k=J(T.onClick,()=>{!p&&h&&y.closeDropdownImmediately()}),A=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),ee=b?.getReferenceProps({onMouseEnter:T.onMouseEnter,onMouseLeave:T.onMouseLeave,onPointerEnter:T.onPointerEnter,onPointerLeave:T.onPointerLeave});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,...ee,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g,b?.setReference),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onClick:k,onMouseMove:A,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:d}),(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u||(0,K.jsx)($n,{...y.getStyles(`chevron`),size:14})})]})});Nr.classes=Z,Nr.displayName=`@mantine/core/MenuSubItem`;function Pr({children:e,refProp:t}){if(!oe(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return X(),(0,K.jsx)(Y.Target,{refProp:t,popupType:`menu`,children:e})}Pr.displayName=`@mantine/core/MenuSubTarget`;var Fr={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Ir(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=v(`MenuSub`,Fr,e),l=g(),[u,d]=A({value:o,finalValue:!1,onChange:s}),f=(0,G.use)(sr),p=X(),{dir:m}=M(),h=fe(m,i),_=f?.registerOpenSub??p.registerOpenSub,y=(0,G.useRef)(null),b=(0,G.useCallback)(e=>{let t=y.current;return t&&t!==e&&t(),y.current=e,()=>{y.current===e&&(y.current=null)}},[]),x=(0,G.useRef)(d);x.current=d;let S=(0,G.useCallback)(()=>x.current(!0),[]),C=(0,G.useCallback)(()=>x.current(!1),[]);(0,G.useEffect)(()=>{if(u)return _(C)},[u,_,C]);let{context:w,refs:T}=N({placement:h,open:u,onOpenChange:e=>{e?S():C()}}),{getReferenceProps:E,getFloatingProps:D}=B([I(w,{handleClose:a?pe(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,K.jsx)(sr,{value:{opened:u,close:C,open:S,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:T.setReference,setFloating:T.setFloating,getReferenceProps:E,getFloatingProps:D,registerOpenSub:b},children:(0,K.jsx)(Y,{opened:u,onChange:e=>e?S():C(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Ir.extend=e=>e,Ir.displayName=`@mantine/core/MenuSub`,Ir.Target=Pr,Ir.Dropdown=Mr,Ir.Item=Nr;var Lr={refProp:`ref`};function Rr(e){let{children:t,refProp:n,...r}=v(`MenuTarget`,Lr,e),i=H(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=i.props,s=J(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=J(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=J(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,K.jsx)(Y.Target,{refProp:n,popupType:`menu`,...r,children:(0,G.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Rr.displayName=`@mantine/core/MenuTarget`;var zr={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Q=n(e=>{let n=v(`Menu`,zr,e),{children:r,onOpen:i,onClose:a,opened:o,defaultOpened:s,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:f,trigger:p,openDelay:m,closeDelay:h,classNames:g,styles:_,unstyled:b,variant:x,vars:S,menuItemTabIndex:C,keepMounted:w,withInitialFocusPlaceholder:T,attributes:E,onExitTransitionEnd:D,alignItemsLabels:O,checkIcon:k,...ee}=n,te=y({name:`Menu`,classes:Z,props:n,classNames:g,styles:_,unstyled:b,attributes:E}),[j,ne]=A({value:o,defaultValue:s,finalValue:!1,onChange:l}),[re,ie]=(0,G.useState)(!1),ae=()=>{ne(!1),ie(!1),j&&a?.()},oe=()=>{ne(!0),!j&&i?.()},se=()=>{j?ae():oe()},{openDropdown:ce,closeDropdown:M}=zn({open:oe,close:ae,closeDelay:h,openDelay:m}),N=(0,G.useRef)(null),le=(0,G.useCallback)(e=>{let t=N.current;return t&&t!==e&&t(),N.current=e,()=>{N.current===e&&(N.current=null)}},[]),P=(0,G.useRef)(0),[F,ue]=(0,G.useState)(!1),de=(0,G.useCallback)(()=>(P.current+=1,P.current===1&&ue(!0),()=>{--P.current,P.current===0&&ue(!1)}),[]),I=(0,G.useRef)(null),L=()=>{I.current?.(),D?.()},R=e=>Dn(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:z,resolvedStyles:fe}=t({classNames:g,styles:_,props:n});return(0,K.jsx)(ir,{value:{getStyles:te,opened:j,toggleDropdown:se,getItemIndex:R,openedViaClick:re,setOpenedViaClick:ie,closeOnItemClick:u,closeDropdown:p===`click`?ae:M,openDropdown:p===`click`?oe:ce,closeDropdownImmediately:ae,loop:d,trigger:p,unstyled:b,menuItemTabIndex:C,withInitialFocusPlaceholder:T,registerOpenSub:le,hasSearch:F,registerSearch:de,searchExitClearRef:I,alignItemsLabels:O,checkIcon:k},children:(0,K.jsx)(Y,{returnFocus:!0,...ee,opened:j,onChange:se,defaultOpened:s,trapFocus:!w&&c,closeOnEscape:f,__staticSelector:`Menu`,classNames:z,styles:fe,unstyled:b,variant:x,keepMounted:w,onExitTransitionEnd:L,children:r})})});Q.displayName=`@mantine/core/Menu`,Q.classes=Z,Q.Item=_r,Q.Label=vr,Q.Dropdown=gr,Q.Target=Rr,Q.Divider=dr,Q.Search=jr,Q.Sub=Ir,Q.CheckboxItem=lr,Q.CheckboxGroup=or,Q.RadioItem=Sr,Q.RadioGroup=br,Q.ContextMenu=ur;var Br=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Vr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),Hr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),Ur=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),Wr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Br}));Wr.displayName=`DotsThreeIcon`;var Gr=Wr,Kr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Vr}));Kr.displayName=`PlusIcon`;var qr=Kr,Jr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Hr}));Jr.displayName=`SparkleIcon`;var Yr=Jr,Xr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Ur}));Xr.displayName=`TrashIcon`;var Zr=Xr,$=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Qr(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var $r=new Uint8Array(16);function ei(){return crypto.getRandomValues($r)}var ti={};function ni(e,t,n){let r;if(e)r=ii(e.random??e.rng?.()??ei(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=ei();ri(ti,e,i),r=ii(i,ti.msecs,ti.seq,t,n)}return t??Qr(r)}function ri(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=ai(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ii(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=ai(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function ai(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function oi(){return ni()}var si=[{value:`15m`,label:`15 minutes`},{value:`1h`,label:`1 hour`},{value:`6h`,label:`6 hours`},{value:`24h`,label:`24 hours`},{value:`168h`,label:`7 days`},{value:`720h`,label:`30 days`}];function ci(e){return si.find(t=>t.value===e)?.label??e}function li(e,t){let n=e?.[t];return typeof n==`string`?n:``}function ui(e,t,n=[]){let r=new URLSearchParams({window:e.window,limit:`40`});e.namespace&&r.set(`namespace`,e.namespace);for(let e of n){let n=li(t,e);n&&r.set(e,n)}return r}function di(e,t){return[`observability`,e,t.toString()]}var fi=e=>e.state.status===`error`?15e3:3e4;function pi(e,t,n=!0){return be({queryKey:di(e,t),queryFn:()=>xe(`/api/observability/${e}?${t}`),enabled:n,refetchInterval:fi})}function mi(e){return e.getQueryCache().findAll({queryKey:[`observability`]}).reduce((e,t)=>Math.max(e,t.state.dataUpdatedAt),0)||null}function hi(){let e=ve(),[t,n]=(0,G.useState)(()=>mi(e));return(0,G.useEffect)(()=>e.getQueryCache().subscribe(()=>n(mi(e))),[e]),t}function gi(e){let t={};return typeof e.window==`string`&&si.some(t=>t.value===e.window)&&(t.window=e.window),typeof e.namespace==`string`&&e.namespace.trim()&&(t.namespace=e.namespace.trim()),t}var _i=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],vi=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],yi=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],bi=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],xi=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Si=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],Ci={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},wi={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},Ti={micro:11,small:12,body:14,title:16,section:22,page:32},Ei={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`};export{Qe as $,En as A,jt as B,Q as C,In as D,Y as E,mn as F,pt as G,Tt as H,Kt as I,gt as J,bt as K,Ut as L,vn as M,gn as N,Rn as O,hn as P,et as Q,Vt as R,Gr as S,er as T,xt as U,Dt as V,Ct as W,$e as X,ot as Y,tt as Z,ci as _,Ei as a,Pe as at,Yr as b,wi as c,U as ct,gi as d,Oe as dt,rt as et,li as f,ke as ft,ui as g,pi as h,Ci as i,Ve as it,Tn as j,Ln as k,Ti as l,Be as lt,hi as m,xi as n,ze as nt,Si as o,He as ot,si as p,_t as q,vi as r,Ue as rt,yi as s,we as st,_i as t,Ge as tt,bi as u,Ce as ut,oi as v,rr as w,qr as x,Zr as y,Pt as z}; \ No newline at end of file +import{$ as e,A as t,C as n,G as r,J as i,K as a,N as o,S as s,St as c,X as l,Y as u,_t as d,a as f,at as p,b as m,dt as h,et as g,gt as _,j as v,k as y,m as b,mt as x,nt as S,ot as C,q as w,st as T,tt as E,v as D,x as O,z as k}from"./brand-MzZ03bSa.js";import{c as A,d as ee,h as te,m as j,p as ne,u as re}from"./auth-BeUORN-q.js";import{C as ie,S as ae,T as oe,_ as se,a as ce,b as M,c as N,d as le,f as P,g as F,h as ue,i as de,l as I,m as L,n as R,p as z,r as fe,s as pe,u as B,v as V,w as me,x as H,y as he}from"./Tooltip-BJiO7C_G.js";import{r as ge}from"./use-computed-color-scheme-6JIsge00.js";import{B as _e,O as ve,U as ye,i as be,n as xe,z as Se}from"./api-Be5Lq4YA.js";function Ce(e){return e[e.length-1]}function we(e,t){return typeof e==`function`?e(t):e}var Te=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;function U(e){for(let t in e)if(Te.call(e,t))return!0;return!1}var De=()=>Object.create(null),Oe=(e,t)=>ke(e,t,De);function ke(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=Ne(e)&&Ne(i);if(!a&&!(je(e)&&je(i)))return i;let o=a?e:Ae(e);if(!o)return i;let s=a?i:Ae(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;ti||!Pe(e[o],t[o],n)))return!1;return i===a}return!1}function Fe(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var Ie=/[\x00-\x1f\x7f"<>`{}]/g;function Le(e){return e.replace(Ie,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function Re(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return Le(t)}var ze=[`http:`,`https:`,`mailto:`,`tel:`];function Be(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function Ve(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=Re(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=Re(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function He(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function Ue(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var W=4,Ke=5;function qe(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=Ze(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=Xe(r);e.kind=Ke,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=Xe(r);e.kind=W,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)Je(e,t,r,c,i,a,o,s)}function Ye(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Xe(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function Ze(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function Qe(e,t){let n=Xe(`/`),r=new Uint16Array(6),i=[];for(let t of e)Je(!1,r,t,1,n,0,i);for(let e of i)e.sort(Ye);t.masksTree=n,t.flatCache=Ge(1e3)}function $e(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=it(e,t.masksTree);return t.flatCache.set(e,r),r}function et(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=Xe(`/`),Je(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),it(r,o,n)}function tt(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=it(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=ot(a.route)),t.matchCache.set(r,a),a}function nt(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function rt(e,t=!1,n){let r=Xe(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;Je(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&We(),o[e.id]=e,c!==0&&e.path){let t=nt(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(Ye);return{processedTree:{segmentTree:r,singleCache:Ge(1e3),matchCache:Ge(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function it(e,t,n=!1){let r=e.split(`/`),i=ct(e,r,t,n);if(!i)return null;let[a]=at(e,r,i);return{route:i.node.route,rawParams:a}}function at(e,t,n){let r=st(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;ee.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===W)>(e.node.kind===W)||t.node.kind===W==(e.node.kind===W)&&t.node.depth>e.node.depth)))}function pt(e){return mt(e.filter(e=>e!==void 0).join(`/`))}function mt(e){return e.replace(/\/{2,}/g,`/`)}function ht(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function gt(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function _t(e){return gt(ht(e))}function vt(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function yt(e,t,n){return vt(e,n)===vt(t,n)}function bt({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=mt(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=mt(e)),o=e.split(`/`);o.length>1&&Ce(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(Ce(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?mt(s):s)||`/`;return a&&r&&r.set(a,c),c}function xt(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function St(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>wt(e,n)).join(`/`):wt(r,n):r}function Ct({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=Tt:this.parentRoute||We();let r=n?Tt:t?.path;r&&r!==`/`&&(r=ht(r));let i=t?.id||r,a=n?Tt:pt([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=pt([`/`,a]));let o=a===`__root__`?`/`:pt([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=gt(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>Et({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},At=class extends kt{constructor(e){super(e)}},G=c(_(),1),K=x();function jt({children:e,fallback:t=null}){return(0,K.jsx)(G.Fragment,{children:Mt()?e:t})}function Mt(){return G.useSyncExternalStore(Nt,()=>!0,()=>!1)}function Nt(){return()=>{}}var Pt=G.createContext(void 0),Ft=G.createContext(void 0),It=d((e=>{var t=_();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Lt=d(((e,t)=>{t.exports=It()})),Rt=d((e=>{var t=_(),n=Lt();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),zt=d(((e,t)=>{t.exports=Rt()}))();function Bt(e,t){return e===t}function Vt(e,t,n=Bt){let r=(0,G.useCallback)(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=(0,G.useCallback)(()=>e?.get(),[e]);return(0,zt.useSyncExternalStoreWithSelector)(r,i,i,t,n)}var Ht={};function Ut(e,t){let n=G.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=ke(n.current,i):i}}function q(e){let t=ee(),n=G.useContext(e.from?Ft:Pt),r=e.from??n,i=t.stores.getMatchStore(r),a=Ut(e,t),o=Vt(i,e=>e?a(e):Ht);if(o!==Ht)return o;(e.shouldThrow??!0)&&We()}function Wt(e){return q({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Gt(e){let{select:t,...n}=e;return q({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Kt(e){return q({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function qt(e){return q({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Jt(e){return q({...e,select:t=>e.select?e.select(t.context):t.context})}function Yt(e){let t=G.useRef(e);return Pe(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Xt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Zt(e,t,n){if(e?.external)return Be(e.href,n)?void 0:e.href;if(!ln(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),Be(t,n)?void 0:t}catch{}}function Qt(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!yt(e.pathname,t.pathname,r))return!1}else{let n=vt(e.pathname,r),i=vt(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!Pe(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function $t(e,t){let n=ee(),r=j(t),{activeProps:i,inactiveProps:a,activeOptions:o,to:s,preload:c,preloadDelay:l,preloadIntentProximity:u,hashScrollIntoView:d,replace:f,startTransition:p,resetScroll:m,viewTransition:h,children:g,target:_,disabled:v,style:y,className:b,onClick:x,onBlur:S,onFocus:C,onMouseEnter:w,onMouseLeave:T,onTouchStart:E,ignoreBlocker:D,params:O,search:k,hash:A,state:ne,mask:re,reloadDocument:ie,unsafeRelative:ae,from:oe,_fromLocation:se,...ce}=e,M=Mt(),N=Yt(e.search),le=Yt(e.params),P=Yt(o),F=G.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,N,le,e.state,e.mask,e.unsafeRelative]),ue=G.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...F}),r=cn(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,v),i=Zt(r,s,n.protocolAllowlist);return[r?.href,i,Qt(e,t,P,n.basepath,M,i!==void 0)]},[P,v,M,F,n,s]),[de,I,L]=Vt(n.stores.location,ue,Xt),R=L?we(i,{})??tn:en,z=L?en:we(a,{})??en,fe=[b,R.className,z.className].filter(Boolean).join(` `),pe=(y||R.style||z.style)&&{...y,...R.style,...z.style},B=G.useRef(!1),V=e.reloadDocument||I||v?!1:c??n.options.defaultPreload,me=l??n.options.defaultPreloadDelay??0,H=G.useCallback(()=>{n.preloadRoute(F).catch(e=>{console.warn(e),console.warn(Ot)})},[n,F]),he=G.useCallback(e=>{if(!e){on(r);return}if(!(e.isIntersecting??V===`intent`)){e.isIntersecting===!1&&on(r);return}if(!me){H();return}an.has(r)||an.set(r,setTimeout(()=>{an.delete(r),H()},me))},[H,r,V,me]);te(r,he,V!==`viewport`),G.useEffect(()=>{B.current||V===`render`&&(H(),B.current=!0)},[H,V]);let ge=e=>{let t=e.currentTarget.getAttribute(`target`),r=_===void 0?t:_;!v&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...F,replace:f,resetScroll:m,hashScrollIntoView:d,startTransition:p,viewTransition:h,ignoreBlocker:D}))};if(I)return{...ce,ref:r,href:I,...g&&{children:g},..._&&{target:_},...v&&{disabled:v},...y&&{style:y},...b&&{className:b},...x&&{onClick:x},...S&&{onBlur:S},...C&&{onFocus:C},...w&&{onMouseEnter:w},...T&&{onMouseLeave:T},...E&&{onTouchStart:E}};let _e=()=>{V===`intent`&&H()},ve=()=>{V===`intent`&&on(r)};return{...ce,...R,...z,href:de,ref:r,onClick:sn([x,ge]),onBlur:sn([S,ve]),onFocus:sn([C,he]),onMouseEnter:sn([w,he]),onMouseLeave:sn([T,ve]),onTouchStart:sn([E,_e]),disabled:!!v,target:_,...pe&&{style:pe},...fe&&{className:fe},...v&&nn,...L&&rn}}var en={},tn={className:`active`},nn={role:`link`,"aria-disabled":!0},rn={"data-status":`active`,"aria-current":`page`},an=new WeakMap,on=e=>{clearTimeout(an.get(e)),an.delete(e)},sn=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function cn(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ln(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var un=G.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=$t(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return G.createElement(`a`,t,o)}return G.createElement(n,a,o)}),dn=class extends kt{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function fn(e){return new dn(e)}var pn=class extends At{constructor(e){super(e),this.useMatch=e=>q({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>Jt({...e,from:this.id}),this.useSearch=e=>qt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Kt({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Gt({...e,from:this.id}),this.useLoaderData=e=>Wt({...e,from:this.id}),this.useNavigate=()=>re({from:this.fullPath}),this.Link=G.forwardRef((e,t)=>(0,K.jsx)(un,{ref:t,from:this.fullPath,...e}))}};function mn(e){return new pn(e)}function hn(e){return e=>{let t=fn(e);return t.isRoot=!1,t}}function gn(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,o.preload=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(Fe(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r){if(ne)ne(a());else throw a()}return G.createElement(r,e)};return o.preload=a,o}function _n(e){return typeof e!=`string`||!e.includes(`var(--mantine-scale)`)?e:e.match(/^calc\((.*?)\)$/)?.[1].split(`*`)[0].trim()}function vn(e){let t=_n(e);return typeof t==`number`?t:typeof t==`string`?t.includes(`calc`)||t.includes(`var`)?t:t.includes(`px`)?Number(t.replace(`px`,``)):t.includes(`rem`)?Number(t.replace(`rem`,``))*16:t.includes(`em`)?Number(t.replace(`em`,``))*16:Number(t):NaN}function yn(e,t){let n=e;for(;(n=n.parentElement)&&!n.matches(t););return n}function bn(e,t,n){for(let n=e-1;n>=0;--n)if(!t[n].disabled)return n;if(n){for(let e=t.length-1;e>-1;--e)if(!t[e].disabled)return e}return e}function xn(e,t,n){for(let n=e+1;n{n?.(s);let c=Array.from(yn(s.currentTarget,e)?.querySelectorAll(t)||[]).filter(t=>Sn(s.currentTarget,t,e)),l=c.findIndex(e=>s.currentTarget===e),u=xn(l,c,r),d=bn(l,c,r),f=a===`rtl`?d:u,p=a===`rtl`?u:d;switch(s.key){case`ArrowRight`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[f].focus(),i&&c[f].click());break;case`ArrowLeft`:o===`horizontal`&&(s.stopPropagation(),s.preventDefault(),c[p].focus(),i&&c[p].click());break;case`ArrowUp`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[d].focus(),i&&c[d].click());break;case`ArrowDown`:o===`vertical`&&(s.stopPropagation(),s.preventDefault(),c[u].focus(),i&&c[u].click());break;case`Home`:s.stopPropagation(),s.preventDefault(),c[xn(-1,c,!1)]?.focus();break;case`End`:s.stopPropagation(),s.preventDefault(),c[bn(c.length,c,!1)]?.focus()}}}function wn(e,t={active:!0}){return typeof e!=`function`||!t.active?t.onKeyDown||ge:n=>{n.key===`Escape`&&(e(n),t.onTrigger?.())}}function J(e,t){return n=>{e?.(n),t?.(n)}}function Tn(e,t){return e in t?vn(t[e]):vn(e)}function En(e,t){let n=e.map(e=>({value:e,px:Tn(e,t)}));return n.sort((e,t)=>e.px-t.px),n}function Dn(e,t,n){return n?Array.from(yn(n,t)?.querySelectorAll(e)||[]).findIndex(e=>e===n):null}var On=[`mousedown`,`touchstart`];function kn(e,t,n,r=!0){let i=(0,G.useRef)(null),a=t||On,o=(0,G.useEffectEvent)(t=>{let{target:r}=t??{};if(!document.body.contains(r)&&r?.tagName!==`HTML`)return;let a=t.composedPath();Array.isArray(n)?n.every(e=>!!e&&!a.includes(e))&&e(t):i.current&&!a.includes(i.current)&&e(t)}),s=a.join(`,`);return(0,G.useEffect)(()=>{if(!r)return;let e=s.split(`,`);return e.forEach(e=>document.addEventListener(e,o)),()=>{e.forEach(e=>document.removeEventListener(e,o))}},[s,r]),i}var An=[`mouse`,`touch`],jn=10;function Mn(e,t={}){let{threshold:n=400,events:r=An,cancelOnMove:i=!1,onStart:a,onFinish:o,onCancel:s}=t,c=(0,G.useRef)(!1),l=(0,G.useRef)(!1),u=(0,G.useRef)(-1),d=(0,G.useRef)(null);return(0,G.useEffect)(()=>()=>window.clearTimeout(u.current),[]),(0,G.useMemo)(()=>{if(typeof e!=`function`)return{};let t=i!==!1,f=i===!0?jn:i===!1?0:i,p=t=>{(Fn(t)||Pn(t))&&(a&&a(t),d.current=Nn(t),l.current=!0,u.current=window.setTimeout(()=>{e(t),c.current=!0},n))},m=e=>{(Fn(e)||Pn(e))&&(c.current?o&&o(e):l.current&&s&&s(e),c.current=!1,l.current=!1,d.current=null,u.current!==-1&&(window.clearTimeout(u.current),u.current=-1))},h=e=>{if(!t||!l.current||c.current)return;let n=Nn(e);if(!n||!d.current)return;let r=n.x-d.current.x,i=n.y-d.current.y;Math.sqrt(r*r+i*i)>f&&m(e)},g={};return r.includes(`mouse`)&&(g.onMouseDown=p,g.onMouseUp=m,g.onMouseLeave=m,t&&(g.onMouseMove=h)),r.includes(`touch`)&&(g.onTouchStart=p,g.onTouchEnd=m,g.onTouchCancel=m,t&&(g.onTouchMove=h)),g},[e,n,s,o,a,i,r.join(`,`)])}function Nn(e){if(Pn(e)){let t=e.touches[0]??e.changedTouches[0];return t?{x:t.clientX,y:t.clientY}:null}return{x:e.clientX,y:e.clientY}}function Pn(e){return window.TouchEvent?e.nativeEvent instanceof TouchEvent:`touches`in e.nativeEvent}function Fn(e){return e.nativeEvent instanceof MouseEvent}function In({color:e,theme:t,autoContrast:n,colorScheme:r}){return(typeof n==`boolean`?n:t.autoContrast)&&w({color:e||t.primaryColor,theme:t,colorScheme:r}).isLight?`var(--mantine-color-black)`:`var(--mantine-color-white)`}function Ln(e,t,n){return In({color:n===`dark`?e.dark:e.light,theme:t,colorScheme:n,autoContrast:!0})}function Rn(e,t){let n=e.colors[e.primaryColor];return r(n)?e.autoContrast?Ln(n,e,t):`var(--mantine-color-white)`:In({color:n[i(e,t)],theme:e,autoContrast:null})}function zn({open:e,close:t,openDelay:n,closeDelay:r}){let i=(0,G.useRef)(-1),a=(0,G.useRef)(-1),o=()=>{window.clearTimeout(i.current),window.clearTimeout(a.current)};return(0,G.useEffect)(()=>o,[]),{openDropdown:()=>{o(),n===0||n===void 0?e():i.current=window.setTimeout(e,n)},closeDropdown:()=>{o(),r===0||r===void 0?t():a.current=window.setTimeout(t,r)}}}var[Bn,Vn]=me(`Popover component was not found in the tree`);function Hn({childProps:e,disabled:t,opened:n,longPressDelay:r=500,setReference:i,open:a}){let o=(0,G.useRef)(!1),s=(0,G.useRef)(!1),c=(0,G.useRef)(null),l=(0,G.useRef)(t);l.current=t;let u=(e,t,n)=>{i({getBoundingClientRect:()=>({x:e,y:t,width:0,height:0,top:t,left:e,right:e,bottom:t,toJSON:()=>void 0}),contextElement:n}),a()},d=J(e.onMouseDown,e=>{t||e.button===2&&e.stopPropagation()}),f=J(e.onContextMenu,e=>{t||e.defaultPrevented||(e.preventDefault(),!s.current&&(u(e.clientX,e.clientY,e.currentTarget),o.current&&(s.current=!0)))}),p=Mn(e=>{if(l.current||s.current)return;let t=e,n=t.touches[0]??t.changedTouches[0];n&&(u(n.clientX,n.clientY,c.current),s.current=!0)},{threshold:r,events:[`touch`],cancelOnMove:!0,onStart:e=>{o.current=!0,s.current=!1,c.current=e.currentTarget},onFinish:e=>{o.current=!1,s.current=!1,l.current||e.preventDefault()},onCancel:()=>{o.current=!1,s.current=!1}});return{onContextMenu:f,onMouseDown:d,onTouchStart:J(e.onTouchStart,p.onTouchStart),onTouchEnd:J(e.onTouchEnd,p.onTouchEnd),onTouchCancel:J(e.onTouchCancel,p.onTouchCancel),onTouchMove:J(e.onTouchMove,p.onTouchMove),style:t?e.style:{...e.style,WebkitTouchCallout:`none`,WebkitUserSelect:`none`,userSelect:`none`},"data-expanded":n?!0:void 0}}function Un(e){let{children:t,disabled:n,longPressDelay:r}=v(`PopoverContextMenu`,null,e),i=H(t);if(!i)throw Error(`Popover.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||a.disabled,opened:a.opened,longPressDelay:r,setReference:a.reference,open:()=>{a.opened||a.onToggle()}}))}Un.displayName=`@mantine/core/PopoverContextMenu`;var Wn={dropdown:`m_38a85659`,arrow:`m_a31dc6c1`,overlay:`m_3d7bc908`},Gn=n(t=>{let n=v(`PopoverDropdown`,null,t),{className:r,style:i,vars:a,children:o,onKeyDownCapture:s,variant:c,classNames:l,styles:u,ref:d,...f}=n,p=Vn(),{dir:m}=M(),g=p.arrowPosition===`merge`&&p.withArrow?ce({position:p.placement,dir:m}):void 0,_=ye({opened:p.opened,shouldReturnFocus:p.returnFocus}),y=p.withRoles?{"aria-labelledby":p.getTargetId(),id:p.getDropdownId(),role:`dialog`,tabIndex:-1}:{},b=e(d,p.floating);return p.disabled?null:(0,K.jsx)(R,{...p.portalProps,withinPortal:p.withinPortal,children:(0,K.jsx)(D,{mounted:p.opened,...p.transitionProps,transition:p.transitionProps?.transition||`fade`,duration:p.transitionProps?.duration??150,keepMounted:p.keepMounted,keepMountedMode:p.keepMountedMode,exitDuration:typeof p.transitionProps?.exitDuration==`number`?p.transitionProps.exitDuration:p.transitionProps?.duration,children:e=>(0,K.jsx)(Se,{active:p.trapFocus&&p.opened,innerRef:b,children:(0,K.jsxs)(O,{...y,...f,variant:c,onKeyDownCapture:wn(()=>{p.onClose?.(),p.onDismiss?.()},{active:p.closeOnEscape,onTrigger:_,onKeyDown:s}),"data-position":p.placement,"data-fixed":p.floatingStrategy===`fixed`||void 0,...p.getStyles(`dropdown`,{className:r,props:n,classNames:l,styles:u,style:[{...e,...g,zIndex:p.zIndex,top:p.y??0,left:p.x??0,width:p.width===`target`?void 0:h(p.width),...p.referenceHidden?{display:`none`}:null},p.resolvedStyles?.dropdown,u?.dropdown,i]}),children:[o,(0,K.jsx)(de,{ref:p.arrowRef,arrowX:p.arrowX,arrowY:p.arrowY,visible:p.withArrow,position:p.placement,arrowSize:p.arrowSize,arrowRadius:p.arrowRadius,arrowOffset:p.arrowOffset,arrowPosition:p.arrowPosition,...p.getStyles(`arrow`,{props:n,classNames:l,styles:u})})]})})})})});Gn.classes=Wn,Gn.displayName=`@mantine/core/PopoverDropdown`;var Kn={refProp:`ref`,popupType:`dialog`},qn=n(t=>{let{children:n,refProp:r,popupType:i,ref:a,...o}=v(`PopoverTarget`,Kn,t),s=H(n);if(!s)throw Error(`Popover.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let c=o,l=Vn(),d=e(l.reference,ae(s),a),f=l.withRoles?{"aria-haspopup":i,"aria-expanded":l.opened,"aria-controls":l.opened?l.getDropdownId():void 0,id:l.getTargetId()}:{},p=s.props;return(0,G.cloneElement)(s,{...c,...f,...l.targetProps,className:u(l.targetProps.className,c.className,p.className),[r]:d,...l.controlled?null:{onClick:e=>{l.onToggle(),p.onClick?.(e)}}})});qn.displayName=`@mantine/core/PopoverTarget`;function Jn(e){if(e===void 0)return{shift:!0,flip:!0};let t={...e};return e.shift===void 0&&(t.shift=!0),e.flip===void 0&&(t.flip=!0),t}function Yn(e,t,n,r){let i=Jn(e.middlewares),a=[F(e.offset),z()];if(i.flip&&!n){let e=typeof i.flip==`boolean`?{}:i.flip,t=r?{fallbackStrategy:`initialPlacement`,...e}:e;a.push(P(t))}if(i.shift){let t=typeof i.shift==`boolean`?{}:i.shift;a.push(se(n=>{let r=n.placement.startsWith(`top`)||n.placement.startsWith(`bottom`);return{limiter:ue(),padding:5,...e.width===`target`&&r?{mainAxis:!1}:null,...t}}))}return i.inline&&a.push(typeof i.inline==`boolean`?L():L(i.inline)),a.push(le({element:e.arrowRef,padding:e.arrowOffset})),(i.size||e.width===`target`)&&a.push(V({...typeof i.size==`boolean`?{}:i.size,apply({rects:n,availableWidth:r,availableHeight:a,...o}){let s=t().refs.floating.current?.style??{};i.size&&(typeof i.size==`object`&&i.size.apply?i.size.apply({rects:n,availableWidth:r,availableHeight:a,...o}):Object.assign(s,{maxWidth:`${r}px`,maxHeight:`${a}px`})),e.width===`target`&&Object.assign(s,{width:`${n.reference.width}px`})}})),a}function Xn(e){let[t,n]=A({value:e.opened,defaultValue:e.defaultOpened,finalValue:!1,onChange:e.onChange}),r=(0,G.useRef)(t),[i,a]=(0,G.useState)(null),o=e.preventPositionChangeWhenVisible!==!1,s=(0,G.useRef)(t);t!==s.current&&(s.current=t,t&&i!==null&&a(null));let c=(0,G.useCallback)(()=>a(null),[]),l=()=>{t&&!e.disabled&&n(!1)},u=()=>{e.disabled||n(!t)},d=N({open:t,strategy:e.strategy,placement:o?i??e.position:e.position,middleware:Yn(e,()=>d,o&&i!==null,o),whileElementsMounted:e.keepMounted?void 0:he});(0,G.useEffect)(()=>{if(!e.keepMounted)return;let n=d.refs.reference.current,r=d.refs.floating.current;if(t&&n&&r)return he(n,r,d.update)},[e.keepMounted,t,d.update,d.elements.reference,d.elements.floating]);let f=(0,G.useRef)(!1);S(()=>{if(!t){f.current=!1;return}if(!o||i!==null)return;let e=d.refs.floating.current;if(e&&e.offsetHeight!==0&&e.offsetWidth!==0){if(!f.current){f.current=!0,d.update();return}d.isPositioned&&a(d.placement)}},[o,t,d.isPositioned,d.placement,i,d.update]);let p=(0,G.useRef)(d.placement);return S(()=>{p.current!==d.placement&&(p.current=d.placement,e.onPositionChange?.(d.placement))},[d.placement]),E(()=>{t!==r.current&&(t?e.onOpen?.():e.onClose?.()),r.current=t},[t,e.onClose,e.onOpen]),{floating:d,controlled:typeof e.opened==`boolean`,opened:t,onClose:l,onToggle:u,resetLockedPlacement:c}}var Zn={position:`bottom`,offset:8,transitionProps:{transition:`fade`,duration:150},middlewares:{flip:!0,shift:!0,inline:!1},arrowSize:7,arrowOffset:5,arrowRadius:0,arrowPosition:`side`,closeOnClickOutside:!0,withinPortal:!0,closeOnEscape:!0,trapFocus:!1,withRoles:!0,returnFocus:!1,withOverlay:!1,hideDetached:!0,preventPositionChangeWhenVisible:!0,clickOutsideEvents:[`mousedown`,`touchstart`],zIndex:ie(`popover`),__staticSelector:`Popover`,width:`max-content`},Qn=l((e,{radius:t,shadow:n})=>({dropdown:{"--popover-radius":t===void 0?void 0:p(t),"--popover-shadow":C(n)}}));function Y(e){let n=v(`Popover`,Zn,e),{children:r,position:i,offset:a,onPositionChange:o,opened:s,transitionProps:c,onExitTransitionEnd:l,onEnterTransitionEnd:u,width:d,middlewares:f,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,unstyled:x,classNames:S,styles:C,closeOnClickOutside:w,withinPortal:T,portalProps:E,closeOnEscape:O,clickOutsideEvents:A,trapFocus:ee,onClose:te,onDismiss:j,onOpen:ne,onChange:re,zIndex:ie,radius:ae,shadow:oe,id:se,defaultOpened:ce,__staticSelector:N,withRoles:le,disabled:P,returnFocus:F,variant:ue,keepMounted:de,keepMountedMode:I,vars:L,floatingStrategy:z,withOverlay:pe,overlayProps:B,hideDetached:V,attributes:me,preventPositionChangeWhenVisible:H,...he}=n,ge=y({name:N,props:n,classes:Wn,classNames:S,styles:C,unstyled:x,attributes:me,rootSelector:`dropdown`,vars:L,varsResolver:Qn}),{resolvedStyles:ve}=t({classNames:S,styles:C,props:n}),ye=(0,G.useRef)(null),[be,xe]=(0,G.useState)(null),[Se,Ce]=(0,G.useState)(null),{dir:we}=M(),Te=k(),Ee=g(se),U=Xn({middlewares:f,width:d,position:fe(we,i),offset:typeof a==`number`?a+(p?m/2:0):a,arrowRef:ye,arrowOffset:h,onPositionChange:o,opened:s,defaultOpened:ce,onChange:re,onOpen:ne,onClose:te,onDismiss:j,strategy:z,disabled:P,preventPositionChangeWhenVisible:H,keepMounted:de});kn(()=>{w&&(U.onClose(),j?.())},A,[be,Se]);let De=(0,G.useCallback)(e=>{xe(e),U.floating.refs.setReference(e)},[U.floating.refs.setReference]),Oe=(0,G.useCallback)(e=>{Ce(e),U.floating.refs.setFloating(e)},[U.floating.refs.setFloating]),ke=(0,G.useCallback)(()=>{c?.onExited?.(),l?.(),U.resetLockedPlacement()},[c?.onExited,l,U.resetLockedPlacement]),Ae=(0,G.useCallback)(()=>{c?.onEntered?.(),u?.()},[c?.onEntered,u]);return(0,K.jsxs)(Bn,{value:{returnFocus:F,disabled:P,controlled:U.controlled,reference:De,floating:Oe,x:U.floating.x,y:U.floating.y,arrowX:U.floating?.middlewareData?.arrow?.x,arrowY:U.floating?.middlewareData?.arrow?.y,opened:U.opened,arrowRef:ye,transitionProps:{...c,onExited:ke,onEntered:Ae},width:d,withArrow:p,arrowSize:m,arrowOffset:h,arrowRadius:_,arrowPosition:b,placement:U.floating.placement,trapFocus:ee,withinPortal:T,portalProps:E,zIndex:ie,radius:ae,shadow:oe,closeOnEscape:O,onDismiss:j,onClose:U.onClose,onToggle:U.onToggle,getTargetId:()=>Ee,getDropdownId:()=>`${Ee}-dropdown`,withRoles:le,targetProps:he,__staticSelector:N,classNames:S,styles:C,unstyled:x,variant:ue,keepMounted:de,keepMountedMode:I,getStyles:ge,resolvedStyles:ve,floatingStrategy:z,referenceHidden:V&&Te!==`test`?U.floating.middlewareData.hide?.referenceHidden:!1},children:[r,pe&&(0,K.jsx)(D,{transition:`fade`,mounted:U.opened,duration:c?.duration||250,exitDuration:c?.exitDuration||250,children:e=>(0,K.jsx)(R,{withinPortal:T,children:(0,K.jsx)(_e,{...B,...ge(`overlay`,{className:B?.className,style:[e,B?.style]})})})})]})}Y.Target=qn,Y.Dropdown=Gn,Y.ContextMenu=Un,Y.varsResolver=Qn,Y.displayName=`@mantine/core/Popover`,Y.extend=e=>e,Y.withProps=e=>{let t=t=>(0,K.jsx)(Y,{...e,...t});return t.extend=Y.extend,t.displayName=`WithProps(${Y.displayName})`,t};function $n({style:e,size:t=16,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 15 15`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:{...e,width:h(t),height:h(t),display:`block`},...n,children:(0,K.jsx)(`path`,{d:`M3.13523 6.15803C3.3241 5.95657 3.64052 5.94637 3.84197 6.13523L7.5 9.56464L11.158 6.13523C11.3595 5.94637 11.6759 5.95657 11.8648 6.15803C12.0536 6.35949 12.0434 6.67591 11.842 6.86477L7.84197 10.6148C7.64964 10.7951 7.35036 10.7951 7.15803 10.6148L3.15803 6.86477C2.95657 6.67591 2.94637 6.35949 3.13523 6.15803Z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}$n.displayName=`@mantine/core/AccordionChevron`;function er({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{viewBox:`0 0 10 7`,fill:`none`,xmlns:`http://www.w3.org/2000/svg`,style:e===void 0?t:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`path`,{d:`M4 4.586L1.707 2.293A1 1 0 1 0 .293 3.707l3 3a.997.997 0 0 0 1.414 0l5-5A1 1 0 1 0 8.293.293L4 4.586z`,fill:`currentColor`,fillRule:`evenodd`,clipRule:`evenodd`})})}var tr={root:`m_347db0ec`,"root--dot":`m_fbd81e3d`,label:`m_5add502a`,section:`m_91fdda9b`},nr=l((e,{radius:t,color:n,gradient:r,variant:i,size:o,autoContrast:s,circle:c})=>{let l=e.variantColorResolver({color:n||e.primaryColor,theme:e,gradient:r,variant:i||`filled`,autoContrast:s});return{root:{"--badge-height":T(o,`badge-height`),"--badge-padding-x":T(o,`badge-padding-x`),"--badge-fz":T(o,`badge-fz`),"--badge-radius":c||t===void 0?void 0:p(t),"--badge-bg":n||i?l.background:void 0,"--badge-color":n||i?l.color:void 0,"--badge-bd":n||i?l.border:void 0,"--badge-dot-color":i===`dot`?a(n,e):void 0}}}),rr=s(e=>{let t=v(`Badge`,null,e),{classNames:n,className:r,style:i,styles:a,unstyled:o,vars:s,radius:c,color:l,gradient:u,leftSection:d,rightSection:f,children:p,variant:m,fullWidth:h,autoContrast:g,circle:_,mod:b,attributes:x,...S}=t,C=y({name:`Badge`,props:t,classes:tr,className:r,style:i,classNames:n,styles:a,unstyled:o,attributes:x,vars:s,varsResolver:nr});return(0,K.jsxs)(O,{variant:m,mod:[{block:h,circle:_,"with-right-section":!!f,"with-left-section":!!d},b],...C(`root`,{variant:m}),...S,children:[d&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`left`,children:d}),(0,K.jsx)(`span`,{...C(`label`),children:p}),f&&(0,K.jsx)(`span`,{...C(`section`),"data-position":`right`,children:f})]})});rr.classes=tr,rr.varsResolver=nr,rr.displayName=`@mantine/core/Badge`;var[ir,X]=me(`Menu component was not found in the tree`),ar=(0,G.createContext)(null);function or(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuCheckboxGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:[],onChange:r});return(0,K.jsx)(ar,{value:{values:a,onChange:(0,G.useCallback)(e=>{o(a.includes(e)?a.filter(t=>t!==e):[...a,e])},[a,o])},children:i})}or.displayName=`@mantine/core/MenuCheckboxGroup`;var sr=(0,G.createContext)(null);function cr({role:t,checked:n,indicator:r,onSelect:i,color:a,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,dataDisabled:d,className:f,style:p,styles:h,classNames:g,buttonRef:_,others:v}){let y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=J(v.onClick,()=>{d||(i(),s&&y.closeDropdownImmediately())}),E=J(v.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),D=J(v.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())}),O=a?x.variantColorResolver({color:a,theme:x,variant:`light`}):void 0,k=a?w({color:a,theme:x}):null,A=y.alignItemsLabels!==`none`||n;return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),...v,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:f,style:p,styles:h,classNames:g}),ref:e(C,_),role:t,"aria-checked":n,disabled:u,"data-menu-item":!0,"data-checked":n||void 0,"data-disabled":u||d||void 0,"data-mantine-stop-propagation":!0,onClick:T,onMouseMove:E,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:D}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[A&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:h,classNames:g}),"data-checked":n||void 0,children:n?r:null}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:h,classNames:g}),"data-menu-item-label":!0,children:l}),c&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:h,classNames:g}),"data-position":`right`,children:c})]})}var Z={dropdown:`m_dc9b7c9f`,label:`m_9bfac126`,divider:`m_efdf90cb`,item:`m_99ac2aa1`,search:`m_ef8769b6`,itemLabel:`m_5476e0d3`,itemIndicator:`m_8395186e`,itemSection:`m_8b75e504`,chevron:`m_b85b0bed`},lr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,defaultChecked:m,onChange:h,checkIcon:g,ref:_,...y}=v(`MenuCheckboxItem`,null,e),b=X(),x=(0,G.use)(ar),S=x&&f!==void 0?x.values.includes(f):void 0,[C,w]=A({value:p??S,defaultValue:m,finalValue:!1,onChange:h});return(0,K.jsx)(cr,{role:`menuitemcheckbox`,checked:C,indicator:g??b.checkIcon??(0,K.jsx)(er,{size:10}),onSelect:()=>{h?w(!C):x&&f!==void 0?x.onChange(f):w(!C)},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:_,others:y,children:l})});lr.classes=Z,lr.displayName=`@mantine/core/MenuCheckboxItem`;function ur(e){let{children:t,disabled:n,longPressDelay:r}=v(`MenuContextMenu`,null,e),i=H(t);if(!i)throw Error(`Menu.ContextMenu component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=Vn();return(0,G.cloneElement)(i,Hn({childProps:i.props,disabled:n||o.disabled,opened:a.opened,longPressDelay:r,setReference:o.reference,open:()=>a.openDropdown()}))}ur.displayName=`@mantine/core/MenuContextMenu`;var dr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuDivider`,null,e);return(0,K.jsx)(O,{...X().getStyles(`divider`,{className:n,style:r,styles:i,classNames:t}),...o})});dr.classes=Z,dr.displayName=`@mantine/core/MenuDivider`;var fr=500;function pr(e){return((e.querySelector(`[data-menu-item-label]`)??e).textContent??``).trim().toLowerCase()}function mr(e){return e.length>1&&e.split(``).every(t=>t===e[0])}function hr({enabled:e,opened:t,getDropdown:n}){let r=(0,G.useRef)({buffer:``,timeoutId:null});return(0,G.useEffect)(()=>{if(t&&e)return;let n=r.current;n.timeoutId!==null&&(window.clearTimeout(n.timeoutId),n.timeoutId=null),n.buffer=``},[t,e]),(0,G.useEffect)(()=>()=>{let{timeoutId:e}=r.current;e!==null&&window.clearTimeout(e)},[]),t=>{if(!e||t.defaultPrevented||t.ctrlKey||t.metaKey||t.altKey||t.key.length!==1||t.key===` `)return;let i=t.target;if(i&&(i.tagName===`INPUT`||i.tagName===`TEXTAREA`||i.tagName===`SELECT`||i.isContentEditable))return;let a=n();if(!a)return;let o=Array.from(a.querySelectorAll(`[data-menu-item]:not([data-disabled])`)).filter(e=>e.closest(`[data-menu-dropdown]`)===a);if(o.length===0)return;let s=r.current;s.buffer=(s.buffer+t.key).toLowerCase(),s.timeoutId!==null&&window.clearTimeout(s.timeoutId),s.timeoutId=window.setTimeout(()=>{s.buffer=``,s.timeoutId=null},fr);let c=document.activeElement,l=c?o.indexOf(c):-1,u=null;if(s.buffer.length===1||mr(s.buffer)){let e=s.buffer[0],t=l+1;for(let n=0;n{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onKeyDown:l,children:u,ref:d,...f}=v(`MenuDropdown`,null,t),p=(0,G.useRef)(null),m=X(),h=hr({enabled:!m.hasSearch,opened:m.opened,getDropdown:()=>p.current}),g=J(l,e=>{h(e),!(e.defaultPrevented||m.hasSearch)&&(e.key===`ArrowUp`||e.key===`ArrowDown`)&&(e.preventDefault(),p.current?.querySelectorAll(`[data-menu-item]:not(:disabled)`)[0]?.focus())}),_=J(s,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.openDropdown()),y=J(c,()=>(m.trigger===`hover`||m.trigger===`click-hover`)&&m.closeDropdown());return(0,K.jsxs)(Y.Dropdown,{...f,onMouseEnter:_,onMouseLeave:y,role:`menu`,"aria-orientation":`vertical`,ref:e(d,p),...m.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:g,children:[m.withInitialFocusPlaceholder&&!m.hasSearch&&(0,K.jsx)(`div`,{role:`presentation`,tabIndex:-1,"data-autofocus":!0,"data-mantine-stop-propagation":!0,style:{outline:0}}),u]})});gr.classes=Z,gr.displayName=`@mantine/core/MenuDropdown`;var _r=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,closeMenuOnClick:l,leftSection:u,rightSection:d,children:f,disabled:p,"data-disabled":h,ref:g,..._}=v(`MenuItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=J(T.onClick,()=>{h||(typeof l==`boolean`?l&&y.closeDropdownImmediately():y.closeOnItemClick&&y.closeDropdownImmediately())}),D=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),O=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,k=c?w({color:c,theme:x}):null,A=J(T.onKeyDown,e=>{e.key===`ArrowLeft`&&b&&(b.close(),b.focusParentItem())});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g),role:`menuitem`,disabled:p,"data-menu-item":!0,"data-disabled":p||h||void 0,"data-mantine-stop-propagation":!0,onClick:E,onMouseMove:D,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:A}),__vars:{"--menu-item-color":k?.isThemeColor&&k?.shade===void 0?`var(--mantine-color-${k.color}-6)`:O?.color,"--menu-item-hover":O?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),u&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:u}),f&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:f}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:d})]})});_r.classes=Z,_r.displayName=`@mantine/core/MenuItem`;var vr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,...o}=v(`MenuLabel`,null,e);return(0,K.jsx)(O,{...X().getStyles(`label`,{className:n,style:r,styles:i,classNames:t}),...o})});vr.classes=Z,vr.displayName=`@mantine/core/MenuLabel`;var yr=(0,G.createContext)(null);function br(e){let{value:t,defaultValue:n,onChange:r,children:i}=v(`MenuRadioGroup`,null,e),[a,o]=A({value:t,defaultValue:n,finalValue:null,onChange:r});return(0,K.jsx)(yr,{value:{value:a,onChange:e=>o(e)},children:i})}br.displayName=`@mantine/core/MenuRadioGroup`;function xr({size:e,style:t,...n}){return(0,K.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,fill:`none`,viewBox:`0 0 5 5`,style:{width:h(e),height:h(e),...t},"aria-hidden":!0,...n,children:(0,K.jsx)(`circle`,{cx:`2.5`,cy:`2.5`,r:`2.5`,fill:`currentColor`})})}var Sr=n(e=>{let{classNames:t,className:n,style:r,styles:i,vars:a,color:o,closeMenuOnClick:s,rightSection:c,children:l,disabled:u,"data-disabled":d,value:f,checked:p,onChange:m,checkIcon:h,ref:g,..._}=v(`MenuRadioItem`,null,e),y=X(),b=(0,G.use)(yr),x=p??(b?b.value===f:!1);return(0,K.jsx)(cr,{role:`menuitemradio`,checked:x,indicator:h??y.checkIcon??(0,K.jsx)(xr,{size:5}),onSelect:()=>{x||(m?m(f):b&&b.onChange(f))},color:o,closeMenuOnClick:s,rightSection:c,disabled:u,dataDisabled:d,className:n,style:r,styles:i,classNames:t,buttonRef:g,others:_,children:l})});Sr.classes=Z,Sr.displayName=`@mantine/core/MenuRadioItem`;var Cr=`[data-menu-item]:not([data-disabled])`,wr=`[data-menu-active]`;function Tr(e){return e?.closest(`[data-menu-dropdown]`)}function Er(e){return e?Array.from(e.querySelectorAll(Cr)).filter(t=>t.closest(`[data-menu-dropdown]`)===e):[]}function Dr(e){e&&e.querySelectorAll(wr).forEach(t=>{t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}function Or(e,t){Dr(t),e&&(e.setAttribute(`data-menu-active`,`true`),e.scrollIntoView({block:`nearest`}))}function kr(e){return e.findIndex(e=>e.hasAttribute(`data-menu-active`))}var Ar={clearSearchOnClose:!0},jr=n(t=>{let{classNames:n,styles:r,onKeyDown:i,onChange:a,size:o,clearSearchOnClose:s,ref:c,...l}=v(`MenuSearch`,Ar,t),u=X(),d=(0,G.useRef)(null),f=e(c,d),p=(0,G.useRef)(a);p.current=a,(0,G.useEffect)(()=>u.registerSearch(),[u.registerSearch]),(0,G.useEffect)(()=>{s?u.searchExitClearRef.current=()=>{p.current?.({currentTarget:{value:``}})}:u.searchExitClearRef.current=null},[s,u.searchExitClearRef]),(0,G.useEffect)(()=>{u.opened||Dr(Tr(d.current))},[u.opened]);let m=J(a,e=>{Dr(Tr(e.currentTarget))}),h=J(i,e=>{if(e.defaultPrevented)return;let t=Tr(e.currentTarget),n=Er(t);if(e.key===`ArrowDown`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r>=n.length-1?u.loop?0:r:r+1]??null,t)}else if(e.key===`ArrowUp`){if(e.preventDefault(),n.length===0)return;let r=kr(n);Or(n[r<=0?r===-1||u.loop?n.length-1:0:r-1]??null,t)}else if(e.key===`Home`)e.preventDefault(),n.length>0&&Or(n[0],t);else if(e.key===`End`)e.preventDefault(),n.length>0&&Or(n[n.length-1],t);else if(e.key===`Enter`){if(e.nativeEvent.isComposing||e.nativeEvent.keyCode===229)return;let t=n[kr(n)];t&&(e.preventDefault(),t.hasAttribute(`data-sub-menu-item`)?(t.focus(),t.dispatchEvent(new KeyboardEvent(`keydown`,{key:`ArrowRight`,bubbles:!0}))):t.click())}}),g=u.getStyles(`search`);return(0,K.jsx)(b,{"data-autofocus":!0,"data-mantine-stop-propagation":!0,type:`search`,size:o,...l,ref:f,classNames:[{input:g.className},n],styles:[{input:g.style},r],onKeyDown:h,onChange:m,__staticSelector:`Menu`})});jr.classes=Z,jr.displayName=`@mantine/core/MenuSearch`;var Mr=n(t=>{let{classNames:n,className:r,style:i,styles:a,vars:o,onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u,onKeyDown:d,children:f,ref:p,...m}=v(`MenuSubDropdown`,null,t),h=(0,G.useRef)(null),g=X(),_=(0,G.use)(sr),y=hr({enabled:!g.hasSearch,opened:_?.opened??!1,getDropdown:()=>h.current}),b=J(d,e=>{y(e),!e.ctrlKey&&!e.metaKey&&!e.altKey&&e.key.length===1&&e.key!==` `&&e.stopPropagation()}),x=_?.getFloatingProps({onMouseEnter:s,onMouseLeave:c,onPointerEnter:l,onPointerLeave:u});return(0,K.jsx)(Y.Dropdown,{...m,...x,role:`menu`,"aria-orientation":`vertical`,ref:e(p,h,_?.setFloating),...g.getStyles(`dropdown`,{className:r,style:i,styles:a,classNames:n,withStaticClass:!1}),tabIndex:-1,"data-menu-dropdown":!0,onKeyDown:b,children:f})});Mr.classes=Z,Mr.displayName=`@mantine/core/MenuSubDropdown`;var Nr=s(t=>{let{classNames:n,className:r,style:i,styles:a,vars:s,color:c,leftSection:l,rightSection:u,children:d,disabled:f,"data-disabled":p,closeMenuOnClick:h,ref:g,..._}=v(`MenuSubItem`,null,t),y=X(),b=(0,G.use)(sr),x=o(),{dir:S}=M(),C=(0,G.useRef)(null),T=_,E=c?x.variantColorResolver({color:c,theme:x,variant:`light`}):void 0,D=c?w({color:c,theme:x}):null,O=J(T.onKeyDown,e=>{e.key===`ArrowRight`&&(b?.open(),b?.focusFirstItem()),e.key===`ArrowLeft`&&b?.parentContext&&(b.parentContext.close(),b.parentContext.focusParentItem())}),k=J(T.onClick,()=>{!p&&h&&y.closeDropdownImmediately()}),A=J(T.onMouseMove,()=>{if(!y.hasSearch)return;let e=C.current?.closest(`[data-menu-dropdown]`);e&&e.querySelectorAll(`[data-menu-active]`).forEach(t=>{t!==C.current&&t.closest(`[data-menu-dropdown]`)===e&&t.removeAttribute(`data-menu-active`)})}),ee=b?.getReferenceProps({onMouseEnter:T.onMouseEnter,onMouseLeave:T.onMouseLeave,onPointerEnter:T.onPointerEnter,onPointerLeave:T.onPointerLeave});return(0,K.jsxs)(m,{onMouseDown:e=>e.preventDefault(),..._,...ee,unstyled:y.unstyled,tabIndex:y.menuItemTabIndex,...y.getStyles(`item`,{className:r,style:i,styles:a,classNames:n}),ref:e(C,g,b?.setReference),role:`menuitem`,disabled:f,"data-menu-item":!0,"data-sub-menu-item":!0,"data-disabled":f||p||void 0,"data-mantine-stop-propagation":!0,onClick:k,onMouseMove:A,onKeyDown:Cn({siblingSelector:`[data-menu-item]:not([data-disabled])`,parentSelector:`[data-menu-dropdown]`,activateOnFocus:!1,loop:y.loop,dir:S,orientation:`vertical`,onKeyDown:O}),__vars:{"--menu-item-color":D?.isThemeColor&&D?.shade===void 0?`var(--mantine-color-${D.color}-6)`:E?.color,"--menu-item-hover":E?.hover},children:[y.alignItemsLabels===`all`&&(0,K.jsx)(`div`,{...y.getStyles(`itemIndicator`,{styles:a,classNames:n}),"data-placeholder":!0}),l&&(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`left`,children:l}),d&&(0,K.jsx)(`div`,{...y.getStyles(`itemLabel`,{styles:a,classNames:n}),"data-menu-item-label":!0,children:d}),(0,K.jsx)(`div`,{...y.getStyles(`itemSection`,{styles:a,classNames:n}),"data-position":`right`,children:u||(0,K.jsx)($n,{...y.getStyles(`chevron`),size:14})})]})});Nr.classes=Z,Nr.displayName=`@mantine/core/MenuSubItem`;function Pr({children:e,refProp:t}){if(!oe(e))throw Error(`Menu.Sub.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);return X(),(0,K.jsx)(Y.Target,{refProp:t,popupType:`menu`,children:e})}Pr.displayName=`@mantine/core/MenuSubTarget`;var Fr={offset:0,position:`right-start`,safeAreaPolygon:!0,transitionProps:{duration:0},openDelay:0,middlewares:{shift:{crossAxis:!0}}};function Ir(e){let{children:t,closeDelay:n,openDelay:r,position:i,safeAreaPolygon:a,opened:o,onChange:s,...c}=v(`MenuSub`,Fr,e),l=g(),[u,d]=A({value:o,finalValue:!1,onChange:s}),f=(0,G.use)(sr),p=X(),{dir:m}=M(),h=fe(m,i),_=f?.registerOpenSub??p.registerOpenSub,y=(0,G.useRef)(null),b=(0,G.useCallback)(e=>{let t=y.current;return t&&t!==e&&t(),y.current=e,()=>{y.current===e&&(y.current=null)}},[]),x=(0,G.useRef)(d);x.current=d;let S=(0,G.useCallback)(()=>x.current(!0),[]),C=(0,G.useCallback)(()=>x.current(!1),[]);(0,G.useEffect)(()=>{if(u)return _(C)},[u,_,C]);let{context:w,refs:T}=N({placement:h,open:u,onOpenChange:e=>{e?S():C()}}),{getReferenceProps:E,getFloatingProps:D}=B([I(w,{handleClose:a?pe(typeof a==`object`?a:void 0):void 0,delay:{open:r,close:n}})]);return(0,K.jsx)(sr,{value:{opened:u,close:C,open:S,focusFirstItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-dropdown`)?.querySelectorAll(`[data-menu-item]:not([data-disabled])`)[0]?.focus()},16),focusParentItem:()=>window.setTimeout(()=>{document.getElementById(`${l}-target`)?.focus()},16),parentContext:f,setReference:T.setReference,setFloating:T.setFloating,getReferenceProps:E,getFloatingProps:D,registerOpenSub:b},children:(0,K.jsx)(Y,{opened:u,onChange:e=>e?S():C(),withinPortal:!1,withArrow:!1,id:l,position:i,...c,children:t})})}Ir.extend=e=>e,Ir.displayName=`@mantine/core/MenuSub`,Ir.Target=Pr,Ir.Dropdown=Mr,Ir.Item=Nr;var Lr={refProp:`ref`};function Rr(e){let{children:t,refProp:n,...r}=v(`MenuTarget`,Lr,e),i=H(t);if(!i)throw Error(`Menu.Target component children should be an element or a component that accepts ref. Fragments, strings, numbers and other primitive values are not supported`);let a=X(),o=i.props,s=J(o.onClick,()=>{a.trigger===`click`?a.toggleDropdown():a.trigger===`click-hover`&&(a.setOpenedViaClick(!0),a.opened||a.openDropdown())}),c=J(o.onMouseEnter,()=>(a.trigger===`hover`||a.trigger===`click-hover`)&&a.openDropdown()),l=J(o.onMouseLeave,()=>{(a.trigger===`hover`||a.trigger===`click-hover`&&!a.openedViaClick)&&a.closeDropdown()});return(0,K.jsx)(Y.Target,{refProp:n,popupType:`menu`,...r,children:(0,G.cloneElement)(i,{onClick:s,onMouseEnter:c,onMouseLeave:l,"data-expanded":a.opened?!0:void 0})})}Rr.displayName=`@mantine/core/MenuTarget`;var zr={trapFocus:!0,closeOnItemClick:!0,withInitialFocusPlaceholder:!0,clickOutsideEvents:[`mousedown`,`touchstart`,`keydown`],loop:!0,trigger:`click`,openDelay:0,closeDelay:100,menuItemTabIndex:-1,alignItemsLabels:`with-indicators`},Q=n(e=>{let n=v(`Menu`,zr,e),{children:r,onOpen:i,onClose:a,opened:o,defaultOpened:s,trapFocus:c,onChange:l,closeOnItemClick:u,loop:d,closeOnEscape:f,trigger:p,openDelay:m,closeDelay:h,classNames:g,styles:_,unstyled:b,variant:x,vars:S,menuItemTabIndex:C,keepMounted:w,withInitialFocusPlaceholder:T,attributes:E,onExitTransitionEnd:D,alignItemsLabels:O,checkIcon:k,...ee}=n,te=y({name:`Menu`,classes:Z,props:n,classNames:g,styles:_,unstyled:b,attributes:E}),[j,ne]=A({value:o,defaultValue:s,finalValue:!1,onChange:l}),[re,ie]=(0,G.useState)(!1),ae=()=>{ne(!1),ie(!1),j&&a?.()},oe=()=>{ne(!0),!j&&i?.()},se=()=>{j?ae():oe()},{openDropdown:ce,closeDropdown:M}=zn({open:oe,close:ae,closeDelay:h,openDelay:m}),N=(0,G.useRef)(null),le=(0,G.useCallback)(e=>{let t=N.current;return t&&t!==e&&t(),N.current=e,()=>{N.current===e&&(N.current=null)}},[]),P=(0,G.useRef)(0),[F,ue]=(0,G.useState)(!1),de=(0,G.useCallback)(()=>(P.current+=1,P.current===1&&ue(!0),()=>{--P.current,P.current===0&&ue(!1)}),[]),I=(0,G.useRef)(null),L=()=>{I.current?.(),D?.()},R=e=>Dn(`[data-menu-item]`,`[data-menu-dropdown]`,e),{resolvedClassNames:z,resolvedStyles:fe}=t({classNames:g,styles:_,props:n});return(0,K.jsx)(ir,{value:{getStyles:te,opened:j,toggleDropdown:se,getItemIndex:R,openedViaClick:re,setOpenedViaClick:ie,closeOnItemClick:u,closeDropdown:p===`click`?ae:M,openDropdown:p===`click`?oe:ce,closeDropdownImmediately:ae,loop:d,trigger:p,unstyled:b,menuItemTabIndex:C,withInitialFocusPlaceholder:T,registerOpenSub:le,hasSearch:F,registerSearch:de,searchExitClearRef:I,alignItemsLabels:O,checkIcon:k},children:(0,K.jsx)(Y,{returnFocus:!0,...ee,opened:j,onChange:se,defaultOpened:s,trapFocus:!w&&c,closeOnEscape:f,__staticSelector:`Menu`,classNames:z,styles:fe,unstyled:b,variant:x,keepMounted:w,onExitTransitionEnd:L,children:r})})});Q.displayName=`@mantine/core/Menu`,Q.classes=Z,Q.Item=_r,Q.Label=vr,Q.Dropdown=gr,Q.Target=Rr,Q.Divider=dr,Q.Search=jr,Q.Sub=Ir,Q.CheckboxItem=lr,Q.CheckboxGroup=or,Q.RadioItem=Sr,Q.RadioGroup=br,Q.ContextMenu=ur;var Br=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M144,128a16,16,0,1,1-16-16A16,16,0,0,1,144,128ZM60,112a16,16,0,1,0,16,16A16,16,0,0,0,60,112Zm136,0a16,16,0,1,0,16,16A16,16,0,0,0,196,112Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,96v64a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V96A16,16,0,0,1,32,80H224A16,16,0,0,1,240,96Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,80H32A16,16,0,0,0,16,96v64a16,16,0,0,0,16,16H224a16,16,0,0,0,16-16V96A16,16,0,0,0,224,80ZM60,140a12,12,0,1,1,12-12A12,12,0,0,1,60,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,128,140Zm68,0a12,12,0,1,1,12-12A12,12,0,0,1,196,140Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M138,128a10,10,0,1,1-10-10A10,10,0,0,1,138,128ZM60,118a10,10,0,1,0,10,10A10,10,0,0,0,60,118Zm136,0a10,10,0,1,0,10,10A10,10,0,0,0,196,118Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,128a12,12,0,1,1-12-12A12,12,0,0,1,140,128Zm56-12a12,12,0,1,0,12,12A12,12,0,0,0,196,116ZM60,116a12,12,0,1,0,12,12A12,12,0,0,0,60,116Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,128a8,8,0,1,1-8-8A8,8,0,0,1,136,128Zm-76-8a8,8,0,1,0,8,8A8,8,0,0,0,60,120Zm136,0a8,8,0,1,0,8,8A8,8,0,0,0,196,120Z`}))]]),Vr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z`}))]]),Hr=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M199,125.31l-49.88-18.39L130.69,57a19.92,19.92,0,0,0-37.38,0L74.92,106.92,25,125.31a19.92,19.92,0,0,0,0,37.38l49.88,18.39L93.31,231a19.92,19.92,0,0,0,37.38,0l18.39-49.88L199,162.69a19.92,19.92,0,0,0,0-37.38Zm-63.38,35.16a12,12,0,0,0-7.11,7.11L112,212.28l-16.47-44.7a12,12,0,0,0-7.11-7.11L43.72,144l44.7-16.47a12,12,0,0,0,7.11-7.11L112,75.72l16.47,44.7a12,12,0,0,0,7.11,7.11L180.28,144ZM140,40a12,12,0,0,1,12-12h12V16a12,12,0,0,1,24,0V28h12a12,12,0,0,1,0,24H188V64a12,12,0,0,1-24,0V52H152A12,12,0,0,1,140,40ZM252,88a12,12,0,0,1-12,12h-4v4a12,12,0,0,1-24,0v-4h-4a12,12,0,0,1,0-24h4V72a12,12,0,0,1,24,0v4h4A12,12,0,0,1,252,88Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M194.82,151.43l-55.09,20.3-20.3,55.09a7.92,7.92,0,0,1-14.86,0l-20.3-55.09-55.09-20.3a7.92,7.92,0,0,1,0-14.86l55.09-20.3,20.3-55.09a7.92,7.92,0,0,1,14.86,0l20.3,55.09,55.09,20.3A7.92,7.92,0,0,1,194.82,151.43Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M208,144a15.78,15.78,0,0,1-10.42,14.94L146,178l-19,51.62a15.92,15.92,0,0,1-29.88,0L78,178l-51.62-19a15.92,15.92,0,0,1,0-29.88L78,110l19-51.62a15.92,15.92,0,0,1,29.88,0L146,110l51.62,19A15.78,15.78,0,0,1,208,144ZM152,48h16V64a8,8,0,0,0,16,0V48h16a8,8,0,0,0,0-16H184V16a8,8,0,0,0-16,0V32H152a8,8,0,0,0,0,16Zm88,32h-8V72a8,8,0,0,0-16,0v8h-8a8,8,0,0,0,0,16h8v8a8,8,0,0,0,16,0V96h8a8,8,0,0,0,0-16Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.89,130.94,144.4,111.6,125.06,59.11a13.92,13.92,0,0,0-26.12,0L79.6,111.6,27.11,130.94a13.92,13.92,0,0,0,0,26.12L79.6,176.4l19.34,52.49a13.92,13.92,0,0,0,26.12,0L144.4,176.4l52.49-19.34a13.92,13.92,0,0,0,0-26.12Zm-4.15,14.86-55.08,20.3a6,6,0,0,0-3.56,3.56l-20.3,55.08a1.92,1.92,0,0,1-3.6,0L89.9,169.66a6,6,0,0,0-3.56-3.56L31.26,145.8a1.92,1.92,0,0,1,0-3.6l55.08-20.3a6,6,0,0,0,3.56-3.56l20.3-55.08a1.92,1.92,0,0,1,3.6,0l20.3,55.08a6,6,0,0,0,3.56,3.56l55.08,20.3a1.92,1.92,0,0,1,0,3.6ZM146,40a6,6,0,0,1,6-6h18V16a6,6,0,0,1,12,0V34h18a6,6,0,0,1,0,12H182V64a6,6,0,0,1-12,0V46H152A6,6,0,0,1,146,40ZM246,88a6,6,0,0,1-6,6H230v10a6,6,0,0,1-12,0V94H208a6,6,0,0,1,0-12h10V72a6,6,0,0,1,12,0V82h10A6,6,0,0,1,246,88Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M197.58,129.06,146,110l-19-51.62a15.92,15.92,0,0,0-29.88,0L78,110l-51.62,19a15.92,15.92,0,0,0,0,29.88L78,178l19,51.62a15.92,15.92,0,0,0,29.88,0L146,178l51.62-19a15.92,15.92,0,0,0,0-29.88ZM137,164.22a8,8,0,0,0-4.74,4.74L112,223.85,91.78,169A8,8,0,0,0,87,164.22L32.15,144,87,123.78A8,8,0,0,0,91.78,119L112,64.15,132.22,119a8,8,0,0,0,4.74,4.74L191.85,144ZM144,40a8,8,0,0,1,8-8h16V16a8,8,0,0,1,16,0V32h16a8,8,0,0,1,0,16H184V64a8,8,0,0,1-16,0V48H152A8,8,0,0,1,144,40ZM248,88a8,8,0,0,1-8,8h-8v8a8,8,0,0,1-16,0V96h-8a8,8,0,0,1,0-16h8V72a8,8,0,0,1,16,0v8h8A8,8,0,0,1,248,88Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196.2,132.81l-53.36-19.65L123.19,59.8a11.93,11.93,0,0,0-22.38,0L81.16,113.16,27.8,132.81a11.93,11.93,0,0,0,0,22.38l53.36,19.65,19.65,53.36a11.93,11.93,0,0,0,22.38,0l19.65-53.36,53.36-19.65a11.93,11.93,0,0,0,0-22.38Zm-2.77,14.87L138.35,168a4,4,0,0,0-2.37,2.37l-20.3,55.08a3.92,3.92,0,0,1-7.36,0L88,170.35A4,4,0,0,0,85.65,168l-55.08-20.3a3.92,3.92,0,0,1,0-7.36L85.65,120A4,4,0,0,0,88,117.65l20.3-55.08a3.92,3.92,0,0,1,7.36,0L136,117.65a4,4,0,0,0,2.37,2.37l55.08,20.3a3.92,3.92,0,0,1,0,7.36ZM148,40a4,4,0,0,1,4-4h20V16a4,4,0,0,1,8,0V36h20a4,4,0,0,1,0,8H180V64a4,4,0,0,1-8,0V44H152A4,4,0,0,1,148,40Zm96,48a4,4,0,0,1-4,4H228v12a4,4,0,0,1-8,0V92H208a4,4,0,0,1,0-8h12V72a4,4,0,0,1,8,0V84h12A4,4,0,0,1,244,88Z`}))]]),Ur=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z`}))]]),Wr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Br}));Wr.displayName=`DotsThreeIcon`;var Gr=Wr,Kr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Vr}));Kr.displayName=`PlusIcon`;var qr=Kr,Jr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Hr}));Jr.displayName=`SparkleIcon`;var Yr=Jr,Xr=G.forwardRef((e,t)=>G.createElement(f,{ref:t,...e,weights:Ur}));Xr.displayName=`TrashIcon`;var Zr=Xr,$=[];for(let e=0;e<256;++e)$.push((e+256).toString(16).slice(1));function Qr(e,t=0){return($[e[t+0]]+$[e[t+1]]+$[e[t+2]]+$[e[t+3]]+`-`+$[e[t+4]]+$[e[t+5]]+`-`+$[e[t+6]]+$[e[t+7]]+`-`+$[e[t+8]]+$[e[t+9]]+`-`+$[e[t+10]]+$[e[t+11]]+$[e[t+12]]+$[e[t+13]]+$[e[t+14]]+$[e[t+15]]).toLowerCase()}var $r=new Uint8Array(16);function ei(){return crypto.getRandomValues($r)}var ti={};function ni(e,t,n){let r;if(e)r=ii(e.random??e.rng?.()??ei(),e.msecs,e.seq,t,n);else{let e=Date.now(),i=ei();ri(ti,e,i),r=ii(i,ti.msecs,ti.seq,t,n)}return t??Qr(r)}function ri(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=ai(n),e.msecs=t):(e.seq=e.seq+1|0,e.seq===0&&e.msecs++),e}function ii(e,t,n,r,i=0){if(e.length<16)throw Error(`Random bytes length must be >= 16`);if(!r)r=new Uint8Array(16),i=0;else if(i<0||i+16>r.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);return t??=Date.now(),n??=ai(e),r[i++]=t/1099511627776&255,r[i++]=t/4294967296&255,r[i++]=t/16777216&255,r[i++]=t/65536&255,r[i++]=t/256&255,r[i++]=t&255,r[i++]=112|n>>>28&15,r[i++]=n>>>20&255,r[i++]=128|n>>>14&63,r[i++]=n>>>6&255,r[i++]=n<<2&255|e[10]&3,r[i++]=e[11],r[i++]=e[12],r[i++]=e[13],r[i++]=e[14],r[i++]=e[15],r}function ai(e){return(e[6]&127)<<24|e[7]<<16|e[8]<<8|e[9]}function oi(){return ni()}var si=[{value:`15m`,label:`15 minutes`},{value:`1h`,label:`1 hour`},{value:`6h`,label:`6 hours`},{value:`24h`,label:`24 hours`},{value:`168h`,label:`7 days`},{value:`720h`,label:`30 days`}];function ci(e){return si.find(t=>t.value===e)?.label??e}function li(e,t){let n=e?.[t];return typeof n==`string`?n:``}function ui(e,t,n=[]){let r=new URLSearchParams({window:e.window,limit:`40`});e.namespace&&r.set(`namespace`,e.namespace);for(let e of n){let n=li(t,e);n&&r.set(e,n)}return r}function di(e,t){return[`observability`,e,t.toString()]}var fi=e=>e.state.status===`error`?15e3:3e4,pi=15e3;function mi(e,t,n=!0){return be({queryKey:di(e,t),queryFn:()=>xe(`/api/observability/${e}?${t}`),enabled:n,refetchInterval:fi,staleTime:pi})}function hi(e){return e.getQueryCache().findAll({queryKey:[`observability`]}).reduce((e,t)=>Math.max(e,t.state.dataUpdatedAt),0)||null}function gi(){let e=ve(),[t,n]=(0,G.useState)(()=>hi(e));return(0,G.useEffect)(()=>e.getQueryCache().subscribe(()=>n(hi(e))),[e]),t}function _i(e){let t={};return typeof e.window==`string`&&si.some(t=>t.value===e.window)&&(t.window=e.window),typeof e.namespace==`string`&&e.namespace.trim()&&(t.namespace=e.namespace.trim()),t}var vi=[`#fafafa`,`#e6e4de`,`#bfbdb6`,`#8b8e99`,`#565b69`,`#1d2433`,`#131721`,`#0b0e14`,`#080a10`,`#05070b`],yi=[`#f3ecfd`,`#ece3fb`,`#dcc9f7`,`#d2a6ff`,`#bf94ec`,`#a97ce0`,`#9163d6`,`#7c4dcc`,`#5b32a3`,`#40236f`],bi=[`#eefbe6`,`#dcf7cc`,`#c2f0a6`,`#a5e880`,`#8fe06c`,`#7fd962`,`#66c04b`,`#4f9c3a`,`#3b7a2c`,`#2a5a1f`],xi=[`#fff5e6`,`#ffe9c9`,`#ffd79b`,`#ffc571`,`#ffbc62`,`#ffb454`,`#ef9c33`,`#c87d21`,`#9c5f16`,`#74460f`],Si=[`#fdecee`,`#fbd9dc`,`#f8b6bc`,`#f59099`,`#f37d87`,`#f26d78`,`#e04d5a`,`#c03642`,`#96262f`,`#6f1a21`],Ci=[`#e8f6ff`,`#ccebff`,`#a3daff`,`#7dcbff`,`#66c5ff`,`#59c2ff`,`#33a7e6`,`#1e86bd`,`#146694`,`#0d4a6d`],wi={dark:{text:`#bfbdb6`,muted:`#8b8e99`,grid:`#1d2433`,surface:`#131721`,border:`#565b69`},light:{text:`#4a5058`,muted:`#6b7280`,grid:`#eceef0`,surface:`#fcfcfc`,border:`#a4abb4`}},Ti={dark:[`#66d0ee`,`#a97ce0`,`#5fe8ce`,`#cb55e8`,`#41b6f8`,`#d2a6ff`],light:[`#2b93b5`,`#7c4dcc`,`#1a9c86`,`#a12fbf`,`#2f7fd4`,`#9163d6`]},Ei={micro:11,small:12,body:14,title:16,section:22,page:32},Di={display:`"Geist Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace`,body:`"Geist Variable", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif`};export{et as $,Ln as A,Pt as B,Gr as C,Y as D,er as E,hn as F,Ct as G,Dt as H,mn as I,_t as J,pt as K,Kt as L,Tn as M,vn as N,In as O,gn as P,tt as Q,Ut as R,qr as S,rr as T,Tt as U,jt as V,xt as W,ot as X,gt as Y,$e as Z,ui as _,Di as a,Ve as at,Zr as b,Ti as c,we as ct,_i as d,Ce as dt,Qe as et,li as f,Oe as ft,mi as g,gi as h,wi as i,Ue as it,En as j,Rn as k,Ei as l,U as lt,pi as m,Si as n,Ge as nt,Ci as o,Pe as ot,si as p,ke as pt,bt as q,yi as r,ze as rt,bi as s,He as st,vi as t,rt as tt,xi as u,Be as ut,ci as v,Q as w,Yr as x,oi as y,Vt as z}; \ No newline at end of file diff --git a/internal/ui/dist/index.html b/internal/ui/dist/index.html index f53ffa2c0..bb70b7973 100644 --- a/internal/ui/dist/index.html +++ b/internal/ui/dist/index.html @@ -21,13 +21,13 @@ document.documentElement.setAttribute("data-mantine-color-scheme", computed); } catch (e) {} - + - + diff --git a/internal/ui/ui.go b/internal/ui/ui.go index dd6f0a74e..d74c23036 100644 --- a/internal/ui/ui.go +++ b/internal/ui/ui.go @@ -2,6 +2,7 @@ package ui import ( "embed" + "io" "io/fs" "net/http" "path" @@ -30,7 +31,19 @@ func Handler() http.Handler { if name == "." { name = "index.html" } + if name == "robots.txt" { + // A robots.txt shipped in the build wins: this default is for a + // binary that has none, not an override of one that does. + if _, err := fs.Stat(dist, name); err != nil { + serveRobots(response) + return + } + } if _, err := fs.Stat(dist, name); err != nil { + if looksLikeAFile(name) { + http.NotFound(response, request) + return + } clone := request.Clone(request.Context()) clone.URL.Path = "/" files.ServeHTTP(response, clone) @@ -39,3 +52,34 @@ func Handler() http.Handler { files.ServeHTTP(response, request) }) } + +// robots is served rather than embedded because it is a fact about the +// application, not part of the build: every route behind it needs a session, +// so there is nothing here for a crawler to index, and a public demo should +// say so instead of answering /robots.txt with the application shell. +const robots = "User-agent: *\nDisallow: /\n" + +func serveRobots(response http.ResponseWriter) { + response.Header().Set("Content-Type", "text/plain; charset=utf-8") + response.Header().Set("Cache-Control", "public, max-age=3600") + _, _ = io.WriteString(response, robots) +} + +// looksLikeAFile reports whether a missing path was asking for an asset rather +// than a client route. The single-page fallback answered every unknown path +// with the application shell and a 200 — including /favicon.ico, a mistyped +// bundle and every probe a scanner makes — so a missing asset arrived at the +// browser as HTML that parsed as neither script nor image, and nothing in the +// response said it was missing. +// +// Client routes have no extension (/dashboards/, /chat/) — both +// parameters are UUIDs — so the last segment carrying a dot is the signal. A +// route parameter that can hold a dot (a service name, an email, a filename) +// would arrive here as a 404 instead of the application, so a new route of +// that shape needs this to become an allow-list of static paths. +// +// A trailing dot is not an extension: "/checkout." is a client route with a +// typo, not a request for a file. +func looksLikeAFile(name string) bool { + return path.Ext(name) != "" && !strings.HasSuffix(name, ".") +} diff --git a/internal/ui/ui_test.go b/internal/ui/ui_test.go index 753fa44e5..5e463eb2d 100644 --- a/internal/ui/ui_test.go +++ b/internal/ui/ui_test.go @@ -35,6 +35,41 @@ func TestHandlerServesEmbeddedSPAAndFallback(t *testing.T) { } } +func TestHandlerServesRobotsAndRefusesMissingAssets(t *testing.T) { + handler := Handler() + + robots := request(t, handler, "/robots.txt") + if robots.Code != http.StatusOK { + t.Fatalf("GET /robots.txt = %d", robots.Code) + } + if got := robots.Header().Get("Content-Type"); !strings.HasPrefix(got, "text/plain") { + t.Fatalf("robots.txt content type = %q", got) + } + if body := robots.Body.String(); !strings.Contains(body, "Disallow: /") { + t.Fatalf("robots.txt = %q", body) + } + + // A missing asset used to answer with the application shell and a 200, so + // nothing in the response said it was missing. + missing := request(t, handler, "/assets/does-not-exist.js") + if missing.Code != http.StatusNotFound { + t.Fatalf("GET a missing asset = %d, want 404", missing.Code) + } + // dist ships favicon.svg, so the .ico a browser asks for first is simply + // not there and has to say so. + if icon := request(t, handler, "/favicon.ico"); icon.Code != http.StatusNotFound { + t.Fatalf("GET /favicon.ico = %d, want 404", icon.Code) + } + if trailing := request(t, handler, "/checkout."); trailing.Code != http.StatusOK { + t.Fatalf("a trailing dot is a client route, not a file: got %d", trailing.Code) + } + + // A client route still resolves to the shell, extension or not. + if route := request(t, handler, "/chat/01a07a17-b2e2-7334-b77d-64e9ed69fa8e"); route.Code != http.StatusOK { + t.Fatalf("GET a client route = %d", route.Code) + } +} + func request(t *testing.T, handler http.Handler, target string) *httptest.ResponseRecorder { t.Helper() recorder := httptest.NewRecorder() diff --git a/ui/apps/src/components.tsx b/ui/apps/src/components.tsx index 3abe31edb..c65e6f902 100644 --- a/ui/apps/src/components.tsx +++ b/ui/apps/src/components.tsx @@ -71,11 +71,18 @@ export function usePagedItems(items: T[], pageSize = 8) { }; } +const controlLabel: Record = { first: "First page", previous: "Previous page", next: "Next page", last: "Last page" }; + export function PageControls({ page, totalPages, from, to, total, onChange }: { page: number; totalPages: number; from: number; to: number; total: number; onChange: (page: number) => void }) { if (totalPages <= 1) return null; return {from}–{to} of {total} - + {/* Mantine names the numbered controls by their own text and leaves the + four edge controls as unlabelled icon buttons — half the control set + reaches the accessibility tree as "button". */} + ({ "aria-label": `Page ${item}` })} + getControlProps={(control) => ({ "aria-label": controlLabel[control] })} /> ; } diff --git a/ui/apps/src/logs.tsx b/ui/apps/src/logs.tsx index 05d298b05..7b07af9f7 100644 --- a/ui/apps/src/logs.tsx +++ b/ui/apps/src/logs.tsx @@ -8,7 +8,7 @@ import { chartTheme, severityColor, severityHex } from "../../chart"; import { typeScale } from "../../tokens"; import type { LogEntry, Logs, Result } from "../../contracts"; import { EChart, useECharts } from "./echart"; -import { timelineTimestamp, windowLabel } from "../../format"; +import { exactTimestamp, timeZoneLabel, timelineTimestamp, windowLabel } from "../../format"; import { askAbout, useFanoutApp } from "./use-fanout-app"; import "./app.css"; @@ -51,8 +51,8 @@ function LogList({ entries, onTrace, window }: { entries: LogEntry[]; onTrace: ( const logs = usePagedItems(entries, 6); if (entries.length === 0) return } title="No visible matches">Adjust the local severity or text filter.; return <> - TimeLevelServiceMessage - {logs.pageItems.map((entry, index) => {timelineTimestamp(entry.time, window, true)}{entry.severity || "LOG"}{entry.service}{entry.body}{entry.trace_id && onTrace(entry)}>})} + Time ({timeZoneLabel(logs.pageItems[0]?.time)})LevelServiceMessage + {logs.pageItems.map((entry, index) => {timelineTimestamp(entry.time, window, true)}{entry.severity || "LOG"}{entry.service}{entry.body}{entry.trace_id && onTrace(entry)}>})}
; } diff --git a/ui/apps/src/overview.tsx b/ui/apps/src/overview.tsx index fb05127c8..0d316927f 100644 --- a/ui/apps/src/overview.tsx +++ b/ui/apps/src/overview.tsx @@ -5,7 +5,7 @@ import { createRoot } from "react-dom/client"; import { EmptyState, MetaFooter, Metric, PageControls, ViewHeader, ViewShell, ViewStatus, usePagedItems } from "./components"; import { healthColor } from "../../chart"; import type { Overview, Result, ServiceHealth } from "../../contracts"; -import { duration, integer, percent, windowLabel } from "../../format"; +import { duration, integer, percent, timeZoneLabel, windowLabel } from "../../format"; import { askAbout, useFanoutApp } from "./use-fanout-app"; import "./app.css"; @@ -51,7 +51,7 @@ function OverviewBody({ result, onService }: { result: Result; onServi ServiceTrafficP95Errors {services.pageItems.map((service) => onService(service.service)} />)} } - + ; } diff --git a/ui/apps/src/performance.tsx b/ui/apps/src/performance.tsx index e45ed5fd9..a5ce95298 100644 --- a/ui/apps/src/performance.tsx +++ b/ui/apps/src/performance.tsx @@ -8,7 +8,7 @@ import { chartTheme, healthColor, seriesColor, statusHex } from "../../chart"; import { typeScale } from "../../tokens"; import type { Endpoint, Performance, Result } from "../../contracts"; import { EChart, useECharts } from "./echart"; -import { duration, integer, percent, timelineTimestamp, windowLabel } from "../../format"; +import { duration, integer, percent, timeZoneLabel, timelineTimestamp, windowLabel } from "../../format"; import { askAbout, useFanoutApp } from "./use-fanout-app"; import "./app.css"; @@ -28,7 +28,7 @@ function PerformanceApp() { {view === "latency" && } {view === "endpoints" && askAbout(app, `Investigate ${endpoint.method} ${endpoint.path}. Explain its latency and errors.`)} />} {view === "compare" && } - + } ; } diff --git a/ui/apps/src/trace.tsx b/ui/apps/src/trace.tsx index 76972998b..604497c9f 100644 --- a/ui/apps/src/trace.tsx +++ b/ui/apps/src/trace.tsx @@ -5,7 +5,7 @@ import { createRoot } from "react-dom/client"; import { EmptyState, MetaFooter, Metric, PageControls, Tabs, ViewHeader, ViewShell, ViewStatus, usePagedItems } from "./components"; import { seriesColor, severityColor } from "../../chart"; import type { LogEntry, Result, TraceDetail, TraceSpan } from "../../contracts"; -import { duration, integer, windowLabel } from "../../format"; +import { duration, exactTimestamp, integer, timeZoneLabel, windowLabel } from "../../format"; import { askAbout, useFanoutApp } from "./use-fanout-app"; import "./app.css"; @@ -43,7 +43,7 @@ function Waterfall({ spans, dark, onSpan }: { spans: TraceSpan[]; dark: boolean; const failed = span.status.toUpperCase().includes("ERROR"); return onSpan(span)} onKeyDown={(event) => { if (event.key === "Enter" || event.key === " ") onSpan(span); }} style={{ cursor: "pointer" }}> {span.operation}{span.service} - + {duration(span.duration_ms)} ; })} @@ -64,7 +64,7 @@ function FlameGraph({ spans, dark, onSpan }: { spans: TraceSpan[]; dark: boolean {model.frames.map(({ span, lane, left, width }) => { const failed = span.status.toUpperCase().includes("ERROR"); const compact = width < 7; - return ; + return ; })} @@ -94,7 +94,7 @@ function flameModel(spans: TraceSpan[]) { function TraceLogs({ entries }: { entries: LogEntry[] }) { const logs = usePagedItems(entries, 6); if (entries.length === 0) return } title="No correlated logs">No logs in this window carry the selected trace ID.; - return <>TimeLevelServiceMessage{logs.pageItems.map((entry, index) => {new Date(entry.time).toLocaleTimeString([], { hour: "numeric", minute: "2-digit", second: "2-digit" })}{entry.severity || "LOG"}{entry.service}{entry.body})}
; + return <>Time ({timeZoneLabel(logs.pageItems[0]?.time)})LevelServiceMessage{logs.pageItems.map((entry, index) => {new Date(entry.time).toLocaleTimeString([], { hour: "numeric", minute: "2-digit", second: "2-digit" })}{entry.severity || "LOG"}{entry.service}{entry.body})}
; } function shortID(value: string) { return value.length > 12 ? `${value.slice(0, 8)}…${value.slice(-4)}` : value; } diff --git a/ui/format.ts b/ui/format.ts index d75aea510..f534b120e 100644 --- a/ui/format.ts +++ b/ui/format.ts @@ -69,3 +69,30 @@ export function timelineTimestamp(value: string, window: string, seconds = false ...(seconds ? { second: "2-digit" } as const : {}), }); } + +/** The viewer's time zone, abbreviated the way their locale writes it. + * + * Every timestamp in the product is rendered in the browser's zone and none + * of them said so, which is a real ambiguity when the reader is looking at an + * incident with someone in another office, or at a server that logs in UTC. + * + * `when` matters: an abbreviation is a property of an instant, not of a zone. + * A table of rows from before a daylight-saving change headed "PST" when its + * rows read PDT is a worse answer than no heading at all, so a caller labels + * the rows it is actually showing. */ +export function timeZoneLabel(when: Date | string | number = new Date()) { + const at = when instanceof Date ? when : new Date(when); + if (Number.isNaN(at.valueOf())) return timeZoneLabel(new Date()); + const parts = new Intl.DateTimeFormat([], { timeZoneName: "short" }).formatToParts(at); + return parts.find((part) => part.type === "timeZoneName")?.value ?? ""; +} + +/** The whole instant — date, seconds and zone — for the title of a timestamp + * that is displayed shortened. Takes whatever the caller holds, so nobody has + * to round-trip an epoch through toISOString, which throws on a bad value + * where this returns it unchanged. */ +export function exactTimestamp(value: string | number | Date) { + const date = value instanceof Date ? value : new Date(value); + if (Number.isNaN(date.valueOf())) return String(value); + return date.toLocaleString([], { year: "numeric", month: "short", day: "numeric", hour: "numeric", minute: "2-digit", second: "2-digit", timeZoneName: "short" }); +} diff --git a/ui/host/src/App.tsx b/ui/host/src/App.tsx index 65a964d0c..20567b1c7 100644 --- a/ui/host/src/App.tsx +++ b/ui/host/src/App.tsx @@ -31,7 +31,6 @@ function Session() { // dependency of the session effect, so a bump asks the server again. const [reloadCount, setReloadCount] = useState(0); const pendingPromptRef = useRef(""); - const bottomRef = useRef(null); const inputRef = useRef(null); // A turn can hold several tool calls at once, and each one ends separately. // Counting them keeps the activity line on the work still in flight instead @@ -110,8 +109,6 @@ function Session() { return () => { active = false; subscription.unsubscribe(); agent.abortRun(); }; }, [agent, agentAvailable, queryClient, reloadCount, threadID]); - useEffect(() => { bottomRef.current?.scrollIntoView({ behavior: "smooth", block: "end" }); }, [messages, running]); - useEffect(() => { if (!agentAvailable) return; const shortcuts = (event: KeyboardEvent) => { @@ -183,7 +180,7 @@ function Session() { } function reloadThread() { setReloadCount((n) => n + 1); } - return + return ; } diff --git a/ui/host/src/app-context.ts b/ui/host/src/app-context.ts index fc7363c07..ef6d9fe2a 100644 --- a/ui/host/src/app-context.ts +++ b/ui/host/src/app-context.ts @@ -13,7 +13,6 @@ export type FanoutAppContextValue = { input: string; setInput: (value: string) => void; error: string; - bottomRef: RefObject; inputRef: RefObject; send: (text: string) => Promise; submit: (event: FormEvent) => void; diff --git a/ui/host/src/chat-scroll.test.tsx b/ui/host/src/chat-scroll.test.tsx new file mode 100644 index 000000000..01884d7f5 --- /dev/null +++ b/ui/host/src/chat-scroll.test.tsx @@ -0,0 +1,126 @@ +import { act } from "react"; +import { createRoot } from "react-dom/client"; +import { afterEach, beforeEach, describe, expect, it, vi } from "vitest"; +import { useStickToBottom } from "./chat-scroll"; + +/* happy-dom does no layout, and its ResizeObserver is a no-op, so the pane's + geometry and the observer are both declared here: a ~200px viewport over + content that grows the way a turn does while its markdown lays out and its + embedded views load. */ +function sized(element: HTMLElement, { scrollHeight, clientHeight }: { scrollHeight: number; clientHeight: number }) { + Object.defineProperty(element, "scrollHeight", { value: scrollHeight, configurable: true }); + Object.defineProperty(element, "clientHeight", { value: clientHeight, configurable: true }); +} + +let resize: (() => void) | null = null; + +class FakeResizeObserver { + constructor(callback: () => void) { resize = callback; } + observe() {} + disconnect() { resize = null; } +} + +function Pane({ pane = "thread-1" }: { pane?: string }) { + const { scrollRef, contentRef } = useStickToBottom(); + return
thread
; +} + +describe("chat scrolling", () => { + beforeEach(() => { vi.stubGlobal("ResizeObserver", FakeResizeObserver); }); + afterEach(() => { vi.unstubAllGlobals(); document.body.innerHTML = ""; resize = null; }); + + async function mount(pane?: string) { + const container = document.createElement("div"); + document.body.append(container); + const root = createRoot(container); + await act(async () => root.render()); + const scroller = container.querySelector('[data-testid="scroller"]')!; + sized(scroller, { scrollHeight: 200, clientHeight: 200 }); + return { root, scroller, container }; + } + + /** Move the pane and tell it, the way the browser does. */ + function scrollTo(scroller: HTMLElement, top: number) { + scroller.scrollTop = top; + scroller.dispatchEvent(new Event("scroll")); + } + + it("follows content that keeps growing after the message arrived", async () => { + const { root, scroller } = await mount(); + expect(scroller.scrollTop).toBe(0); + // The answer renders, then its markdown and embedded views lay out. + sized(scroller, { scrollHeight: 900, clientHeight: 200 }); + act(() => resize?.()); + expect(scroller.scrollTop).toBe(900); + await act(async () => root.unmount()); + }); + + it("stays pinned when the pane is moved by something that is not the reader", async () => { + // Position alone cannot tell these apart from a reader scrolling up: the + // pane's own scrolling reports intermediate positions, and the browser + // clamps scrollTop every time a streaming answer briefly gets shorter. + // Both used to unpin the pane and abandon a reader mid-answer. + const { root, scroller } = await mount(); + sized(scroller, { scrollHeight: 4000, clientHeight: 200 }); + scrollTo(scroller, 1200); + sized(scroller, { scrollHeight: 10000, clientHeight: 200 }); + act(() => resize?.()); + expect(scroller.scrollTop).toBe(10000); + await act(async () => root.unmount()); + }); + + it("lets go for a wheel, and for a key, and for a scrollbar drag", async () => { + for (const leave of [ + (scroller: HTMLElement) => scroller.dispatchEvent(new Event("wheel")), + (scroller: HTMLElement) => scroller.dispatchEvent(new KeyboardEvent("keydown", { key: "PageUp", bubbles: true })), + (scroller: HTMLElement) => scroller.dispatchEvent(new Event("pointerdown")), + ]) { + const { root, scroller } = await mount(); + sized(scroller, { scrollHeight: 4000, clientHeight: 200 }); + leave(scroller); + scrollTo(scroller, 1200); + sized(scroller, { scrollHeight: 10000, clientHeight: 200 }); + act(() => resize?.()); + expect(scroller.scrollTop).toBe(1200); + await act(async () => root.unmount()); + window.dispatchEvent(new Event("pointerup")); + document.body.innerHTML = ""; + } + }); + + it("pins again when the reader comes back to the bottom", async () => { + const { root, scroller } = await mount(); + sized(scroller, { scrollHeight: 4000, clientHeight: 200 }); + scroller.dispatchEvent(new Event("wheel")); + scrollTo(scroller, 1200); + // Back to within the anchor's slack of the bottom. + scrollTo(scroller, 3790); + sized(scroller, { scrollHeight: 6000, clientHeight: 200 }); + act(() => resize?.()); + expect(scroller.scrollTop).toBe(6000); + await act(async () => root.unmount()); + }); + + // Naming a draft thread moves the conversation from /chat to /chat/. + // React reconciles those two routes into one component instance and swaps + // the DOM underneath it, so anything wired once stayed on nodes that were no + // longer on the page — the answer arrived off-screen with the pane at + // scrollTop 0. + it("re-arms on the new nodes when the route swaps them", async () => { + const container = document.createElement("div"); + document.body.append(container); + const root = createRoot(container); + await act(async () => root.render()); + const first = container.querySelector('[data-testid="scroller"]')!; + sized(first, { scrollHeight: 200, clientHeight: 200 }); + + // The route changes: same component, a new scroller underneath it. + await act(async () => root.render()); + const second = container.querySelector('[data-testid="scroller"]')!; + expect(second).not.toBe(first); + sized(second, { scrollHeight: 900, clientHeight: 200 }); + act(() => resize?.()); + expect(second.scrollTop).toBe(900); + await act(async () => root.unmount()); + }); +}); diff --git a/ui/host/src/chat-scroll.ts b/ui/host/src/chat-scroll.ts new file mode 100644 index 000000000..045383d9e --- /dev/null +++ b/ui/host/src/chat-scroll.ts @@ -0,0 +1,102 @@ +import { useCallback, useRef } from "react"; + +/** How far from the bottom still counts as "at the bottom". A reader who has + * scrolled up by more than this has chosen a place in the thread, and moving + * them takes it away. */ +const anchorSlack = 64; + +/** How long after a wheel, a drag or a key the resulting scroll still counts + * as that reader's. Scroll events land a frame or two behind the input. */ +const inputSettles = 300; + +/** Keeps a chat pane pinned to its newest message. + * + * Scrolling once per message does not hold: a turn's height keeps growing + * after the message that carried it — markdown lays out, an embedded view + * loads in its iframe, a lazy chunk arrives — and each of those pushes the + * answer below the fold again. The measured result was an answer that + * arrived off-screen with the pane sitting at scrollTop 0, and a 10,000px + * reply whose first screen was all the reader ever saw. + * + * Three things make it hold. + * + * It watches the content's size rather than the message list, so every late + * arrival counts, whoever produced it. + * + * It wires itself from ref callbacks rather than an effect. Naming a draft + * thread moves the same conversation from /chat to /chat/ without + * changing the thread's identity: React reconciles the two routes into one + * component instance and swaps the DOM underneath it, so an effect keyed on + * anything the component knows about does not re-run — while the listeners + * and the observer it installed are still on the discarded nodes. (A plain + * ref would have survived that: React repopulates `.current`. It is the + * wiring, not the ref, that goes stale.) A ref callback fires exactly when + * the node it is given changes, which is the event that matters. + * + * It lets go only for an actual wheel, drag or key. Position cannot be used + * to infer that the reader left: the pane's own scrolling moves scrollTop, + * and so does the browser clamping it every time a streaming answer briefly + * gets shorter. Both were read as scrolling up. + */ +export function useStickToBottom() { + const scroller = useRef(null); + const stuck = useRef(true); + const detach = useRef<() => void>(() => {}); + const observer = useRef(null); + + const follow = useCallback(() => { + const node = scroller.current; + if (node && stuck.current) node.scrollTop = node.scrollHeight; + }, []); + + const scrollRef = useCallback((node: Scroller | null) => { + detach.current(); + scroller.current = node; + if (!node) return; + + let handledAt = 0; + let dragging = false; + const handled = () => { handledAt = Date.now(); }; + const onPointerDown = () => { dragging = true; }; + const onPointerUp = () => { dragging = false; }; + const onScroll = () => { + if (node.scrollHeight - node.clientHeight - node.scrollTop <= anchorSlack) stuck.current = true; + else if (dragging || Date.now() - handledAt < inputSettles) stuck.current = false; + }; + node.addEventListener("scroll", onScroll, { passive: true }); + node.addEventListener("wheel", handled, { passive: true }); + node.addEventListener("touchmove", handled, { passive: true }); + node.addEventListener("keydown", handled); + node.addEventListener("pointerdown", onPointerDown); + window.addEventListener("pointerup", onPointerUp); + detach.current = () => { + node.removeEventListener("scroll", onScroll); + node.removeEventListener("wheel", handled); + node.removeEventListener("touchmove", handled); + node.removeEventListener("keydown", handled); + node.removeEventListener("pointerdown", onPointerDown); + window.removeEventListener("pointerup", onPointerUp); + detach.current = () => {}; + }; + + // A pane that opens on an existing thread opens at its newest message, + // the way returning to a conversation should. + stuck.current = true; + node.scrollTop = node.scrollHeight; + }, []); + + const contentRef = useCallback((node: Content | null) => { + observer.current?.disconnect(); + observer.current = null; + if (!node) return; + observer.current = new ResizeObserver(follow); + observer.current.observe(node); + }, [follow]); + + const toBottom = useCallback(() => { + stuck.current = true; + follow(); + }, [follow]); + + return { scrollRef, contentRef, toBottom }; +} diff --git a/ui/host/src/chat.test.tsx b/ui/host/src/chat.test.tsx index b74ca47e2..9f6f8c9b3 100644 --- a/ui/host/src/chat.test.tsx +++ b/ui/host/src/chat.test.tsx @@ -9,7 +9,7 @@ import { ChatPage } from "./chat"; function value(overrides: Partial = {}): FanoutAppContextValue { return { agentAvailable: true, threadID: "thread-1", threadMissing: false, messages: [], messageTimes: {}, ready: true, running: false, activity: "", - input: "", setInput: vi.fn(), error: "", bottomRef: createRef(), inputRef: createRef(), + input: "", setInput: vi.fn(), error: "", inputRef: createRef(), send: vi.fn(async () => undefined), submit: vi.fn((event: FormEvent) => event.preventDefault()), stop: vi.fn(), retry: vi.fn(), reloadThread: vi.fn(), openChat: vi.fn(), newThread: vi.fn(), selectThread: vi.fn(), ...overrides, diff --git a/ui/host/src/chat.tsx b/ui/host/src/chat.tsx index 2b258dfc9..0b6da7cf8 100644 --- a/ui/host/src/chat.tsx +++ b/ui/host/src/chat.tsx @@ -1,12 +1,14 @@ import type { Message } from "@ag-ui/client"; import { ActionIcon, Alert, Box, Button, Center, Container, Group, Loader, Paper, Stack, Table, Text, Textarea, Title, Tooltip, Typography } from "@mantine/core"; import { Check, Copy, PaperPlaneTilt, Stop } from "@phosphor-icons/react"; -import { lazy, Suspense, type ComponentProps, type ReactNode } from "react"; +import { lazy, Suspense, useEffect, type ComponentProps, type ReactNode } from "react"; import Markdown, { type Components } from "react-markdown"; import remarkGfm from "remark-gfm"; import { useFanoutApp } from "./app-context"; +import { useStickToBottom } from "./chat-scroll"; import { BrandMark } from "./brand"; import { useCopy } from "./copy"; +import { exactTimestamp } from "../../format"; import type { MCPAppContent } from "./mcp-app-frame"; const MCPAppFrame = lazy(() => import("./mcp-app-frame")); @@ -23,12 +25,20 @@ export function toolTitle(name: string) { } export function ChatPage() { - const { agentAvailable, messages, messageTimes, ready, running, activity, error, threadMissing, bottomRef, send, retry, reloadThread, newThread } = useFanoutApp(); + const { agentAvailable, messages, messageTimes, ready, running, activity, error, threadMissing, send, retry, reloadThread, newThread } = useFanoutApp(); + const { scrollRef, contentRef, toBottom } = useStickToBottom(); + // Sending is a request to see the answer, so it returns a reader who had + // scrolled back through the thread to the bottom of it. + const lastSent = messages.filter((message) => message.role === "user").at(-1)?.id; + useEffect(() => { if (lastSent) toBottom(); }, [lastSent, toBottom]); if (!agentAvailable) return Optional capabilityChat is not configuredAdd an AI provider key to enable chat. Telemetry ingest, dashboards, traces, logs, and metrics remain available without it.; const visibleMessages = messages.filter((message) => message.role !== "tool"); return - - + {/* A scroll region has to be reachable without a mouse. Chrome makes a + scroller focusable only when it holds no focusable children, and this + one holds copy buttons and links, so it says so itself. */} + + {threadMissing && It was deleted, or the link is wrong.} {/* A thread whose load failed never becomes ready, so showing the loader here would spin forever: state the failure instead. Retry @@ -42,7 +52,6 @@ export function ChatPage() { {visibleMessages.map((message) => )} {running && {activity || "Analyzing your system"}} {error && } -
} @@ -105,7 +114,7 @@ function ChatMessage({ message, time, send }: { message: Message; time?: number; ? {content} : {content}} - {stamp && {stamp}} + {stamp && time && {stamp}} {!user && } ; diff --git a/ui/host/src/dashboard.tsx b/ui/host/src/dashboard.tsx index 3729c8ba2..480ad708c 100644 --- a/ui/host/src/dashboard.tsx +++ b/ui/host/src/dashboard.tsx @@ -5,10 +5,11 @@ import { useEffect, useMemo, useState } from "react"; import { Responsive, WidthProvider } from "react-grid-layout/legacy"; import { dashboardsQueryKey, getJSON, type DashboardRecord, type DashboardState, type DashboardSummary } from "./api"; import type { Overview } from "../../contracts"; +import { exactTimestamp, timeZoneLabel } from "../../format"; import { authorizedFetch } from "./auth"; import { compactDashboardLayout, nextDashboardSlot, widgetDefaults, widgetTypes, type DashboardLayoutItem, type WidgetType } from "./dashboard-layout"; import { createID } from "./id"; -import { dashboardWindows, useLastUpdated, useObservability, widgetParams, type Filters, type WidgetConfig } from "./widgets/data"; +import { dashboardWindows, freshFor, useLastUpdated, useObservability, widgetParams, type Filters, type WidgetConfig } from "./widgets/data"; import WidgetCard, { widgetTitles } from "./widgets/widget-card"; const Grid = WidthProvider(Responsive); @@ -25,7 +26,7 @@ function widgetSizeFor(type: string) { export default function Dashboard({ dashboardID = "", agentAvailable, onOpenChat, onDashboardChange, urlFilters, onFiltersChange }: { dashboardID?: string; agentAvailable: boolean; onOpenChat: (prompt?: string) => void; onDashboardChange?: (id: string, replace?: boolean) => void; urlFilters?: Partial; onFiltersChange?: (filters: Filters) => void }) { const queryClient = useQueryClient(); const dark = useComputedColorScheme("light") === "dark"; - const dashboards = useQuery({ queryKey: dashboardsQueryKey, queryFn: () => getJSON<{ dashboards: DashboardSummary[] }>("/api/dashboards"), refetchInterval: 30_000 }); + const dashboards = useQuery({ queryKey: dashboardsQueryKey, queryFn: () => getJSON<{ dashboards: DashboardSummary[] }>("/api/dashboards"), refetchInterval: 30_000, staleTime: freshFor }); const [selectedID, setSelectedID] = useState(() => dashboardID || localStorage.getItem(dashboardKey) || ""); const save = useMutation({ mutationFn: async (next: DashboardState) => { @@ -39,7 +40,7 @@ export default function Dashboard({ dashboardID = "", agentAvailable, onOpenChat onError: (cause) => console.error("Dashboard save failed", cause), }); // Pause polling while a save is in flight or failing so the refetch cannot clobber unsaved local edits. - const selected = useQuery({ queryKey: ["dashboard", selectedID], queryFn: () => getJSON(`/api/dashboards/${encodeURIComponent(selectedID)}`), enabled: Boolean(selectedID), refetchInterval: save.isPending || save.isError ? false : 30_000 }); + const selected = useQuery({ queryKey: ["dashboard", selectedID], queryFn: () => getJSON(`/api/dashboards/${encodeURIComponent(selectedID)}`), enabled: Boolean(selectedID), refetchInterval: save.isPending || save.isError ? false : 30_000, staleTime: freshFor }); const [state, setState] = useState(emptyState); const [breakpoint, setBreakpoint] = useState("lg"); // While the address bar names a namespace it decides what is shown, which @@ -133,7 +134,7 @@ export default function Dashboard({ dashboardID = "", agentAvailable, onOpenChat {/* The row wraps rather than squeezing: at 390px a single line clipped both button labels to "Add vie" and "Ask Fano". */} - {updatedAt && Updated {new Intl.DateTimeFormat(undefined, { hour: "numeric", minute: "2-digit" }).format(new Date(updatedAt))}} + {updatedAt && Updated {new Intl.DateTimeFormat(undefined, { hour: "numeric", minute: "2-digit" }).format(new Date(updatedAt))} {timeZoneLabel(updatedAt)}} {widgetTypes.filter((type) => agentAvailable || type !== "assistant").map((type) => add(type)}>{widgetTitles[type]})} diff --git a/ui/host/src/format.test.ts b/ui/host/src/format.test.ts index f82795e2e..9b0f4aaca 100644 --- a/ui/host/src/format.test.ts +++ b/ui/host/src/format.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from "vitest"; -import { duration, percent } from "../../format"; +import { duration, exactTimestamp, percent, timeZoneLabel } from "../../format"; describe("duration", () => { it("keeps sub-millisecond values legible", () => { @@ -71,3 +71,27 @@ describe("duration seams", () => { expect(duration(-5)).toBe("-5.0ms"); }); }); + +describe("time zone", () => { + // Every timestamp is rendered in the browser's zone and none of them said + // so, which is ambiguous the moment two people read the same incident from + // different offices. + it("names the viewer's zone and spells an instant out in full", () => { + expect(timeZoneLabel(new Date("2026-09-07T14:00:00Z"))).not.toBe(""); + // An abbreviation belongs to an instant, not to a zone: a table of rows + // from before a daylight-saving change must not be headed with today's. + expect(timeZoneLabel("2026-09-07T14:00:00Z")).toBe(timeZoneLabel(new Date("2026-09-07T14:00:00Z"))); + expect(timeZoneLabel("not a time")).toBe(timeZoneLabel()); + const exact = exactTimestamp("2026-09-07T14:00:00Z"); + expect(exact).toContain("2026"); + expect(exact).toMatch(/\d{1,2}:\d{2}:\d{2}/); + expect(exact).toContain(timeZoneLabel(new Date("2026-09-07T14:00:00Z"))); + // A value that is not a time is passed through rather than shown as + // "Invalid Date". + expect(exactTimestamp("not a time")).toBe("not a time"); + // Callers hold epochs and Dates as often as strings, and a round-trip + // through toISOString throws where this returns the value unchanged. + expect(exactTimestamp(Date.parse("2026-09-07T14:00:00Z"))).toBe(exact); + expect(exactTimestamp(new Date("2026-09-07T14:00:00Z"))).toBe(exact); + }); +}); diff --git a/ui/host/src/rail.tsx b/ui/host/src/rail.tsx index 5f4348273..a56323b64 100644 --- a/ui/host/src/rail.tsx +++ b/ui/host/src/rail.tsx @@ -6,7 +6,7 @@ import { useEffect, useImperativeHandle, useMemo, useRef, useState, type Ref } f import { dashboardsQueryKey, getJSON, threadHistoryQueryKey, type DashboardSummary } from "./api"; import type { Overview } from "../../contracts"; import { authorizedFetch } from "./auth"; -import { useObservability, widgetParams } from "./widgets/data"; +import { freshFor, useObservability, widgetParams } from "./widgets/data"; export type RailHandle = { focusSearch(): void }; @@ -57,7 +57,7 @@ export default function Rail({ agentAvailable, activeThreadID, activeDashboardID getNextPageParam: (last) => last.nextCursor || undefined, enabled: agentAvailable, }); - const dashboards = useQuery({ queryKey: dashboardsQueryKey, queryFn: () => getJSON<{ dashboards: DashboardSummary[] }>("/api/dashboards"), refetchInterval: 30_000 }); + const dashboards = useQuery({ queryKey: dashboardsQueryKey, queryFn: () => getJSON<{ dashboards: DashboardSummary[] }>("/api/dashboards"), refetchInterval: 30_000, staleTime: freshFor }); const threads = useMemo(() => history.data?.pages.flatMap((page) => page.threads) ?? [], [history.data]); const groups = useMemo(() => groupThreads(threads), [threads]); // Searching for a service used to answer "No matching chats / No matching diff --git a/ui/host/src/shell.test.tsx b/ui/host/src/shell.test.tsx new file mode 100644 index 000000000..2b111523f --- /dev/null +++ b/ui/host/src/shell.test.tsx @@ -0,0 +1,38 @@ +import { MantineProvider } from "@mantine/core"; +import { act } from "react"; +import { createRoot } from "react-dom/client"; +import { afterEach, describe, expect, it, vi } from "vitest"; +import { ColorSchemeToggle } from "./shell"; + +async function mount() { + const container = document.createElement("div"); + document.body.append(container); + const root = createRoot(container); + await act(async () => root.render()); + return { root, button: document.querySelector('button[aria-label^="Switch to"]')! }; +} + +const tooltip = () => document.querySelectorAll('.mantine-Tooltip-tooltip, [role="tooltip"]').length; + +describe("colour scheme toggle", () => { + afterEach(() => { document.body.innerHTML = ""; }); + + it("closes its tooltip on the click that makes it wrong", async () => { + const { root, button } = await mount(); + await act(async () => { button.dispatchEvent(new MouseEvent("mouseover", { bubbles: true })); }); + expect(tooltip()).toBe(1); + + await act(async () => { button.click(); }); + await vi.waitFor(() => expect(tooltip()).toBe(0)); + await act(async () => root.unmount()); + }); + + it("still answers to keyboard focus, which taking control of the tooltip could have broken", async () => { + const { root, button } = await mount(); + await act(async () => { button.dispatchEvent(new FocusEvent("focus", { bubbles: false })); button.dispatchEvent(new FocusEvent("focusin", { bubbles: true })); }); + expect(tooltip()).toBe(1); + await act(async () => { button.dispatchEvent(new FocusEvent("blur", { bubbles: false })); button.dispatchEvent(new FocusEvent("focusout", { bubbles: true })); }); + await vi.waitFor(() => expect(tooltip()).toBe(0)); + await act(async () => root.unmount()); + }); +}); diff --git a/ui/host/src/shell.tsx b/ui/host/src/shell.tsx index 8e9805b85..4cff67e6c 100644 --- a/ui/host/src/shell.tsx +++ b/ui/host/src/shell.tsx @@ -86,14 +86,25 @@ export default function Shell({ children }: { children: ReactNode }) { ; } -function ColorSchemeToggle() { +/* Exported for shell.test.tsx: reaching it through Shell would drag in the + router, the app context and a viewer. */ +export function ColorSchemeToggle() { const { setColorScheme } = useMantineColorScheme(); // Reading the computed scheme rather than the stored one means the button // offers the opposite of what is on screen even while the setting is "auto". const scheme = useComputedColorScheme("light", { getInitialValueInEffect: true }); const next = scheme === "dark" ? "light" : "dark"; - return - setColorScheme(next)}> + // The tooltip describes what the button will do, and the click changes that. + // The label is reactive, so what stays on screen is not wrong — it is a + // sentence rewriting itself under a stationary cursor, which reads as the + // page arguing with itself. It closes on the click and comes back on the + // next hover or focus. + const [tip, setTip] = useState(false); + return + setTip(true)} onMouseLeave={() => setTip(false)} + onFocus={() => setTip(true)} onBlur={() => setTip(false)} + onClick={() => { setTip(false); setColorScheme(next); }}> {scheme === "dark" ? : } ; diff --git a/ui/host/src/widgets/data.test.tsx b/ui/host/src/widgets/data.test.tsx index 9cd078657..2333ce779 100644 --- a/ui/host/src/widgets/data.test.tsx +++ b/ui/host/src/widgets/data.test.tsx @@ -51,4 +51,28 @@ describe("useObservability and useLastUpdated", () => { expect(String(fetchMock.mock.calls[0][0])).toBe("/api/observability/overview?window=1h"); await act(async () => root.unmount()); }); + + // Opening /dashboards renders the default dashboard and then navigates to + // its own URL, which unmounts the pane and mounts a new one. Every widget + // asked the server again on that second mount. + it("does not ask again when a pane is remounted moments later", async () => { + function Probe() { + const overview = useObservability<{ health: string }>("overview", new URLSearchParams({ window: "1h" })); + return
{overview.data?.data.health ?? "loading"}
; + } + const client = new QueryClient({ defaultOptions: { queries: { retry: false } } }); + const mount = async () => { + const container = document.createElement("div"); + document.body.append(container); + const root = createRoot(container); + await act(async () => root.render()); + await vi.waitFor(() => expect(container.textContent).toContain("healthy")); + return root; + }; + const first = await mount(); + await act(async () => first.unmount()); + const second = await mount(); + expect(fetchMock).toHaveBeenCalledTimes(1); + await act(async () => second.unmount()); + }); }); diff --git a/ui/host/src/widgets/data.ts b/ui/host/src/widgets/data.ts index 7e16098de..ca68bb9e9 100644 --- a/ui/host/src/widgets/data.ts +++ b/ui/host/src/widgets/data.ts @@ -46,12 +46,24 @@ export function observabilityKey(kind: ObservabilityKind, params: URLSearchParam // a widget recovers without a manual refresh. const refetchInterval = (query: { state: { status: string } }) => (query.state.status === "error" ? 15_000 : 30_000); +/** How long an answer is treated as current. + * + * Opening /dashboards renders the default dashboard and then navigates to its + * own URL, which unmounts the pane and mounts a new one. With nothing held + * fresh, that second mount asked the server for the overview, the service map + * and the performance summary all over again — a measured thirteen requests + * for a page that needs seven, and the same again on every focus of the tab. + * Half the poll interval keeps a remount free without letting a widget show + * anything the poll would not have shown anyway. */ +export const freshFor = 15_000; + export function useObservability(kind: ObservabilityKind, params: URLSearchParams, enabled = true): UseQueryResult> { return useQuery({ queryKey: observabilityKey(kind, params), queryFn: () => getJSON>(`/api/observability/${kind}?${params}`), enabled, refetchInterval, + staleTime: freshFor, }); } diff --git a/ui/host/src/widgets/logs.tsx b/ui/host/src/widgets/logs.tsx index 1093db122..89e4c999e 100644 --- a/ui/host/src/widgets/logs.tsx +++ b/ui/host/src/widgets/logs.tsx @@ -4,7 +4,7 @@ import { useMemo } from "react"; import type { Logs } from "../../../contracts"; import { chartTheme, severityColor, severityHex } from "../../../chart"; import { typeScale } from "../../../tokens"; -import { timelineTimestamp } from "../../../format"; +import { exactTimestamp, timelineTimestamp } from "../../../format"; import { EChart, useECharts } from "../echart"; import { useObservability, widgetParams } from "./data"; import { Empty, WidgetError } from "./pieces"; @@ -39,7 +39,7 @@ export default function LogsWidget({ widget, filters, dark }: WidgetBodyProps) { {entries.map((entry, index) => - {result ? timelineTimestamp(entry.time, result.provenance.window, true) : entry.time} + {result ? timelineTimestamp(entry.time, result.provenance.window, true) : entry.time} {/* The body cell takes the whole row, so every other cell has to say it will not be squeezed. A Badge is an inline-grid with hidden overflow: squeeze it and the track collapses and the label